svn commit: r338347 - in head: sys/conf sys/modules tools/build/options
Author: imp Date: Tue Aug 28 14:46:49 2018 New Revision: 338347 URL: https://svnweb.freebsd.org/changeset/base/338347 Log: Put building of drm and drm2 modules behind options. Make the building of drm dependent on MK_MODULE_DRM and the building of module drm2 on MK_MODULE_DRM2. The defaults are unchanged. Approved by: re@ (gjb) Differential Review: https://reviews.freebsd.org/D16894 Added: head/tools/build/options/WITHOUT_MODULE_DRM (contents, props changed) head/tools/build/options/WITHOUT_MODULE_DRM2 (contents, props changed) head/tools/build/options/WITH_MODULE_DRM (contents, props changed) head/tools/build/options/WITH_MODULE_DRM2 (contents, props changed) Modified: head/sys/conf/kern.opts.mk head/sys/modules/Makefile Modified: head/sys/conf/kern.opts.mk == --- head/sys/conf/kern.opts.mk Tue Aug 28 14:33:04 2018(r338346) +++ head/sys/conf/kern.opts.mk Tue Aug 28 14:46:49 2018(r338347) @@ -38,6 +38,8 @@ __DEFAULT_YES_OPTIONS = \ IPSEC_SUPPORT \ ISCSI \ KERNEL_SYMBOLS \ +MODULE_DRM \ +MODULE_DRM2 \ NETGRAPH \ PF \ SOURCELESS_HOST \ Modified: head/sys/modules/Makefile == --- head/sys/modules/Makefile Tue Aug 28 14:33:04 2018(r338346) +++ head/sys/modules/Makefile Tue Aug 28 14:46:49 2018(r338347) @@ -583,8 +583,12 @@ _cpuctl= cpuctl _cpufreq= cpufreq _cs= cs _dpms= dpms +.if ${MK_MODULE_DRM} != "no" _drm= drm +.endif +.if ${MK_MODULE_DRM2} != "no" _drm2= drm2 +.endif _ed= ed _em= em _ena= ena @@ -781,7 +785,9 @@ _cardbus= cardbus _cbb= cbb _cfi= cfi _cpufreq= cpufreq +.if ${MK_MODULE_DRM} != "no" _drm= drm +.endif _exca= exca _ffec= ffec _nvd= nvd @@ -791,7 +797,9 @@ _wi=wi .endif .if ${MACHINE_ARCH} == "powerpc64" +.if ${MK_MODULE_DRM2} != "no" _drm2= drm2 +.endif _ipmi= ipmi .endif .if ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "powerpc" Added: head/tools/build/options/WITHOUT_MODULE_DRM == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_MODULE_DRM Tue Aug 28 14:46:49 2018 (r338347) @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Disable creation of old drm video modules. + Added: head/tools/build/options/WITHOUT_MODULE_DRM2 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_MODULE_DRM2Tue Aug 28 14:46:49 2018(r338347) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Disable creation of old drm2 video modules. Added: head/tools/build/options/WITH_MODULE_DRM == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_MODULE_DRMTue Aug 28 14:46:49 2018 (r338347) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Enable creation of old drm video modules. Added: head/tools/build/options/WITH_MODULE_DRM2 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_MODULE_DRM2 Tue Aug 28 14:46:49 2018 (r338347) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Enable creation of old drm2 video modules. ___ 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: r338348 - in head/sys/dev: drm drm2
Author: imp Date: Tue Aug 28 14:46:55 2018 New Revision: 338348 URL: https://svnweb.freebsd.org/changeset/base/338348 Log: Add big, nasty abandonware tags to this code. This code works for some people, but hasn't been updated in a long time. Still allow people to use this code for the moment, but put a big, nasty obsolete message to inform and encourage people to move to the port. Approved by: re@ (gjb) Differential Review: https://reviews.freebsd.org/D16894 Modified: head/sys/dev/drm/drm.h head/sys/dev/drm/drm_drv.c head/sys/dev/drm2/drm_os_freebsd.c head/sys/dev/drm2/drm_os_freebsd.h Modified: head/sys/dev/drm/drm.h == --- head/sys/dev/drm/drm.h Tue Aug 28 14:46:49 2018(r338347) +++ head/sys/dev/drm/drm.h Tue Aug 28 14:46:55 2018(r338348) @@ -1145,4 +1145,15 @@ typedef struct drm_mm_init_arg drm_mm_init_arg_t; typedef enum drm_bo_type drm_bo_type_t; #endif +#define DRM_PORT "graphics/drm-legacy-kmod" + +#define DRM_OBSOLETE(dev) \ +do { \ + device_printf(dev, "===\n"); \ + device_printf(dev, "This code is obsolete abandonware. Install the " DRM_PORT " pkg\n"); \ + device_printf(dev, "===\n"); \ + gone_in_dev(dev, 13, "drm drivers"); \ +} while (0) + + #endif Modified: head/sys/dev/drm/drm_drv.c == --- head/sys/dev/drm/drm_drv.c Tue Aug 28 14:46:49 2018(r338347) +++ head/sys/dev/drm/drm_drv.c Tue Aug 28 14:46:55 2018(r338348) @@ -174,7 +174,8 @@ int drm_probe(device_t kdev, drm_pci_id_list_t *idlist DRM_DEBUG("desc : %s\n", device_get_desc(kdev)); device_set_desc(kdev, id_entry->name); } - return 0; + DRM_OBSOLETE(kdev); + return BUS_PROBE_GENERIC; } return ENXIO; Modified: head/sys/dev/drm2/drm_os_freebsd.c == --- head/sys/dev/drm2/drm_os_freebsd.c Tue Aug 28 14:46:49 2018 (r338347) +++ head/sys/dev/drm2/drm_os_freebsd.c Tue Aug 28 14:46:55 2018 (r338348) @@ -126,7 +126,8 @@ drm_probe_helper(device_t kdev, const drm_pci_id_list_ device_get_nameunit(kdev), id_entry->name); device_set_desc(kdev, id_entry->name); } - return (0); + DRM_OBSOLETE(kdev); + return (-BUS_PROBE_GENERIC); } return (-ENXIO); Modified: head/sys/dev/drm2/drm_os_freebsd.h == --- head/sys/dev/drm2/drm_os_freebsd.h Tue Aug 28 14:46:49 2018 (r338347) +++ head/sys/dev/drm2/drm_os_freebsd.h Tue Aug 28 14:46:55 2018 (r338348) @@ -154,6 +154,20 @@ typedef void irqreturn_t; *(volatile u_int64_t *)(((vm_offset_t)(map)->handle) + \ (vm_offset_t)(offset)) = htole64(val) +#ifdef __LP64__ +#define DRM_PORT "graphics/drm-stable-kmod" +#else +#define DRM_PORT "graphics/drm-legacy-kmod" +#endif + +#define DRM_OBSOLETE(dev) \ +do { \ + device_printf(dev, "===\n"); \ + device_printf(dev, "This code is obsolete abandonware. Install the " DRM_PORT " pkg\n"); \ + device_printf(dev, "===\n"); \ + gone_in_dev(dev, 13, "drm2 drivers"); \ +} while (0) + /* DRM_READMEMORYBARRIER() prevents reordering of reads. * DRM_WRITEMEMORYBARRIER() prevents reordering of writes. * DRM_MEMORYBARRIER() prevents reordering of reads and writes. ___ 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: r338349 - head/share/man/man5
Author: imp Date: Tue Aug 28 14:53:03 2018 New Revision: 338349 URL: https://svnweb.freebsd.org/changeset/base/338349 Log: Regen src.conf.5 after r338347. Approved by: re@ (gjb) Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 == --- head/share/man/man5/src.conf.5 Tue Aug 28 14:46:55 2018 (r338348) +++ head/share/man/man5/src.conf.5 Tue Aug 28 14:53:03 2018 (r338349) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd August 16, 2018 +.Dd August 28, 2018 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1184,8 +1184,14 @@ Enable firewire support in /boot/loader on x86. This o on all other platforms. .It Va WITHOUT_LOADER_GELI Disable inclusion of GELI crypto support in the boot chain binaries. +.Pp +This is a default setting on +sparc64/sparc64. .It Va WITH_LOADER_LUA Set to build LUA bindings for the boot loader. +.Pp +This is a default setting on +amd64/amd64, arm/arm, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe, riscv/riscv64 and riscv/riscv64sf. .It Va WITHOUT_LOADER_OFW Disable building of openfirmware bootloader components. .Pp @@ -1342,6 +1348,11 @@ Set to build .Pp This is a default setting on amd64/amd64, arm64/aarch64, i386/i386, powerpc/powerpc64 and sparc64/sparc64. +.It Va WITHOUT_MODULE_DRM +Disable creation of old drm video modules. + +.It Va WITHOUT_MODULE_DRM2 +Disable creation of old drm2 video modules. .It Va WITH_NAND Set to build the NAND Flash components. .It Va WITHOUT_NDIS ___ 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: r338350 - head/usr.sbin/nfsuserd
Author: markj Date: Tue Aug 28 15:18:14 2018 New Revision: 338350 URL: https://svnweb.freebsd.org/changeset/base/338350 Log: Add missing endpwent() and endgrent() calls to nfsuserd(8). PR: 230937 Submitted by: Peter Eriksson Reviewed by: rmacklem Approved by: re (gjb) MFC after:1 week Modified: head/usr.sbin/nfsuserd/nfsuserd.c Modified: head/usr.sbin/nfsuserd/nfsuserd.c == --- head/usr.sbin/nfsuserd/nfsuserd.c Tue Aug 28 14:53:03 2018 (r338349) +++ head/usr.sbin/nfsuserd/nfsuserd.c Tue Aug 28 15:18:14 2018 (r338350) @@ -334,6 +334,7 @@ main(int argc, char *argv[]) #endif i++; } + endgrent(); /* * Loop around adding all users. @@ -382,6 +383,7 @@ main(int argc, char *argv[]) #endif i++; } + endpwent(); /* * I should feel guilty for not calling this for all the above exit() ___ 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: r338352 - head/usr.bin/last
Author: philip Date: Tue Aug 28 17:10:19 2018 New Revision: 338352 URL: https://svnweb.freebsd.org/changeset/base/338352 Log: Add libxo(3) support to last(1). Reviewed by: kp Approved by: re (gjb) MFC after:1 week Relnotes: yes Differential Revision:https://reviews.freebsd.org/D16922 Modified: head/usr.bin/last/Makefile head/usr.bin/last/last.1 head/usr.bin/last/last.c Modified: head/usr.bin/last/Makefile == --- head/usr.bin/last/Makefile Tue Aug 28 17:09:41 2018(r338351) +++ head/usr.bin/last/Makefile Tue Aug 28 17:10:19 2018(r338352) @@ -2,6 +2,7 @@ # $FreeBSD$ PROG= last +LIBADD=xo NO_WFORMAT= Modified: head/usr.bin/last/last.1 == --- head/usr.bin/last/last.1Tue Aug 28 17:09:41 2018(r338351) +++ head/usr.bin/last/last.1Tue Aug 28 17:10:19 2018(r338352) @@ -28,7 +28,7 @@ .\" @(#)last.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd June 1, 2018 +.Dd August 28, 2018 .Dt LAST 1 .Os .Sh NAME @@ -36,6 +36,7 @@ .Nd indicate last logins of users and ttys .Sh SYNOPSIS .Nm +.Op Fl -libxo .Op Fl swy .Oo .Fl d @@ -72,6 +73,13 @@ will so indicate. .Pp The following options are available: .Bl -tag -width indent-two +.It Fl -libxo +Generate output via +.Xr libxo 3 +in a selection of different human and machine readable formats. +See +.Xr xo_parse_args 3 +for details on command line arguments. .It Fl d Ar date Specify the snapshot date and time. All users logged in at the snapshot date and time will @@ -201,6 +209,8 @@ login data base .Xr getutxent 3 , .Xr ac 8 , .Xr lastlogin 8 +.Xr libxo 3 , +.Xr xo_parse_args 3 .Sh HISTORY .Nm utility first appeared in @@ -211,6 +221,10 @@ The original version was written by .An Howard P. Katseff ; .An Keith Bostic rewrote it in 1986/87 to add functionality and to improve code quality. +.An Philip Paeps +added +.Xr libxo 3 +support in August 2018. .Sh BUGS If a login shell should terminate abnormally for some reason, it is likely that a logout record will not be written to the Modified: head/usr.bin/last/last.c == --- head/usr.bin/last/last.cTue Aug 28 17:09:41 2018(r338351) +++ head/usr.bin/last/last.cTue Aug 28 17:10:19 2018(r338352) @@ -3,6 +3,7 @@ * * Copyright (c) 1987, 1993, 1994 * The Regents of the University of California. All rights reserved. + * Copyright (c) 2018 Philip Paeps * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -62,6 +63,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #defineNO 0 /* false/no */ #defineYES 1 /* true/yes */ #defineATOI2(ar) ((ar)[0] - '0') * 10 + ((ar)[1] - '0'); (ar) += 2; @@ -112,7 +115,7 @@ static void wtmp(void); static void usage(void) { - (void)fprintf(stderr, + xo_error( "usage: last [-swy] [-d [[CC]YY][MMDD]hhmm[.SS]] [-f file] [-h host]\n" "[-n maxrec] [-t tty] [user ...]\n"); exit(1); @@ -127,6 +130,11 @@ main(int argc, char *argv[]) (void) setlocale(LC_TIME, ""); d_first = (*nl_langinfo(D_MD_ORDER) == 'd'); + argc = xo_parse_args(argc, argv); + if (argc < 0) + exit(1); + atexit(xo_finish_atexit); + maxrec = -1; snaptime = 0; while ((ch = getopt(argc, argv, "0123456789d:f:h:n:st:wy")) != -1) @@ -161,7 +169,7 @@ main(int argc, char *argv[]) maxrec = strtol(optarg, &p, 10); if (p == optarg || *p != '\0' || errno != 0 || maxrec <= 0) - errx(1, "%s: bad line count", optarg); + xo_errx(1, "%s: bad line count", optarg); break; case 's': sflag++;/* Show delta as seconds */ @@ -181,17 +189,17 @@ main(int argc, char *argv[]) } if (caph_limit_stdio() < 0) - err(1, "can't limit stdio rights"); + xo_err(1, "can't limit stdio rights"); caph_cache_catpages(); caph_cache_tzdata(); /* Cache UTX database. */ if (setutxdb(UTXDB_LOG, file) != 0) - err(1, "%s", file != NULL ? file : "(default utx db)"); + xo_err(1, "%s", file != NULL ? file : "(default utx db)"); if (caph_enter() < 0) - err(1, "cap_enter"); + xo_err(1, "cap_enter"); if (sflag && width == 8) usage(); @@ -229,12 +237,14 @@ wtmp(void) SLIST_INIT(&idlist); (void)time(&t); + xo
svn commit: r338351 - head/sys/dev/al_eth
Author: mw Date: Tue Aug 28 17:09:41 2018 New Revision: 338351 URL: https://svnweb.freebsd.org/changeset/base/338351 Log: Use ip/ipv6 structures in al_eth only if they are supported The ip/ipv6 header files are included only if the appropriate definition exists, but the driver was missing similar checks when using the ip and ip6_hdr structures. If the kernel was not built with the INET or INET6 option, the driver was preventing kernel from being built. To fix that, the missing ifdef checks were added to the driver. PR: Bug 230886 Submitted by: Michal Krawczyk Reported by: O. Hartmann Approved by: re (gjb) Obtained from: Semihalf MFC after: 1 week Sponsored by: Amazon, Inc. Modified: head/sys/dev/al_eth/al_eth.c Modified: head/sys/dev/al_eth/al_eth.c == --- head/sys/dev/al_eth/al_eth.cTue Aug 28 15:18:14 2018 (r338350) +++ head/sys/dev/al_eth/al_eth.cTue Aug 28 17:09:41 2018 (r338351) @@ -1202,8 +1202,12 @@ al_eth_tx_csum(struct al_eth_ring *tx_ring, struct al_ uint32_t mss = m->m_pkthdr.tso_segsz; struct ether_vlan_header *eh; uint16_t etype; +#ifdef INET struct ip *ip; +#endif +#ifdef INET6 struct ip6_hdr *ip6; +#endif struct tcphdr *th = NULL; int ehdrlen, ip_hlen = 0; uint8_t ipproto = 0; @@ -1243,6 +1247,7 @@ al_eth_tx_csum(struct al_eth_ring *tx_ring, struct al_ } switch (etype) { +#ifdef INET case ETHERTYPE_IP: ip = (struct ip *)(m->m_data + ehdrlen); ip_hlen = ip->ip_hl << 2; @@ -1256,6 +1261,8 @@ al_eth_tx_csum(struct al_eth_ring *tx_ring, struct al_ else hal_pkt->l4_proto_idx = AL_ETH_PROTO_ID_UDP; break; +#endif /* INET */ +#ifdef INET6 case ETHERTYPE_IPV6: ip6 = (struct ip6_hdr *)(m->m_data + ehdrlen); hal_pkt->l3_proto_idx = AL_ETH_PROTO_ID_IPv6; @@ -1267,6 +1274,7 @@ al_eth_tx_csum(struct al_eth_ring *tx_ring, struct al_ else hal_pkt->l4_proto_idx = AL_ETH_PROTO_ID_UDP; break; +#endif /* INET6 */ default: break; } ___ 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: r338353 - head/usr.sbin/lastlogin
Author: philip Date: Tue Aug 28 17:12:37 2018 New Revision: 338353 URL: https://svnweb.freebsd.org/changeset/base/338353 Log: Add libxo(3) support to lastlogin(8). Reviewed by: kp Approved by: re (gjb) MFC after:1 week Relnotes: yes Differential Revision:https://reviews.freebsd.org/D16919 Modified: head/usr.sbin/lastlogin/Makefile head/usr.sbin/lastlogin/lastlogin.8 head/usr.sbin/lastlogin/lastlogin.c Modified: head/usr.sbin/lastlogin/Makefile == --- head/usr.sbin/lastlogin/MakefileTue Aug 28 17:10:19 2018 (r338352) +++ head/usr.sbin/lastlogin/MakefileTue Aug 28 17:12:37 2018 (r338353) @@ -2,5 +2,6 @@ PROG= lastlogin MAN= lastlogin.8 +LIBADD=xo .include Modified: head/usr.sbin/lastlogin/lastlogin.8 == --- head/usr.sbin/lastlogin/lastlogin.8 Tue Aug 28 17:10:19 2018 (r338352) +++ head/usr.sbin/lastlogin/lastlogin.8 Tue Aug 28 17:12:37 2018 (r338353) @@ -31,7 +31,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 6, 2011 +.Dd August 28, 2018 .Dt LASTLOGIN 8 .Os .Sh NAME @@ -39,6 +39,7 @@ .Nd indicate last login time of users .Sh SYNOPSIS .Nm +.Op Fl -libxo .Op Fl f Ar file .Op Fl rt .Op Ar user ... @@ -68,6 +69,13 @@ The last login database is never turned over or delete .Pp The following options are available: .Bl -tag -width indent +.It Fl -libxo +Generate output via +.Xr libxo 3 +in a selection of different human and machine readable formats. +See +.Xr xo_parse_args 3 +for details on command line arguments. .It Fl f Ar file Open last login database .Ar file @@ -86,9 +94,15 @@ last login database .Xr last 1 , .Xr getutxent 3 , .Xr ac 8 +.Xr libxo 3 , +.Xr xo_parse_args 3 .Sh AUTHORS +.An -nosplit .An John M. Vinopal wrote this program in January 1996 and contributed it to the .Nx project. +.An Philip Paeps added +.Xr libxo 3 +support in August 2018. Modified: head/usr.sbin/lastlogin/lastlogin.c == --- head/usr.sbin/lastlogin/lastlogin.c Tue Aug 28 17:10:19 2018 (r338352) +++ head/usr.sbin/lastlogin/lastlogin.c Tue Aug 28 17:12:37 2018 (r338353) @@ -2,6 +2,7 @@ * SPDX-License-Identifier: BSD-4-Clause * * Copyright (c) 1996 John M. Vinopal + * Copyright (c) 2018 Philip Paeps * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -46,6 +47,8 @@ __RCSID("$NetBSD: lastlogin.c,v 1.4 1998/02/03 04:45:3 #include #include +#include + int main(int, char **); static voidoutput(struct utmpx *); static voidusage(void); @@ -79,6 +82,10 @@ main(int argc, char *argv[]) int ch, i, ulistsize; struct utmpx *u, *ulist; + argc = xo_parse_args(argc, argv); + if (argc < 0) + exit(1); + while ((ch = getopt(argc, argv, "f:rt")) != -1) { switch (ch) { case 'f': @@ -97,13 +104,16 @@ main(int argc, char *argv[]) argc -= optind; argv += optind; + xo_open_container("lastlogin-information"); + xo_open_list("lastlogin"); + if (argc > 0) { /* Process usernames given on the command line. */ for (i = 0; i < argc; i++) { if (setutxdb(UTXDB_LASTLOGIN, file) != 0) - err(1, "failed to open lastlog database"); + xo_err(1, "failed to open lastlog database"); if ((u = getutxuser(argv[i])) == NULL) { - warnx("user '%s' not found", argv[i]); + xo_warnx("user '%s' not found", argv[i]); continue; } output(u); @@ -112,7 +122,7 @@ main(int argc, char *argv[]) } else { /* Read all lastlog entries, looking for active ones. */ if (setutxdb(UTXDB_LASTLOGIN, file) != 0) - err(1, "failed to open lastlog database"); + xo_err(1, "failed to open lastlog database"); ulist = NULL; ulistsize = 0; while ((u = getutxent()) != NULL) { @@ -122,7 +132,7 @@ main(int argc, char *argv[]) ulist = realloc(ulist, (ulistsize + 16) * sizeof(struct utmpx)); if (ulist == NULL) - err(1, "malloc"); + xo_err(1, "malloc"); } ulist[ulistsize++] = *u; } @@ -133,6 +143,10 @@ main(int argc, char *argv[])
svn commit: r338354 - head/stand/defaults
Author: markj Date: Tue Aug 28 17:14:46 2018 New Revision: 338354 URL: https://svnweb.freebsd.org/changeset/base/338354 Log: Document the cpu_microcode_* tunables. Reviewed by: bcr (previous version), kib Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D16923 Modified: head/stand/defaults/loader.conf.5 Modified: head/stand/defaults/loader.conf.5 == --- head/stand/defaults/loader.conf.5 Tue Aug 28 17:12:37 2018 (r338353) +++ head/stand/defaults/loader.conf.5 Tue Aug 28 17:14:46 2018 (r338354) @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd March 23, 2018 +.Dd August 28, 2018 .Dt LOADER.CONF 5 .Os .Sh NAME @@ -289,6 +289,29 @@ See the entropy entries in .Pq Dq /boot/entropy The name of the very early boot-time entropy cache file. +.It Va cpu_microcode_load +.Pq Dq NO +If set to +.Dq YES , +the microcode update file specified by +.Va cpu_microcode_name +will be loaded and applied very early during boot. +This provides functionality similar to +.Xr cpucontrol 8 +but ensures that CPU features enabled by microcode updates can be +used by the kernel. +The update will be re-applied automatically when resuming from an +ACPI sleep state. +If the update file contains updates for multiple processor models, +the kernel will search for and extract a matching update. +Currently this setting is supported only on Intel +.Dv i386 +and +.Dv amd64 +processors. +It has no effect on other processor types. +.It Va cpu_microcode_name +A path to a microcode update file. .El .Sh OTHER SETTINGS Other settings that may be used in @@ -319,6 +342,7 @@ machine-specific settings for sites with a common load .Sh SEE ALSO .Xr rc.conf 5 , .Xr boot 8 , +.Xr cpucontrol 8 , .Xr loader 8 , .Xr loader.4th 8 .Sh HISTORY ___ 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: r338348 - in head/sys/dev: drm drm2
For the below I wonder if graphics/drm-stable-kmod would be correct for old powerpc64 PowerMac's and such. Presuming graphics/drm-legacy-kmod (I do not know): Tier 2, old equipment, etc. so it may just be an item for handling questions on the lists rather than making a mess instead of the below to cover sufficient alternatives. > Modified: head/sys/dev/drm2/drm_os_freebsd.h > == > --- head/sys/dev/drm2/drm_os_freebsd.hTue Aug 28 14:46:49 2018 > (r338347) > +++ head/sys/dev/drm2/drm_os_freebsd.hTue Aug 28 14:46:55 2018 > (r338348) > @@ -154,6 +154,20 @@ typedef void irqreturn_t; > *(volatile u_int64_t *)(((vm_offset_t)(map)->handle) + \ > (vm_offset_t)(offset)) = htole64(val) > > +#ifdef __LP64__ > +#define DRM_PORT "graphics/drm-stable-kmod" > +#else > +#define DRM_PORT "graphics/drm-legacy-kmod" > +#endif > + > +#define DRM_OBSOLETE(dev) > \ > +do { > \ > + device_printf(dev, > "===\n"); \ > + device_printf(dev, "This code is obsolete abandonware. Install the " > DRM_PORT " pkg\n"); \ > + device_printf(dev, > "===\n"); \ > + gone_in_dev(dev, 13, "drm2 drivers"); > \ > +} while (0) > + > /* DRM_READMEMORYBARRIER() prevents reordering of reads. > * DRM_WRITEMEMORYBARRIER() prevents reordering of writes. > * DRM_MEMORYBARRIER() prevents reordering of reads and writes. === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) ___ 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: r338348 - in head/sys/dev: drm drm2
Legacy would be needed by existing these existing ppc64 at the moment and I pointed out in the review that LP64 is not the correct heuristic but was dismissed without understanding the point. On Tue, Aug 28, 2018 at 10:36 AM, Mark Millard via svn-src-head wrote: > For the below I wonder if graphics/drm-stable-kmod > would be correct for old powerpc64 PowerMac's and > such. > > Presuming graphics/drm-legacy-kmod (I do not know): > Tier 2, old equipment, etc. so it may just be an item > for handling questions on the lists rather than making > a mess instead of the below to cover sufficient > alternatives. > >> Modified: head/sys/dev/drm2/drm_os_freebsd.h >> == >> --- head/sys/dev/drm2/drm_os_freebsd.hTue Aug 28 14:46:49 2018 >> (r338347) >> +++ head/sys/dev/drm2/drm_os_freebsd.hTue Aug 28 14:46:55 2018 >> (r338348) >> @@ -154,6 +154,20 @@ typedef void irqreturn_t; >> *(volatile u_int64_t *)(((vm_offset_t)(map)->handle) + \ >> (vm_offset_t)(offset)) = htole64(val) >> >> +#ifdef __LP64__ >> +#define DRM_PORT "graphics/drm-stable-kmod" >> +#else >> +#define DRM_PORT "graphics/drm-legacy-kmod" >> +#endif >> + >> +#define DRM_OBSOLETE(dev) >> \ >> +do { >> \ >> + device_printf(dev, >> "===\n"); \ >> + device_printf(dev, "This code is obsolete abandonware. Install the " >> DRM_PORT " pkg\n"); \ >> + device_printf(dev, >> "===\n"); \ >> + gone_in_dev(dev, 13, "drm2 drivers"); >> \ >> +} while (0) >> + >> /* DRM_READMEMORYBARRIER() prevents reordering of reads. >> * DRM_WRITEMEMORYBARRIER() prevents reordering of writes. >> * DRM_MEMORYBARRIER() prevents reordering of reads and writes. > > > === > Mark Millard > marklmi at yahoo.com > ( dsl-only.net went > away in early 2018-Mar) > > ___ > 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-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: r338348 - in head/sys/dev: drm drm2
Your comments weren't exactly clear in the review (even after clarification), and they were at odds with what I'd been told, I thought, the graphics folks wanted to message: all 64-bit platforms use drm-stable/drm-devel. Warner On Tue, Aug 28, 2018 at 11:51 AM Kevin Bowling wrote: > Legacy would be needed by existing these existing ppc64 at the moment > and I pointed out in the review that LP64 is not the correct heuristic > but was dismissed without understanding the point. > > On Tue, Aug 28, 2018 at 10:36 AM, Mark Millard via svn-src-head > wrote: > > For the below I wonder if graphics/drm-stable-kmod > > would be correct for old powerpc64 PowerMac's and > > such. > > > > Presuming graphics/drm-legacy-kmod (I do not know): > > Tier 2, old equipment, etc. so it may just be an item > > for handling questions on the lists rather than making > > a mess instead of the below to cover sufficient > > alternatives. > > > >> Modified: head/sys/dev/drm2/drm_os_freebsd.h > >> > == > >> --- head/sys/dev/drm2/drm_os_freebsd.hTue Aug 28 14:46:49 2018 > (r338347) > >> +++ head/sys/dev/drm2/drm_os_freebsd.hTue Aug 28 14:46:55 2018 > (r338348) > >> @@ -154,6 +154,20 @@ typedef void irqreturn_t; > >> *(volatile u_int64_t *)(((vm_offset_t)(map)->handle) + \ > >> (vm_offset_t)(offset)) = htole64(val) > >> > >> +#ifdef __LP64__ > >> +#define DRM_PORT "graphics/drm-stable-kmod" > >> +#else > >> +#define DRM_PORT "graphics/drm-legacy-kmod" > >> +#endif > >> + > >> +#define DRM_OBSOLETE(dev) > \ > >> +do { >\ > >> + device_printf(dev, > "===\n"); \ > >> + device_printf(dev, "This code is obsolete abandonware. Install > the " DRM_PORT " pkg\n"); \ > >> + device_printf(dev, > "===\n"); \ > >> + gone_in_dev(dev, 13, "drm2 drivers"); >\ > >> +} while (0) > >> + > >> /* DRM_READMEMORYBARRIER() prevents reordering of reads. > >> * DRM_WRITEMEMORYBARRIER() prevents reordering of writes. > >> * DRM_MEMORYBARRIER() prevents reordering of reads and writes. > > > > > > === > > Mark Millard > > marklmi at yahoo.com > > ( dsl-only.net went > > away in early 2018-Mar) > > > > ___ > > 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-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: r338355 - head/sys/dev/cxgbe/tom
Author: np Date: Tue Aug 28 18:16:02 2018 New Revision: 338355 URL: https://svnweb.freebsd.org/changeset/base/338355 Log: cxgbe/tom: Unregister shared CPL handlers on module unload. This fixes a panic with INVARIANTS that occurs when t4_tom is unloaded and reloaded. Approved by: re@ (kib@) Modified: head/sys/dev/cxgbe/tom/t4_ddp.c Modified: head/sys/dev/cxgbe/tom/t4_ddp.c == --- head/sys/dev/cxgbe/tom/t4_ddp.c Tue Aug 28 17:14:46 2018 (r338354) +++ head/sys/dev/cxgbe/tom/t4_ddp.c Tue Aug 28 18:16:02 2018 (r338355) @@ -1970,6 +1970,8 @@ t4_ddp_mod_unload(void) taskqueue_drain(taskqueue_thread, &ddp_orphan_task); MPASS(TAILQ_EMPTY(&ddp_orphan_pagesets)); mtx_destroy(&ddp_orphan_pagesets_lock); + t4_register_shared_cpl_handler(CPL_SET_TCB_RPL, NULL, CPL_COOKIE_DDP0); + t4_register_shared_cpl_handler(CPL_SET_TCB_RPL, NULL, CPL_COOKIE_DDP1); t4_register_cpl_handler(CPL_RX_DATA_DDP, NULL); t4_register_cpl_handler(CPL_RX_DDP_COMPLETE, NULL); } ___ 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: r338356 - head/sys/amd64/amd64
Author: kib Date: Tue Aug 28 18:47:02 2018 New Revision: 338356 URL: https://svnweb.freebsd.org/changeset/base/338356 Log: Several bug fixes and robustness improvements for the AP boot page table allocation. At the time that mp_bootaddress() is called, phys_avail[] array does not reflect some memory reservations already done, like kernel placement. Recent changes to DMAP protection which make kernel text read-only in DMAP revealed this, where on some machines AP boot page tables selection appears to intersect with the kernel itself. Fix this by checking the addresses selected using the same algorithm as bootaddr_rwx(). Also, try to chomp pages for the page table not only at the start of the contiguous range, but also at the end. This should improve robustness when the only suitable range is already consumed by the kernel. Reported and tested by: Michael Gmelin Reviewed by:jhb MFC after: 1 week Sponsored by: The FreeBSD Foundation Approved by:re (gjb) Differential revision: https://reviews.freebsd.org/D16907 Modified: head/sys/amd64/amd64/mp_machdep.c Modified: head/sys/amd64/amd64/mp_machdep.c == --- head/sys/amd64/amd64/mp_machdep.c Tue Aug 28 18:16:02 2018 (r338355) +++ head/sys/amd64/amd64/mp_machdep.c Tue Aug 28 18:47:02 2018 (r338356) @@ -86,6 +86,8 @@ __FBSDID("$FreeBSD$"); #define GiB(v) (v ## ULL << 30) +#defineAP_BOOTPT_SZ(PAGE_SIZE * 3) + extern struct pcpu __pcpu[]; /* Temporary variables for init_secondary() */ @@ -100,45 +102,79 @@ char *dbg_stack; static int start_ap(int apic_id); +static bool +is_kernel_paddr(vm_paddr_t pa) +{ + + return (pa >= trunc_2mpage(btext - KERNBASE) && + pa < round_page(_end - KERNBASE)); +} + +static bool +is_mpboot_good(vm_paddr_t start, vm_paddr_t end) +{ + + return (start + AP_BOOTPT_SZ <= GiB(4) && atop(end) < Maxmem); +} + /* * Calculate usable address in base memory for AP trampoline code. */ void mp_bootaddress(vm_paddr_t *physmap, unsigned int *physmap_idx) { + vm_paddr_t start, end; unsigned int i; bool allocated; alloc_ap_trampoline(physmap, physmap_idx); + /* +* Find a memory region big enough below the 4GB boundary to +* store the initial page tables. Region must be mapped by +* the direct map. +* +* Note that it needs to be aligned to a page boundary. +*/ allocated = false; for (i = *physmap_idx; i <= *physmap_idx; i -= 2) { /* -* Find a memory region big enough below the 4GB -* boundary to store the initial page tables. Region -* must be mapped by the direct map. -* -* Note that it needs to be aligned to a page -* boundary. +* First, try to chomp at the start of the physmap region. +* Kernel binary might claim it already. */ - if (physmap[i] >= GiB(4) || physmap[i + 1] - - round_page(physmap[i]) < PAGE_SIZE * 3 || - atop(physmap[i + 1]) > Maxmem) - continue; + start = round_page(physmap[i]); + end = start + AP_BOOTPT_SZ; + if (start < end && end <= physmap[i + 1] && + is_mpboot_good(start, end) && + !is_kernel_paddr(start) && !is_kernel_paddr(end - 1)) { + allocated = true; + physmap[i] = end; + break; + } - allocated = true; - mptramp_pagetables = round_page(physmap[i]); - physmap[i] = round_page(physmap[i]) + (PAGE_SIZE * 3); + /* +* Second, try to chomp at the end. Again, check +* against kernel. +*/ + end = trunc_page(physmap[i + 1]); + start = end - AP_BOOTPT_SZ; + if (start < end && start >= physmap[i] && + is_mpboot_good(start, end) && + !is_kernel_paddr(start) && !is_kernel_paddr(end - 1)) { + allocated = true; + physmap[i + 1] = start; + break; + } + } + if (allocated) { + mptramp_pagetables = start; if (physmap[i] == physmap[i + 1] && *physmap_idx != 0) { memmove(&physmap[i], &physmap[i + 2], sizeof(*physmap) * (*physmap_idx - i + 2)); *physmap_idx -= 2; } - break; - } - - if (!allocated) { - mptramp_pagetables = trunc_page(boot_address) - (PAGE_SIZE * 3); + } else { +
svn commit: r338357 - head/sys/compat/freebsd32
Author: kib Date: Tue Aug 28 18:49:39 2018 New Revision: 338357 URL: https://svnweb.freebsd.org/changeset/base/338357 Log: Fix compat32 ftruncate cap mode after ino64. Reported by:asomers PR: 230120 Sponsored by: The FreeBSD Foundation Approved by: re (gjb) Modified: head/sys/compat/freebsd32/capabilities.conf Modified: head/sys/compat/freebsd32/capabilities.conf == --- head/sys/compat/freebsd32/capabilities.conf Tue Aug 28 18:47:02 2018 (r338356) +++ head/sys/compat/freebsd32/capabilities.conf Tue Aug 28 18:49:39 2018 (r338357) @@ -108,6 +108,7 @@ freebsd32_fstat fstatfs fsync ftruncate +freebsd32_ftruncate freebsd32_futimens freebsd32_futimes getaudit ___ 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: r338358 - head/sys/compat/freebsd32
Author: kib Date: Tue Aug 28 18:50:34 2018 New Revision: 338358 URL: https://svnweb.freebsd.org/changeset/base/338358 Log: Regen after r338357. Approved by: re (gjb) Modified: head/sys/compat/freebsd32/freebsd32_sysent.c Modified: head/sys/compat/freebsd32/freebsd32_sysent.c == --- head/sys/compat/freebsd32/freebsd32_sysent.cTue Aug 28 18:49:39 2018(r338357) +++ head/sys/compat/freebsd32/freebsd32_sysent.cTue Aug 28 18:50:34 2018(r338358) @@ -257,7 +257,7 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 198 = __syscall */ { compat6(AS(freebsd6_freebsd32_lseek_args),freebsd32_lseek), AUE_LSEEK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 199 = freebsd6 freebsd32_lseek */ { compat6(AS(freebsd6_freebsd32_truncate_args),freebsd32_truncate), AUE_TRUNCATE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 200 = freebsd6 freebsd32_truncate */ - { compat6(AS(freebsd6_freebsd32_ftruncate_args),freebsd32_ftruncate), AUE_FTRUNCATE, NULL, 0, 0, 0, SY_THR_STATIC },/* 201 = freebsd6 freebsd32_ftruncate */ + { compat6(AS(freebsd6_freebsd32_ftruncate_args),freebsd32_ftruncate), AUE_FTRUNCATE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 201 = freebsd6 freebsd32_ftruncate */ { AS(freebsd32_sysctl_args), (sy_call_t *)freebsd32_sysctl, AUE_SYSCTL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },/* 202 = freebsd32_sysctl */ { AS(mlock_args), (sy_call_t *)sys_mlock, AUE_MLOCK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 203 = mlock */ { AS(munlock_args), (sy_call_t *)sys_munlock, AUE_MUNLOCK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 204 = munlock */ @@ -537,14 +537,14 @@ struct sysent freebsd32_sysent[] = { { AS(freebsd32_mmap_args), (sy_call_t *)freebsd32_mmap, AUE_MMAP, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 477 = freebsd32_mmap */ { AS(freebsd32_lseek_args), (sy_call_t *)freebsd32_lseek, AUE_LSEEK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 478 = freebsd32_lseek */ { AS(freebsd32_truncate_args), (sy_call_t *)freebsd32_truncate, AUE_TRUNCATE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 479 = freebsd32_truncate */ - { AS(freebsd32_ftruncate_args), (sy_call_t *)freebsd32_ftruncate, AUE_FTRUNCATE, NULL, 0, 0, 0, SY_THR_STATIC },/* 480 = freebsd32_ftruncate */ + { AS(freebsd32_ftruncate_args), (sy_call_t *)freebsd32_ftruncate, AUE_FTRUNCATE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 480 = freebsd32_ftruncate */ #else { AS(freebsd32_pread_args), (sy_call_t *)freebsd32_pread, AUE_PREAD, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 475 = freebsd32_pread */ { AS(freebsd32_pwrite_args), (sy_call_t *)freebsd32_pwrite, AUE_PWRITE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },/* 476 = freebsd32_pwrite */ { AS(freebsd32_mmap_args), (sy_call_t *)freebsd32_mmap, AUE_MMAP, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 477 = freebsd32_mmap */ { AS(freebsd32_lseek_args), (sy_call_t *)freebsd32_lseek, AUE_LSEEK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 478 = freebsd32_lseek */ { AS(freebsd32_truncate_args), (sy_call_t *)freebsd32_truncate, AUE_TRUNCATE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 479 = freebsd32_truncate */ - { AS(freebsd32_ftruncate_args), (sy_call_t *)freebsd32_ftruncate, AUE_FTRUNCATE, NULL, 0, 0, 0, SY_THR_STATIC },/* 480 = freebsd32_ftruncate */ + { AS(freebsd32_ftruncate_args), (sy_call_t *)freebsd32_ftruncate, AUE_FTRUNCATE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 480 = freebsd32_ftruncate */ #endif { AS(thr_kill2_args), (sy_call_t *)sys_thr_kill2, AUE_THR_KILL2, NULL, 0, 0, 0, SY_THR_STATIC },/* 481 = thr_kill2 */ { AS(shm_open_args), (sy_call_t *)sys_shm_open, AUE_SHMOPEN, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 482 = shm_open */ ___ 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: r338359 - in head/sys/cddl/dev/fbt: . aarch64 arm mips powerpc riscv x86
Author: markj Date: Tue Aug 28 20:21:36 2018 New Revision: 338359 URL: https://svnweb.freebsd.org/changeset/base/338359 Log: Allow multiple FBT probes to share a tracepoint. With GNU ifuncs, multiple FBT probes may correspond to the same instruction. fbt_invop() assumed that this could not happen and would return after the first probe found in the global FBT hash table, which might not be the one that's enabled. Fix the problem on x86 by linking probes that share a tracepoint and having each linked probe fire when the tracepoint is hit. PR: 230846 Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D16921 Modified: head/sys/cddl/dev/fbt/aarch64/fbt_isa.c head/sys/cddl/dev/fbt/arm/fbt_isa.c head/sys/cddl/dev/fbt/fbt.c head/sys/cddl/dev/fbt/fbt.h head/sys/cddl/dev/fbt/mips/fbt_isa.c head/sys/cddl/dev/fbt/powerpc/fbt_isa.c head/sys/cddl/dev/fbt/riscv/fbt_isa.c head/sys/cddl/dev/fbt/x86/fbt_isa.c Modified: head/sys/cddl/dev/fbt/aarch64/fbt_isa.c == --- head/sys/cddl/dev/fbt/aarch64/fbt_isa.c Tue Aug 28 18:50:34 2018 (r338358) +++ head/sys/cddl/dev/fbt/aarch64/fbt_isa.c Tue Aug 28 20:21:36 2018 (r338359) @@ -152,7 +152,7 @@ again: fbt->fbtp_id = dtrace_probe_create(fbt_id, modname, name, FBT_RETURN, 3, fbt); } else { - retfbt->fbtp_next = fbt; + retfbt->fbtp_probenext = fbt; fbt->fbtp_id = retfbt->fbtp_id; } retfbt = fbt; Modified: head/sys/cddl/dev/fbt/arm/fbt_isa.c == --- head/sys/cddl/dev/fbt/arm/fbt_isa.c Tue Aug 28 18:50:34 2018 (r338358) +++ head/sys/cddl/dev/fbt/arm/fbt_isa.c Tue Aug 28 20:21:36 2018 (r338359) @@ -165,7 +165,7 @@ again: fbt->fbtp_id = dtrace_probe_create(fbt_id, modname, name, FBT_RETURN, 2, fbt); } else { - retfbt->fbtp_next = fbt; + retfbt->fbtp_probenext = fbt; fbt->fbtp_id = retfbt->fbtp_id; } retfbt = fbt; Modified: head/sys/cddl/dev/fbt/fbt.c == --- head/sys/cddl/dev/fbt/fbt.c Tue Aug 28 18:50:34 2018(r338358) +++ head/sys/cddl/dev/fbt/fbt.c Tue Aug 28 20:21:36 2018(r338359) @@ -156,7 +156,7 @@ fbt_doubletrap(void) for (i = 0; i < fbt_probetab_size; i++) { fbt = fbt_probetab[i]; - for (; fbt != NULL; fbt = fbt->fbtp_next) + for (; fbt != NULL; fbt = fbt->fbtp_probenext) fbt_patch_tracepoint(fbt, fbt->fbtp_savedval); } } @@ -205,39 +205,52 @@ fbt_provide_module(void *arg, modctl_t *lf) } static void +fbt_destroy_one(fbt_probe_t *fbt) +{ + fbt_probe_t *hash, *hashprev, *next; + int ndx; + + ndx = FBT_ADDR2NDX(fbt->fbtp_patchpoint); + for (hash = fbt_probetab[ndx], hashprev = NULL; hash != NULL; + hash = hash->fbtp_hashnext, hashprev = hash) { + if (hash == fbt) { + if ((next = fbt->fbtp_tracenext) != NULL) + next->fbtp_hashnext = hash->fbtp_hashnext; + else + next = hash->fbtp_hashnext; + if (hashprev != NULL) + hashprev->fbtp_hashnext = next; + else + fbt_probetab[ndx] = next; + goto free; + } else if (hash->fbtp_patchpoint == fbt->fbtp_patchpoint) { + for (next = hash; next->fbtp_tracenext != NULL; + next = next->fbtp_tracenext) { + if (fbt == next->fbtp_tracenext) { + next->fbtp_tracenext = + fbt->fbtp_tracenext; + goto free; + } + } + } + } + panic("probe %p not found in hash table", fbt); +free: + free(fbt, M_FBT); +} + +static void fbt_destroy(void *arg, dtrace_id_t id, void *parg) { - fbt_probe_t *fbt = parg, *next, *hash, *last; + fbt_probe_t *fbt = parg, *next; modctl_t *ctl; - int ndx; do { ctl = fbt->fbtp_ctl; - ctl->fbt_nentries--; - /* -* Now we need to remove this probe from the fbt_probetab. -*/ - ndx = FBT_ADDR2NDX(fbt->fbtp_patchpoint); - last = NULL; - hash = fbt_probetab[ndx]; - - while (hash != fbt) { - ASSERT(hash
svn commit: r338360 - in head: sys/sys sys/x86/acpica sys/x86/include sys/x86/iommu sys/x86/isa sys/x86/x86 sys/x86/xen usr.bin/vmstat
Author: jhb Date: Tue Aug 28 21:09:19 2018 New Revision: 338360 URL: https://svnweb.freebsd.org/changeset/base/338360 Log: Dynamically allocate IRQ ranges on x86. Previously, x86 used static ranges of IRQ values for different types of I/O interrupts. Interrupt pins on I/O APICs and 8259A PICs used IRQ values from 0 to 254. MSI interrupts used a compile-time-defined range starting at 256, and Xen event channels used a compile-time-defined range after MSI. Some recent systems have more than 255 I/O APIC interrupt pins which resulted in those IRQ values overflowing into the MSI range triggering an assertion failure. Replace statically assigned ranges with dynamic ranges. Do a single pass computing the sizes of the IRQ ranges (PICs, MSI, Xen) to determine the total number of IRQs required. Allocate the interrupt source and interrupt count arrays dynamically once this pass has completed. To minimize runtime complexity these arrays are only sized once during bootup. The PIC range is determined by the PICs present in the system. The MSI and Xen ranges continue to use a fixed size, though this does make it possible to turn the MSI range size into a tunable in the future. As a result, various places are updated to use dynamic limits instead of constants. In addition, the vmstat(8) utility has been taught to understand that some kernels may treat 'intrcnt' and 'intrnames' as pointers rather than arrays when extracting interrupt stats from a crashdump. This is determined by the presence (vs absence) of a global 'nintrcnt' symbol. This change reverts r189404 which worked around a buggy BIOS which enumerated an I/O APIC twice (using the same memory mapped address for both entries but using an IRQ base of 256 for one entry and a valid IRQ base for the second entry). Making the "base" of MSI IRQ values dynamic avoids the panic that r189404 worked around, and there may now be valid I/O APICs with an IRQ base above 256 which this workaround would incorrectly skip. If in the future the issue reported in PR 130483 reoccurs, we will have to add a pass over the I/O APIC entries in the MADT to detect duplicates using the memory mapped address and use some strategy to choose the "correct" one. While here, reserve room in intrcnts for the Hyper-V counters. PR: 229429, 130483 Reviewed by: kib, royger, cem Tested by:royger (Xen), kib (DMAR) Approved by: re (gjb) MFC after:2 weeks Differential Revision:https://reviews.freebsd.org/D16861 Modified: head/sys/sys/interrupt.h head/sys/x86/acpica/madt.c head/sys/x86/include/apicvar.h head/sys/x86/include/intr_machdep.h head/sys/x86/iommu/intel_intrmap.c head/sys/x86/isa/atpic.c head/sys/x86/x86/intr_machdep.c head/sys/x86/x86/io_apic.c head/sys/x86/x86/local_apic.c head/sys/x86/x86/msi.c head/sys/x86/x86/nexus.c head/sys/x86/xen/xen_intr.c head/sys/x86/xen/xen_msi.c head/sys/x86/xen/xen_nexus.c head/usr.bin/vmstat/vmstat.c Modified: head/sys/sys/interrupt.h == --- head/sys/sys/interrupt.hTue Aug 28 20:21:36 2018(r338359) +++ head/sys/sys/interrupt.hTue Aug 28 21:09:19 2018(r338360) @@ -154,8 +154,13 @@ extern struct intr_event *clk_intr_event; extern void*vm_ih; /* Counts and names for statistics (defined in MD code). */ +#if defined(__amd64__) || defined(__i386__) +extern u_long *intrcnt; /* counts for for each device and stray */ +extern char*intrnames; /* string table containing device names */ +#else extern u_long intrcnt[]; /* counts for for each device and stray */ extern charintrnames[];/* string table containing device names */ +#endif extern size_t sintrcnt; /* size of intrcnt table */ extern size_t sintrnames; /* size of intrnames table */ Modified: head/sys/x86/acpica/madt.c == --- head/sys/x86/acpica/madt.c Tue Aug 28 20:21:36 2018(r338359) +++ head/sys/x86/acpica/madt.c Tue Aug 28 21:09:19 2018(r338360) @@ -428,10 +428,6 @@ madt_parse_apics(ACPI_SUBTABLE_HEADER *entry, void *ar apic->Id); if (ioapics[apic->Id].io_apic != NULL) panic("%s: Double APIC ID %u", __func__, apic->Id); - if (apic->GlobalIrqBase >= FIRST_MSI_INT) { - printf("MADT: Ignoring bogus I/O APIC ID %u", apic->Id); - break; - } ioapics[apic->Id].io_apic = ioapic_create(apic->Address, apic->Id, apic->GlobalIrqBase); ioapics[apic->Id].io_vector = apic->GlobalIrqBase; Modified: head/sys/x86/include/apicvar.h == --- head/sys/x86
Re: svn commit: r338239 - head
Piotr P. Stefaniak wrote: On 2018-08-23 05:06:32, Warner Losh wrote: Author: imp Date: Thu Aug 23 05:06:31 2018 New Revision: 338239 URL: https://svnweb.freebsd.org/changeset/base/338239 Log: Add a special note to UPDATING for the devmatch stuff. While tested, there's an elevated risk of trouble, and you must update kernel, userland and rc scripts for the best experience. Modified: head/UPDATING Modified: head/UPDATING == --- head/UPDATING Thu Aug 23 05:06:27 2018 (r338238) +++ head/UPDATING Thu Aug 23 05:06:31 2018 (r338239) @@ -31,6 +31,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20170822: Shouldn't that be 20180822? Both issues still not fixed. ___ 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: r338361 - head/share/mk
Author: brd Date: Tue Aug 28 22:22:06 2018 New Revision: 338361 URL: https://svnweb.freebsd.org/changeset/base/338361 Log: Add beforeinstallconfig to bsd.confs.mk to enable running commands prior to the installconfig target. Approved by: re (rgrimes), bapt (mentor) Differential Revision:https://reviews.freebsd.org/D16874 Modified: head/share/mk/bsd.confs.mk Modified: head/share/mk/bsd.confs.mk == --- head/share/mk/bsd.confs.mk Tue Aug 28 21:09:19 2018(r338360) +++ head/share/mk/bsd.confs.mk Tue Aug 28 22:22:06 2018(r338361) @@ -29,8 +29,11 @@ all: buildconfig . if !target(afterinstallconfig) afterinstallconfig: . endif -installconfig: realinstallconfig afterinstallconfig -.ORDER:realinstallconfig afterinstallconfig +. if !target(beforeinstallconfig) +beforeinstallconfig: +. endif +installconfig: beforeinstallconfig realinstallconfig afterinstallconfig +.ORDER:beforeinstallconfig realinstallconfig afterinstallconfig ${group}OWN?= ${SHAREOWN} ${group}GRP?= ${SHAREGRP} ___ 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: r338362 - head/bin/csh
Author: brd Date: Tue Aug 28 22:51:45 2018 New Revision: 338362 URL: https://svnweb.freebsd.org/changeset/base/338362 Log: Fix the install of /root/.login missed as part of r337849. Approved by: re (rgrimes) Modified: head/bin/csh/Makefile Modified: head/bin/csh/Makefile == --- head/bin/csh/Makefile Tue Aug 28 22:22:06 2018(r338361) +++ head/bin/csh/Makefile Tue Aug 28 22:51:45 2018(r338362) @@ -8,8 +8,11 @@ .include -CONFGROUPS=ETC +CONFGROUPS=ETC ROOT ETC= csh.cshrc csh.login csh.logout +ROOT= dot.login +ROOTDIR= /root +ROOTNAME_dot.login=.login PACKAGE=runtime TCSHDIR= ${SRCTOP}/contrib/tcsh .PATH: ${TCSHDIR} ___ 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: r338363 - head
Author: lwhsu Date: Tue Aug 28 23:56:52 2018 New Revision: 338363 URL: https://svnweb.freebsd.org/changeset/base/338363 Log: Fix 'install: symlink usr/src/sys -> /sys: File exists' in distributeworld Follow r334617, specify ${DISTDIR} (by ${INSTALL_DDIR}), '/base' and add ${INSTALLFLAGS} while installing the '/sys' symbolic link. Reviewed by: bapt (earlier version), markj Approved by: re (gjb), markj (mentor) Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D16877 Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Tue Aug 28 22:51:45 2018(r338362) +++ head/Makefile.inc1 Tue Aug 28 23:56:52 2018(r338363) @@ -1334,7 +1334,7 @@ distributeworld installworld stageworld: _installcheck METALOG=${METALOG} ${IMAKE_INSTALL} ${IMAKE_MTREE} \ DISTBASE=/base DESTDIR=${DESTDIR}/${DISTDIR}/base \ LOCAL_MTREE=${LOCAL_MTREE:Q} distrib-dirs - ${INSTALL_SYMLINK} usr/src/sys ${DESTDIR}/sys + ${INSTALL_SYMLINK} ${INSTALLFLAGS} usr/src/sys ${INSTALL_DDIR}/base/sys .endif ${_+_}cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//}; \ ${IMAKEENV} rm -rf ${INSTALLTMP} ___ 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: r338365 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: markj Date: Wed Aug 29 02:49:18 2018 New Revision: 338365 URL: https://svnweb.freebsd.org/changeset/base/338365 Log: Add a sysctl for the ZFS abd_scatter_enabled setting. Submitted by: Yamagi Burmeister (original version) Approved by: re (rgrimes) MFC after:3 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Wed Aug 29 02:18:13 2018(r338364) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Wed Aug 29 02:49:18 2018(r338365) @@ -153,6 +153,8 @@ size_t zfs_abd_chunk_size = 4096; #if defined(__FreeBSD__) && defined(_KERNEL) SYSCTL_DECL(_vfs_zfs); +SYSCTL_INT(_vfs_zfs, OID_AUTO, abd_scatter_enabled, CTLFLAG_RWTUN, +&zfs_abd_scatter_enabled, 0, "Enable scattered ARC data buffers"); SYSCTL_ULONG(_vfs_zfs, OID_AUTO, abd_chunk_size, CTLFLAG_RDTUN, &zfs_abd_chunk_size, 0, "The size of the chunks ABD allocates"); #endif ___ 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: r338366 - head/sys/dev/cxgbe/iw_cxgbe
Author: np Date: Wed Aug 29 04:37:53 2018 New Revision: 338366 URL: https://svnweb.freebsd.org/changeset/base/338366 Log: cxgbe/iw_cxgbe: Fix iWARP RDMA + VIMAGE operation by setting the VNET properly in a couple of places in the driver. Submitted by: Krishnamraju Eraparaju @ Chelsio Approved by: re@ (rgrimes@) Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/iw_cxgbe/cm.c Modified: head/sys/dev/cxgbe/iw_cxgbe/cm.c == --- head/sys/dev/cxgbe/iw_cxgbe/cm.cWed Aug 29 02:49:18 2018 (r338365) +++ head/sys/dev/cxgbe/iw_cxgbe/cm.cWed Aug 29 04:37:53 2018 (r338366) @@ -76,6 +76,7 @@ struct cpl_set_tcb_rpl; #include #include #include +#include static spinlock_t req_lock; static TAILQ_HEAD(c4iw_ep_list, c4iw_ep_common) req_list; @@ -2523,6 +2524,8 @@ int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_ struct c4iw_dev *dev = to_c4iw_dev(cm_id->device); struct c4iw_ep *ep = NULL; struct ifnet*nh_ifp;/* Logical egress interface */ + struct rdma_cm_id *rdma_id = (struct rdma_cm_id*)cm_id->context; + struct vnet *vnet = rdma_id->route.addr.dev_addr.net; CTR2(KTR_IW_CXGBE, "%s:ccB %p", __func__, cm_id); @@ -2568,7 +2571,10 @@ int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_ ref_qp(ep); ep->com.thread = curthread; + CURVNET_SET(vnet); err = get_ifnet_from_raddr(&cm_id->remote_addr, &nh_ifp); + CURVNET_RESTORE(); + if (err) { CTR2(KTR_IW_CXGBE, "%s:cc7 %p", __func__, ep); @@ -2811,7 +2817,10 @@ int c4iw_ep_disconnect(struct c4iw_ep *ep, int abrupt, if (!ep->parent_ep) ep->com.state = MORIBUND; + + CURVNET_SET(ep->com.so->so_vnet); sodisconnect(ep->com.so); + CURVNET_RESTORE(); } } ___ 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: r338367 - head/crypto/heimdal/doc/doxyout/krb5/man/man3
Author: cy Date: Wed Aug 29 06:04:54 2018 New Revision: 338367 URL: https://svnweb.freebsd.org/changeset/base/338367 Log: Avoid printing extraneous function names when searching man page database (apropos, man -k). This commit Replaces .SS with .SH, similar to the man page provided by original heimdal (as in port). PR: 230573 Submitted by: yur...@yuripv.net Approved by: re (rgrimes@) MFC after:3 days Modified: head/crypto/heimdal/doc/doxyout/krb5/man/man3/krb5.3 Modified: head/crypto/heimdal/doc/doxyout/krb5/man/man3/krb5.3 == --- head/crypto/heimdal/doc/doxyout/krb5/man/man3/krb5.3Wed Aug 29 04:37:53 2018(r338366) +++ head/crypto/heimdal/doc/doxyout/krb5/man/man3/krb5.3Wed Aug 29 06:04:54 2018(r338367) @@ -2,9 +2,8 @@ .ad l .nh .SH NAME -Heimdal Kerberos 5 library \- -.SS "Functions" - +krb5 \- Heimdal Kerberos 5 library +.SH SYNOPSIS .in +1c .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_add_et_list\fP (krb5_context context, void(*func)(struct et_list **))" ___ 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"