svn commit: r296137 - in head/sys: arm/xscale/i8134x dev/aac dev/aacraid dev/aha dev/aic dev/an dev/ata dev/cm dev/cs dev/ct dev/digi dev/ed dev/fdc dev/fe dev/ichsmb dev/if_ndis dev/iicbus dev/le ...
Author: jhibbits Date: Sat Feb 27 03:38:01 2016 New Revision: 296137 URL: https://svnweb.freebsd.org/changeset/base/296137 Log: Migrate many bus_alloc_resource() calls to bus_alloc_resource_anywhere(). Most calls to bus_alloc_resource() use "anywhere" as the range, with a given count. Migrate these to use the new bus_alloc_resource_anywhere() API. Reviewed by: jhb Differential Revision:https://reviews.freebsd.org/D5370 Modified: head/sys/arm/xscale/i8134x/uart_bus_i81342.c head/sys/dev/aac/aac.c head/sys/dev/aacraid/aacraid.c head/sys/dev/aha/aha_isa.c head/sys/dev/aic/aic_isa.c head/sys/dev/aic/aic_pccard.c head/sys/dev/an/if_an.c head/sys/dev/ata/ata-card.c head/sys/dev/ata/ata-cbus.c head/sys/dev/ata/ata-isa.c head/sys/dev/cm/if_cm_isa.c head/sys/dev/cs/if_cs.c head/sys/dev/ct/ct_isa.c head/sys/dev/digi/digi_isa.c head/sys/dev/ed/if_ed.c head/sys/dev/fdc/fdc_isa.c head/sys/dev/fe/if_fe.c head/sys/dev/ichsmb/ichsmb_pci.c head/sys/dev/if_ndis/if_ndis_pccard.c head/sys/dev/iicbus/iicoc.c head/sys/dev/le/if_le_isa.c head/sys/dev/mse/mse_isa.c head/sys/dev/nsp/nsp_pccard.c head/sys/dev/oce/oce_hw.c head/sys/dev/pbio/pbio.c head/sys/dev/pccard/pccard.c head/sys/dev/pccard/pccard_cis.c head/sys/dev/pci/pci_pci.c head/sys/dev/ppc/ppc.c head/sys/dev/rc/rc.c head/sys/dev/rp/rp_isa.c head/sys/dev/sbni/if_sbni_isa.c head/sys/dev/scc/scc_core.c head/sys/dev/si/si_isa.c head/sys/dev/sio/sio.c head/sys/dev/smc/if_smc.c head/sys/dev/sn/if_sn.c head/sys/dev/snc/if_snc.c head/sys/dev/snc/if_snc_cbus.c head/sys/dev/sound/isa/gusc.c head/sys/dev/sound/isa/mss.c head/sys/dev/sound/isa/sbc.c head/sys/dev/wi/if_wi.c head/sys/dev/wl/if_wl.c head/sys/dev/xe/if_xe.c head/sys/i386/isa/spic.c head/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c head/sys/pc98/cbus/sio.c Modified: head/sys/arm/xscale/i8134x/uart_bus_i81342.c == --- head/sys/arm/xscale/i8134x/uart_bus_i81342.cSat Feb 27 03:35:28 2016(r296136) +++ head/sys/arm/xscale/i8134x/uart_bus_i81342.cSat Feb 27 03:38:01 2016(r296137) @@ -74,8 +74,8 @@ uart_i81342_probe(device_t dev) sc->sc_sysdev = SLIST_FIRST(_sysdevs); bcopy(>sc_sysdev->bas, >sc_bas, sizeof(sc->sc_bas)); } - sc->sc_rres = bus_alloc_resource(dev, SYS_RES_IOPORT, >sc_rrid, -0, ~0, uart_getrange(sc->sc_class), RF_ACTIVE); + sc->sc_rres = bus_alloc_resource_anywhere(dev, SYS_RES_IOPORT, + >sc_rrid, uart_getrange(sc->sc_class), RF_ACTIVE); sc->sc_bas.bsh = rman_get_bushandle(sc->sc_rres); sc->sc_bas.bst = rman_get_bustag(sc->sc_rres); Modified: head/sys/dev/aac/aac.c == --- head/sys/dev/aac/aac.c Sat Feb 27 03:35:28 2016(r296136) +++ head/sys/dev/aac/aac.c Sat Feb 27 03:38:01 2016(r296137) @@ -1780,8 +1780,8 @@ aac_check_firmware(struct aac_softc *sc) rid = rman_get_rid(sc->aac_regs_res1); bus_release_resource(sc->aac_dev, SYS_RES_MEMORY, rid, sc->aac_regs_res1); - sc->aac_regs_res1 = bus_alloc_resource(sc->aac_dev, - SYS_RES_MEMORY, , 0ul, ~0ul, atu_size, RF_ACTIVE); + sc->aac_regs_res1 = bus_alloc_resource_anywhere(sc->aac_dev, + SYS_RES_MEMORY, , atu_size, RF_ACTIVE); if (sc->aac_regs_res1 == NULL) { sc->aac_regs_res1 = bus_alloc_resource_any( sc->aac_dev, SYS_RES_MEMORY, , RF_ACTIVE); Modified: head/sys/dev/aacraid/aacraid.c == --- head/sys/dev/aacraid/aacraid.c Sat Feb 27 03:35:28 2016 (r296136) +++ head/sys/dev/aacraid/aacraid.c Sat Feb 27 03:38:01 2016 (r296137) @@ -1663,9 +1663,9 @@ aac_check_firmware(struct aac_softc *sc) bus_release_resource( sc->aac_dev, SYS_RES_MEMORY, sc->aac_regs_rid0, sc->aac_regs_res0); - sc->aac_regs_res0 = bus_alloc_resource( + sc->aac_regs_res0 = bus_alloc_resource_anywhere( sc->aac_dev, SYS_RES_MEMORY, >aac_regs_rid0, - 0ul, ~0ul, atu_size, RF_ACTIVE); + atu_size, RF_ACTIVE); if (sc->aac_regs_res0 == NULL) { sc->aac_regs_res0 = bus_alloc_resource_any( sc->aac_dev, SYS_RES_MEMORY, Modified: head/sys/dev/aha/aha_isa.c == --- head/sys/dev/aha/aha_isa.c Sat Feb 27 03:35:28 2016(r296136) +++ head/sys/dev/aha/aha_isa.c Sat Feb 27 03:38:01 2016
svn commit: r296136 - in head: share/man/man9 sys/sys
Author: jhibbits Date: Sat Feb 27 03:35:28 2016 New Revision: 296136 URL: https://svnweb.freebsd.org/changeset/base/296136 Log: Add the bus_alloc_resource_anywhere() convenience function. Summary: Many instances of bus_alloc_resource() simply use 0 and ~0 for start and end to denote 'anywhere' with a given count. To clean this up, introduce a bus_alloc_resource_anywhere() convenience function. Bump __FreeBSD_version for the new API. Reviewed By: jhb Differential Revision: https://reviews.freebsd.org/D5370 Modified: head/share/man/man9/bus_alloc_resource.9 head/sys/sys/bus.h head/sys/sys/param.h Modified: head/share/man/man9/bus_alloc_resource.9 == --- head/share/man/man9/bus_alloc_resource.9Sat Feb 27 03:34:01 2016 (r296135) +++ head/share/man/man9/bus_alloc_resource.9Sat Feb 27 03:35:28 2016 (r296136) @@ -34,6 +34,7 @@ .Sh NAME .Nm bus_alloc_resource , .Nm bus_alloc_resource_any +.Nm bus_alloc_resource_anywhere .Nd allocate resources from a parent bus .Sh SYNOPSIS .In sys/param.h @@ -49,6 +50,10 @@ .Fc .Ft struct resource * .Fn bus_alloc_resource_any "device_t dev" "int type" "int *rid" "u_int flags" +.Fc +.Ft struct resource * +.Fn bus_alloc_resource_anywhere +.Fa "device_t dev" "int type" "int *rid" "rman_res_t count" "u_int flags" .Sh DESCRIPTION This is an easy interface to the resource-management functions. It hides the indirection through the parent's method table. @@ -57,9 +62,12 @@ rare cases) never earlier. .Pp The .Fn bus_alloc_resource_any -function is a convenience wrapper for +and +.Fn bus_alloc_resource_anywhere +functions are convenience wrappers for .Fn bus_alloc_resource . -It sets the values for +.Fn bus_alloc_resource_any +sets .Fa start , .Fa end , and @@ -67,6 +75,14 @@ and to the default resource (see description of .Fa start below). +.Fn bus_alloc_resource_anywhere +sets +.Fa start +and +.Fa end +to the default resource and uses the provided +.Fa count +argument. .Pp The arguments are as follows: .Bl -item Modified: head/sys/sys/bus.h == --- head/sys/sys/bus.h Sat Feb 27 03:34:01 2016(r296135) +++ head/sys/sys/bus.h Sat Feb 27 03:35:28 2016(r296136) @@ -481,6 +481,13 @@ bus_alloc_resource_any(device_t dev, int return (bus_alloc_resource(dev, type, rid, 0ul, ~0ul, 1, flags)); } +static __inline struct resource * +bus_alloc_resource_anywhere(device_t dev, int type, int *rid, +rman_res_t count, u_int flags) +{ + return (bus_alloc_resource(dev, type, rid, 0ul, ~0ul, count, flags)); +} + /* * Access functions for device. */ Modified: head/sys/sys/param.h == --- head/sys/sys/param.hSat Feb 27 03:34:01 2016(r296135) +++ head/sys/sys/param.hSat Feb 27 03:35:28 2016(r296136) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100099 /* Master, propagated to newvers */ +#define __FreeBSD_version 1100100 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, ___ 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: r296135 - in head/sys/dev: amdsbwd arcmsr hpt27xx hptmv hptnr hptrr sdhci sound/pci tws
Author: jhibbits Date: Sat Feb 27 03:34:01 2016 New Revision: 296135 URL: https://svnweb.freebsd.org/changeset/base/296135 Log: Replace several bus_alloc_resource() calls with bus_alloc_resource_any() Most of these are BARs, and we allocate them in their entirety. The one outlier in this is amdsbwd, which calls bus_set_resource() prior. Reviewed by: jhb Differential Revision:https://reviews.freebsd.org/D5370 (partial) Modified: head/sys/dev/amdsbwd/amdsbwd.c head/sys/dev/arcmsr/arcmsr.c head/sys/dev/hpt27xx/hpt27xx_os_bsd.c head/sys/dev/hptmv/entry.c head/sys/dev/hptnr/hptnr_os_bsd.c head/sys/dev/hptrr/hptrr_os_bsd.c head/sys/dev/sdhci/sdhci_pci.c head/sys/dev/sound/pci/als4000.c head/sys/dev/sound/pci/cs4281.c head/sys/dev/sound/pci/vibes.c head/sys/dev/tws/tws.c Modified: head/sys/dev/amdsbwd/amdsbwd.c == --- head/sys/dev/amdsbwd/amdsbwd.c Sat Feb 27 02:11:00 2016 (r296134) +++ head/sys/dev/amdsbwd/amdsbwd.c Sat Feb 27 03:34:01 2016 (r296135) @@ -395,8 +395,8 @@ amdsbwd_probe(device_t dev) return (ENXIO); } rid = 0; - res = bus_alloc_resource(dev, SYS_RES_IOPORT, , 0ul, ~0ul, - AMDSB_PMIO_WIDTH, RF_ACTIVE | RF_SHAREABLE); + res = bus_alloc_resource_any(dev, SYS_RES_IOPORT, , + RF_ACTIVE | RF_SHAREABLE); if (res == NULL) { device_printf(dev, "bus_alloc_resource for IO failed\n"); return (ENXIO); Modified: head/sys/dev/arcmsr/arcmsr.c == --- head/sys/dev/arcmsr/arcmsr.cSat Feb 27 02:11:00 2016 (r296134) +++ head/sys/dev/arcmsr/arcmsr.cSat Feb 27 03:34:01 2016 (r296135) @@ -4143,7 +4143,7 @@ static u_int32_t arcmsr_initialize(devic u_int32_t rid0 = PCIR_BAR(0); vm_offset_t mem_base0; - acb->sys_res_arcmsr[0] = bus_alloc_resource(dev,SYS_RES_MEMORY, , 0ul, ~0ul, 0x1000, RF_ACTIVE); + acb->sys_res_arcmsr[0] = bus_alloc_resource_any(dev,SYS_RES_MEMORY, , RF_ACTIVE); if(acb->sys_res_arcmsr[0] == NULL) { arcmsr_free_resource(acb); printf("arcmsr%d: bus_alloc_resource failure!\n", device_get_unit(dev)); @@ -4177,11 +4177,11 @@ static u_int32_t arcmsr_initialize(devic size = sizeof(struct HBB_DOORBELL); for(i=0; i < 2; i++) { if(i == 0) { - acb->sys_res_arcmsr[i] = bus_alloc_resource(dev,SYS_RES_MEMORY, [i], - 0ul, ~0ul, size, RF_ACTIVE); + acb->sys_res_arcmsr[i] = bus_alloc_resource_any(dev,SYS_RES_MEMORY, [i], + RF_ACTIVE); } else { - acb->sys_res_arcmsr[i] = bus_alloc_resource(dev, SYS_RES_MEMORY, [i], - 0ul, ~0ul, sizeof(struct HBB_RWBUFFER), RF_ACTIVE); + acb->sys_res_arcmsr[i] = bus_alloc_resource_any(dev, SYS_RES_MEMORY, [i], + RF_ACTIVE); } if(acb->sys_res_arcmsr[i] == NULL) { arcmsr_free_resource(acb); @@ -4224,7 +4224,7 @@ static u_int32_t arcmsr_initialize(devic u_int32_t rid0 = PCIR_BAR(1); vm_offset_t mem_base0; - acb->sys_res_arcmsr[0] = bus_alloc_resource(dev,SYS_RES_MEMORY, , 0ul, ~0ul, sizeof(struct HBC_MessageUnit), RF_ACTIVE); + acb->sys_res_arcmsr[0] = bus_alloc_resource_any(dev,SYS_RES_MEMORY, , RF_ACTIVE); if(acb->sys_res_arcmsr[0] == NULL) { arcmsr_free_resource(acb); printf("arcmsr%d: bus_alloc_resource failure!\n", device_get_unit(dev)); @@ -4251,7 +4251,7 @@ static u_int32_t arcmsr_initialize(devic u_int32_t rid0 = PCIR_BAR(0); vm_offset_t mem_base0; - acb->sys_res_arcmsr[0] = bus_alloc_resource(dev,SYS_RES_MEMORY, , 0ul, ~0ul, sizeof(struct HBD_MessageUnit), RF_ACTIVE); + acb->sys_res_arcmsr[0] = bus_alloc_resource_any(dev,SYS_RES_MEMORY, , RF_ACTIVE); if(acb->sys_res_arcmsr[0] == NULL) {
svn commit: r296134 - head/libexec/getty
Author: pfg Date: Sat Feb 27 02:11:00 2016 New Revision: 296134 URL: https://svnweb.freebsd.org/changeset/base/296134 Log: Missing tab. Pointed out by: bapt Modified: head/libexec/getty/subr.c Modified: head/libexec/getty/subr.c == --- head/libexec/getty/subr.c Fri Feb 26 23:25:21 2016(r296133) +++ head/libexec/getty/subr.c Sat Feb 27 02:11:00 2016(r296134) @@ -635,7 +635,7 @@ portselector(void) const char * autobaud(void) { -struct pollfd set[1]; + struct pollfd set[1]; struct timespec timeout; char c; const char *type = "9600-baud"; ___ 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: r296104 - head/libexec/getty
On Fri, Feb 26, 2016 at 06:52:06PM +, Pedro F. Giffuni wrote: > Author: pfg > Date: Fri Feb 26 18:52:06 2016 > New Revision: 296104 > URL: https://svnweb.freebsd.org/changeset/base/296104 > > Log: > getty(8): Use poll(2) and nanosleep(2) instead of select(2). > > Sort headers while here. > > Obtained from: NetBSD (CVS Rev. 1.25 - 1.26) > > Modified: > head/libexec/getty/subr.c > > Modified: head/libexec/getty/subr.c > == > --- head/libexec/getty/subr.c Fri Feb 26 16:18:47 2016(r296103) > +++ head/libexec/getty/subr.c Fri Feb 26 18:52:06 2016(r296104) > @@ -38,14 +38,16 @@ static const char rcsid[] = > /* > * Melbourne getty. > */ > -#include > -#include > -#include > -#include > #include > #include > #include > + > +#include > +#include > +#include > #include > +#include > +#include > > #include "gettytab.h" > #include "pathnames.h" > @@ -633,24 +635,21 @@ portselector(void) > const char * > autobaud(void) > { > - int rfds; > - struct timeval timeout; > +struct pollfd set[1]; Indentation issue here Bapt signature.asc Description: PGP signature
svn commit: r296133 - in head: include/rpc lib/libc/rpc
Author: pfg Date: Fri Feb 26 23:25:21 2016 New Revision: 296133 URL: https://svnweb.freebsd.org/changeset/base/296133 Log: RPC: update the getrpcbyname() definition to include a const qualifier. Add const qualifier making getrpcbyname() and getrpcbyname_r() prototypes match those used in latest Sun RPC code (TI-RPC 2.3). Obtained from:NetBSD Modified: head/include/rpc/rpcent.h head/lib/libc/rpc/getrpcent.3 head/lib/libc/rpc/getrpcent.c Modified: head/include/rpc/rpcent.h == --- head/include/rpc/rpcent.h Fri Feb 26 23:12:59 2016(r296132) +++ head/include/rpc/rpcent.h Fri Feb 26 23:25:21 2016(r296133) @@ -56,7 +56,7 @@ __BEGIN_DECLS * These interfaces are currently implemented through nsswitch and are * MT-safe. */ -extern struct rpcent *getrpcbyname(char *); +extern struct rpcent *getrpcbyname(const char *); extern struct rpcent *getrpcbynumber(int); extern struct rpcent *getrpcent(void); extern void setrpcent(int); Modified: head/lib/libc/rpc/getrpcent.3 == --- head/lib/libc/rpc/getrpcent.3 Fri Feb 26 23:12:59 2016 (r296132) +++ head/lib/libc/rpc/getrpcent.3 Fri Feb 26 23:25:21 2016 (r296133) @@ -2,7 +2,7 @@ .\" $NetBSD: getrpcent.3,v 1.6 1998/02/05 18:49:06 perry Exp $ .\" $FreeBSD$ .\" -.Dd December 14, 1987 +.Dd February 26, 2016 .Dt GETRPCENT 3 .Os .Sh NAME @@ -19,7 +19,7 @@ .Ft struct rpcent * .Fn getrpcent void .Ft struct rpcent * -.Fn getrpcbyname "char *name" +.Fn getrpcbyname "const char *name" .Ft struct rpcent * .Fn getrpcbynumber "int number" .Ft void Modified: head/lib/libc/rpc/getrpcent.c == --- head/lib/libc/rpc/getrpcent.c Fri Feb 26 23:12:59 2016 (r296132) +++ head/lib/libc/rpc/getrpcent.c Fri Feb 26 23:25:21 2016 (r296133) @@ -969,7 +969,7 @@ getrpc(int (*fn)(union key, struct rpcen } struct rpcent * -getrpcbyname(char *name) +getrpcbyname(const char *name) { union key key; ___ 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: r296132 - head/usr.sbin/pciconf
Author: pfg Date: Fri Feb 26 23:12:59 2016 New Revision: 296132 URL: https://svnweb.freebsd.org/changeset/base/296132 Log: pciconf: Silence a GCC warning. Fix the build on sparc64 and powerpc. Taken from: wma Modified: head/usr.sbin/pciconf/cap.c Modified: head/usr.sbin/pciconf/cap.c == --- head/usr.sbin/pciconf/cap.c Fri Feb 26 22:25:35 2016(r296131) +++ head/usr.sbin/pciconf/cap.c Fri Feb 26 23:12:59 2016(r296132) @@ -535,7 +535,7 @@ cap_pciaf(int fd, struct pci_conf *p, ui } static const char * -ea_bei_to_name(uint8_t bei) +ea_bei_to_name(int bei) { static const char *barstr[] = { "BAR0", "BAR1", "BAR2", "BAR3", "BAR4", "BAR5" ___ 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: r296131 - head/etc/mtree
Author: emaste Date: Fri Feb 26 22:25:35 2016 New Revision: 296131 URL: https://svnweb.freebsd.org/changeset/base/296131 Log: Restore lib/casper debug directory, reverting r296130 Reported by: bdrewery Pointy hat to:emaste Modified: head/etc/mtree/BSD.debug.dist Modified: head/etc/mtree/BSD.debug.dist == --- head/etc/mtree/BSD.debug.dist Fri Feb 26 22:19:39 2016 (r296130) +++ head/etc/mtree/BSD.debug.dist Fri Feb 26 22:25:35 2016 (r296131) @@ -15,6 +15,8 @@ lib geom .. +casper +.. .. libexec .. ___ 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: r296124 - in head: share/man/man7 share/mk sys/conf
On 2/26/16 2:19 PM, Bryan Drewery wrote: > On 2/26/16 2:14 PM, Bryan Drewery wrote: >> Author: bdrewery >> Date: Fri Feb 26 22:14:00 2016 >> New Revision: 296124 >> URL: https://svnweb.freebsd.org/changeset/base/296124 >> >> Log: >> Import bsd.clang-analyze.mk based on NetBSD's version. >> >> This allows 'make analyze' or 'make OBJ.clang-analyzer' to run the >> Clang static analyzer and present results on stdout. >> >> Obtained from: NetBSD (CVS Rev. 1.3) >> Sponsored by: EMC / Isilon Storage Division >> Differential Revision: https://reviews.freebsd.org/D5449 >> > > I just wanted to call special attention to this one. You may find it > useful to run in something you maintain. scan-build can achieve the > same thing but this one is at least built-in and dependency-free. > > It doesn't work for the kernel yet. > Though it does work in modules! -- Regards, Bryan Drewery ___ 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: r296130 - head/etc/mtree
On 2/26/16 2:19 PM, Ed Maste wrote: > Author: emaste > Date: Fri Feb 26 22:19:39 2016 > New Revision: 296130 > URL: https://svnweb.freebsd.org/changeset/base/296130 > > Log: > Remove libexec/casper debug directory missed in r296047 > > Modified: > head/etc/mtree/BSD.debug.dist > > Modified: head/etc/mtree/BSD.debug.dist > == > --- head/etc/mtree/BSD.debug.dist Fri Feb 26 22:14:23 2016 > (r296129) > +++ head/etc/mtree/BSD.debug.dist Fri Feb 26 22:19:39 2016 > (r296130) > @@ -15,8 +15,6 @@ > lib > geom > .. > -casper > -.. > .. > libexec > .. > I think we do want this though. The casper libraries are installed to /lib/casper. -- Regards, Bryan Drewery ___ 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: r296130 - head/etc/mtree
Author: emaste Date: Fri Feb 26 22:19:39 2016 New Revision: 296130 URL: https://svnweb.freebsd.org/changeset/base/296130 Log: Remove libexec/casper debug directory missed in r296047 Modified: head/etc/mtree/BSD.debug.dist Modified: head/etc/mtree/BSD.debug.dist == --- head/etc/mtree/BSD.debug.dist Fri Feb 26 22:14:23 2016 (r296129) +++ head/etc/mtree/BSD.debug.dist Fri Feb 26 22:19:39 2016 (r296130) @@ -15,8 +15,6 @@ lib geom .. -casper -.. .. libexec .. ___ 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: r296124 - in head: share/man/man7 share/mk sys/conf
On 2/26/16 2:14 PM, Bryan Drewery wrote: > Author: bdrewery > Date: Fri Feb 26 22:14:00 2016 > New Revision: 296124 > URL: https://svnweb.freebsd.org/changeset/base/296124 > > Log: > Import bsd.clang-analyze.mk based on NetBSD's version. > > This allows 'make analyze' or 'make OBJ.clang-analyzer' to run the > Clang static analyzer and present results on stdout. > > Obtained from: NetBSD (CVS Rev. 1.3) > Sponsored by: EMC / Isilon Storage Division > Differential Revision: https://reviews.freebsd.org/D5449 > I just wanted to call special attention to this one. You may find it useful to run in something you maintain. scan-build can achieve the same thing but this one is at least built-in and dependency-free. It doesn't work for the kernel yet. -- Regards, Bryan Drewery ___ 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: r296129 - in head/lib: libdpv libfigpar libgpio libnv libpjdlog libproc libproc/tests
Author: bdrewery Date: Fri Feb 26 22:14:23 2016 New Revision: 296129 URL: https://svnweb.freebsd.org/changeset/base/296129 Log: Remove WARNS inherited fine by ../Makefile.inc. Sponsored by: EMC / Isilon Storage Division Added: head/lib/libproc/Makefile.inc (contents, props changed) Modified: head/lib/libdpv/Makefile head/lib/libfigpar/Makefile head/lib/libgpio/Makefile head/lib/libnv/Makefile head/lib/libpjdlog/Makefile head/lib/libproc/tests/Makefile Modified: head/lib/libdpv/Makefile == --- head/lib/libdpv/MakefileFri Feb 26 22:14:19 2016(r296128) +++ head/lib/libdpv/MakefileFri Feb 26 22:14:23 2016(r296129) @@ -12,6 +12,4 @@ SRCS= dialog_util.c dialogrc.c dprompt. CFLAGS+= -I${.CURDIR} -WARNS?=6 - .include Modified: head/lib/libfigpar/Makefile == --- head/lib/libfigpar/Makefile Fri Feb 26 22:14:19 2016(r296128) +++ head/lib/libfigpar/Makefile Fri Feb 26 22:14:23 2016(r296129) @@ -16,6 +16,4 @@ CFLAGS+= -I${.CURDIR} SRCS= figpar.c string_m.c -WARNS?=6 - .include Modified: head/lib/libgpio/Makefile == --- head/lib/libgpio/Makefile Fri Feb 26 22:14:19 2016(r296128) +++ head/lib/libgpio/Makefile Fri Feb 26 22:14:23 2016(r296129) @@ -31,6 +31,4 @@ MLINKS= gpio.3 gpio_open.3 \ gpio.3 gpio_pin_invout.3 \ gpio.3 gpio_pin_pulsate.3 -WARNS?=6 - .include Modified: head/lib/libnv/Makefile == --- head/lib/libnv/Makefile Fri Feb 26 22:14:19 2016(r296128) +++ head/lib/libnv/Makefile Fri Feb 26 22:14:23 2016(r296129) @@ -15,8 +15,6 @@ SRCS+=msgio.c SRCS+= nvlist.c SRCS+= nvpair.c -WARNS?=6 - .if ${MK_TESTS} != "no" SUBDIR+= tests .endif Modified: head/lib/libpjdlog/Makefile == --- head/lib/libpjdlog/Makefile Fri Feb 26 22:14:19 2016(r296128) +++ head/lib/libpjdlog/Makefile Fri Feb 26 22:14:23 2016(r296129) @@ -15,6 +15,4 @@ CFLAGS+=-I${.CURDIR} LIBADD=util -WARNS?=6 - .include Added: head/lib/libproc/Makefile.inc == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libproc/Makefile.inc Fri Feb 26 22:14:23 2016 (r296129) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +.include "../Makefile.inc" Modified: head/lib/libproc/tests/Makefile == --- head/lib/libproc/tests/Makefile Fri Feb 26 22:14:19 2016 (r296128) +++ head/lib/libproc/tests/Makefile Fri Feb 26 22:14:23 2016 (r296129) @@ -12,6 +12,4 @@ LIBADD= elf proc rtld_db util # for testing symbol lookup. STRIP= -WARNS?=6 - .include ___ 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: r296128 - head/lib/libc/string
Author: bdrewery Date: Fri Feb 26 22:14:19 2016 New Revision: 296128 URL: https://svnweb.freebsd.org/changeset/base/296128 Log: Make it clear that the "size" argument is for the dst string. The rest of the manpage already referenced 'dstsize' but did not rename the variable in the prototype in r257646. MFC after:3 days Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libc/string/strlcpy.3 Modified: head/lib/libc/string/strlcpy.3 == --- head/lib/libc/string/strlcpy.3 Fri Feb 26 22:14:15 2016 (r296127) +++ head/lib/libc/string/strlcpy.3 Fri Feb 26 22:14:19 2016 (r296128) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 4, 2013 +.Dd February 26, 2016 .Dt STRLCPY 3 .Os .Sh NAME @@ -39,9 +39,9 @@ .Sh SYNOPSIS .In string.h .Ft size_t -.Fn strlcpy "char * restrict dst" "const char * restrict src" "size_t size" +.Fn strlcpy "char * restrict dst" "const char * restrict src" "size_t dstsize" .Ft size_t -.Fn strlcat "char * restrict dst" "const char * restrict src" "size_t size" +.Fn strlcat "char * restrict dst" "const char * restrict src" "size_t dstsize" .Sh DESCRIPTION The .Fn strlcpy ___ 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: r296118 - head/share/mk
Author: bdrewery Date: Fri Feb 26 22:13:38 2016 New Revision: 296118 URL: https://svnweb.freebsd.org/changeset/base/296118 Log: Allow configuring .MAKE.MODE via META_MODE as meta.sys.mk does. meta.sys.mk is only used for the DIRDEPS_BUILD. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/sys.mk Modified: head/share/mk/sys.mk == --- head/share/mk/sys.mkFri Feb 26 22:13:35 2016(r296117) +++ head/share/mk/sys.mkFri Feb 26 22:13:38 2016(r296118) @@ -45,12 +45,15 @@ __ENV_ONLY_OPTIONS:= \ .if ${MK_DIRDEPS_BUILD} == "yes" .sinclude .elif ${MK_META_MODE} == "yes" && defined(.MAKEFLAGS) && ${.MAKEFLAGS:M-B} == "" -.MAKE.MODE= meta verbose +# verbose will show .MAKE.META.PREFIX for each target. +META_MODE= meta verbose .if !exists(/dev/filemon) -.MAKE.MODE+= nofilemon +META_MODE+= nofilemon .endif .endif -.MAKE.MODE?= normal +META_MODE?= normal +.export META_MODE +.MAKE.MODE?= ${META_MODE} .if ${MK_AUTO_OBJ} == "yes" # This needs to be done early - before .PATH is computed ___ 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: r296121 - head/share/mk
Author: bdrewery Date: Fri Feb 26 22:13:48 2016 New Revision: 296121 URL: https://svnweb.freebsd.org/changeset/base/296121 Log: DIRDEPS_BUILD: Fix some things building in MAKELEVEL0. For PROGS this was recursing twice since MAKELEVEL0 is for 'dirdeps' which then really builds in a sub-make. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.confs.mk head/share/mk/bsd.crunchgen.mk head/share/mk/bsd.doc.mk head/share/mk/bsd.files.mk head/share/mk/bsd.incs.mk head/share/mk/bsd.info.mk head/share/mk/bsd.progs.mk Modified: head/share/mk/bsd.confs.mk == --- head/share/mk/bsd.confs.mk Fri Feb 26 22:13:45 2016(r296120) +++ head/share/mk/bsd.confs.mk Fri Feb 26 22:13:48 2016(r296121) @@ -12,7 +12,9 @@ buildconfig: ${${group}} .endfor .endif +.if !defined(_SKIP_BUILD) all: buildconfig +.endif .if !target(installconfig) .for group in ${CONFGROUPS} Modified: head/share/mk/bsd.crunchgen.mk == --- head/share/mk/bsd.crunchgen.mk Fri Feb 26 22:13:45 2016 (r296120) +++ head/share/mk/bsd.crunchgen.mk Fri Feb 26 22:13:48 2016 (r296121) @@ -70,7 +70,9 @@ LINKS+= ${BINDIR}/${PROG} ${BINDIR}/${A} .endfor .endfor +.if !defined(_SKIP_BUILD) all: ${PROG} +.endif exe: ${PROG} ${CONF}: Makefile Modified: head/share/mk/bsd.doc.mk == --- head/share/mk/bsd.doc.mkFri Feb 26 22:13:45 2016(r296120) +++ head/share/mk/bsd.doc.mkFri Feb 26 22:13:48 2016(r296121) @@ -107,9 +107,11 @@ COMPAT?= -C .PATH: ${.CURDIR} ${SRCDIR} +.if !defined(_SKIP_BUILD) .for _dev in ${PRINTERDEVICE} all: ${DFILE.${_dev}} .endfor +.endif .if !target(print) .for _dev in ${PRINTERDEVICE} Modified: head/share/mk/bsd.files.mk == --- head/share/mk/bsd.files.mk Fri Feb 26 22:13:45 2016(r296120) +++ head/share/mk/bsd.files.mk Fri Feb 26 22:13:48 2016(r296121) @@ -16,7 +16,9 @@ ${${group}}:= ${${group}:O:u} buildfiles: ${${group}} .endfor +.if !defined(_SKIP_BUILD) all: buildfiles +.endif .for group in ${FILESGROUPS} .if defined(${group}) && !empty(${group}) Modified: head/share/mk/bsd.incs.mk == --- head/share/mk/bsd.incs.mk Fri Feb 26 22:13:45 2016(r296120) +++ head/share/mk/bsd.incs.mk Fri Feb 26 22:13:48 2016(r296121) @@ -14,7 +14,9 @@ buildincludes: ${${group}} .endfor .endif +.if !defined(_SKIP_BUILD) all: buildincludes +.endif .if !target(installincludes) .for group in ${INCSGROUPS} Modified: head/share/mk/bsd.info.mk == --- head/share/mk/bsd.info.mk Fri Feb 26 22:13:45 2016(r296120) +++ head/share/mk/bsd.info.mk Fri Feb 26 22:13:48 2016(r296121) @@ -125,9 +125,10 @@ CLEANFILES+= ${IFILENS} .if !defined(NO_INFOCOMPRESS) CLEANFILES+= ${IFILENS:S/$/${ICOMPRESS_EXT}/} IFILES=${IFILENS:S/$/${ICOMPRESS_EXT}/:S/.html${ICOMPRESS_EXT}/.html/} -all: ${IFILES} .else IFILES=${IFILENS} +.endif +.if !defined(_SKIP_BUILD) all: ${IFILES} .endif Modified: head/share/mk/bsd.progs.mk == --- head/share/mk/bsd.progs.mk Fri Feb 26 22:13:45 2016(r296120) +++ head/share/mk/bsd.progs.mk Fri Feb 26 22:13:48 2016(r296121) @@ -53,7 +53,9 @@ UPDATE_DEPENDFILE ?= NO # prog.mk will do the rest .else # !defined(PROG) +.if !defined(_SKIP_BUILD) all: ${PROGS} +.endif # We cannot capture dependencies for meta mode here UPDATE_DEPENDFILE = NO ___ 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: r296122 - head/share/mk
Author: bdrewery Date: Fri Feb 26 22:13:52 2016 New Revision: 296122 URL: https://svnweb.freebsd.org/changeset/base/296122 Log: Move PROGS logic to proper place and remove redundant and unneeded logic. - bsd.progs.mk is safe to include regardless of PROGS/PROGS_CXX/SCRIPTS being set. - bsd.progs.mk includes bsd.prog.mk always and will bring in bsd.files.mk and bsd.obj.mk. - DIRDEPS_BUILD: There's no need for _SKIP_BUILD or _SKIP_STAGING as the PROGS were implicitly being built by the staging dependency anyway. This was also preventing other objects from building if they were not part of the staging sets. - DIRDEPS_BUILD: This fixes PROGS without bsd.test.mk not staging. MFC after:2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.progs.mk head/share/mk/bsd.test.mk Modified: head/share/mk/bsd.progs.mk == --- head/share/mk/bsd.progs.mk Fri Feb 26 22:13:48 2016(r296121) +++ head/share/mk/bsd.progs.mk Fri Feb 26 22:13:52 2016(r296122) @@ -59,11 +59,19 @@ all: ${PROGS} # We cannot capture dependencies for meta mode here UPDATE_DEPENDFILE = NO + +.if ${MK_STAGING} != "no" +.if !empty(PROGS) +stage_files.prog: ${PROGS} +.endif +.endif # ${MK_STAGING} != "no" .endif .endif # PROGS || PROGS_CXX # These are handled by the main make process. .ifdef _RECURSING_PROGS +MK_STAGING= no + _PROGS_GLOBAL_VARS= CLEANFILES CLEANDIRS CONFGROUPS FILESGROUPS INCSGROUPS \ SCRIPTS .for v in ${_PROGS_GLOBAL_VARS} Modified: head/share/mk/bsd.test.mk == --- head/share/mk/bsd.test.mk Fri Feb 26 22:13:48 2016(r296121) +++ head/share/mk/bsd.test.mk Fri Feb 26 22:13:52 2016(r296122) @@ -93,30 +93,4 @@ beforecheck realcheck aftercheck check: .ORDER: beforecheck realcheck aftercheck check: beforecheck realcheck aftercheck -.ifdef PROG -# we came here via bsd.progs.mk below -# parent will do staging. -MK_STAGING= no -.endif - -.if !empty(PROGS) || !empty(PROGS_CXX) || !empty(SCRIPTS) .include -.endif -.include - -.if !defined(PROG) && ${MK_STAGING} != "no" -.if !defined(_SKIP_BUILD) -# this will handle staging if needed -_SKIP_STAGING= no -# but we don't want it to build anything -_SKIP_BUILD= -.endif -.if !empty(PROGS) -stage_files.prog: ${PROGS} -.endif -.include -.endif - -.if !target(objwarn) -.include -.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: r296119 - head/share/mk
Author: bdrewery Date: Fri Feb 26 22:13:42 2016 New Revision: 296119 URL: https://svnweb.freebsd.org/changeset/base/296119 Log: Track .meta files for .sh but don't preserve timestamp. See r291320 for more information. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/sys.mk Modified: head/share/mk/sys.mk == --- head/share/mk/sys.mkFri Feb 26 22:13:38 2016(r296118) +++ head/share/mk/sys.mkFri Feb 26 22:13:42 2016(r296119) @@ -282,8 +282,8 @@ YFLAGS ?= -d # non-Posix rule set -.sh: .NOMETA - cp -fp ${.IMPSRC} ${.TARGET} +.sh: + cp -f ${.IMPSRC} ${.TARGET} chmod a+x ${.TARGET} .c.ln: ___ 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: r296127 - in head: lib/libcasper lib/libcasper/libcasper lib/libcasper/services/cap_dns lib/libcasper/services/cap_grp lib/libcasper/services/cap_pwd lib/libcasper/services/cap_random l...
Author: bdrewery Date: Fri Feb 26 22:14:15 2016 New Revision: 296127 URL: https://svnweb.freebsd.org/changeset/base/296127 Log: Update dependencies. Sponsored by: EMC / Isilon Storage Division Added: head/lib/libcasper/libcasper/Makefile.depend - copied, changed from r296126, head/lib/libcasper/Makefile.depend head/lib/libcasper/services/cap_dns/Makefile.depend - copied, changed from r296126, head/lib/libcasper/Makefile.depend head/lib/libcasper/services/cap_grp/Makefile.depend - copied, changed from r296126, head/lib/libcasper/Makefile.depend head/lib/libcasper/services/cap_pwd/Makefile.depend - copied, changed from r296126, head/lib/libcasper/Makefile.depend head/lib/libcasper/services/cap_random/Makefile.depend - copied, changed from r296126, head/lib/libcasper/Makefile.depend head/lib/libcasper/services/cap_sysctl/Makefile.depend (contents, props changed) - copied, changed from r296126, head/lib/libcasper/Makefile.depend Deleted: head/lib/libcasper/Makefile.depend Modified: head/sbin/ping/Makefile.depend head/targets/pseudo/userland/gnu/Makefile.depend head/targets/pseudo/userland/lib/Makefile.depend head/usr.bin/kdump/Makefile.depend head/usr.sbin/tcpdump/tcpdump/Makefile.depend Copied and modified: head/lib/libcasper/libcasper/Makefile.depend (from r296126, head/lib/libcasper/Makefile.depend) == --- head/lib/libcasper/Makefile.depend Fri Feb 26 22:14:08 2016 (r296126, copy source) +++ head/lib/libcasper/libcasper/Makefile.dependFri Feb 26 22:14:15 2016(r296127) @@ -8,10 +8,8 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ - lib/libcapsicum \ lib/libcompiler_rt \ lib/libnv \ - lib/libpjdlog \ .include Copied and modified: head/lib/libcasper/services/cap_dns/Makefile.depend (from r296126, head/lib/libcasper/Makefile.depend) == --- head/lib/libcasper/Makefile.depend Fri Feb 26 22:14:08 2016 (r296126, copy source) +++ head/lib/libcasper/services/cap_dns/Makefile.depend Fri Feb 26 22:14:15 2016(r296127) @@ -8,10 +8,9 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ - lib/libcapsicum \ + lib/libcasper/libcasper \ lib/libcompiler_rt \ lib/libnv \ - lib/libpjdlog \ .include Copied and modified: head/lib/libcasper/services/cap_grp/Makefile.depend (from r296126, head/lib/libcasper/Makefile.depend) == --- head/lib/libcasper/Makefile.depend Fri Feb 26 22:14:08 2016 (r296126, copy source) +++ head/lib/libcasper/services/cap_grp/Makefile.depend Fri Feb 26 22:14:15 2016(r296127) @@ -8,10 +8,9 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ - lib/libcapsicum \ + lib/libcasper/libcasper \ lib/libcompiler_rt \ lib/libnv \ - lib/libpjdlog \ .include Copied and modified: head/lib/libcasper/services/cap_pwd/Makefile.depend (from r296126, head/lib/libcasper/Makefile.depend) == --- head/lib/libcasper/Makefile.depend Fri Feb 26 22:14:08 2016 (r296126, copy source) +++ head/lib/libcasper/services/cap_pwd/Makefile.depend Fri Feb 26 22:14:15 2016(r296127) @@ -8,10 +8,9 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ - lib/libcapsicum \ + lib/libcasper/libcasper \ lib/libcompiler_rt \ lib/libnv \ - lib/libpjdlog \ .include Copied and modified: head/lib/libcasper/services/cap_random/Makefile.depend (from r296126, head/lib/libcasper/Makefile.depend) == --- head/lib/libcasper/Makefile.depend Fri Feb 26 22:14:08 2016 (r296126, copy source) +++ head/lib/libcasper/services/cap_random/Makefile.depend Fri Feb 26 22:14:15 2016(r296127) @@ -8,10 +8,9 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ - lib/libcapsicum \ + lib/libcasper/libcasper \ lib/libcompiler_rt \ lib/libnv \ - lib/libpjdlog \ .include Copied and modified: head/lib/libcasper/services/cap_sysctl/Makefile.depend (from r296126, head/lib/libcasper/Makefile.depend) == --- head/lib/libcasper/Makefile.depend Fri Feb 26 22:14:08 2016 (r296126, copy source) +++ head/lib/libcasper/services/cap_sysctl/Makefile.depend Fri Feb 26 22:14:15 2016(r296127) @@ -8,10 +8,9 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ -
svn commit: r296117 - in head: share/mk sys/conf
Author: bdrewery Date: Fri Feb 26 22:13:35 2016 New Revision: 296117 URL: https://svnweb.freebsd.org/changeset/base/296117 Log: Remove more references to targets we've never had. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.sys.mk head/sys/conf/kern.mk Modified: head/share/mk/bsd.sys.mk == --- head/share/mk/bsd.sys.mkFri Feb 26 22:13:31 2016(r296116) +++ head/share/mk/bsd.sys.mkFri Feb 26 22:13:35 2016(r296117) @@ -179,11 +179,10 @@ CXXFLAGS+= ${CXXFLAGS.${COMPILER_TYPE}} PHONY_NOTMAIN = afterdepend afterinstall all beforedepend beforeinstall \ beforelinking build build-tools buildconfig buildfiles \ buildincludes check checkdpadd clean cleandepend cleandir \ - cleanobj configure depend dependall distclean distribute exe \ + cleanobj configure depend distclean distribute exe \ files html includes install installconfig installfiles \ - installincludes lint obj objlink objs objwarn realall \ - realdepend realinstall subdir-all subdir-depend \ - subdir-install tags whereobj + installincludes lint obj objlink objs objwarn \ + realinstall tags whereobj # we don't want ${PROG} to be PHONY .PHONY: ${PHONY_NOTMAIN:N${PROG:U}} Modified: head/sys/conf/kern.mk == --- head/sys/conf/kern.mk Fri Feb 26 22:13:31 2016(r296116) +++ head/sys/conf/kern.mk Fri Feb 26 22:13:35 2016(r296117) @@ -210,10 +210,10 @@ CFLAGS+= ${CFLAGS.${COMPILER_TYPE}} ${CF PHONY_NOTMAIN = afterdepend afterinstall all beforedepend beforeinstall \ beforelinking build build-tools buildfiles buildincludes \ checkdpadd clean cleandepend cleandir cleanobj configure \ - depend dependall distclean distribute exe \ + depend distclean distribute exe \ html includes install installfiles installincludes lint \ - obj objlink objs objwarn realall realdepend \ - realinstall regress subdir-all subdir-depend subdir-install \ + obj objlink objs objwarn \ + realinstall regress \ tags whereobj .PHONY: ${PHONY_NOTMAIN} ___ 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: r296126 - in head/lib/libcasper: . libcasper services services/cap_dns services/cap_grp services/cap_pwd services/cap_random services/cap_sysctl
Author: bdrewery Date: Fri Feb 26 22:14:08 2016 New Revision: 296126 URL: https://svnweb.freebsd.org/changeset/base/296126 Log: Remove unneeded lines. - WARNS can be inherited from lib/Makefile.inc - CFLAGS referred to a non-existent directory and this shouldn't be needed anyhow due to the build picking up includes from WORLDTMP. Sponsored by: EMC / Isilon Storage Division Added: head/lib/libcasper/Makefile.inc (contents, props changed) head/lib/libcasper/services/Makefile.inc (contents, props changed) Modified: head/lib/libcasper/libcasper/Makefile head/lib/libcasper/services/cap_dns/Makefile head/lib/libcasper/services/cap_grp/Makefile head/lib/libcasper/services/cap_pwd/Makefile head/lib/libcasper/services/cap_random/Makefile head/lib/libcasper/services/cap_sysctl/Makefile Added: head/lib/libcasper/Makefile.inc == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libcasper/Makefile.inc Fri Feb 26 22:14:08 2016 (r296126) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +.include "../Makefile.inc" Modified: head/lib/libcasper/libcasper/Makefile == --- head/lib/libcasper/libcasper/Makefile Fri Feb 26 22:14:04 2016 (r296125) +++ head/lib/libcasper/libcasper/Makefile Fri Feb 26 22:14:08 2016 (r296126) @@ -18,8 +18,6 @@ LIBADD= nv CFLAGS+=-I${.CURDIR} -WARNS?=6 - MAN+= libcasper.3 MLINKS+=libcasper.3 cap_init.3 Added: head/lib/libcasper/services/Makefile.inc == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libcasper/services/Makefile.incFri Feb 26 22:14:08 2016 (r296126) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +.include "../Makefile.inc" Modified: head/lib/libcasper/services/cap_dns/Makefile == --- head/lib/libcasper/services/cap_dns/MakefileFri Feb 26 22:14:04 2016(r296125) +++ head/lib/libcasper/services/cap_dns/MakefileFri Feb 26 22:14:08 2016(r296126) @@ -13,8 +13,5 @@ INCS= cap_dns.h LIBADD=nv CFLAGS+=-I${.CURDIR} -CFLAGS+=-I${.CURDIR}/../libcasper - -WARNS?=6 .include Modified: head/lib/libcasper/services/cap_grp/Makefile == --- head/lib/libcasper/services/cap_grp/MakefileFri Feb 26 22:14:04 2016(r296125) +++ head/lib/libcasper/services/cap_grp/MakefileFri Feb 26 22:14:08 2016(r296126) @@ -13,8 +13,5 @@ INCS= cap_grp.h LIBADD=nv CFLAGS+=-I${.CURDIR} -CFLAGS+=-I${.CURDIR}/../libcasper - -WARNS?=6 .include Modified: head/lib/libcasper/services/cap_pwd/Makefile == --- head/lib/libcasper/services/cap_pwd/MakefileFri Feb 26 22:14:04 2016(r296125) +++ head/lib/libcasper/services/cap_pwd/MakefileFri Feb 26 22:14:08 2016(r296126) @@ -13,8 +13,5 @@ INCS= cap_pwd.h LIBADD=nv CFLAGS+=-I${.CURDIR} -CFLAGS+=-I${.CURDIR}/../libcasper - -WARNS?=6 .include Modified: head/lib/libcasper/services/cap_random/Makefile == --- head/lib/libcasper/services/cap_random/Makefile Fri Feb 26 22:14:04 2016(r296125) +++ head/lib/libcasper/services/cap_random/Makefile Fri Feb 26 22:14:08 2016(r296126) @@ -13,8 +13,5 @@ INCS= cap_random.h LIBADD=nv CFLAGS+=-I${.CURDIR} -CFLAGS+=-I${.CURDIR}/../libcasper - -WARNS?=6 .include Modified: head/lib/libcasper/services/cap_sysctl/Makefile == --- head/lib/libcasper/services/cap_sysctl/Makefile Fri Feb 26 22:14:04 2016(r296125) +++ head/lib/libcasper/services/cap_sysctl/Makefile Fri Feb 26 22:14:08 2016(r296126) @@ -13,8 +13,5 @@ INCS= cap_sysctl.h LIBADD=nv CFLAGS+=-I${.CURDIR} -CFLAGS+=-I${.CURDIR}/../libcasper - -WARNS?=6 .include ___ 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: r296116 - head/share/mk
Author: bdrewery Date: Fri Feb 26 22:13:31 2016 New Revision: 296116 URL: https://svnweb.freebsd.org/changeset/base/296116 Log: Remove _manpages and _maninstall targets as they are no longer needed. r96164 added them to avoid recursing twice with _SUBDIR. That issue was fixed in bsd.subdir.mk in r291635 for all targets. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.lib.mk head/share/mk/bsd.man.mk head/share/mk/bsd.prog.mk Modified: head/share/mk/bsd.lib.mk == --- head/share/mk/bsd.lib.mkFri Feb 26 22:03:41 2016(r296115) +++ head/share/mk/bsd.lib.mkFri Feb 26 22:13:31 2016(r296116) @@ -299,7 +299,7 @@ CLEANFILES+=${_LIBS} .endif .if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY) -all: _manpages +all: all-man .endif .endif @@ -400,8 +400,8 @@ _libinstall: .include .if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY) -realinstall: _maninstall -.ORDER: beforeinstall _maninstall +realinstall: maninstall +.ORDER: beforeinstall maninstall .endif .endif Modified: head/share/mk/bsd.man.mk == --- head/share/mk/bsd.man.mkFri Feb 26 22:03:41 2016(r296115) +++ head/share/mk/bsd.man.mkFri Feb 26 22:13:31 2016(r296116) @@ -71,8 +71,7 @@ MAN+= ${MAN${__sect}} .endfor .endif -_manpages: -all-man: _manpages +all-man: .if ${MK_MANCOMPRESS} == "no" @@ -92,13 +91,13 @@ CLEANFILES+=${MAN:T:S/$/${FILTEXTENSION CLEANFILES+= ${MAN:T:S/$/${CATEXT}${FILTEXTENSION}/g} .for __page in ${MAN} .for __target in ${__page:T:S/$/${FILTEXTENSION}/g} -_manpages: ${__target} +all-man: ${__target} ${__target}: ${__page} ${MANFILTER} < ${.ALLSRC} > ${.TARGET} .endfor .if defined(MANBUILDCAT) && !empty(MANBUILDCAT) .for __target in ${__page:T:S/$/${CATEXT}${FILTEXTENSION}/g} -_manpages: ${__target} +all-man: ${__target} ${__target}: ${__page} ${MANFILTER} < ${.ALLSRC} | ${MANDOC_CMD} > ${.TARGET} .endfor @@ -111,13 +110,13 @@ CLEANFILES+= ${MAN:T:S/$/${CATEXT}/g} .if defined(MANBUILDCAT) && !empty(MANBUILDCAT) .for __page in ${MAN} .for __target in ${__page:T:S/$/${CATEXT}/g} -_manpages: ${__target} +all-man: ${__target} ${__target}: ${__page} ${MANDOC_CMD} ${.ALLSRC} > ${.TARGET} .endfor .endfor .else -_manpages: ${MAN} +all-man: ${MAN} .endif .endif .endif # defined(MANFILTER) @@ -147,7 +146,7 @@ CLEANFILES+=${MAN:T:S/$/${MCOMPRESS_EXT CLEANFILES+= ${MAN:T:S/$/${CATEXT}${MCOMPRESS_EXT}/g} .for __page in ${MAN} .for __target in ${__page:T:S/$/${MCOMPRESS_EXT}/} -_manpages: ${__target} +all-man: ${__target} ${__target}: ${__page} .if defined(MANFILTER) ${MANFILTER} < ${.ALLSRC} | ${MCOMPRESS_CMD} > ${.TARGET} @@ -157,7 +156,7 @@ ${__target}: ${__page} .endfor .if defined(MANBUILDCAT) && !empty(MANBUILDCAT) .for __target in ${__page:T:S/$/${CATEXT}${MCOMPRESS_EXT}/} -_manpages: ${__target} +all-man: ${__target} ${__target}: ${__page} .if defined(MANFILTER) ${MANFILTER} < ${.ALLSRC} | ${MANDOC_CMD} | ${MCOMPRESS_CMD} > ${.TARGET} @@ -182,10 +181,9 @@ _MANLINKS+=${CATDIR}${_osect}${MANSUBDI .endfor .endif -maninstall: _maninstall -_maninstall: +maninstall: .if defined(MAN) && !empty(MAN) -_maninstall: ${MAN} +maninstall: ${MAN} .if ${MK_MANCOMPRESS} == "no" .if defined(MANFILTER) .for __page in ${MAN} Modified: head/share/mk/bsd.prog.mk == --- head/share/mk/bsd.prog.mk Fri Feb 26 22:03:41 2016(r296115) +++ head/share/mk/bsd.prog.mk Fri Feb 26 22:13:31 2016(r296116) @@ -150,7 +150,7 @@ all: .else all: ${PROG} ${SCRIPTS} .if ${MK_MAN} != "no" -all: _manpages +all: all-man .endif .endif @@ -258,8 +258,8 @@ NLSNAME?= ${PROG} .include .if ${MK_MAN} != "no" -realinstall: _maninstall -.ORDER: beforeinstall _maninstall +realinstall: maninstall +.ORDER: beforeinstall maninstall .endif .endif # !target(install) ___ 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: r296124 - in head: share/man/man7 share/mk sys/conf
Author: bdrewery Date: Fri Feb 26 22:14:00 2016 New Revision: 296124 URL: https://svnweb.freebsd.org/changeset/base/296124 Log: Import bsd.clang-analyze.mk based on NetBSD's version. This allows 'make analyze' or 'make OBJ.clang-analyzer' to run the Clang static analyzer and present results on stdout. Obtained from:NetBSD (CVS Rev. 1.3) Sponsored by: EMC / Isilon Storage Division Differential Revision:https://reviews.freebsd.org/D5449 Added: head/share/mk/bsd.clang-analyze.mk (contents, props changed) Modified: head/share/man/man7/build.7 head/share/mk/Makefile head/share/mk/bsd.dep.mk head/share/mk/bsd.lib.mk head/share/mk/bsd.prog.mk head/share/mk/bsd.subdir.mk head/share/mk/bsd.sys.mk head/sys/conf/kmod.mk Modified: head/share/man/man7/build.7 == --- head/share/man/man7/build.7 Fri Feb 26 22:13:56 2016(r296123) +++ head/share/man/man7/build.7 Fri Feb 26 22:14:00 2016(r296124) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 21, 2015 +.Dd February 26, 2016 .Dt BUILD 7 .Os .Sh NAME @@ -107,6 +107,8 @@ section below, and by the variables docu The following list provides the names and actions for the targets supported by the build system: .Bl -tag -width ".Cm cleandepend" +.It Cm analyze +Run Clang static analyzer against all objects and present output on stdout. .It Cm check Run tests for a given subdirectory. The default directory used is Modified: head/share/mk/Makefile == --- head/share/mk/Makefile Fri Feb 26 22:13:56 2016(r296123) +++ head/share/mk/Makefile Fri Feb 26 22:14:00 2016(r296124) @@ -17,6 +17,7 @@ FILES=\ auto.obj.mk \ bsd.README \ bsd.arch.inc.mk \ + bsd.clang-analyze.mk \ bsd.compiler.mk \ bsd.confs.mk \ bsd.cpu.mk \ Added: head/share/mk/bsd.clang-analyze.mk == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/mk/bsd.clang-analyze.mk Fri Feb 26 22:14:00 2016 (r296124) @@ -0,0 +1,105 @@ +# $FreeBSD$ +# +# Support Clang static analyzer on SRCS. +# +# +# +++ variables +++ +# +# CLANG_ANALYZE_CHECKERS Which checkers to run for all sources. +# +# CLANG_ANALYZE_CXX_CHECKERS Which checkers to run for C++ sources. +# +# CLANG_ANALYZE_OUTPUT Output format for generated files. +# text - don't generate extra files. +# html - generate html in obj.plist/ directories. +# plist - generate xml obj.plist files. +# See also: +# contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/Analyses.def +# +# CLANG_ANALYZE_OUTPUT_DIR Sets which directory output set by +# CLANG_ANALYZE_OUTPUT is placed into. +# +# +++ targets +++ +# +# analyze: +# Run the Clang static analyzer against all sources and present +# output on stdout. + +.if !target() +: + +.include + +.if ${COMPILER_TYPE} != "clang" && (make(analyze) || make(*.clang-analyzer)) +.error Clang static analyzer requires clang but found that compiler '${CC}' is ${COMPILER_TYPE} +.endif + +CLANG_ANALYZE_OUTPUT?= text +CLANG_ANALYZE_OUTPUT_DIR?= clang-analyze +CLANG_ANALYZE_FLAGS+= --analyze \ + -Xanalyzer -analyzer-output=${CLANG_ANALYZE_OUTPUT} \ + -o ${CLANG_ANALYZE_OUTPUT_DIR} + +CLANG_ANALYZE_CHECKERS+= core deadcode security unix +CLANG_ANALYZE_CXX_CHECKERS+= cplusplus + +.for checker in ${CLANG_ANALYZE_CHECKERS} +CLANG_ANALYZE_FLAGS+= -Xanalyzer -analyzer-checker=${checker} +.endfor +CLANG_ANALYZE_CXX_FLAGS+= ${CLANG_ANALYZE_FLAGS} +.for checker in ${CLANG_ANALYZE_CXX_CHECKERS} +CLANG_ANALYZE_CXX_FLAGS+= -Xanalyzer -analyzer-checker=${checker} +.endfor + +.SUFFIXES: .c .cc .cpp .cxx .C .clang-analyzer + +CLANG_ANALYZE_CFLAGS= ${CFLAGS:N-Wa,--fatal-warnings} +CLANG_ANALYZE_CXXFLAGS=${CXXFLAGS:N-Wa,--fatal-warnings} + +.c.clang-analyzer: + ${CC:N${CCACHE_BIN}} ${CLANG_ANALYZE_FLAGS} \ + ${CLANG_ANALYZE_CFLAGS} ${CPPFLAGS} \ + ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} \ + ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} +.cc.clang-analyzer .cpp.clang-analyzer .cxx.clang-analyzer .C.clang-analyzer: + ${CXX:N${CCACHE_BIN}} ${CLANG_ANALYZE_CXX_FLAGS} \ + ${CLANG_ANALYZE_CXXFLAGS} ${CPPFLAGS} \ + ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} \ + ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} + +CLANG_ANALYZE_SRCS= \ + ${SRCS:M*.[cC]} ${SRCS:M*.cc} \ + ${SRCS:M*.cpp} ${SRCS:M*.cxx} \ + ${DPSRCS:M*.[cC]} ${DPSRCS:M*.cc} \ +
svn commit: r296120 - head/targets
Author: bdrewery Date: Fri Feb 26 22:13:45 2016 New Revision: 296120 URL: https://svnweb.freebsd.org/changeset/base/296120 Log: Follow-up r295991: Only allow 'make destroy*' to include bsd.obj.mk. Sponsored by: EMC / Isilon Storage Division Modified: head/targets/Makefile.xtras Modified: head/targets/Makefile.xtras == --- head/targets/Makefile.xtras Fri Feb 26 22:13:42 2016(r296119) +++ head/targets/Makefile.xtras Fri Feb 26 22:13:45 2016(r296120) @@ -54,7 +54,9 @@ show-help: not-valid-target: @echo "ERROR: '${_TARGETS}' is not a valid target for ${MACHINE}." +.if make(destroy*) .include +.endif .for t in ${_TARGETS:Nlove} .if !target($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: r296125 - in head/lib/libcasper: . services
Author: bdrewery Date: Fri Feb 26 22:14:04 2016 New Revision: 296125 URL: https://svnweb.freebsd.org/changeset/base/296125 Log: These can build in parallel. Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libcasper/Makefile head/lib/libcasper/services/Makefile Modified: head/lib/libcasper/Makefile == --- head/lib/libcasper/Makefile Fri Feb 26 22:14:00 2016(r296124) +++ head/lib/libcasper/Makefile Fri Feb 26 22:14:04 2016(r296125) @@ -3,4 +3,6 @@ SUBDIR=libcasper SUBDIR+= services +SUBDIR_PARALLEL= + .include Modified: head/lib/libcasper/services/Makefile == --- head/lib/libcasper/services/MakefileFri Feb 26 22:14:00 2016 (r296124) +++ head/lib/libcasper/services/MakefileFri Feb 26 22:14:04 2016 (r296125) @@ -6,4 +6,6 @@ SUBDIR+=cap_pwd SUBDIR+= cap_random SUBDIR+= cap_sysctl +SUBDIR_PARALLEL= + .include ___ 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: r296123 - head/share/mk
Author: bdrewery Date: Fri Feb 26 22:13:56 2016 New Revision: 296123 URL: https://svnweb.freebsd.org/changeset/base/296123 Log: META_MODE: Default to the silent build. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/sys.mk Modified: head/share/mk/sys.mk == --- head/share/mk/sys.mkFri Feb 26 22:13:52 2016(r296122) +++ head/share/mk/sys.mkFri Feb 26 22:13:56 2016(r296123) @@ -47,6 +47,10 @@ __ENV_ONLY_OPTIONS:= \ .elif ${MK_META_MODE} == "yes" && defined(.MAKEFLAGS) && ${.MAKEFLAGS:M-B} == "" # verbose will show .MAKE.META.PREFIX for each target. META_MODE= meta verbose +# silent will hide command output if a .meta file is created. +.if !defined(NO_SILENT) +META_MODE+=silent=yes +.endif .if !exists(/dev/filemon) META_MODE+= nofilemon .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: r296114 - head/sys/net80211
Author: avos Date: Fri Feb 26 20:47:08 2016 New Revision: 296114 URL: https://svnweb.freebsd.org/changeset/base/296114 Log: net80211: fix 'uma_zalloc_arg: zone "32" with non-sleepable locks held' when 'sysctl net.wlan.devices' is executed. PR: 207497 Submitted by: glebius Approved by: adrian (mentor) Modified: head/sys/net80211/ieee80211.c Modified: head/sys/net80211/ieee80211.c == --- head/sys/net80211/ieee80211.c Fri Feb 26 20:38:23 2016 (r296113) +++ head/sys/net80211/ieee80211.c Fri Feb 26 20:47:08 2016 (r296114) @@ -266,21 +266,24 @@ static int sysctl_ieee80211coms(SYSCTL_HANDLER_ARGS) { struct ieee80211com *ic; - struct sbuf *sb; + struct sbuf sb; char *sp; int error; - sb = sbuf_new_auto(); + error = sysctl_wire_old_buffer(req, 0); + if (error) + return (error); + sbuf_new_for_sysctl(, NULL, 8, req); + sbuf_clear_flags(, SBUF_INCLUDENUL); sp = ""; mtx_lock(_list_mtx); LIST_FOREACH(ic, _head, ic_next) { - sbuf_printf(sb, "%s%s", sp, ic->ic_name); + sbuf_printf(, "%s%s", sp, ic->ic_name); sp = " "; } mtx_unlock(_list_mtx); - sbuf_finish(sb); - error = SYSCTL_OUT(req, sbuf_data(sb), sbuf_len(sb) + 1); - sbuf_delete(sb); + error = sbuf_finish(); + sbuf_delete(); return (error); } ___ 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: r296113 - in head/lib/libc: powerpc powerpc/gen powerpc64 powerpc64/gen
Author: nwhitehorn Date: Fri Feb 26 20:38:23 2016 New Revision: 296113 URL: https://svnweb.freebsd.org/changeset/base/296113 Log: Make unions in PowerPC libc endian-safe. Modified: head/lib/libc/powerpc/_fpmath.h head/lib/libc/powerpc/gen/infinity.c head/lib/libc/powerpc64/_fpmath.h head/lib/libc/powerpc64/gen/infinity.c Modified: head/lib/libc/powerpc/_fpmath.h == --- head/lib/libc/powerpc/_fpmath.h Fri Feb 26 20:33:32 2016 (r296112) +++ head/lib/libc/powerpc/_fpmath.h Fri Feb 26 20:38:23 2016 (r296113) @@ -29,10 +29,17 @@ union IEEEl2bits { long double e; struct { +#if _BYTE_ORDER == _LITTLE_ENDIAN + unsigned intmanl:32; + unsigned intmanh:20; + unsigned intexp :11; + unsigned intsign:1; +#else /* _BYTE_ORDER == _LITTLE_ENDIAN */ unsigned intsign:1; unsigned intexp :11; unsigned intmanh:20; unsigned intmanl:32; +#endif } bits; }; Modified: head/lib/libc/powerpc/gen/infinity.c == --- head/lib/libc/powerpc/gen/infinity.cFri Feb 26 20:33:32 2016 (r296112) +++ head/lib/libc/powerpc/gen/infinity.cFri Feb 26 20:38:23 2016 (r296113) @@ -11,7 +11,20 @@ __FBSDID("$FreeBSD$"); #include /* bytes for +Infinity on powerpc */ -const union __infinity_un __infinity = { { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 } }; +const union __infinity_un __infinity = { +#if BYTE_ORDER == BIG_ENDIAN + { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 } +#else + { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f } +#endif +}; /* bytes for NaN */ -const union __nan_un __nan = { { 0xff, 0xc0, 0, 0 } }; +const union __nan_un __nan = { +#if BYTE_ORDER == BIG_ENDIAN + {0xff, 0xc0, 0, 0} +#else + { 0, 0, 0xc0, 0xff } +#endif +}; + Modified: head/lib/libc/powerpc64/_fpmath.h == --- head/lib/libc/powerpc64/_fpmath.h Fri Feb 26 20:33:32 2016 (r296112) +++ head/lib/libc/powerpc64/_fpmath.h Fri Feb 26 20:38:23 2016 (r296113) @@ -29,10 +29,17 @@ union IEEEl2bits { long double e; struct { +#if _BYTE_ORDER == _LITTLE_ENDIAN + unsigned intmanl:32; + unsigned intmanh:20; + unsigned intexp :11; + unsigned intsign:1; +#else /* _BYTE_ORDER == _LITTLE_ENDIAN */ unsigned intsign:1; unsigned intexp :11; unsigned intmanh:20; unsigned intmanl:32; +#endif } bits; }; Modified: head/lib/libc/powerpc64/gen/infinity.c == --- head/lib/libc/powerpc64/gen/infinity.c Fri Feb 26 20:33:32 2016 (r296112) +++ head/lib/libc/powerpc64/gen/infinity.c Fri Feb 26 20:38:23 2016 (r296113) @@ -11,7 +11,20 @@ __FBSDID("$FreeBSD$"); #include /* bytes for +Infinity on powerpc */ -const union __infinity_un __infinity = { { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 } }; +const union __infinity_un __infinity = { +#if BYTE_ORDER == BIG_ENDIAN + { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 } +#else + { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f } +#endif +}; /* bytes for NaN */ -const union __nan_un __nan = { { 0xff, 0xc0, 0, 0 } }; +const union __nan_un __nan = { +#if BYTE_ORDER == BIG_ENDIAN + {0xff, 0xc0, 0, 0} +#else + { 0, 0, 0xc0, 0xff } +#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: r296112 - head/sys/arm/allwinner/a31
Author: jmcneill Date: Fri Feb 26 20:33:32 2016 New Revision: 296112 URL: https://svnweb.freebsd.org/changeset/base/296112 Log: Fix inverted test for lock status while waiting for PLL to become stable. Reviewed by: andrew Approved by: adrian (mentor) Modified: head/sys/arm/allwinner/a31/a31_clk.c Modified: head/sys/arm/allwinner/a31/a31_clk.c == --- head/sys/arm/allwinner/a31/a31_clk.cFri Feb 26 20:25:26 2016 (r296111) +++ head/sys/arm/allwinner/a31/a31_clk.cFri Feb 26 20:33:32 2016 (r296112) @@ -129,8 +129,8 @@ a31_clk_pll6_enable(void) /* Wait for PLL to be stable */ for (i = 0; i < PLL6_TIMEOUT; i++) - if (!(ccm_read_4(sc, A31_CCM_PLL6_CFG) & - A31_CCM_PLL6_CFG_REG_LOCK)) + if ((ccm_read_4(sc, A31_CCM_PLL6_CFG) & + A31_CCM_PLL6_CFG_REG_LOCK) == A31_CCM_PLL6_CFG_REG_LOCK) break; if (i == PLL6_TIMEOUT) return (ENXIO); ___ 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: r296111 - head/lib/msun/powerpc
Author: nwhitehorn Date: Fri Feb 26 20:25:26 2016 New Revision: 296111 URL: https://svnweb.freebsd.org/changeset/base/296111 Log: Make FPSCR definition endian clean. PR: 207526 Submitted by: Simon Byrne Obtained from:Julia MFC after:1 month Modified: head/lib/msun/powerpc/fenv.h Modified: head/lib/msun/powerpc/fenv.h == --- head/lib/msun/powerpc/fenv.hFri Feb 26 20:19:44 2016 (r296110) +++ head/lib/msun/powerpc/fenv.hFri Feb 26 20:25:26 2016 (r296111) @@ -97,8 +97,13 @@ extern const fenv_t __fe_dfl_env; union __fpscr { double __d; struct { +#if _BYTE_ORDER == _LITTLE_ENDIAN + fenv_t __reg; + __uint32_t __junk; +#else __uint32_t __junk; fenv_t __reg; +#endif } __bits; }; ___ 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: r296109 - head/libexec/rlogind
Author: pfg Date: Fri Feb 26 20:02:01 2016 New Revision: 296109 URL: https://svnweb.freebsd.org/changeset/base/296109 Log: rlogin(1): Replace select(2) with poll(2). Obtanied from:NetBSD (CVS Rev. 1.27 - 1.28) Modified: head/libexec/rlogind/rlogind.c Modified: head/libexec/rlogind/rlogind.c == --- head/libexec/rlogind/rlogind.c Fri Feb 26 19:49:04 2016 (r296108) +++ head/libexec/rlogind/rlogind.c Fri Feb 26 20:02:01 2016 (r296109) @@ -76,6 +76,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -350,34 +351,27 @@ protocol(int f, int p) nfd = f + 1; else nfd = p + 1; - if (nfd > FD_SETSIZE) { - syslog(LOG_ERR, "select mask too small, increase FD_SETSIZE"); - fatal(f, "internal error (select mask too small)", 0); - } for (;;) { - fd_set ibits, obits, ebits, *omask; + struct pollfd set[2]; - FD_ZERO(); - FD_ZERO(); - FD_ZERO(); - omask = (fd_set *)NULL; - if (fcc) { - FD_SET(p, ); - omask = - } else - FD_SET(f, ); + set[0].fd = p; + set[0].events = POLLPRI; + set[1].fd = f; + set[1].events = 0; + if (fcc) + set[0].events |= POLLOUT; + else + set[1].events |= POLLIN; if (pcc >= 0) { - if (pcc) { - FD_SET(f, ); - omask = - } else - FD_SET(p, ); + if (pcc) + set[1].events |= POLLOUT; + else + set[0].events |= POLLIN; } - FD_SET(p, ); - if ((n = select(nfd, , omask, , 0)) < 0) { + if ((n = poll(set, 2, INFTIM)) < 0) { if (errno == EINTR) continue; - fatal(f, "select", 1); + fatal(f, "poll", 1); } if (n == 0) { /* shouldn't happen... */ @@ -385,18 +379,16 @@ protocol(int f, int p) continue; } #definepkcontrol(c) ((c)&(TIOCPKT_FLUSHWRITE|TIOCPKT_NOSTOP|TIOCPKT_DOSTOP)) - if (FD_ISSET(p, )) { + if (set[0].revents & POLLPRI) { cc = read(p, , 1); if (cc == 1 && pkcontrol(cntl)) { cntl |= oobdata[0]; send(f, , 1, MSG_OOB); - if (cntl & TIOCPKT_FLUSHWRITE) { + if (cntl & TIOCPKT_FLUSHWRITE) pcc = 0; - FD_CLR(p, ); - } } } - if (FD_ISSET(f, )) { + if (set[1].revents & POLLIN) { fcc = read(f, fibuf, sizeof(fibuf)); if (fcc < 0 && errno == EWOULDBLOCK) fcc = 0; @@ -422,11 +414,10 @@ protocol(int f, int p) goto top; /* n^2 */ } } - FD_SET(p, ); /* try write */ } } - if (FD_ISSET(p, ) && fcc > 0) { + if (set[0].revents & POLLOUT && fcc > 0) { cc = write(p, fbp, fcc); if (cc > 0) { fcc -= cc; @@ -434,7 +425,7 @@ protocol(int f, int p) } } - if (FD_ISSET(p, )) { + if (set[0].revents & POLLIN) { pcc = read(p, pibuf, sizeof (pibuf)); pbp = pibuf; if (pcc < 0 && errno == EWOULDBLOCK) @@ -443,7 +434,6 @@ protocol(int f, int p) break; else if (pibuf[0] == 0) { pbp++, pcc--; - FD_SET(f, ); /* try write */ } else { if (pkcontrol(pibuf[0])) { pibuf[0] |= oobdata[0]; @@ -452,18 +442,8 @@ protocol(int f, int p) pcc = 0; } } - if ((FD_ISSET(f,
svn commit: r296108 - head/etc/mtree
Author: emaste Date: Fri Feb 26 19:49:04 2016 New Revision: 296108 URL: https://svnweb.freebsd.org/changeset/base/296108 Log: Add debug /libexec directory for rtld-elf debug files Modified: head/etc/mtree/BSD.debug.dist Modified: head/etc/mtree/BSD.debug.dist == --- head/etc/mtree/BSD.debug.dist Fri Feb 26 19:35:51 2016 (r296107) +++ head/etc/mtree/BSD.debug.dist Fri Feb 26 19:49:04 2016 (r296108) @@ -18,6 +18,8 @@ casper .. .. +libexec +.. sbin .. usr ___ 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: r296107 - head/libexec/getty
Author: pfg Date: Fri Feb 26 19:35:51 2016 New Revision: 296107 URL: https://svnweb.freebsd.org/changeset/base/296107 Log: getty(8): Undo incomplete support VEOL2 and VSTATUS. Forgot to add some definitions for charnames[]. Modified: head/libexec/getty/subr.c Modified: head/libexec/getty/subr.c == --- head/libexec/getty/subr.c Fri Feb 26 19:08:37 2016(r296106) +++ head/libexec/getty/subr.c Fri Feb 26 19:35:51 2016(r296107) @@ -212,8 +212,7 @@ charvars[] = { _cc[VQUIT], _cc[VSTART], _cc[VSTOP], _cc[VEOF], _cc[VEOL], _cc[VSUSP], _cc[VDSUSP], _cc[VREPRINT], _cc[VDISCARD], - _cc[VWERASE], _cc[VLNEXT], _cc[VSTATUS], - _cc[VEOL2], 0 + _cc[VWERASE], _cc[VLNEXT], 0 }; void ___ 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: r296106 - head/libexec/getty
Author: pfg Date: Fri Feb 26 19:08:37 2016 New Revision: 296106 URL: https://svnweb.freebsd.org/changeset/base/296106 Log: getty(8): Support VEOL2 and VSTATUS Bring some type cleanups while here. Obtained from:NetBSD Modified: head/libexec/getty/subr.c Modified: head/libexec/getty/subr.c == --- head/libexec/getty/subr.c Fri Feb 26 18:54:26 2016(r296105) +++ head/libexec/getty/subr.c Fri Feb 26 19:08:37 2016(r296106) @@ -73,7 +73,7 @@ gettable(const char *name, char *buf) static int firsttime = 1; dba[0] = _PATH_GETTYTAB; - dba[1] = 0; + dba[1] = NULL; if (firsttime) { /* @@ -212,7 +212,8 @@ charvars[] = { _cc[VQUIT], _cc[VSTART], _cc[VSTOP], _cc[VEOF], _cc[VEOL], _cc[VSUSP], _cc[VDSUSP], _cc[VREPRINT], _cc[VDISCARD], - _cc[VWERASE], _cc[VLNEXT], 0 + _cc[VWERASE], _cc[VLNEXT], _cc[VSTATUS], + _cc[VEOL2], 0 }; void @@ -595,7 +596,7 @@ struct portselect { { "B4800", "std.4800" }, { "B9600", "std.9600" }, { "B19200", "std.19200" }, - { 0 } + { NULL, NULL } }; const char * @@ -604,7 +605,7 @@ portselector(void) char c, baud[20]; const char *type = "default"; struct portselect *ps; - int len; + size_t len; alarm(5*60); for (len = 0; len < sizeof (baud) - 1; len++) { ___ 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: r296105 - head/sys/arm/conf
Author: andrew Date: Fri Feb 26 18:54:26 2016 New Revision: 296105 URL: https://svnweb.freebsd.org/changeset/base/296105 Log: Make the CUBIEBOARD config include the A10 config with a few needed additions. This is used by the release scripts so we need to keep it around for now. Sponsored by: ABT Systems Ltd Modified: head/sys/arm/conf/CUBIEBOARD Modified: head/sys/arm/conf/CUBIEBOARD == --- head/sys/arm/conf/CUBIEBOARDFri Feb 26 18:52:06 2016 (r296104) +++ head/sys/arm/conf/CUBIEBOARDFri Feb 26 18:54:26 2016 (r296105) @@ -19,97 +19,15 @@ # # $FreeBSD$ -ident CUBIEBOARD - -include"std.armv6" -include"../allwinner/std.a10" - -optionsSOC_ALLWINNER_A10 - -optionsHZ=100 -optionsSCHED_4BSD # 4BSD scheduler -optionsPLATFORM - -# Debugging for use in -current -makeoptionsDEBUG=-g# Build kernel with gdb(1) debug symbols -optionsALT_BREAK_TO_DEBUGGER -#options VERBOSE_SYSINIT # Enable verbose sysinit messages -optionsKDB # Enable kernel debugger support -# For minimum debugger support (stable branch) use: -#options KDB_TRACE # Print a stack trace for a panic -# For full debugger support use this instead: -optionsDDB # Enable the kernel debugger -optionsINVARIANTS # Enable calls of extra sanity checking -optionsINVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -optionsWITNESS # Enable checks to detect deadlocks and cycles -optionsWITNESS_SKIPSPIN# Don't run witness on spinlocks for speed -#options DIAGNOSTIC +#NO_UNIVERSE -# NFS root from boopt/dhcp -#options BOOTP -#options BOOTP_NFSROOT -#options BOOTP_COMPAT -#options BOOTP_NFSV3 -#options BOOTP_WIRED_TO=cpsw0 +include"A10" +ident CUBIEBOARD # Boot device is 2nd slice on MMC/SD card optionsROOTDEVNAME=\"ufs:/dev/da0s2\" -# MMC/SD/SDIO Card slot support -device mmc # mmc/sd bus -device mmcsd # mmc/sd flash cards - -# ATA controllers -device ahci# AHCI-compatible SATA controllers -#deviceata # Legacy ATA/SATA controllers - -# Console and misc -device uart -device uart_ns8250 -device pty -device snp -device md -device random # Entropy device - -# I2C support -#deviceiicbus -#deviceiic - -# GPIO -device gpio - -device scbus # SCSI bus (required for ATA/SCSI) -device da # Direct Access (disks) -device pass# Passthrough device (direct ATA/SCSI access) - -# USB support -optionsUSB_HOST_ALIGN=64 # Align usb buffers to cache line size. -device usb -optionsUSB_DEBUG -#options USB_REQ_DEBUG -#options USB_VERBOSE -#deviceuhci -#deviceohci -device ehci - -device umass - -# Ethernet -device loop -device ether -device mii -device bpf - -device emac - -# USB ethernet support, requires miibus -device miibus - -# Pinmux -device fdt_pinctrl - # Flattened Device Tree -optionsFDT # Configure using FDT/DTB data +optionsFDT optionsFDT_DTB_STATIC makeoptionsFDT_DTS_FILE=cubieboard.dts -makeoptionsMODULES_EXTRA=dtb/allwinner ___ 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: r296104 - head/libexec/getty
Author: pfg Date: Fri Feb 26 18:52:06 2016 New Revision: 296104 URL: https://svnweb.freebsd.org/changeset/base/296104 Log: getty(8): Use poll(2) and nanosleep(2) instead of select(2). Sort headers while here. Obtained from:NetBSD (CVS Rev. 1.25 - 1.26) Modified: head/libexec/getty/subr.c Modified: head/libexec/getty/subr.c == --- head/libexec/getty/subr.c Fri Feb 26 16:18:47 2016(r296103) +++ head/libexec/getty/subr.c Fri Feb 26 18:52:06 2016(r296104) @@ -38,14 +38,16 @@ static const char rcsid[] = /* * Melbourne getty. */ -#include -#include -#include -#include #include #include #include + +#include +#include +#include #include +#include +#include #include "gettytab.h" #include "pathnames.h" @@ -633,24 +635,21 @@ portselector(void) const char * autobaud(void) { - int rfds; - struct timeval timeout; +struct pollfd set[1]; + struct timespec timeout; char c; const char *type = "9600-baud"; (void)tcflush(0, TCIOFLUSH); - rfds = 1 << 0; - timeout.tv_sec = 5; - timeout.tv_usec = 0; - if (select(32, (fd_set *), (fd_set *)NULL, - (fd_set *)NULL, ) <= 0) + set[0].fd = STDIN_FILENO; + set[0].events = POLLIN; + if (poll(set, 1, 5000) <= 0) return (type); if (read(STDIN_FILENO, , sizeof(char)) != sizeof(char)) return (type); timeout.tv_sec = 0; - timeout.tv_usec = 20; - (void) select(32, (fd_set *)NULL, (fd_set *)NULL, - (fd_set *)NULL, ); + timeout.tv_nsec = 2; + (void)nanosleep(, NULL); (void)tcflush(0, TCIOFLUSH); switch (c & 0377) { ___ 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: r296103 - head/sys/amd64/vmm
Author: marcel Date: Fri Feb 26 16:18:47 2016 New Revision: 296103 URL: https://svnweb.freebsd.org/changeset/base/296103 Log: Bump VM_MAX_MEMSEGS from 2 to 3 to match the number of VM segment identifiers present in vmmapi.h. In particular, it's now possible to create a VM_FRAMEBUFFER segment. Modified: head/sys/amd64/vmm/vmm.c Modified: head/sys/amd64/vmm/vmm.c == --- head/sys/amd64/vmm/vmm.cFri Feb 26 16:15:02 2016(r296102) +++ head/sys/amd64/vmm/vmm.cFri Feb 26 16:18:47 2016(r296103) @@ -121,7 +121,7 @@ struct mem_seg { boolsysmem; struct vm_object *object; }; -#defineVM_MAX_MEMSEGS 2 +#defineVM_MAX_MEMSEGS 3 struct mem_map { vm_paddr_t gpa; ___ 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: r296102 - head/usr.sbin/bhyveload
Author: marcel Date: Fri Feb 26 16:15:02 2016 New Revision: 296102 URL: https://svnweb.freebsd.org/changeset/base/296102 Log: Add option -C to have the guest memory included in core files. This aids in debugging OS loaders. Modified: head/usr.sbin/bhyveload/bhyveload.8 head/usr.sbin/bhyveload/bhyveload.c Modified: head/usr.sbin/bhyveload/bhyveload.8 == --- head/usr.sbin/bhyveload/bhyveload.8 Fri Feb 26 16:12:20 2016 (r296101) +++ head/usr.sbin/bhyveload/bhyveload.8 Fri Feb 26 16:15:02 2016 (r296102) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 7, 2015 +.Dd February 26, 2016 .Dt BHYVELOAD 8 .Os .Sh NAME @@ -35,6 +35,7 @@ guest inside a bhyve virtual machine .Sh SYNOPSIS .Nm +.Op Fl C .Op Fl S .Op Fl c Ar cons-dev .Op Fl d Ar disk-path @@ -125,6 +126,12 @@ respectively. The default value of .Ar mem-size is 256M. +.It Fl C +Include guest memory in the core file when +.Nm +dumps core. +This is intended for debugging an OS loader as it allows inspection of +the guest memory. .It Fl S Wire guest memory. .El Modified: head/usr.sbin/bhyveload/bhyveload.c == --- head/usr.sbin/bhyveload/bhyveload.c Fri Feb 26 16:12:20 2016 (r296101) +++ head/usr.sbin/bhyveload/bhyveload.c Fri Feb 26 16:15:02 2016 (r296102) @@ -674,7 +674,7 @@ main(int argc, char** argv) consin_fd = STDIN_FILENO; consout_fd = STDOUT_FILENO; - while ((opt = getopt(argc, argv, "Sc:d:e:h:l:m:")) != -1) { + while ((opt = getopt(argc, argv, "CSc:d:e:h:l:m:")) != -1) { switch (opt) { case 'c': error = altcons_open(optarg); @@ -709,6 +709,9 @@ main(int argc, char** argv) if (error != 0) errx(EX_USAGE, "Invalid memsize '%s'", optarg); break; + case 'C': + memflags |= VM_MEM_F_INCORE; + break; case 'S': memflags |= VM_MEM_F_WIRED; 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: r296101 - head/usr.sbin/bhyveload
Author: marcel Date: Fri Feb 26 16:12:20 2016 New Revision: 296101 URL: https://svnweb.freebsd.org/changeset/base/296101 Log: Support version 4 of the userboot structure by implementing the vm_set_register() and vm_set_desc() callbacks. Modified: head/usr.sbin/bhyveload/bhyveload.c Modified: head/usr.sbin/bhyveload/bhyveload.c == --- head/usr.sbin/bhyveload/bhyveload.c Fri Feb 26 16:04:47 2016 (r296100) +++ head/usr.sbin/bhyveload/bhyveload.c Fri Feb 26 16:12:20 2016 (r296101) @@ -542,6 +542,21 @@ cb_getenv(void *arg, int num) return (NULL); } +static int +cb_vm_set_register(void *arg, int vcpu, int reg, uint64_t val) +{ + + return (vm_set_register(ctx, vcpu, reg, val)); +} + +static int +cb_vm_set_desc(void *arg, int vcpu, int reg, uint64_t base, u_int limit, +u_int access) +{ + + return (vm_set_desc(ctx, vcpu, reg, base, limit, access)); +} + static struct loader_callbacks cb = { .getc = cb_getc, .putc = cb_putc, @@ -571,6 +586,10 @@ static struct loader_callbacks cb = { .getmem = cb_getmem, .getenv = cb_getenv, + + /* Version 4 additions */ + .vm_set_register = cb_vm_set_register, + .vm_set_desc = cb_vm_set_desc, }; static int @@ -765,7 +784,7 @@ main(int argc, char** argv) addenv("smbios.bios.vendor=BHYVE"); addenv("boot_serial=1"); - func(, NULL, USERBOOT_VERSION_3, ndisks); + func(, NULL, USERBOOT_VERSION_4, ndisks); free(loader); return (0); ___ 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: r296100 - in head/sys/arm: allwinner/a20 altera/socfpga amlogic/aml8726 annapurna/alpine arm broadcom/bcm2835 freescale/imx include mv mv/armada38x mv/armadaxp qemu rockchip samsung/exy...
Author: andrew Date: Fri Feb 26 16:04:47 2016 New Revision: 296100 URL: https://svnweb.freebsd.org/changeset/base/296100 Log: Almost all copies of platform_mp_init_secondary just called intr_pic_init_secondary. Replace them with a direct call. On BCM2836 and ARMADA XP we need to add this function, but it can be empty. Reviewed by: ian, imp Sponsored by: ABT Systems Ltd Differential Revision:https://reviews.freebsd.org/D5460 Modified: head/sys/arm/allwinner/a20/a20_mp.c head/sys/arm/altera/socfpga/socfpga_mp.c head/sys/arm/amlogic/aml8726/aml8726_mp.c head/sys/arm/annapurna/alpine/alpine_machdep_mp.c head/sys/arm/arm/mp_machdep.c head/sys/arm/broadcom/bcm2835/bcm2835_intr.c head/sys/arm/broadcom/bcm2835/bcm2836_mp.c head/sys/arm/freescale/imx/imx6_mp.c head/sys/arm/include/smp.h head/sys/arm/mv/armada38x/armada38x_mp.c head/sys/arm/mv/armadaxp/armadaxp_mp.c head/sys/arm/mv/mpic.c head/sys/arm/qemu/virt_mp.c head/sys/arm/rockchip/rk30xx_mp.c head/sys/arm/samsung/exynos/exynos5_mp.c head/sys/arm/ti/omap4/omap4_mp.c head/sys/arm/xilinx/zy7_mp.c Modified: head/sys/arm/allwinner/a20/a20_mp.c == --- head/sys/arm/allwinner/a20/a20_mp.c Fri Feb 26 16:00:16 2016 (r296099) +++ head/sys/arm/allwinner/a20/a20_mp.c Fri Feb 26 16:04:47 2016 (r296100) @@ -59,13 +59,6 @@ __FBSDID("$FreeBSD$"); #defineCPUCFG_DBGCTL1 0x1e4 void -platform_mp_init_secondary(void) -{ - - intr_pic_init_secondary(); -} - -void platform_mp_setmaxid(void) { int ncpu; Modified: head/sys/arm/altera/socfpga/socfpga_mp.c == --- head/sys/arm/altera/socfpga/socfpga_mp.cFri Feb 26 16:00:16 2016 (r296099) +++ head/sys/arm/altera/socfpga/socfpga_mp.cFri Feb 26 16:04:47 2016 (r296100) @@ -85,13 +85,6 @@ socfpga_trampoline(void) } void -platform_mp_init_secondary(void) -{ - - intr_pic_init_secondary(); -} - -void platform_mp_setmaxid(void) { int hwcpu, ncpu; Modified: head/sys/arm/amlogic/aml8726/aml8726_mp.c == --- head/sys/arm/amlogic/aml8726/aml8726_mp.c Fri Feb 26 16:00:16 2016 (r296099) +++ head/sys/arm/amlogic/aml8726/aml8726_mp.c Fri Feb 26 16:04:47 2016 (r296100) @@ -341,21 +341,6 @@ power_on_cpu(int cpu) } } - -void -platform_mp_init_secondary(void) -{ - - /* -* Consider modifying the timer driver to support -* per-cpu timers and then enabling the timer for -* each AP. -*/ - -intr_pic_init_secondary(); -} - - void platform_mp_setmaxid(void) { Modified: head/sys/arm/annapurna/alpine/alpine_machdep_mp.c == --- head/sys/arm/annapurna/alpine/alpine_machdep_mp.c Fri Feb 26 16:00:16 2016(r296099) +++ head/sys/arm/annapurna/alpine/alpine_machdep_mp.c Fri Feb 26 16:04:47 2016(r296100) @@ -119,13 +119,6 @@ platform_mp_get_core_cnt(void) } void -platform_mp_init_secondary(void) -{ - - intr_pic_init_secondary(); -} - -void platform_mp_setmaxid(void) { Modified: head/sys/arm/arm/mp_machdep.c == --- head/sys/arm/arm/mp_machdep.c Fri Feb 26 16:00:16 2016 (r296099) +++ head/sys/arm/arm/mp_machdep.c Fri Feb 26 16:04:47 2016 (r296100) @@ -234,7 +234,7 @@ init_secondary(int cpu) cpu_initclocks_ap(); CTR0(KTR_SMP, "go into scheduler"); - platform_mp_init_secondary(); + intr_pic_init_secondary(); /* Enter the scheduler */ sched_throw(NULL); Modified: head/sys/arm/broadcom/bcm2835/bcm2835_intr.c == --- head/sys/arm/broadcom/bcm2835/bcm2835_intr.cFri Feb 26 16:00:16 2016(r296099) +++ head/sys/arm/broadcom/bcm2835/bcm2835_intr.cFri Feb 26 16:04:47 2016(r296100) @@ -240,3 +240,10 @@ arm_unmask_irq(uintptr_t nb) else printf("arm_mask_irq: Invalid IRQ number: %d\n", nb); } + +#ifdef SMP +void +intr_pic_init_secondary(void) +{ +} +#endif Modified: head/sys/arm/broadcom/bcm2835/bcm2836_mp.c == --- head/sys/arm/broadcom/bcm2835/bcm2836_mp.c Fri Feb 26 16:00:16 2016 (r296099) +++ head/sys/arm/broadcom/bcm2835/bcm2836_mp.c Fri Feb 26 16:04:47 2016 (r296100) @@ -77,12 +77,6 @@ static bus_space_handle_t bs_periph; bus_space_write_4(fdtbus_bs_tag, bs_periph, (addr), (val)) void -platform_mp_init_secondary(void) -{ - -} - -void platform_mp_setmaxid(void) { Modified: head/sys/arm/freescale/imx/imx6_mp.c
svn commit: r296099 - head/sys/boot/userboot
Author: marcel Date: Fri Feb 26 16:00:16 2016 New Revision: 296099 URL: https://svnweb.freebsd.org/changeset/base/296099 Log: Add vm_set_register() and vm_set_desc() callbacks. These callbacks translate directly into calls to their namesake API functions in libvmmapi. It is an improvement over the existing setreg(), setmsr(), setcr() setgdt() and exec() callbacks in that the new additions give full control and don't assume we're booting FreeBSD, like exec() and don't assume one only wants to set the value of RSP, like setreg(). Modified: head/sys/boot/userboot/userboot.h Modified: head/sys/boot/userboot/userboot.h == --- head/sys/boot/userboot/userboot.h Fri Feb 26 15:54:34 2016 (r296098) +++ head/sys/boot/userboot/userboot.h Fri Feb 26 16:00:16 2016 (r296099) @@ -34,6 +34,14 @@ #defineUSERBOOT_VERSION_3 3 /* + * Version 4 added more generic callbacks for setting up + * registers and descriptors. The callback structure is + * backward compatible (new callbacks have been added at + * the tail end). + */ +#defineUSERBOOT_VERSION_4 4 + +/* * Exit codes from the loader */ #defineUSERBOOT_EXIT_QUIT 1 @@ -195,4 +203,11 @@ struct loader_callbacks { * each invocation will add 1 to the previous value of 'num'. */ const char *(*getenv)(void *arg, int num); + + /* +* Version 4 additions. +*/ + int (*vm_set_register)(void *arg, int vcpu, int reg, uint64_t val); + int (*vm_set_desc)(void *arg, int vcpu, int reg, uint64_t base, + u_int limit, u_int access); }; ___ 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: r296047 - in head: . contrib/mdocml contrib/tcpdump etc/defaults etc/mtree etc/rc.d gnu/usr.bin/groff/tmac lib lib/libc/posix1e lib/libcapsicum lib/libcasper lib/libcasper/libcasper li
On Thu, Feb 25, 2016 at 06:23:40PM +, Mariusz Zaborski wrote: > Author: oshogbo > Date: Thu Feb 25 18:23:40 2016 > New Revision: 296047 > URL: https://svnweb.freebsd.org/changeset/base/296047 > > Log: > Convert casperd(8) daemon to the libcasper. > After calling the cap_init(3) function Casper will fork from it's original > process, using pdfork(2). Forking from a process has a lot of advantages: > 1. We have the same cwd as the original process. > 2. The same uid, gid and groups. > 3. The same MAC labels. > 4. The same descriptor table. > 5. The same routing table. > 6. The same umask. > 7. The same cpuset(1). > From now services are also in form of libraries. > We also removed libcapsicum at all and converts existing program using > Casper > to new architecture. > > Discussed with: pjd, jonathan, ed, drysd...@google.com, emaste > Partially reviewed by: drysd...@google.com, bdrewery > Approved by:pjd (mentor) > Differential Revision: https://reviews.freebsd.org/D4277 This commit breaks `cd /usr/src/release; make real-release`. Log of failed build here: http://jenkins.hardenedbsd.org:8180/jenkins/job/HardenedBSD-CURRENT-amd64/lastFailedBuild/console Reverting this commit makes everything happy again. Thanks, -- Shawn Webb HardenedBSD GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE signature.asc Description: PGP signature
svn commit: r296098 - in head/sys/arm: allwinner/a20 altera/socfpga amlogic/aml8726 annapurna/alpine arm broadcom/bcm2835 freescale/imx include mv/armada38x mv/armadaxp qemu rockchip samsung/exynos...
Author: andrew Date: Fri Feb 26 15:54:34 2016 New Revision: 296098 URL: https://svnweb.freebsd.org/changeset/base/296098 Log: Remove platform_mp_probe as it's almost identical on most ARM SoCs, and slightly wrong on the others. We should just check if mp_ncpus is set to more than one CPU as we may wish to run on a single core even when SMP is available. Reviewed by: ian Sponsored by: ABT Systems Ltd Differential Revision:https://reviews.freebsd.org/D5458 Modified: head/sys/arm/allwinner/a20/a20_mp.c head/sys/arm/altera/socfpga/socfpga_mp.c head/sys/arm/amlogic/aml8726/aml8726_mp.c head/sys/arm/annapurna/alpine/alpine_machdep_mp.c head/sys/arm/arm/mp_machdep.c head/sys/arm/broadcom/bcm2835/bcm2836_mp.c head/sys/arm/freescale/imx/imx6_mp.c head/sys/arm/include/smp.h head/sys/arm/mv/armada38x/armada38x_mp.c head/sys/arm/mv/armadaxp/armadaxp_mp.c head/sys/arm/qemu/virt_mp.c head/sys/arm/rockchip/rk30xx_mp.c head/sys/arm/samsung/exynos/exynos5_mp.c head/sys/arm/ti/omap4/omap4_mp.c head/sys/arm/xilinx/zy7_mp.c Modified: head/sys/arm/allwinner/a20/a20_mp.c == --- head/sys/arm/allwinner/a20/a20_mp.c Fri Feb 26 15:52:55 2016 (r296097) +++ head/sys/arm/allwinner/a20/a20_mp.c Fri Feb 26 15:54:34 2016 (r296098) @@ -81,16 +81,6 @@ platform_mp_setmaxid(void) mp_maxid = ncpu - 1; } -int -platform_mp_probe(void) -{ - - if (mp_ncpus == 0) - platform_mp_setmaxid(); - - return (mp_ncpus > 1); -} - void platform_mp_start_ap(void) { Modified: head/sys/arm/altera/socfpga/socfpga_mp.c == --- head/sys/arm/altera/socfpga/socfpga_mp.cFri Feb 26 15:52:55 2016 (r296097) +++ head/sys/arm/altera/socfpga/socfpga_mp.cFri Feb 26 15:54:34 2016 (r296098) @@ -111,16 +111,6 @@ platform_mp_setmaxid(void) mp_maxid = ncpu - 1; } -int -platform_mp_probe(void) -{ - - if (mp_ncpus == 0) - platform_mp_setmaxid(); - - return (mp_ncpus > 1); -} - void platform_mp_start_ap(void) { Modified: head/sys/arm/amlogic/aml8726/aml8726_mp.c == --- head/sys/arm/amlogic/aml8726/aml8726_mp.c Fri Feb 26 15:52:55 2016 (r296097) +++ head/sys/arm/amlogic/aml8726/aml8726_mp.c Fri Feb 26 15:54:34 2016 (r296098) @@ -433,18 +433,6 @@ moveon: mp_maxid = ncpu - 1; } - -int -platform_mp_probe(void) -{ - - if (mp_ncpus == 0) - platform_mp_setmaxid(); - - return (mp_ncpus > 1); -} - - void platform_mp_start_ap(void) { Modified: head/sys/arm/annapurna/alpine/alpine_machdep_mp.c == --- head/sys/arm/annapurna/alpine/alpine_machdep_mp.c Fri Feb 26 15:52:55 2016(r296097) +++ head/sys/arm/annapurna/alpine/alpine_machdep_mp.c Fri Feb 26 15:54:34 2016(r296098) @@ -133,12 +133,6 @@ platform_mp_setmaxid(void) mp_maxid = mp_ncpus - 1; } -int -platform_mp_probe(void) -{ - return (1); -} - static int alpine_get_cpu_resume_base(u_long *pbase, u_long *psize) { Modified: head/sys/arm/arm/mp_machdep.c == --- head/sys/arm/arm/mp_machdep.c Fri Feb 26 15:52:55 2016 (r296097) +++ head/sys/arm/arm/mp_machdep.c Fri Feb 26 15:54:34 2016 (r296098) @@ -86,9 +86,12 @@ void *dpcpu[MAXCPU - 1]; int cpu_mp_probe(void) { + + KASSERT(mp_ncpus != 0, ("cpu_mp_probe: mp_ncpus is unset")); + CPU_SETOF(0, _cpus); - return (platform_mp_probe()); + return (mp_ncpus > 1); } /* Start Application Processor via platform specific function */ Modified: head/sys/arm/broadcom/bcm2835/bcm2836_mp.c == --- head/sys/arm/broadcom/bcm2835/bcm2836_mp.c Fri Feb 26 15:52:55 2016 (r296097) +++ head/sys/arm/broadcom/bcm2835/bcm2836_mp.c Fri Feb 26 15:54:34 2016 (r296098) @@ -95,17 +95,6 @@ platform_mp_setmaxid(void) DPRINTF("mp_maxid=%d\n", mp_maxid); } -int -platform_mp_probe(void) -{ - - DPRINTF("platform_mp_probe\n"); - CPU_SETOF(0, _cpus); - if (mp_ncpus == 0) - platform_mp_setmaxid(); - return (mp_ncpus > 1); -} - void platform_mp_start_ap(void) { Modified: head/sys/arm/freescale/imx/imx6_mp.c == --- head/sys/arm/freescale/imx/imx6_mp.cFri Feb 26 15:52:55 2016 (r296097) +++ head/sys/arm/freescale/imx/imx6_mp.cFri Feb 26 15:54:34 2016 (r296098) @@ -99,17 +99,6 @@ platform_mp_setmaxid(void) mp_maxid = ncpu - 1; } -int -platform_mp_probe(void) -{ - -
svn commit: r296097 - head/sys/boot/userboot/userboot
Author: marcel Date: Fri Feb 26 15:52:55 2016 New Revision: 296097 URL: https://svnweb.freebsd.org/changeset/base/296097 Log: Check that the userboot version is at least 3, rather than 3 exactly. The structure may be of a newer version and as long as it is backward compatible with 3, we can work with it. While here: whitespace nits. Modified: head/sys/boot/userboot/userboot/main.c Modified: head/sys/boot/userboot/userboot/main.c == --- head/sys/boot/userboot/userboot/main.c Fri Feb 26 15:46:14 2016 (r296096) +++ head/sys/boot/userboot/userboot/main.c Fri Feb 26 15:52:55 2016 (r296097) @@ -43,6 +43,7 @@ static void userboot_zfs_probe(void); static int userboot_zfs_found; #endif +/* Minimum version required */ #defineUSERBOOT_VERSIONUSERBOOT_VERSION_3 #defineMALLOCSZ(10*1024*1024) @@ -64,7 +65,7 @@ void delay(int usec) { -CALLBACK(delay, usec); + CALLBACK(delay, usec); } void @@ -82,11 +83,11 @@ loader_main(struct loader_callbacks *cb, const char *var; int i; -if (version != USERBOOT_VERSION) -abort(); + if (version < USERBOOT_VERSION) + abort(); callbacks = cb; -callbacks_arg = arg; + callbacks_arg = arg; userboot_disk_maxunit = ndisks; /* @@ -95,9 +96,9 @@ loader_main(struct loader_callbacks *cb, */ setheap((void *)mallocbuf, (void *)(mallocbuf + sizeof(mallocbuf))); -/* - * Hook up the console - */ + /* +* Hook up the console +*/ cons_probe(); printf("\n"); @@ -192,9 +193,9 @@ extract_currdev(void) } env_setenv("currdev", EV_VOLATILE, userboot_fmtdev(), -userboot_setcurrdev, env_nounset); + userboot_setcurrdev, env_nounset); env_setenv("loaddev", EV_VOLATILE, userboot_fmtdev(), -env_noset, env_nounset); + env_noset, env_nounset); } #if defined(USERBOOT_ZFS_SUPPORT) ___ 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: r296096 - in head: . share/mk
Author: emaste Date: Fri Feb 26 15:46:14 2016 New Revision: 296096 URL: https://svnweb.freebsd.org/changeset/base/296096 Log: Install elftoolchain elfcopy(1) as objcopy(1) by default As of r295661 elfcopy supports PE format for EFI boot binaries and is a viable objcopy implementation for the base system and ports. The (temporary) src.conf knob WITHOUT_ELFCOPY_AS_OBJCOPY knob may be set to obtain the GNU version if necessary. PR: 207091 [exp-run] Relnotes: Yes Sponsored by: The FreeBSD Foundation Modified: head/UPDATING head/share/mk/src.opts.mk Modified: head/UPDATING == --- head/UPDATING Fri Feb 26 14:39:39 2016(r296095) +++ head/UPDATING Fri Feb 26 15:46:14 2016(r296096) @@ -31,6 +31,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20150107: + The ELF object manipulation tool objcopy is now provided by the + ELF Tool Chain project rather than by GNU binutils. It should be a + drop-in replacement, with the addition of arm64 support. The + (temporary) src.conf knob WITHOUT_ELFCOPY_AS_OBJCOPY knob may be set + to obtain the GNU version if necessary. + 20160129: Building ZFS pools on top of zvols is prohibited by default. That feature has never worked safely; it's always been prone to deadlocks. Modified: head/share/mk/src.opts.mk == --- head/share/mk/src.opts.mk Fri Feb 26 14:39:39 2016(r296095) +++ head/share/mk/src.opts.mk Fri Feb 26 15:46:14 2016(r296096) @@ -80,6 +80,7 @@ __DEFAULT_YES_OPTIONS = \ DYNAMICROOT \ ED_CRYPTO \ EE \ +ELFCOPY_AS_OBJCOPY \ ELFTOOLCHAIN_BOOTSTRAP \ EXAMPLES \ FDT \ @@ -231,9 +232,9 @@ __DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTST # In-tree binutils/gcc are older versions without modern architecture support. .if ${__T} == "aarch64" || ${__T} == "riscv64" BROKEN_OPTIONS+=BINUTILS BINUTILS_BOOTSTRAP GCC GCC_BOOTSTRAP GDB -__DEFAULT_YES_OPTIONS+=ELFCOPY_AS_OBJCOPY LLVM_LIBUNWIND +__DEFAULT_YES_OPTIONS+=LLVM_LIBUNWIND .else -__DEFAULT_NO_OPTIONS+=ELFCOPY_AS_OBJCOPY LLVM_LIBUNWIND +__DEFAULT_NO_OPTIONS+=LLVM_LIBUNWIND .endif .if ${__T} == "riscv64" BROKEN_OPTIONS+=PROFILE # "sorry, unimplemented: profiler support for RISC-V" ___ 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: r296095 - head/lib/libc/rpc
Author: pfg Date: Fri Feb 26 14:39:39 2016 New Revision: 296095 URL: https://svnweb.freebsd.org/changeset/base/296095 Log: rpc: fix failure to clear string by passing the wrong size to memset. Noted by NetBSD's PR/21014 Obtained from:NetBSD (CVS Rev. 1.24, 1.25) MFC after:1 month Modified: head/lib/libc/rpc/svc_simple.c Modified: head/lib/libc/rpc/svc_simple.c == --- head/lib/libc/rpc/svc_simple.c Fri Feb 26 14:04:00 2016 (r296094) +++ head/lib/libc/rpc/svc_simple.c Fri Feb 26 14:39:39 2016 (r296095) @@ -272,7 +272,7 @@ universal(struct svc_req *rqstp, SVCXPRT /* decode arguments into a CLEAN buffer */ xdrbuf = pl->p_xdrbuf; /* Zero the arguments: reqd ! */ - (void) memset(xdrbuf, 0, sizeof (pl->p_recvsz)); + (void) memset(xdrbuf, 0, (size_t)pl->p_recvsz); /* * Assuming that sizeof (xdrbuf) would be enough * for the arguments; if not then the program ___ 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: r296094 - in head/sys/riscv: include riscv
Author: br Date: Fri Feb 26 14:04:00 2016 New Revision: 296094 URL: https://svnweb.freebsd.org/changeset/base/296094 Log: o Use uint64_t for page number as it doesn't fit uint32_t. o Implement growkernel bits for L1 level of pagetables. This allows us to boot with 128GB of physical memory. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Modified: head/sys/riscv/include/pte.h head/sys/riscv/riscv/pmap.c Modified: head/sys/riscv/include/pte.h == --- head/sys/riscv/include/pte.hFri Feb 26 13:53:09 2016 (r296093) +++ head/sys/riscv/include/pte.hFri Feb 26 14:04:00 2016 (r296094) @@ -41,6 +41,7 @@ #ifndef LOCORE typedefuint64_tpd_entry_t; /* page directory entry */ typedefuint64_tpt_entry_t; /* page table entry */ +typedefuint64_tpn_t; /* page number */ #endif /* Level 0 table, 512GiB per entry */ Modified: head/sys/riscv/riscv/pmap.c == --- head/sys/riscv/riscv/pmap.c Fri Feb 26 13:53:09 2016(r296093) +++ head/sys/riscv/riscv/pmap.c Fri Feb 26 14:04:00 2016(r296094) @@ -450,7 +450,7 @@ pmap_bootstrap_dmap(vm_offset_t l1pt, vm pd_entry_t *l1; u_int l1_slot; pt_entry_t entry; - u_int pn; + pn_t pn; pa = kernstart & ~L1_OFFSET; va = DMAP_MIN_ADDRESS; @@ -924,7 +924,7 @@ pmap_qenter(vm_offset_t sva, vm_page_t * vm_offset_t va; vm_page_t m; pt_entry_t entry; - u_int pn; + pn_t pn; int i; va = sva; @@ -1143,7 +1143,7 @@ _pmap_alloc_l3(pmap_t pmap, vm_pindex_t vm_page_t m, /*pdppg, */pdpg; pt_entry_t entry; vm_paddr_t phys; - int pn; + pn_t pn; PMAP_LOCK_ASSERT(pmap, MA_OWNED); @@ -1323,7 +1323,7 @@ pmap_growkernel(vm_offset_t addr) vm_page_t nkpg; pd_entry_t *l1, *l2; pt_entry_t entry; - int pn; + pn_t pn; mtx_assert(_map->system_mtx, MA_OWNED); @@ -1343,10 +1343,11 @@ pmap_growkernel(vm_offset_t addr) pmap_zero_page(nkpg); paddr = VM_PAGE_TO_PHYS(nkpg); - panic("%s: implement grow l1\n", __func__); -#if 0 - pmap_load_store(l1, paddr | L1_TABLE); -#endif + pn = (paddr / PAGE_SIZE); + entry = (PTE_VALID | (PTE_TYPE_PTR << PTE_TYPE_S)); + entry |= (pn << PTE_PPN0_S); + pmap_load_store(l1, entry); + PTE_SYNC(l1); continue; /* try again */ } @@ -1933,9 +1934,9 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t mpte, om, l2_m, l3_m; boolean_t nosleep; pt_entry_t entry; - int l2_pn; - int l3_pn; - int pn; + pn_t l2_pn; + pn_t l3_pn; + pn_t pn; va = trunc_page(va); if ((m->oflags & VPO_UNMANAGED) == 0 && !vm_page_xbusied(m)) @@ -2211,7 +2212,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ pt_entry_t *l3; vm_paddr_t pa; pt_entry_t entry; - int pn; + pn_t pn; KASSERT(va < kmi.clean_sva || va >= kmi.clean_eva || (m->oflags & VPO_UNMANAGED) != 0, @@ -3084,8 +3085,8 @@ pmap_mincore(pmap_t pmap, vm_offset_t ad void pmap_activate(struct thread *td) { - uint64_t entry; - uint64_t pn; + pt_entry_t entry; + pn_t pn; pmap_t pmap; critical_enter(); ___ 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: r296093 - in head/sys: arm/allwinner arm/allwinner/a20 arm/allwinner/a31 dev/iicbus/twsi
Author: andrew Date: Fri Feb 26 13:53:09 2016 New Revision: 296093 URL: https://svnweb.freebsd.org/changeset/base/296093 Log: Add the start of support for the Allwinner A31 clocks. It only adds support for the i2c, mmc, and gmac clocks. Further clocks can be added as needed. Submitted by: Emmanuel VadotReviewed by: jmcneill Differential Revision:https://reviews.freebsd.org/D5339 Added: head/sys/arm/allwinner/a31/a31_clk.c (contents, props changed) head/sys/arm/allwinner/a31/a31_clk.h (contents, props changed) Modified: head/sys/arm/allwinner/a10_mmc.c head/sys/arm/allwinner/a20/a20_if_dwc.c head/sys/dev/iicbus/twsi/a10_twsi.c Modified: head/sys/arm/allwinner/a10_mmc.c == --- head/sys/arm/allwinner/a10_mmc.cFri Feb 26 12:46:34 2016 (r296092) +++ head/sys/arm/allwinner/a10_mmc.cFri Feb 26 13:53:09 2016 (r296093) @@ -48,8 +48,10 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include +#include #defineA10_MMC_MEMRES 0 #defineA10_MMC_IRQRES 1 @@ -144,6 +146,7 @@ a10_mmc_attach(device_t dev) struct a10_mmc_softc *sc; struct sysctl_ctx_list *ctx; struct sysctl_oid_list *tree; + int clk; sc = device_get_softc(dev); sc->a10_dev = dev; @@ -168,7 +171,24 @@ a10_mmc_attach(device_t dev) } /* Activate the module clock. */ - if (a10_clk_mmc_activate(sc->a10_id) != 0) { + switch (allwinner_soc_type()) { +#if defined(SOC_ALLWINNER_A10) || defined(SOC_ALLWINNER_A20) + case ALLWINNERSOC_A10: + case ALLWINNERSOC_A10S: + case ALLWINNERSOC_A20: + clk = a10_clk_mmc_activate(sc->a10_id); + break; +#endif +#if defined(SOC_ALLWINNER_A31) || defined(SOC_ALLWINNER_A31S) + case ALLWINNERSOC_A31: + case ALLWINNERSOC_A31S: + clk = a31_clk_mmc_activate(sc->a10_id); + break; +#endif + default: + clk = -1; + } + if (clk != 0) { bus_teardown_intr(dev, sc->a10_res[A10_MMC_IRQRES], sc->a10_intrhand); bus_release_resources(dev, a10_mmc_res_spec, sc->a10_res); @@ -790,7 +810,23 @@ a10_mmc_update_ios(device_t bus, device_ return (error); /* Set the MMC clock. */ - error = a10_clk_mmc_cfg(sc->a10_id, ios->clock); + switch (allwinner_soc_type()) { +#if defined(SOC_ALLWINNER_A10) || defined(SOC_ALLWINNER_A20) + case ALLWINNERSOC_A10: + case ALLWINNERSOC_A10S: + case ALLWINNERSOC_A20: + error = a10_clk_mmc_cfg(sc->a10_id, ios->clock); + break; +#endif +#if defined(SOC_ALLWINNER_A31) || defined(SOC_ALLWINNER_A31S) + case ALLWINNERSOC_A31: + case ALLWINNERSOC_A31S: + error = a31_clk_mmc_cfg(sc->a10_id, ios->clock); + break; +#endif + default: + error = ENXIO; + } if (error != 0) return (error); Modified: head/sys/arm/allwinner/a20/a20_if_dwc.c == --- head/sys/arm/allwinner/a20/a20_if_dwc.c Fri Feb 26 12:46:34 2016 (r296092) +++ head/sys/arm/allwinner/a20/a20_if_dwc.c Fri Feb 26 13:53:09 2016 (r296093) @@ -40,7 +40,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include +#include #include "if_dwc_if.h" @@ -60,9 +62,27 @@ a20_if_dwc_probe(device_t dev) static int a20_if_dwc_init(device_t dev) { + int clk; /* Activate GMAC clock and set the pin mux to rgmii. */ - if (a10_clk_gmac_activate(ofw_bus_get_node(dev)) != 0) { + switch (allwinner_soc_type()) { +#if defined(SOC_ALLWINNER_A10) || defined(SOC_ALLWINNER_A20) + case ALLWINNERSOC_A10: + case ALLWINNERSOC_A10S: + case ALLWINNERSOC_A20: + clk = a10_clk_gmac_activate(ofw_bus_get_node(dev)); + break; +#endif +#if defined(SOC_ALLWINNER_A31) || defined(SOC_ALLWINNER_A31S) + case ALLWINNERSOC_A31: + case ALLWINNERSOC_A31S: + clk = a31_clk_gmac_activate(ofw_bus_get_node(dev)); + break; +#endif + default: + clk = -1; + } + if (clk != 0) { device_printf(dev, "could not activate gmac module\n"); return (ENXIO); } Added: head/sys/arm/allwinner/a31/a31_clk.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/allwinner/a31/a31_clk.cFri Feb 26 13:53:09 2016 (r296093) @@ -0,0 +1,295 @@ +/*- + *
svn commit: r296092 - head/sys/kern
Author: ed Date: Fri Feb 26 12:46:34 2016 New Revision: 296092 URL: https://svnweb.freebsd.org/changeset/base/296092 Log: Remove the errno argument from unp_drop(). While there, add a comment to clarify that ECONNRESET should always be returned for POSIX conformance. Suggested by: Steven Hartland Modified: head/sys/kern/uipc_usrreq.c Modified: head/sys/kern/uipc_usrreq.c == --- head/sys/kern/uipc_usrreq.c Fri Feb 26 12:16:11 2016(r296091) +++ head/sys/kern/uipc_usrreq.c Fri Feb 26 12:46:34 2016(r296092) @@ -280,7 +280,7 @@ static void unp_disconnect(struct unpcb static voidunp_dispose(struct mbuf *); static voidunp_dispose_so(struct socket *so); static voidunp_shutdown(struct unpcb *); -static voidunp_drop(struct unpcb *, int); +static voidunp_drop(struct unpcb *); static voidunp_gc(__unused void *, int); static voidunp_scan(struct mbuf *, void (*)(struct filedescent **, int)); static voidunp_discard(struct file *); @@ -354,7 +354,7 @@ uipc_abort(struct socket *so) unp2 = unp->unp_conn; if (unp2 != NULL) { UNP_PCB_LOCK(unp2); - unp_drop(unp2, ECONNRESET); + unp_drop(unp2); UNP_PCB_UNLOCK(unp2); } UNP_PCB_UNLOCK(unp); @@ -682,7 +682,7 @@ uipc_detach(struct socket *so) struct unpcb *ref = LIST_FIRST(>unp_refs); UNP_PCB_LOCK(ref); - unp_drop(ref, ECONNRESET); + unp_drop(ref); UNP_PCB_UNLOCK(ref); } local_unp_rights = unp_rights; @@ -1698,7 +1698,7 @@ unp_shutdown(struct unpcb *unp) } static void -unp_drop(struct unpcb *unp, int errno) +unp_drop(struct unpcb *unp) { struct socket *so = unp->unp_socket; struct unpcb *unp2; @@ -1706,7 +1706,12 @@ unp_drop(struct unpcb *unp, int errno) UNP_LINK_WLOCK_ASSERT(); UNP_PCB_LOCK_ASSERT(unp); - so->so_error = errno; + /* +* Regardless of whether the socket's peer dropped the connection +* with this socket by aborting or disconnecting, POSIX requires +* that ECONNRESET is returned. +*/ + so->so_error = ECONNRESET; unp2 = unp->unp_conn; if (unp2 == NULL) return; ___ 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: r296091 - in head/sys: arm64/cavium dev/pci
Author: wma Date: Fri Feb 26 12:16:11 2016 New Revision: 296091 URL: https://svnweb.freebsd.org/changeset/base/296091 Log: Restore ThunderX Pass1.1 PCI changes removed by r295962 If Enhanced Allocation is not used, we can't allocate any random range. All internal devices have hardcoded place where they can be located within PCI address space. Fortunately, we can read this value from BAR. Obtained from: Semihalf Sponsored by: Cavium Approved by: cognet (mentor) Reviewed by: zbb Differential revision: https://reviews.freebsd.org/D5455 Modified: head/sys/arm64/cavium/thunder_pcie_common.c head/sys/arm64/cavium/thunder_pcie_common.h head/sys/arm64/cavium/thunder_pcie_fdt.c head/sys/dev/pci/pci_host_generic.c head/sys/dev/pci/pci_host_generic.h Modified: head/sys/arm64/cavium/thunder_pcie_common.c == --- head/sys/arm64/cavium/thunder_pcie_common.c Fri Feb 26 10:24:24 2016 (r296090) +++ head/sys/arm64/cavium/thunder_pcie_common.c Fri Feb 26 12:16:11 2016 (r296091) @@ -52,8 +52,10 @@ __FBSDID("$FreeBSD$"); #include #endif -#include +#include #include +#include +#include #include #include @@ -142,3 +144,42 @@ thunder_pcie_identify_ecam(device_t dev, return (0); } + +#ifdef THUNDERX_PASS_1_1_ERRATA +struct resource * +thunder_pcie_alloc_resource(device_t dev, device_t child, int type, int *rid, +rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) +{ + pci_addr_t map, testval; + + /* +* If Enhanced Allocation is not used, we can't allocate any random +* range. All internal devices have hardcoded place where they can +* be located within PCI address space. Fortunately, we can read +* this value from BAR. +*/ + if (((type == SYS_RES_IOPORT) || (type == SYS_RES_MEMORY)) && + RMAN_IS_DEFAULT_RANGE(start, end)) { + + /* Read BAR manually to get resource address and size */ + pci_read_bar(child, *rid, , , NULL); + + /* Mask the information bits */ + if (PCI_BAR_MEM(map)) + map &= PCIM_BAR_MEM_BASE; + else + map &= PCIM_BAR_IO_BASE; + + if (PCI_BAR_MEM(testval)) + testval &= PCIM_BAR_MEM_BASE; + else + testval &= PCIM_BAR_IO_BASE; + + start = map; + end = start + count - 1; + } + + return (pci_host_generic_alloc_resource(dev, child, type, rid, start, + end, count, flags)); +} +#endif Modified: head/sys/arm64/cavium/thunder_pcie_common.h == --- head/sys/arm64/cavium/thunder_pcie_common.h Fri Feb 26 10:24:24 2016 (r296090) +++ head/sys/arm64/cavium/thunder_pcie_common.h Fri Feb 26 12:16:11 2016 (r296091) @@ -39,5 +39,9 @@ uint32_t range_addr_is_phys(struct pcie_ uint64_t range_addr_pci_to_phys(struct pcie_range *, uint64_t); int thunder_pcie_identify_ecam(device_t, int *); +#ifdef THUNDERX_PASS_1_1_ERRATA +struct resource *thunder_pcie_alloc_resource(device_t, +device_t, int, int *, rman_res_t, rman_res_t, rman_res_t, u_int); +#endif #endif /* _CAVIUM_THUNDER_PCIE_COMMON_H_ */ Modified: head/sys/arm64/cavium/thunder_pcie_fdt.c == --- head/sys/arm64/cavium/thunder_pcie_fdt.cFri Feb 26 10:24:24 2016 (r296090) +++ head/sys/arm64/cavium/thunder_pcie_fdt.cFri Feb 26 12:16:11 2016 (r296091) @@ -49,6 +49,10 @@ __FBSDID("$FreeBSD$"); #include "thunder_pcie_common.h" +#ifdef THUNDERX_PASS_1_1_ERRATA +static struct resource * thunder_pcie_fdt_alloc_resource(device_t, device_t, +int, int *, rman_res_t, rman_res_t, rman_res_t, u_int); +#endif static int thunder_pcie_fdt_attach(device_t); static int thunder_pcie_fdt_probe(device_t); @@ -56,6 +60,9 @@ static device_method_t thunder_pcie_fdt_ /* Device interface */ DEVMETHOD(device_probe, thunder_pcie_fdt_probe), DEVMETHOD(device_attach,thunder_pcie_fdt_attach), +#ifdef THUNDERX_PASS_1_1_ERRATA + DEVMETHOD(bus_alloc_resource, thunder_pcie_fdt_alloc_resource), +#endif /* End */ DEVMETHOD_END @@ -105,3 +112,17 @@ thunder_pcie_fdt_attach(device_t dev) return (pci_host_generic_attach(dev)); } +#ifdef THUNDERX_PASS_1_1_ERRATA +static struct resource * +thunder_pcie_fdt_alloc_resource(device_t dev, device_t child, int type, int *rid, +rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) +{ + + if ((int)ofw_bus_get_node(child) > 0) + return (pci_host_generic_alloc_resource(dev, child, + type, rid, start, end, count, flags)); + +
svn commit: r296090 - head/usr.sbin/pciconf
Author: wma Date: Fri Feb 26 10:24:24 2016 New Revision: 296090 URL: https://svnweb.freebsd.org/changeset/base/296090 Log: Change format string in pciconf EA to jx Fix compilation error introduced by r296081 Modified: head/usr.sbin/pciconf/cap.c Modified: head/usr.sbin/pciconf/cap.c == --- head/usr.sbin/pciconf/cap.c Fri Feb 26 09:50:35 2016(r296089) +++ head/usr.sbin/pciconf/cap.c Fri Feb 26 10:24:24 2016(r296090) @@ -657,13 +657,13 @@ cap_ea(int fd, struct pci_conf *p, uint8 b++; } - printf("\n\t\t [%d] %s, %s, %s, base [0x%lx], size [0x%lx]" + printf("\n\t\t [%d] %s, %s, %s, base [0x%jx], size [0x%jx]" "\n\t\t\tPrimary properties [0x%x] (%s)" "\n\t\t\tSecondary properties [0x%x] (%s)", bei, ea_bei_to_name(bei), (flags & PCIM_EA_ENABLE ? "Enabled" : "Disabled"), - (flags & PCIM_EA_WRITABLE ? "Writable" : "Read-only"), - base, max_offset + 1, + (flags & PCIM_EA_WRITABLE ? "Writable" : "Read-only"), + (uintmax_t)base, (uintmax_t)(max_offset + 1), flags_pp, ea_prop_to_name(flags_pp), flags_sp, ea_prop_to_name(flags_sp)); } ___ 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: r296089 - head/sys/dev/hyperv/netvsc
Author: sephe Date: Fri Feb 26 09:50:35 2016 New Revision: 296089 URL: https://svnweb.freebsd.org/changeset/base/296089 Log: hyperv/hn: Make transmission path channel aware Chimney sending buffer still needs conversion, which will be done along with the upcoming vRSS support. MFC after:1 week Sponsored by: Microsoft OSTC Differential Revision:https://reviews.freebsd.org/D5457 Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c head/sys/dev/hyperv/netvsc/hv_net_vsc.h head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c head/sys/dev/hyperv/netvsc/hv_rndis_filter.c Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c == --- head/sys/dev/hyperv/netvsc/hv_net_vsc.c Fri Feb 26 09:45:48 2016 (r296088) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.c Fri Feb 26 09:50:35 2016 (r296089) @@ -809,7 +809,7 @@ hv_nv_on_send_completion(netvsc_dev *net * Returns 0 on success, non-zero on failure. */ int -hv_nv_on_send(struct hv_device *device, netvsc_packet *pkt) +hv_nv_on_send(struct hv_vmbus_channel *chan, netvsc_packet *pkt) { nvsp_msg send_msg; int ret; @@ -829,11 +829,11 @@ hv_nv_on_send(struct hv_device *device, pkt->send_buf_section_size; if (pkt->page_buf_count) { - ret = hv_vmbus_channel_send_packet_pagebuffer(device->channel, + ret = hv_vmbus_channel_send_packet_pagebuffer(chan, pkt->page_buffers, pkt->page_buf_count, _msg, sizeof(nvsp_msg), (uint64_t)(uintptr_t)pkt); } else { - ret = hv_vmbus_channel_send_packet(device->channel, + ret = hv_vmbus_channel_send_packet(chan, _msg, sizeof(nvsp_msg), (uint64_t)(uintptr_t)pkt, HV_VMBUS_PACKET_TYPE_DATA_IN_BAND, HV_VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h == --- head/sys/dev/hyperv/netvsc/hv_net_vsc.h Fri Feb 26 09:45:48 2016 (r296088) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.h Fri Feb 26 09:50:35 2016 (r296089) @@ -1017,6 +1017,8 @@ struct hn_rx_ring { #define HN_TRUST_HCSUM_TCP 0x0002 #define HN_TRUST_HCSUM_UDP 0x0004 +struct hv_vmbus_channel; + struct hn_tx_ring { #ifndef HN_USE_TXDESC_BUFRING struct mtx hn_txlist_spin; @@ -1039,6 +1041,7 @@ struct hn_tx_ring { struct mtx hn_tx_lock; struct hn_softc *hn_sc; + struct hv_vmbus_channel *hn_chan; int hn_direct_tx_size; int hn_tx_chimney_size; @@ -1096,7 +1099,7 @@ netvsc_dev *hv_nv_on_device_add(struct h void *additional_info); int hv_nv_on_device_remove(struct hv_device *device, boolean_t destroy_channel); -int hv_nv_on_send(struct hv_device *device, netvsc_packet *pkt); +int hv_nv_on_send(struct hv_vmbus_channel *chan, netvsc_packet *pkt); int hv_nv_get_next_send_section(netvsc_dev *net_dev); #endif /* __HV_NET_VSC_H__ */ Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c == --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Feb 26 09:45:48 2016(r296088) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Feb 26 09:50:35 2016(r296089) @@ -436,6 +436,7 @@ netvsc_attach(device_t dev) chan = device_ctx->channel; chan->hv_chan_rxr = >hn_rx_ring[0]; chan->hv_chan_txr = >hn_tx_ring[0]; + sc->hn_tx_ring[0].hn_chan = chan; if_initname(ifp, device_get_name(dev), device_get_unit(dev)); ifp->if_dunit = unit; @@ -854,6 +855,8 @@ hn_encap(struct hn_tx_ring *txr, struct /* * Chimney send, if the packet could fit into one chimney buffer. +* +* TODO: vRSS, chimney buffer should be per-channel. */ if (packet->tot_data_buf_len < txr->hn_tx_chimney_size) { netvsc_dev *net_dev = txr->hn_sc->net_dev; @@ -940,8 +943,7 @@ done: * associated w/ the txd will _not_ be freed. */ static int -hn_send_pkt(struct ifnet *ifp, struct hv_device *device_ctx, -struct hn_tx_ring *txr, struct hn_txdesc *txd) +hn_send_pkt(struct ifnet *ifp, struct hn_tx_ring *txr, struct hn_txdesc *txd) { int error, send_failed = 0; @@ -950,7 +952,7 @@ again: * Make sure that txd is not freed before ETHER_BPF_MTAP. */ hn_txdesc_hold(txd); - error = hv_nv_on_send(device_ctx, >netvsc_pkt); + error = hv_nv_on_send(txr->hn_chan, >netvsc_pkt); if (!error) { ETHER_BPF_MTAP(ifp, txd->m); if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); @@ -1010,7 +1012,6 @@ hn_start_locked(struct hn_tx_ring *txr, { struct hn_softc *sc = txr->hn_sc; struct
svn commit: r296088 - head/sys/dev/hyperv/netvsc
Author: sephe Date: Fri Feb 26 09:45:48 2016 New Revision: 296088 URL: https://svnweb.freebsd.org/changeset/base/296088 Log: hyperv/hn: Remove the useless num_outstanding_sends We rely on taskqueue draining now. MFC after:1 week Sponsored by: Microsoft OSTC Differential Revision:https://reviews.freebsd.org/D5456 Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c head/sys/dev/hyperv/netvsc/hv_net_vsc.h Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c == --- head/sys/dev/hyperv/netvsc/hv_net_vsc.c Fri Feb 26 09:41:00 2016 (r296087) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.c Fri Feb 26 09:45:48 2016 (r296088) @@ -117,7 +117,7 @@ hv_nv_get_inbound_net_device(struct hv_d * permit incoming packets if and only if there * are outstanding sends. */ - if (net_dev->destroy && net_dev->num_outstanding_sends == 0) { + if (net_dev->destroy) { return (NULL); } @@ -723,11 +723,6 @@ hv_nv_on_device_remove(struct hv_device /* Stop outbound traffic ie sends and receives completions */ net_dev->destroy = TRUE; - /* Wait for all send completions */ - while (net_dev->num_outstanding_sends) { - DELAY(100); - } - hv_nv_disconnect_from_vsp(net_dev); /* At this point, no one should be accessing net_dev except in here */ @@ -805,8 +800,6 @@ hv_nv_on_send_completion(netvsc_dev *net net_vsc_pkt->compl.send.send_completion_context); } - - atomic_subtract_int(_dev->num_outstanding_sends, 1); } } @@ -818,14 +811,9 @@ hv_nv_on_send_completion(netvsc_dev *net int hv_nv_on_send(struct hv_device *device, netvsc_packet *pkt) { - netvsc_dev *net_dev; nvsp_msg send_msg; int ret; - net_dev = hv_nv_get_outbound_net_device(device); - if (!net_dev) - return (ENODEV); - send_msg.hdr.msg_type = nvsp_msg_1_type_send_rndis_pkt; if (pkt->is_data_pkt) { /* 0 is RMC_DATA */ @@ -851,10 +839,6 @@ hv_nv_on_send(struct hv_device *device, HV_VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); } - /* Record outstanding send only if send_packet() succeeded */ - if (ret == 0) - atomic_add_int(_dev->num_outstanding_sends, 1); - return (ret); } Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h == --- head/sys/dev/hyperv/netvsc/hv_net_vsc.h Fri Feb 26 09:41:00 2016 (r296087) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.h Fri Feb 26 09:45:48 2016 (r296088) @@ -893,7 +893,6 @@ typedef struct nvsp_msg_ { */ typedef struct netvsc_dev_ { struct hv_device*dev; - int num_outstanding_sends; /* Send buffer allocated by us but manages by NetVSP */ void*send_buf; ___ 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: r296087 - in head/sys/dev/hyperv: include netvsc
Author: sephe Date: Fri Feb 26 09:41:00 2016 New Revision: 296087 URL: https://svnweb.freebsd.org/changeset/base/296087 Log: hyperv/hn: Associate TX/RX ring with channel This fixes the TX/RX ring selection for TX/RX done. MFC after:1 week Sponsored by: Microsoft OSTC Differential Revision:https://reviews.freebsd.org/D5454 Modified: head/sys/dev/hyperv/include/hyperv.h head/sys/dev/hyperv/netvsc/hv_net_vsc.h head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/include/hyperv.h == --- head/sys/dev/hyperv/include/hyperv.hFri Feb 26 09:35:45 2016 (r296086) +++ head/sys/dev/hyperv/include/hyperv.hFri Feb 26 09:41:00 2016 (r296087) @@ -822,10 +822,12 @@ typedef struct hv_vmbus_channel { * This will be NULL for the primary channel. */ struct hv_vmbus_channel *primary_channel; + /* -* Support per channel state for use by vmbus drivers. +* Driver private data */ - void*per_channel_state; + void*hv_chan_priv1; + void*hv_chan_priv2; } hv_vmbus_channel; #define HV_VMBUS_CHAN_ISPRIMARY(chan) ((chan)->primary_channel == NULL) Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.h == --- head/sys/dev/hyperv/netvsc/hv_net_vsc.h Fri Feb 26 09:35:45 2016 (r296086) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.h Fri Feb 26 09:41:00 2016 (r296087) @@ -1000,6 +1000,7 @@ struct buf_ring; #endif struct hn_rx_ring { + struct ifnet*hn_ifp; struct lro_ctrl hn_lro; /* Trust csum verification on host side */ Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c == --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Feb 26 09:35:45 2016(r296086) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Feb 26 09:41:00 2016(r296087) @@ -117,6 +117,8 @@ __FBSDID("$FreeBSD$"); #include "hv_rndis.h" #include "hv_rndis_filter.h" +#define hv_chan_rxrhv_chan_priv1 +#define hv_chan_txrhv_chan_priv2 /* Short for Hyper-V network interface */ #define NETVSC_DEVNAME"hn" @@ -376,6 +378,7 @@ static int netvsc_attach(device_t dev) { struct hv_device *device_ctx = vmbus_get_devctx(dev); + struct hv_vmbus_channel *chan; netvsc_device_info device_info; hn_softc_t *sc; int unit = device_get_unit(dev); @@ -427,6 +430,13 @@ netvsc_attach(device_t dev) hn_create_rx_data(sc); + /* +* Associate the first TX/RX ring w/ the primary channel. +*/ + chan = device_ctx->channel; + chan->hv_chan_rxr = >hn_rx_ring[0]; + chan->hv_chan_txr = >hn_tx_ring[0]; + if_initname(ifp, device_get_name(dev), device_get_unit(dev)); ifp->if_dunit = unit; ifp->if_dname = NETVSC_DEVNAME; @@ -686,11 +696,9 @@ hn_tx_done(void *xpkt) void netvsc_channel_rollup(struct hv_vmbus_channel *chan) { - struct hv_device *device_ctx = chan->device; - struct hn_softc *sc = device_get_softc(device_ctx->device); - struct hn_tx_ring *txr = >hn_tx_ring[0]; /* TODO: vRSS */ + struct hn_tx_ring *txr = chan->hv_chan_txr; #if defined(INET) || defined(INET6) - struct hn_rx_ring *rxr = >hn_rx_ring[0]; /* TODO: vRSS */ + struct hn_rx_ring *rxr = chan->hv_chan_rxr; struct lro_ctrl *lro = >hn_lro; struct lro_entry *queued; @@ -700,7 +708,12 @@ netvsc_channel_rollup(struct hv_vmbus_ch } #endif - if (!txr->hn_has_txeof) + /* +* NOTE: +* 'txr' could be NULL, if multiple channels and +* ifnet.if_start method are enabled. +*/ + if (txr == NULL || !txr->hn_has_txeof) return; txr->hn_has_txeof = 0; @@ -1139,22 +1152,13 @@ int netvsc_recv(struct hv_vmbus_channel *chan, netvsc_packet *packet, rndis_tcp_ip_csum_info *csum_info) { - struct hv_device *device_ctx = chan->device; - struct hn_softc *sc = device_get_softc(device_ctx->device); - struct hn_rx_ring *rxr = >hn_rx_ring[0]; /* TODO: vRSS */ + struct hn_rx_ring *rxr = chan->hv_chan_rxr; + struct ifnet *ifp = rxr->hn_ifp; struct mbuf *m_new; - struct ifnet *ifp; int size, do_lro = 0, do_csum = 1; - if (sc == NULL) { - return (0); /* TODO: KYS how can this be! */ - } - - ifp = sc->hn_ifp; - - if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { + if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) return (0); - } /* * Bail out if packet contains more data than configured MTU. @@ -2023,6
svn commit: r296086 - head/sys/dev/hyperv/netvsc
Author: sephe Date: Fri Feb 26 09:35:45 2016 New Revision: 296086 URL: https://svnweb.freebsd.org/changeset/base/296086 Log: hyperv/hn: Pass channel to TX/RX done This is preamble to associate the TX/RX rings to their channel. While I'm here, revoke unused netvsc_recv_rollup. MFC after:1 week Sponsored by: Microsoft OSTC Differential Revision:https://reviews.freebsd.org/D5453 Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c head/sys/dev/hyperv/netvsc/hv_rndis.h head/sys/dev/hyperv/netvsc/hv_rndis_filter.c head/sys/dev/hyperv/netvsc/hv_rndis_filter.h Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c == --- head/sys/dev/hyperv/netvsc/hv_net_vsc.c Fri Feb 26 09:29:50 2016 (r296085) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.c Fri Feb 26 09:35:45 2016 (r296086) @@ -63,7 +63,8 @@ static int hv_nv_connect_to_vsp(struct static void hv_nv_on_send_completion(netvsc_dev *net_dev, struct hv_device *device, hv_vm_packet_descriptor *pkt); static void hv_nv_on_receive(netvsc_dev *net_dev, -struct hv_device *device, hv_vm_packet_descriptor *pkt); +struct hv_device *device, struct hv_vmbus_channel *chan, +hv_vm_packet_descriptor *pkt); /* * @@ -865,7 +866,7 @@ hv_nv_on_send(struct hv_device *device, */ static void hv_nv_on_receive(netvsc_dev *net_dev, struct hv_device *device, -hv_vm_packet_descriptor *pkt) +struct hv_vmbus_channel *chan, hv_vm_packet_descriptor *pkt) { hv_vm_transfer_page_packet_header *vm_xfer_page_pkt; nvsp_msg *nvsp_msg_pkt; @@ -915,7 +916,7 @@ hv_nv_on_receive(netvsc_dev *net_dev, st net_vsc_pkt->tot_data_buf_len = vm_xfer_page_pkt->ranges[i].byte_count; - hv_rf_on_receive(net_dev, device, net_vsc_pkt); + hv_rf_on_receive(net_dev, device, chan, net_vsc_pkt); if (net_vsc_pkt->status != nvsp_status_success) { status = nvsp_status_failure; } @@ -928,7 +929,6 @@ hv_nv_on_receive(netvsc_dev *net_dev, st */ hv_nv_on_receive_completion(device, vm_xfer_page_pkt->d.transaction_id, status); - hv_rf_receive_rollup(net_dev); } /* @@ -1002,7 +1002,7 @@ hv_nv_on_channel_callback(void *xchan) hv_nv_on_send_completion(net_dev, device, desc); break; case HV_VMBUS_PACKET_TYPE_DATA_USING_TRANSFER_PAGES: - hv_nv_on_receive(net_dev, device, desc); + hv_nv_on_receive(net_dev, device, chan, desc); break; default: device_printf(dev, @@ -1036,5 +1036,5 @@ hv_nv_on_channel_callback(void *xchan) if (bufferlen > NETVSC_PACKET_SIZE) free(buffer, M_NETVSC); - hv_rf_channel_rollup(net_dev); + hv_rf_channel_rollup(chan); } Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c == --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Feb 26 09:29:50 2016(r296085) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Fri Feb 26 09:35:45 2016(r296086) @@ -684,8 +684,9 @@ hn_tx_done(void *xpkt) } void -netvsc_channel_rollup(struct hv_device *device_ctx) +netvsc_channel_rollup(struct hv_vmbus_channel *chan) { + struct hv_device *device_ctx = chan->device; struct hn_softc *sc = device_get_softc(device_ctx->device); struct hn_tx_ring *txr = >hn_tx_ring[0]; /* TODO: vRSS */ #if defined(INET) || defined(INET6) @@ -1135,9 +1136,10 @@ hv_m_append(struct mbuf *m0, int len, c_ * Note: This is no longer used as a callback */ int -netvsc_recv(struct hv_device *device_ctx, netvsc_packet *packet, +netvsc_recv(struct hv_vmbus_channel *chan, netvsc_packet *packet, rndis_tcp_ip_csum_info *csum_info) { + struct hv_device *device_ctx = chan->device; struct hn_softc *sc = device_get_softc(device_ctx->device); struct hn_rx_ring *rxr = >hn_rx_ring[0]; /* TODO: vRSS */ struct mbuf *m_new; @@ -1305,11 +1307,6 @@ skip: return (0); } -void -netvsc_recv_rollup(struct hv_device *device_ctx __unused) -{ -} - /* * Rules for using sc->temp_unusable: * 1. sc->temp_unusable can only be read or written while holding NV_LOCK() Modified: head/sys/dev/hyperv/netvsc/hv_rndis.h == --- head/sys/dev/hyperv/netvsc/hv_rndis.h Fri Feb 26 09:29:50 2016 (r296085) +++ head/sys/dev/hyperv/netvsc/hv_rndis.h Fri Feb 26 09:35:45 2016 (r296086) @@
svn commit: r296085 - head/sys/dev/hyperv/netvsc
Author: sephe Date: Fri Feb 26 09:29:50 2016 New Revision: 296085 URL: https://svnweb.freebsd.org/changeset/base/296085 Log: hyperv/hn: Pass channel as the channel callback argument This is the preamble to pass channel back to hn(4) upon TX/RX done. Reviewed by: Hongjiang Zhang MFC after:1 week Sponsored by: Microsoft OSTC Differential Revision:https://reviews.freebsd.org/D5452 Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c == --- head/sys/dev/hyperv/netvsc/hv_net_vsc.c Fri Feb 26 09:23:17 2016 (r296084) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.c Fri Feb 26 09:29:50 2016 (r296085) @@ -679,7 +679,7 @@ hv_nv_on_device_add(struct hv_device *de */ ret = hv_vmbus_channel_open(device->channel, NETVSC_DEVICE_RING_BUFFER_SIZE, NETVSC_DEVICE_RING_BUFFER_SIZE, - NULL, 0, hv_nv_on_channel_callback, device); + NULL, 0, hv_nv_on_channel_callback, device->channel); if (ret != 0) goto cleanup; @@ -972,9 +972,10 @@ retry_send_cmplt: * Net VSC on channel callback */ static void -hv_nv_on_channel_callback(void *context) +hv_nv_on_channel_callback(void *xchan) { - struct hv_device *device = (struct hv_device *)context; + struct hv_vmbus_channel *chan = xchan; + struct hv_device *device = chan->device; netvsc_dev *net_dev; device_t dev = device->device; uint32_t bytes_rxed; @@ -991,7 +992,7 @@ hv_nv_on_channel_callback(void *context) buffer = net_dev->callback_buf; do { - ret = hv_vmbus_channel_recv_packet_raw(device->channel, + ret = hv_vmbus_channel_recv_packet_raw(chan, buffer, bufferlen, _rxed, _id); if (ret == 0) { if (bytes_rxed > 0) { ___ 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: r296084 - in head/sys/dev/hyperv: include storvsc vmbus
Author: sephe Date: Fri Feb 26 09:23:17 2016 New Revision: 296084 URL: https://svnweb.freebsd.org/changeset/base/296084 Log: hyperv: Always set device for channels And unregister hv_device only for primary channels, who own the hv_device. MFC after:1 week Sponsored by: Microsoft OSTC Differential Revision:https://reviews.freebsd.org/D5451 Modified: head/sys/dev/hyperv/include/hyperv.h head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c head/sys/dev/hyperv/vmbus/hv_channel_mgmt.c Modified: head/sys/dev/hyperv/include/hyperv.h == --- head/sys/dev/hyperv/include/hyperv.hFri Feb 26 09:17:31 2016 (r296083) +++ head/sys/dev/hyperv/include/hyperv.hFri Feb 26 09:23:17 2016 (r296084) @@ -828,6 +828,8 @@ typedef struct hv_vmbus_channel { void*per_channel_state; } hv_vmbus_channel; +#define HV_VMBUS_CHAN_ISPRIMARY(chan) ((chan)->primary_channel == NULL) + static inline void hv_set_channel_read_state(hv_vmbus_channel* channel, boolean_t state) { Modified: head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c == --- head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.cFri Feb 26 09:17:31 2016(r296083) +++ head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.cFri Feb 26 09:23:17 2016(r296084) @@ -334,7 +334,7 @@ storvsc_handle_sc_creation(void *context int ret = 0; new_channel = (hv_vmbus_channel *)context; - device = new_channel->primary_channel->device; + device = new_channel->device; sc = get_stor_device(device, TRUE); if (sc == NULL) return; @@ -837,12 +837,7 @@ hv_storvsc_on_channel_callback(void *con struct hv_storvsc_request *request; struct vstor_packet *vstor_packet; - if (channel->primary_channel != NULL){ - device = channel->primary_channel->device; - } else { - device = channel->device; - } - + device = channel->device; KASSERT(device, ("device is NULL")); sc = get_stor_device(device, FALSE); Modified: head/sys/dev/hyperv/vmbus/hv_channel_mgmt.c == --- head/sys/dev/hyperv/vmbus/hv_channel_mgmt.c Fri Feb 26 09:17:31 2016 (r296083) +++ head/sys/dev/hyperv/vmbus/hv_channel_mgmt.c Fri Feb 26 09:23:17 2016 (r296084) @@ -211,6 +211,7 @@ vmbus_channel_process_offer(hv_vmbus_cha * It is a sub channel offer, process it. */ new_channel->primary_channel = channel; + new_channel->device = channel->device; mtx_lock(>sc_lock); TAILQ_INSERT_TAIL( >sc_list_anchor, @@ -451,7 +452,10 @@ vmbus_channel_on_offer_rescind_internal( hv_vmbus_channel* channel; channel = (hv_vmbus_channel*)context; - hv_vmbus_child_device_unregister(channel->device); + if (HV_VMBUS_CHAN_ISPRIMARY(channel)) { + /* Only primary channel owns the hv_device */ + hv_vmbus_child_device_unregister(channel->device); + } } /** @@ -672,7 +676,10 @@ hv_vmbus_release_unattached_channels(voi TAILQ_REMOVE(_vmbus_g_connection.channel_anchor, channel, list_entry); - hv_vmbus_child_device_unregister(channel->device); + if (HV_VMBUS_CHAN_ISPRIMARY(channel)) { + /* Only primary channel owns the hv_device */ + hv_vmbus_child_device_unregister(channel->device); + } hv_vmbus_free_vmbus_channel(channel); } bzero(hv_vmbus_g_connection.channels, ___ 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: r296083 - in head/sys/dev/hyperv: include netvsc storvsc vmbus
Author: sephe Date: Fri Feb 26 09:17:31 2016 New Revision: 296083 URL: https://svnweb.freebsd.org/changeset/base/296083 Log: hyperv: Remove useless channel inbound_lock It serves no purpose. Reviewed by: Hongjiang Zhang MFC after:1 week Sponsored by: Microsoft OSTC Differential Revision:https://reviews.freebsd.org/D5450 Modified: head/sys/dev/hyperv/include/hyperv.h head/sys/dev/hyperv/netvsc/hv_net_vsc.c head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c head/sys/dev/hyperv/vmbus/hv_channel.c head/sys/dev/hyperv/vmbus/hv_channel_mgmt.c Modified: head/sys/dev/hyperv/include/hyperv.h == --- head/sys/dev/hyperv/include/hyperv.hFri Feb 26 08:43:36 2016 (r296082) +++ head/sys/dev/hyperv/include/hyperv.hFri Feb 26 09:17:31 2016 (r296083) @@ -753,8 +753,6 @@ typedef struct hv_vmbus_channel { */ hv_vmbus_ring_buffer_info inbound; - struct mtx inbound_lock; - struct taskqueue * rxq; struct task channel_task; hv_vmbus_pfn_channel_callback on_channel_callback; Modified: head/sys/dev/hyperv/netvsc/hv_net_vsc.c == --- head/sys/dev/hyperv/netvsc/hv_net_vsc.c Fri Feb 26 08:43:36 2016 (r296082) +++ head/sys/dev/hyperv/netvsc/hv_net_vsc.c Fri Feb 26 09:17:31 2016 (r296083) @@ -720,9 +720,7 @@ hv_nv_on_device_remove(struct hv_device netvsc_dev *net_dev = sc->net_dev;; /* Stop outbound traffic ie sends and receives completions */ - mtx_lock(>channel->inbound_lock); net_dev->destroy = TRUE; - mtx_unlock(>channel->inbound_lock); /* Wait for all send completions */ while (net_dev->num_outstanding_sends) { Modified: head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c == --- head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.cFri Feb 26 08:43:36 2016(r296082) +++ head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.cFri Feb 26 09:17:31 2016(r296083) @@ -1153,9 +1153,7 @@ storvsc_detach(device_t dev) struct hv_sgl_node *sgl_node = NULL; int j = 0; - mtx_lock(_device->channel->inbound_lock); sc->hs_destroy = TRUE; - mtx_unlock(_device->channel->inbound_lock); /* * At this point, all outbound traffic should be disabled. We Modified: head/sys/dev/hyperv/vmbus/hv_channel.c == --- head/sys/dev/hyperv/vmbus/hv_channel.c Fri Feb 26 08:43:36 2016 (r296082) +++ head/sys/dev/hyperv/vmbus/hv_channel.c Fri Feb 26 09:17:31 2016 (r296083) @@ -537,13 +537,7 @@ hv_vmbus_channel_close_internal(hv_vmbus */ channel->rxq = NULL; taskqueue_drain(rxq, >channel_task); - /* -* Grab the lock to prevent race condition when a packet received -* and unloading driver is in the process. -*/ - mtx_lock(>inbound_lock); channel->on_channel_callback = NULL; - mtx_unlock(>inbound_lock); /** * Send a closing message @@ -920,12 +914,6 @@ VmbusProcessChannelEvent(void* context, * callback to NULL. This closes the window. */ - /* -* Disable the lock due to newly added WITNESS check in r277723. -* Will seek other way to avoid race condition. -* -- whu -*/ - // mtx_lock(>inbound_lock); if (channel->on_channel_callback != NULL) { arg = channel->channel_callback_context; is_batched_reading = channel->batched_reading; @@ -952,5 +940,4 @@ VmbusProcessChannelEvent(void* context, bytes_to_read = 0; } while (is_batched_reading && (bytes_to_read != 0)); } - // mtx_unlock(>inbound_lock); } Modified: head/sys/dev/hyperv/vmbus/hv_channel_mgmt.c == --- head/sys/dev/hyperv/vmbus/hv_channel_mgmt.c Fri Feb 26 08:43:36 2016 (r296082) +++ head/sys/dev/hyperv/vmbus/hv_channel_mgmt.c Fri Feb 26 09:17:31 2016 (r296083) @@ -140,9 +140,7 @@ hv_vmbus_allocate_channel(void) M_DEVBUF, M_WAITOK | M_ZERO); - mtx_init(>inbound_lock, "channel inbound", NULL, MTX_DEF); mtx_init(>sc_lock, "vmbus multi channel", NULL, MTX_DEF); - TAILQ_INIT(>sc_list_anchor); return (channel); @@ -155,8 +153,6 @@ void hv_vmbus_free_vmbus_channel(hv_vmbus_channel* channel) { mtx_destroy(>sc_lock); - mtx_destroy(>inbound_lock); - free(channel,
svn commit: r296082 - head/sys/dev/uart
Author: wma Date: Fri Feb 26 08:43:36 2016 New Revision: 296082 URL: https://svnweb.freebsd.org/changeset/base/296082 Log: Add ns16550a compatible string in UART 8250 driver Obtained from: Semihalf Submitted by: Michal StanekSponsored by: Annapurna Labs Approved by: cognet (mentor) Reviewed by: imp, wma Differential revision: https://reviews.freebsd.org/D5404 Modified: head/sys/dev/uart/uart_dev_ns8250.c Modified: head/sys/dev/uart/uart_dev_ns8250.c == --- head/sys/dev/uart/uart_dev_ns8250.c Fri Feb 26 08:35:04 2016 (r296081) +++ head/sys/dev/uart/uart_dev_ns8250.c Fri Feb 26 08:43:36 2016 (r296082) @@ -397,6 +397,7 @@ struct uart_class uart_ns8250_class = { #ifdef FDT static struct ofw_compat_data compat_data[] = { {"ns16550", (uintptr_t)_ns8250_class}, + {"ns16550a",(uintptr_t)_ns8250_class}, {"snps,dw-apb-uart",(uintptr_t)_ns8250_class}, {NULL, (uintptr_t)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: r296081 - in head: sys/dev/pci usr.sbin/pciconf
Author: wma Date: Fri Feb 26 08:35:04 2016 New Revision: 296081 URL: https://svnweb.freebsd.org/changeset/base/296081 Log: Add support for Enhanced Allocation in pciconf * Modified pciconf to print EA capability structure * Added register description to pcireg.h Obtained from: Semihalf Sponsored by: Cavium Approved by: cognet (mentor) Reviewed by: jhb Differential revision: https://reviews.freebsd.org/D5440 Modified: head/sys/dev/pci/pcireg.h head/usr.sbin/pciconf/cap.c Modified: head/sys/dev/pci/pcireg.h == --- head/sys/dev/pci/pcireg.h Fri Feb 26 08:16:44 2016(r296080) +++ head/sys/dev/pci/pcireg.h Fri Feb 26 08:35:04 2016(r296081) @@ -146,6 +146,7 @@ #definePCIY_MSIX 0x11/* MSI-X */ #definePCIY_SATA 0x12/* SATA */ #definePCIY_PCIAF 0x13/* PCI Advanced Features */ +#definePCIY_EA 0x14/* PCI Extended Allocation */ /* Extended Capability Register Fields */ @@ -586,6 +587,52 @@ #definePCIR_MSI_MASK 0x10 #definePCIR_MSI_PENDING0x14 +/* PCI Enhanced Allocation registers */ +#definePCIR_EA_NUM_ENT 2 /* Number of Capability Entries */ +#definePCIM_EA_NUM_ENT_MASK0x3f/* Num Entries Mask */ +#definePCIR_EA_FIRST_ENT 4 /* First EA Entry in List */ +#definePCIR_EA_FIRST_ENT_BRIDGE8 /* First EA Entry for Bridges */ +#definePCIM_EA_ES 0x0007 /* Entry Size */ +#definePCIM_EA_BEI 0x00f0 /* BAR Equivalent Indicator */ +#definePCIM_EA_BEI_OFFSET 4 +/* 0-5 map to BARs 0-5 respectively */ +#definePCIM_EA_BEI_BAR_0 0 +#definePCIM_EA_BEI_BAR_5 5 +#definePCIM_EA_BEI_BAR(x) (((x) >> PCIM_EA_BEI_OFFSET) & 0xf) +#definePCIM_EA_BEI_BRIDGE 0x6 /* Resource behind bridge */ +#definePCIM_EA_BEI_ENI 0x7 /* Equivalent Not Indicated */ +#definePCIM_EA_BEI_ROM 0x8 /* Expansion ROM */ +/* 9-14 map to VF BARs 0-5 respectively */ +#definePCIM_EA_BEI_VF_BAR_09 +#definePCIM_EA_BEI_VF_BAR_514 +#definePCIM_EA_BEI_RESERVED0xf /* Reserved - Treat like ENI */ +#definePCIM_EA_PP 0xff00 /* Primary Properties */ +#definePCIM_EA_PP_OFFSET 8 +#definePCIM_EA_SP_OFFSET 16 +#definePCIM_EA_SP 0x00ff /* Secondary Properties */ +#definePCIM_EA_P_MEM 0x00/* Non-Prefetch Memory */ +#definePCIM_EA_P_MEM_PREFETCH 0x01/* Prefetchable Memory */ +#definePCIM_EA_P_IO0x02/* I/O Space */ +#definePCIM_EA_P_VF_MEM_PREFETCH 0x03/* VF Prefetchable Memory */ +#definePCIM_EA_P_VF_MEM0x04/* VF Non-Prefetch Memory */ +#definePCIM_EA_P_BRIDGE_MEM0x05/* Bridge Non-Prefetch Memory */ +#definePCIM_EA_P_BRIDGE_MEM_PREFETCH 0x06/* Bridge Prefetchable Memory */ +#definePCIM_EA_P_BRIDGE_IO 0x07/* Bridge I/O Space */ +/* 0x08-0xfc reserved */ +#definePCIM_EA_P_MEM_RESERVED 0xfd/* Reserved Memory */ +#definePCIM_EA_P_IO_RESERVED 0xfe/* Reserved I/O Space */ +#definePCIM_EA_P_UNAVAILABLE 0xff/* Entry Unavailable */ +#definePCIM_EA_WRITABLE0x4000 /* Writable: 1 = RW, 0 = HwInit */ +#definePCIM_EA_ENABLE 0x8000 /* Enable for this entry */ +#definePCIM_EA_BASE4 /* Base Address Offset */ +#definePCIM_EA_MAX_OFFSET 8 /* MaxOffset (resource length) */ +/* bit 0 is reserved */ +#definePCIM_EA_IS_64 0x0002 /* 64-bit field flag */ +#definePCIM_EA_FIELD_MASK 0xfffc /* For Base & Max Offset */ +/* Bridge config register */ +#definePCIM_EA_SEC_NR(reg) ((reg) & 0xff) +#definePCIM_EA_SUB_NR(reg) (((reg) >> 8) & 0xff) + /* PCI-X definitions */ /* For header type 0 devices */ Modified: head/usr.sbin/pciconf/cap.c == --- head/usr.sbin/pciconf/cap.c Fri Feb 26 08:16:44 2016(r296080) +++ head/usr.sbin/pciconf/cap.c Fri Feb 26 08:35:04 2016(r296081) @@ -534,6 +534,141 @@ cap_pciaf(int fd, struct pci_conf *p, ui cap & PCIM_PCIAFCAP_TP ? " TP" : ""); } +static const char * +ea_bei_to_name(uint8_t bei) +{ + static const char *barstr[] = { + "BAR0", "BAR1", "BAR2", "BAR3", "BAR4", "BAR5" + }; + static const char *vfbarstr[] = { + "VFBAR0", "VFBAR1", "VFBAR2", "VFBAR3", "VFBAR4", "VFBAR5" + }; + + if ((bei >= PCIM_EA_BEI_BAR_0) && (bei
svn commit: r296080 - in head/sys/boot: fdt uboot/fdt uboot/lib
Author: sgalabov Date: Fri Feb 26 08:16:44 2016 New Revision: 296080 URL: https://svnweb.freebsd.org/changeset/base/296080 Log: So far bsd.stand.mk wasn't included in the following files: sys/boot/fdt/Makefile sys/boot/uboot/fdt/Makefile sys/boot/uboot/lib/Makefile This causes compilation issues on MIPS due to trying to link PIC with non-PIC code. This revision includes bsd.stand.mk in the above files. Reviewed by: imp Approved by: adrian (mentor) Sponsored by: Smartcom - Bulgaria AD Differential Revision:https://reviews.freebsd.org/D5311 Modified: head/sys/boot/fdt/Makefile head/sys/boot/uboot/fdt/Makefile head/sys/boot/uboot/lib/Makefile Modified: head/sys/boot/fdt/Makefile == --- head/sys/boot/fdt/Makefile Fri Feb 26 08:06:25 2016(r296079) +++ head/sys/boot/fdt/Makefile Fri Feb 26 08:16:44 2016(r296080) @@ -26,4 +26,5 @@ CFLAGS+= -m32 CFLAGS+= -Wformat -Wall +.include .include Modified: head/sys/boot/uboot/fdt/Makefile == --- head/sys/boot/uboot/fdt/MakefileFri Feb 26 08:06:25 2016 (r296079) +++ head/sys/boot/uboot/fdt/MakefileFri Feb 26 08:16:44 2016 (r296080) @@ -28,6 +28,7 @@ machine: CLEANFILES+= machine +.include .include beforedepend ${OBJS}: machine Modified: head/sys/boot/uboot/lib/Makefile == --- head/sys/boot/uboot/lib/MakefileFri Feb 26 08:06:25 2016 (r296079) +++ head/sys/boot/uboot/lib/MakefileFri Feb 26 08:16:44 2016 (r296080) @@ -46,6 +46,7 @@ machine: CLEANFILES+= machine +.include .include beforedepend ${OBJS}: machine ___ 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: r296079 - in head/sys/boot: ficl mips/beri/loader
Author: sgalabov Date: Fri Feb 26 08:06:25 2016 New Revision: 296079 URL: https://svnweb.freebsd.org/changeset/base/296079 Log: Currently BERI's loader is including the 32-bit version of the FICL MIPS sysdep.h (sys/boot/ficl/mips/sysdep.h) instead of the 64-bit version (sys/boot/ficl/mips64/sysdep.h). Although this may not be an issue in practice, it would be more correct if the 64-bit version was used. Also, using the 64-bit version would make it easier to add support for 64-bit ubldr on MIPS. Approved by: adrian (mentor) Differential Revision:https://reviews.freebsd.org/D5310 Modified: head/sys/boot/ficl/Makefile head/sys/boot/mips/beri/loader/Makefile Modified: head/sys/boot/ficl/Makefile == --- head/sys/boot/ficl/Makefile Fri Feb 26 03:34:32 2016(r296078) +++ head/sys/boot/ficl/Makefile Fri Feb 26 08:06:25 2016(r296079) @@ -55,6 +55,8 @@ CFLAGS+= -m32 -mcpu=powerpc -I. .if ${MACHINE_CPUARCH} == "amd64" && defined(FICL32) FICL_CPUARCH= i386 +.elif ${MACHINE_ARCH} == "mips64" || ${MACHINE_ARCH} == "mips64el" +FICL_CPUARCH= mips64 .else FICL_CPUARCH= ${MACHINE_CPUARCH} .endif Modified: head/sys/boot/mips/beri/loader/Makefile == --- head/sys/boot/mips/beri/loader/Makefile Fri Feb 26 03:34:32 2016 (r296078) +++ head/sys/boot/mips/beri/loader/Makefile Fri Feb 26 08:06:25 2016 (r296079) @@ -72,7 +72,7 @@ CFLAGS+= -DLOADER_BZIP2_SUPPORT # Enable BootForth BOOT_FORTH=yes CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../../ficl -CFLAGS+= -I${.CURDIR}/../../../ficl/mips +CFLAGS+= -I${.CURDIR}/../../../ficl/mips64 LIBFICL= ${.OBJDIR}/../../../ficl/libficl.a .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"