svn commit: r275858 - head/sys/mips/beri
Author: br Date: Wed Dec 17 09:34:54 2014 New Revision: 275858 URL: https://svnweb.freebsd.org/changeset/base/275858 Log: Use memory regions information provided in FDT. Reviewed by: brooks Sponsored by: DARPA, AFRL Modified: head/sys/mips/beri/beri_machdep.c Modified: head/sys/mips/beri/beri_machdep.c == --- head/sys/mips/beri/beri_machdep.c Wed Dec 17 07:47:25 2014 (r275857) +++ head/sys/mips/beri/beri_machdep.c Wed Dec 17 09:34:54 2014 (r275858) @@ -88,6 +88,11 @@ static void mips_init(void) { int i; +#ifdef FDT + struct mem_region mr[FDT_MEM_REGIONS]; + int mr_cnt, val; + int j; +#endif for (i = 0; i < 10; i++) { phys_avail[i] = 0; @@ -102,6 +107,29 @@ mips_init(void) physmem = realmem; +#ifdef FDT + if (fdt_get_mem_regions(mr, &mr_cnt, &val) == 0) { + + physmem = btoc(val); + + KASSERT((phys_avail[0] >= mr[0].mr_start) && \ + (phys_avail[0] < (mr[0].mr_start + mr[0].mr_size)), + ("First region is not within FDT memory range")); + + /* Limit size of the first region */ + phys_avail[1] = MIN(mr[0].mr_size, ctob(realmem)); + dump_avail[1] = phys_avail[1]; + + /* Add the rest of regions */ + for (i = 1, j = 2; i < mr_cnt; i++, j+=2) { + phys_avail[j] = mr[i].mr_start; + phys_avail[j+1] = mr[i].mr_size; + dump_avail[j] = phys_avail[j]; + dump_avail[j+1] = phys_avail[j+1]; + } + } +#endif + init_param1(); init_param2(physmem); mips_cpu_init(); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r275859 - head/sys/boot/fdt/dts/arm
Author: br Date: Wed Dec 17 10:48:53 2014 New Revision: 275859 URL: https://svnweb.freebsd.org/changeset/base/275859 Log: o Add PIO[2,3] devices information o Enable Virtio Block Modified: head/sys/boot/fdt/dts/arm/socfpga-sockit-beri.dts Modified: head/sys/boot/fdt/dts/arm/socfpga-sockit-beri.dts == --- head/sys/boot/fdt/dts/arm/socfpga-sockit-beri.dts Wed Dec 17 09:34:54 2014(r275858) +++ head/sys/boot/fdt/dts/arm/socfpga-sockit-beri.dts Wed Dec 17 10:48:53 2014(r275859) @@ -106,20 +106,36 @@ status = "okay"; }; + pio2: pio@c0022000 { + compatible = "altr,pio"; + reg = <0xc0022000 0x1000>; /* recv */ + interrupts = < 77 >; + interrupt-parent = <&GIC>; + status = "okay"; + }; + + pio3: pio@c0023000 { + compatible = "altr,pio"; + reg = <0xc0023000 0x1000>; /* send */ + interrupts = < 83 >; /* not in use on arm side */ + interrupt-parent = <&GIC>; + status = "okay"; + }; + beri_vtblk: vtblk@1000 { compatible = "sri-cambridge,beri-vtblk"; reg = <0x1000 0x1000>; pio-recv = <&pio0>; pio-send = <&pio1>; beri-mem = <&beri_mem0>; - status = "disabled"; + status = "okay"; }; beri_vtnet: vtnet@2000 { compatible = "sri-cambridge,beri-vtnet"; reg = <0x2000 0x1000>; - pio-recv = <&pio0>; - pio-send = <&pio1>; + pio-recv = <&pio2>; + pio-send = <&pio3>; beri-mem = <&beri_mem0>; status = "okay"; }; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r275860 - head/sys/boot/fdt/dts/mips
Author: br Date: Wed Dec 17 11:05:44 2014 New Revision: 275860 URL: https://svnweb.freebsd.org/changeset/base/275860 Log: Move memory node to the root, so fdt_get_mem_regions() can find it. Modified: head/sys/boot/fdt/dts/mips/beri-netfpga.dts head/sys/boot/fdt/dts/mips/beri-sim.dts head/sys/boot/fdt/dts/mips/beripad-de4.dts Modified: head/sys/boot/fdt/dts/mips/beri-netfpga.dts == --- head/sys/boot/fdt/dts/mips/beri-netfpga.dts Wed Dec 17 10:48:53 2014 (r275859) +++ head/sys/boot/fdt/dts/mips/beri-netfpga.dts Wed Dec 17 11:05:44 2014 (r275860) @@ -82,6 +82,11 @@ */ }; + memory { + device_type = "memory"; + reg = <0x0 0x0FFF>; // ~256M at 0x0 + }; + soc { #address-cells = <1>; #size-cells = <1>; @@ -94,11 +99,6 @@ compatible = "simple-bus", "mips,mips4k"; ranges = <>; - memory { - device_type = "memory"; - reg = <0x0 0x0FFF>; // ~256M at 0x0 - }; - beripic: beripic@7f804000 { compatible = "sri-cambridge,beri-pic"; interrupt-controller; Modified: head/sys/boot/fdt/dts/mips/beri-sim.dts == --- head/sys/boot/fdt/dts/mips/beri-sim.dts Wed Dec 17 10:48:53 2014 (r275859) +++ head/sys/boot/fdt/dts/mips/beri-sim.dts Wed Dec 17 11:05:44 2014 (r275860) @@ -80,6 +80,11 @@ */ }; + memory { + device_type = "memory"; + reg = <0x0 0x400>; // 64M at 0x0 + }; + soc { #address-cells = <1>; #size-cells = <1>; @@ -92,11 +97,6 @@ compatible = "simple-bus", "mips,mips4k"; ranges = <>; - memory { - device_type = "memory"; - reg = <0x0 0x400>; // 64M at 0x0 - }; - beripic0: beripic@7f804000 { compatible = "sri-cambridge,beri-pic"; interrupt-controller; Modified: head/sys/boot/fdt/dts/mips/beripad-de4.dts == --- head/sys/boot/fdt/dts/mips/beripad-de4.dts Wed Dec 17 10:48:53 2014 (r275859) +++ head/sys/boot/fdt/dts/mips/beripad-de4.dts Wed Dec 17 11:05:44 2014 (r275860) @@ -80,6 +80,11 @@ */ }; + memory { + device_type = "memory"; + reg = <0x0 0x4000>; // 1G at 0x0 + }; + soc { #address-cells = <1>; #size-cells = <1>; @@ -92,11 +97,6 @@ compatible = "simple-bus", "mips,mips4k"; ranges = <>; - memory { - device_type = "memory"; - reg = <0x0 0x4000>; // 1G at 0x0 - }; - beripic0: beripic@7f804000 { compatible = "sri-cambridge,beri-pic"; interrupt-controller; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r275861 - in head/sys: boot/fdt/dts/mips mips/beri mips/conf
Author: br Date: Wed Dec 17 11:36:31 2014 New Revision: 275861 URL: https://svnweb.freebsd.org/changeset/base/275861 Log: Add configuration files for BERI soft-core synthesized on Terasic SoCKit board (Altera FPGA). Use virtio block as root filesystem device. Sponsored by: DARPA, AFRL Added: head/sys/boot/fdt/dts/mips/beripad-sockit.dts (contents, props changed) head/sys/mips/conf/BERI_SOCKIT (contents, props changed) Modified: head/sys/mips/beri/files.beri Added: head/sys/boot/fdt/dts/mips/beripad-sockit.dts == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/fdt/dts/mips/beripad-sockit.dts Wed Dec 17 11:36:31 2014(r275861) @@ -0,0 +1,219 @@ +/*- + * Copyright (c) 2012-2013 Robert N. M. Watson + * Copyright (c) 2013-2014 SRI International + * Copyright (c) 2014 Ruslan Bukin + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/dts-v1/; + +/* + * Device names here have been largely made up on the spot, especially for the + * "compatible" strings, and might want to be revised. + */ + +/ { + model = "SRI/Cambridge BeriPad (SoCKit)"; + compatible = "sri-cambridge,beripad-sockit"; + #address-cells = <1>; + #size-cells = <1>; + + cpus { + #address-cells = <1>; + #size-cells = <1>; + + /* +* Secondary CPUs all start disabled and use the +* spin-table enable method. cpu-release-addr must be +* specified for each cpu other than cpu@0. Values of +* cpu-release-addr grow down from 0x10 (kernel). +*/ + status = "disabled"; + enable-method = "spin-table"; + + cpu@0 { + device-type = "cpu"; + compatible = "sri-cambridge,beri"; + + reg = <0 1>; + status = "okay"; + }; + +/* + cpu@1 { + device-type = "cpu"; + compatible = "sri-cambridge,beri"; + + reg = <1 1>; + // XXX: should we need cached prefix? + cpu-release-addr = <0x 0x800fffe0>; + }; +*/ + }; + + memory { + device_type = "memory"; + reg = <0x0 0x1000>; /* 256MB at 0x0 */ + }; + + soc { + #address-cells = <2>; + #size-cells = <2>; + #interrupt-cells = <1>; + + /* +* Declare mips,mips4k since BERI doesn't (yet) have a PIC, so +* we use mips4k coprocessor 0 interrupt management directly. +*/ + compatible = "simple-bus", "mips,mips4k"; + /* ranges = <>; */ + + beripic0: beripic@7f804000 { + compatible = "sri-cambridge,beri-pic"; + interrupt-controller; + #address-cells = <0>; + #interrupt-cells = <1>; + reg = <0x0 0x7f804000 0x0 0x400 + 0x0 0x7f806000 0x0 0x10 + 0x0 0x7f806080 0x0 0x10 + 0x0 0x7f806100 0x0 0x10>; + interrupts = <0 1 2 3 4>; +
Re: svn commit: r275858 - head/sys/mips/beri
On Wed, 2014-12-17 at 09:34 +, Ruslan Bukin wrote: > Author: br > Date: Wed Dec 17 09:34:54 2014 > New Revision: 275858 > URL: https://svnweb.freebsd.org/changeset/base/275858 > > Log: > Use memory regions information provided in FDT. > > Reviewed by:brooks > Sponsored by: DARPA, AFRL > > Modified: > head/sys/mips/beri/beri_machdep.c > > Modified: head/sys/mips/beri/beri_machdep.c > == > --- head/sys/mips/beri/beri_machdep.c Wed Dec 17 07:47:25 2014 > (r275857) > +++ head/sys/mips/beri/beri_machdep.c Wed Dec 17 09:34:54 2014 > (r275858) > @@ -88,6 +88,11 @@ static void > mips_init(void) > { > int i; > +#ifdef FDT > + struct mem_region mr[FDT_MEM_REGIONS]; > + int mr_cnt, val; > + int j; > +#endif > > for (i = 0; i < 10; i++) { > phys_avail[i] = 0; > @@ -102,6 +107,29 @@ mips_init(void) > > physmem = realmem; > > +#ifdef FDT > + if (fdt_get_mem_regions(mr, &mr_cnt, &val) == 0) { > + > + physmem = btoc(val); > + > + KASSERT((phys_avail[0] >= mr[0].mr_start) && \ > + (phys_avail[0] < (mr[0].mr_start + mr[0].mr_size)), > + ("First region is not within FDT memory range")); > + > + /* Limit size of the first region */ > + phys_avail[1] = MIN(mr[0].mr_size, ctob(realmem)); > + dump_avail[1] = phys_avail[1]; > + > + /* Add the rest of regions */ > + for (i = 1, j = 2; i < mr_cnt; i++, j+=2) { > + phys_avail[j] = mr[i].mr_start; > + phys_avail[j+1] = mr[i].mr_size; > + dump_avail[j] = phys_avail[j]; > + dump_avail[j+1] = phys_avail[j+1]; > + } > + } > +#endif > + > init_param1(); > init_param2(physmem); > mips_cpu_init(); > This doesn't look right, the values in the odd-numbered array slots for phys_avail and dump_avail need to be addresses, not sizes. That is, avail[j] = start, avail[j+1] = start+size (note: not start+size-1). -- Ian ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r275858 - head/sys/mips/beri
On Wed, Dec 17, 2014 at 05:51:14AM -0700, Ian Lepore wrote: > > Modified: head/sys/mips/beri/beri_machdep.c > > == > > --- head/sys/mips/beri/beri_machdep.c Wed Dec 17 07:47:25 2014 > > (r275857) > > +++ head/sys/mips/beri/beri_machdep.c Wed Dec 17 09:34:54 2014 > > (r275858) > > @@ -88,6 +88,11 @@ static void > > mips_init(void) > > { > > int i; > > +#ifdef FDT > > + struct mem_region mr[FDT_MEM_REGIONS]; > > + int mr_cnt, val; > > + int j; > > +#endif > > > > for (i = 0; i < 10; i++) { > > phys_avail[i] = 0; > > @@ -102,6 +107,29 @@ mips_init(void) > > > > physmem = realmem; > > > > +#ifdef FDT > > + if (fdt_get_mem_regions(mr, &mr_cnt, &val) == 0) { > > + > > + physmem = btoc(val); > > + > > + KASSERT((phys_avail[0] >= mr[0].mr_start) && \ > > + (phys_avail[0] < (mr[0].mr_start + mr[0].mr_size)), > > + ("First region is not within FDT memory range")); > > + > > + /* Limit size of the first region */ > > + phys_avail[1] = MIN(mr[0].mr_size, ctob(realmem)); > > + dump_avail[1] = phys_avail[1]; > > + > > + /* Add the rest of regions */ > > + for (i = 1, j = 2; i < mr_cnt; i++, j+=2) { > > + phys_avail[j] = mr[i].mr_start; > > + phys_avail[j+1] = mr[i].mr_size; > > + dump_avail[j] = phys_avail[j]; > > + dump_avail[j+1] = phys_avail[j+1]; > > + } > > + } > > +#endif > > + > > init_param1(); > > init_param2(physmem); > > mips_cpu_init(); > > > > This doesn't look right, the values in the odd-numbered array slots for > phys_avail and dump_avail need to be addresses, not sizes. That is, > avail[j] = start, avail[j+1] = start+size (note: not start+size-1). > > Right, thanks. Sounds like it should be like that Index: sys/mips/beri/beri_machdep.c === --- sys/mips/beri/beri_machdep.c(revision 275861) +++ sys/mips/beri/beri_machdep.c(working copy) @@ -117,13 +117,13 @@ ("First region is not within FDT memory range")); /* Limit size of the first region */ - phys_avail[1] = MIN(mr[0].mr_size, ctob(realmem)); + phys_avail[1] = (mr[0].mr_start + MIN(mr[0].mr_size, ctob(realmem))); dump_avail[1] = phys_avail[1]; /* Add the rest of regions */ for (i = 1, j = 2; i < mr_cnt; i++, j+=2) { phys_avail[j] = mr[i].mr_start; - phys_avail[j+1] = mr[i].mr_size; + phys_avail[j+1] = (mr[i].mr_start + mr[i].mr_size); dump_avail[j] = phys_avail[j]; dump_avail[j+1] = phys_avail[j+1]; } Ruslan ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r275862 - head/contrib/elftoolchain/elfcopy
Author: emaste Date: Wed Dec 17 14:46:21 2014 New Revision: 275862 URL: https://svnweb.freebsd.org/changeset/base/275862 Log: Do not strip all when stripping an explicit symbol When requested to strip specific symbols (-N flag) the default should be to strip nothing (other than the requested symbols). This is consistent with binutils strip(1). PR: 196038 Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D1327 Modified: head/contrib/elftoolchain/elfcopy/main.c Modified: head/contrib/elftoolchain/elfcopy/main.c == --- head/contrib/elftoolchain/elfcopy/main.cWed Dec 17 11:36:31 2014 (r275861) +++ head/contrib/elftoolchain/elfcopy/main.cWed Dec 17 14:46:21 2014 (r275862) @@ -1109,7 +1109,8 @@ strip_main(struct elfcopy *ecp, int argc if (ecp->strip == 0 && ((ecp->flags & DISCARD_LOCAL) == 0) && - ((ecp->flags & DISCARD_LLABEL) == 0)) + ((ecp->flags & DISCARD_LLABEL) == 0) && + lookup_symop_list(ecp, NULL, SYMOP_STRIP) == NULL) ecp->strip = STRIP_ALL; if (optind == argc) strip_usage(); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r275864 - in head: sys/cam/ctl sys/dev/iscsi usr.sbin/ctld usr.sbin/iscsid
Author: mav Date: Wed Dec 17 15:13:21 2014 New Revision: 275864 URL: https://svnweb.freebsd.org/changeset/base/275864 Log: Make sequence numbers checks more strict. While we don't support MCS, hole in received sequence numbers may mean only PDU loss. While we don't support lost PDU recovery, terminate the connection to avoid stuck commands. While there, improve handling of sequence numbers wrap after 2^32 PDUs. MFC after:2 weeks Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c head/sys/cam/ctl/ctl_frontend_iscsi.h head/sys/dev/iscsi/iscsi.c head/sys/dev/iscsi/iscsi_proto.h head/usr.sbin/ctld/discovery.c head/usr.sbin/ctld/login.c head/usr.sbin/iscsid/discovery.c head/usr.sbin/iscsid/login.c Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c == --- head/sys/cam/ctl/ctl_frontend_iscsi.c Wed Dec 17 14:50:57 2014 (r275863) +++ head/sys/cam/ctl/ctl_frontend_iscsi.c Wed Dec 17 15:13:21 2014 (r275864) @@ -233,19 +233,34 @@ cfiscsi_pdu_update_cmdsn(const struct ic } #endif - /* -* The target MUST silently ignore any non-immediate command outside -* of this range. -*/ - if (cmdsn < cs->cs_cmdsn || cmdsn > cs->cs_cmdsn + maxcmdsn_delta) { - CFISCSI_SESSION_UNLOCK(cs); - CFISCSI_SESSION_WARN(cs, "received PDU with CmdSN %d, " - "while expected CmdSN was %d", cmdsn, cs->cs_cmdsn); - return (true); - } + if ((request->ip_bhs->bhs_opcode & ISCSI_BHS_OPCODE_IMMEDIATE) == 0) { + /* +* The target MUST silently ignore any non-immediate command +* outside of this range. +*/ + if (ISCSI_SNLT(cmdsn, cs->cs_cmdsn) || + ISCSI_SNGT(cmdsn, cs->cs_cmdsn + maxcmdsn_delta)) { + CFISCSI_SESSION_UNLOCK(cs); + CFISCSI_SESSION_WARN(cs, "received PDU with CmdSN %u, " + "while expected %u", cmdsn, cs->cs_cmdsn); + return (true); + } - if ((request->ip_bhs->bhs_opcode & ISCSI_BHS_OPCODE_IMMEDIATE) == 0) + /* +* We don't support multiple connections now, so any +* discontinuity in CmdSN means lost PDUs. Since we don't +* support PDU retransmission -- terminate the connection. +*/ + if (cmdsn != cs->cs_cmdsn) { + CFISCSI_SESSION_UNLOCK(cs); + CFISCSI_SESSION_WARN(cs, "received PDU with CmdSN %u, " + "while expected %u; dropping connection", + cmdsn, cs->cs_cmdsn); + cfiscsi_session_terminate(cs); + return (true); + } cs->cs_cmdsn++; + } CFISCSI_SESSION_UNLOCK(cs); @@ -892,6 +907,16 @@ cfiscsi_pdu_handle_data_out(struct icl_p return; } + if (cdw->cdw_datasn != ntohl(bhsdo->bhsdo_datasn)) { + CFISCSI_SESSION_WARN(cs, "received Data-Out PDU with " + "DataSN %u, while expected %u; dropping connection", + ntohl(bhsdo->bhsdo_datasn), cdw->cdw_datasn); + icl_pdu_free(request); + cfiscsi_session_terminate(cs); + return; + } + cdw->cdw_datasn++; + io = cdw->cdw_ctl_io; KASSERT((io->io_hdr.flags & CTL_FLAG_DATA_MASK) != CTL_FLAG_DATA_IN, ("CTL_FLAG_DATA_IN")); @@ -2650,6 +2675,7 @@ cfiscsi_datamove_out(union ctl_io *io) cdw->cdw_target_transfer_tag = target_transfer_tag; cdw->cdw_initiator_task_tag = bhssc->bhssc_initiator_task_tag; cdw->cdw_r2t_end = io->scsiio.kern_data_len; + cdw->cdw_datasn = 0; /* Set initial data pointer for the CDW respecting ext_data_filled. */ if (io->scsiio.kern_sg_entries > 0) { Modified: head/sys/cam/ctl/ctl_frontend_iscsi.h == --- head/sys/cam/ctl/ctl_frontend_iscsi.h Wed Dec 17 14:50:57 2014 (r275863) +++ head/sys/cam/ctl/ctl_frontend_iscsi.h Wed Dec 17 15:13:21 2014 (r275864) @@ -58,6 +58,7 @@ struct cfiscsi_data_wait { char*cdw_sg_addr; size_t cdw_sg_len; uint32_tcdw_r2t_end; + uint32_tcdw_datasn; }; #define CFISCSI_SESSION_STATE_INVALID 0 Modified: head/sys/dev/iscsi/iscsi.c == --- head/sys/dev/iscsi/iscsi.c Wed Dec 17 14:50:57 2014(r275863) +++ head/sys/dev/iscsi/iscsi.c Wed Dec 17 15:13:21 2014(r275864) @@ -192,7 +192,7 @@ iscsi_pdu_
Re: svn commit: r275819 - in head/lib/msun: ld128 ld80 src
Steve, 2014-12-16 17:20 GMT+01:00 Steve Kargl : > This seems like a lot of code churn for very little benefit. > > In particular, I know that the one person working on fixing > problems with FreeBSD's libm has a private repo and the openlibm > and android developers base their libm off of FreeBSD's libm > and now they'll need to resync their codebases and resolve > conflicts. I'm always afraid of statements like these, as they can be brought to the table to prevent any changes from being made. The fact that someone else (be it Android or openlibm) uses our code should not limit us as a project to make changes. Hopefully this change will merge into their direction as well? The fact that we often do not dare to refactor our code is exactly what puts us in the spot that a lot of our code is often not directly reusable by others, needs to be forked and adjusted. Examples include u_intX_t, bcopy(), etc. > This comment isn't true! These functions pre-date C11 by years. > See r151865. These functions were designed to deal with gcc's > poorly implemented I. See the paragraph above your comment. Keep in mind that the phrasing is intended to say that CMPLX*() and friends are part of C11. Those do not pre-date C11. > Upon further inspection with md5, this change affects only a single > file. This last paragraph appears to be an excuse for a drive-by > commit. But also acts as proof that the change is harmless. I am not entirely sure what you're trying to imply with this. Are changes that do not affect checksums of object files are bad? -- Ed Schouten ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r275865 - in head: sys/cam/ctl usr.sbin/ctladm
Author: mav Date: Wed Dec 17 17:30:54 2014 New Revision: 275865 URL: https://svnweb.freebsd.org/changeset/base/275865 Log: Add configuration options to override physical and UNMAP blocks geometry. While in most cases CTL should correctly fetch those values from backing storages, there are some initiators (like MS SQL), that may not like large physical block sizes, even if they are true. For such cases allow override fetched values with supported ones (like 4K). MFC after:1 week Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl.h head/sys/cam/ctl/ctl_backend.h head/sys/cam/ctl/ctl_backend_block.c head/usr.sbin/ctladm/ctladm.8 Modified: head/sys/cam/ctl/ctl.c == --- head/sys/cam/ctl/ctl.c Wed Dec 17 15:13:21 2014(r275864) +++ head/sys/cam/ctl/ctl.c Wed Dec 17 17:30:54 2014(r275865) @@ -3900,7 +3900,7 @@ ctl_copy_io(union ctl_io *src, union ctl dest->io_hdr.flags |= CTL_FLAG_INT_COPY; } -static int +int ctl_expand_number(const char *buf, uint64_t *num) { char *endptr; @@ -10146,10 +10146,10 @@ ctl_inquiry_evpd_block_limits(struct ctl if (lun->be_lun->flags & CTL_LUN_FLAG_UNMAP) { scsi_ulto4b(0x, bl_ptr->max_unmap_lba_cnt); scsi_ulto4b(0x, bl_ptr->max_unmap_blk_cnt); - if (lun->be_lun->pblockexp != 0) { - scsi_ulto4b((1 << lun->be_lun->pblockexp), + if (lun->be_lun->ublockexp != 0) { + scsi_ulto4b((1 << lun->be_lun->ublockexp), bl_ptr->opt_unmap_grain); - scsi_ulto4b(0x8000 | lun->be_lun->pblockoff, + scsi_ulto4b(0x8000 | lun->be_lun->ublockoff, bl_ptr->unmap_grain_align); } } Modified: head/sys/cam/ctl/ctl.h == --- head/sys/cam/ctl/ctl.h Wed Dec 17 15:13:21 2014(r275864) +++ head/sys/cam/ctl/ctl.h Wed Dec 17 17:30:54 2014(r275865) @@ -206,6 +206,7 @@ struct ctl_be_arg; void ctl_init_opts(ctl_options_t *opts, int num_args, struct ctl_be_arg *args); void ctl_free_opts(ctl_options_t *opts); char * ctl_get_opt(ctl_options_t *opts, const char *name); +int ctl_expand_number(const char *buf, uint64_t *num); #endif /* _KERNEL */ Modified: head/sys/cam/ctl/ctl_backend.h == --- head/sys/cam/ctl/ctl_backend.h Wed Dec 17 15:13:21 2014 (r275864) +++ head/sys/cam/ctl/ctl_backend.h Wed Dec 17 17:30:54 2014 (r275865) @@ -194,6 +194,8 @@ struct ctl_be_lun { uint32_tblocksize; /* passed to CTL */ uint16_tpblockexp; /* passed to CTL */ uint16_tpblockoff; /* passed to CTL */ + uint16_tublockexp; /* passed to CTL */ + uint16_tublockoff; /* passed to CTL */ uint32_tatomicblock;/* passed to CTL */ uint32_treq_lun_id; /* passed to CTL */ uint32_tlun_id; /* returned from CTL */ Modified: head/sys/cam/ctl/ctl_backend_block.c == --- head/sys/cam/ctl/ctl_backend_block.cWed Dec 17 15:13:21 2014 (r275864) +++ head/sys/cam/ctl/ctl_backend_block.cWed Dec 17 17:30:54 2014 (r275865) @@ -173,6 +173,8 @@ struct ctl_be_block_lun { int blocksize_shift; uint16_t pblockexp; uint16_t pblockoff; + uint16_t ublockexp; + uint16_t ublockoff; struct ctl_be_block_softc *softc; struct devstat *disk_stats; ctl_be_block_lun_flags flags; @@ -1739,8 +1741,9 @@ ctl_be_block_open_file(struct ctl_be_blo { struct ctl_be_block_filedata *file_data; struct ctl_lun_create_params *params; + char *value; struct vattr vattr; - off_t pss; + off_t ps, pss, po, pos, us, uss, uo, uos; int error; error = 0; @@ -1800,11 +1803,36 @@ ctl_be_block_open_file(struct ctl_be_blo be_lun->blocksize = params->blocksize_bytes; else be_lun->blocksize = 512; - pss = vattr.va_blocksize / be_lun->blocksize; - if ((pss > 0) && (pss * be_lun->blocksize == vattr.va_blocksize) && - ((pss & (pss - 1)) == 0)) { + + us = ps = vattr.va_blocksize; + uo = po = 0; + + value = ctl_get_opt(&be_lun->ctl_be_lun.options, "pblocksize"); +
Re: svn commit: r275819 - in head/lib/msun: ld128 ld80 src
On Wed, Dec 17, 2014 at 04:30:32PM +0100, Ed Schouten wrote: > Steve, > > 2014-12-16 17:20 GMT+01:00 Steve Kargl : > > This seems like a lot of code churn for very little benefit. > > > > In particular, I know that the one person working on fixing > > problems with FreeBSD's libm has a private repo and the openlibm > > and android developers base their libm off of FreeBSD's libm > > and now they'll need to resync their codebases and resolve > > conflicts. > > I'm always afraid of statements like these, as they can be brought to > the table to prevent any changes from being made. The fact that > someone else (be it Android or openlibm) uses our code should not > limit us as a project to make changes. Hopefully this change will > merge into their direction as well? I stand corrected. Foisting unnecessary code churn on others is now an acceptable practice. > The fact that we often do not dare to refactor our code is exactly > what puts us in the spot that a lot of our code is often not directly > reusable by others, needs to be forked and adjusted. Examples include > u_intX_t, bcopy(), etc. Your refactoring is nothing more than a gratuitous code change. The reasons you give in your commit log are bogus justification. But the damage is done. Asking you to revert the patch would simply be more code churn. > > This comment isn't true! These functions pre-date C11 by years. > > See r151865. These functions were designed to deal with gcc's > > poorly implemented I. See the paragraph above your comment. > > Keep in mind that the phrasing is intended to say that CMPLX*() and > friends are part of C11. Those do not pre-date C11. The phrasing is wrong. cpack[fl] came at least 6 years before C11 and were designed to work around defects in C99. CMPLX[FL] were introduced into C11 to address those defects. Changing cpack[fl] to CMPLX[FL] and claiming that the functions are modeled after the C11 macros is wrong (unless the meaning of "before" and "after" have changed). > > Upon further inspection with md5, this change affects only a single > > file. This last paragraph appears to be an excuse for a drive-by > > commit. > > But also acts as proof that the change is harmless. I am not entirely > sure what you're trying to imply with this. Are changes that do not > affect checksums of object files are bad? Gratuitous changes are well gratuitous. You are causing extra work for people actively working on libm and other projects that use FreeBSD's libm. The fact that I ran md5 over the *.o files suggests that you made the change without even checking on its effect on the resulting library. To be blunt, your patch has/had ZERO BENEFIT at the expense of causing additional work for others. There are ample opportunities to improve libm. powl, tgammal, j0l, j1l, jnl, y0l, y1l, ynl, and number of the long double complex functions are not implemented. -- Steve ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r275819 - in head/lib/msun: ld128 ld80 src
On 17 December 2014 at 07:30, Ed Schouten wrote: > Steve, > > 2014-12-16 17:20 GMT+01:00 Steve Kargl : >> This seems like a lot of code churn for very little benefit. >> >> In particular, I know that the one person working on fixing >> problems with FreeBSD's libm has a private repo and the openlibm >> and android developers base their libm off of FreeBSD's libm >> and now they'll need to resync their codebases and resolve >> conflicts. > > I'm always afraid of statements like these, as they can be brought to > the table to prevent any changes from being made. The fact that > someone else (be it Android or openlibm) uses our code should not > limit us as a project to make changes. Hopefully this change will > merge into their direction as well? > > The fact that we often do not dare to refactor our code is exactly > what puts us in the spot that a lot of our code is often not directly > reusable by others, needs to be forked and adjusted. Examples include > u_intX_t, bcopy(), etc. > >> This comment isn't true! These functions pre-date C11 by years. >> See r151865. These functions were designed to deal with gcc's >> poorly implemented I. See the paragraph above your comment. > > Keep in mind that the phrasing is intended to say that CMPLX*() and > friends are part of C11. Those do not pre-date C11. > >> Upon further inspection with md5, this change affects only a single >> file. This last paragraph appears to be an excuse for a drive-by >> commit. > > But also acts as proof that the change is harmless. I am not entirely > sure what you're trying to imply with this. Are changes that do not > affect checksums of object files are bad? Actually, the fact that the MD5 signature changed means that the binary code generated has changed, and thus it "isn't harmless." It may be, but it certainly didn't generate identical binary code. We have some active and interested math nerds involved; perhaps a drive-by shooting without including them should be avoided. -adrian ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r275866 - in head/gnu/usr.bin/groff: . src src/devices src/libs src/preproc src/roff src/utils
Author: ngie Date: Wed Dec 17 19:46:12 2014 New Revision: 275866 URL: https://svnweb.freebsd.org/changeset/base/275866 Log: Parallelize building gnu/usr.bin/groff This speeds up building the directory from the bootstrap-tools stage in buildworld as well as building from the subdirectory Based on a patch submitted via -arch: https://lists.freebsd.org/pipermail/freebsd-arch/2014-December/016493.html MFC after: 1 week Submitted by: Jia-Shiun Li Sponsored by: EMC / Isilon Storage Division Modified: head/gnu/usr.bin/groff/Makefile head/gnu/usr.bin/groff/src/Makefile head/gnu/usr.bin/groff/src/devices/Makefile head/gnu/usr.bin/groff/src/libs/Makefile head/gnu/usr.bin/groff/src/preproc/Makefile head/gnu/usr.bin/groff/src/roff/Makefile head/gnu/usr.bin/groff/src/utils/Makefile Modified: head/gnu/usr.bin/groff/Makefile == --- head/gnu/usr.bin/groff/Makefile Wed Dec 17 17:30:54 2014 (r275865) +++ head/gnu/usr.bin/groff/Makefile Wed Dec 17 19:46:12 2014 (r275866) @@ -2,4 +2,8 @@ SUBDIR=contrib doc font man src tmac +.for subdir in ${SUBDIR:Nsrc} +SUBDIR_DEPEND_${subdir}= src +.endfor + .include Modified: head/gnu/usr.bin/groff/src/Makefile == --- head/gnu/usr.bin/groff/src/Makefile Wed Dec 17 17:30:54 2014 (r275865) +++ head/gnu/usr.bin/groff/src/Makefile Wed Dec 17 19:46:12 2014 (r275866) @@ -2,4 +2,10 @@ SUBDIR=libs devices preproc roff utils +SUBDIR_PARALLEL= + +.for subdir in ${SUBDIR:Nlibs} +SUBDIR_DEPEND_${subdir}= libs +.endfor + .include Modified: head/gnu/usr.bin/groff/src/devices/Makefile == --- head/gnu/usr.bin/groff/src/devices/Makefile Wed Dec 17 17:30:54 2014 (r275865) +++ head/gnu/usr.bin/groff/src/devices/Makefile Wed Dec 17 19:46:12 2014 (r275866) @@ -2,4 +2,6 @@ SUBDIR=grodvi grohtml grolbp grolj4 grops grotty +SUBDIR_PARALLEL= + .include Modified: head/gnu/usr.bin/groff/src/libs/Makefile == --- head/gnu/usr.bin/groff/src/libs/MakefileWed Dec 17 17:30:54 2014 (r275865) +++ head/gnu/usr.bin/groff/src/libs/MakefileWed Dec 17 19:46:12 2014 (r275866) @@ -2,4 +2,6 @@ SUBDIR=libgroff libdriver libbib +SUBDIR_PARALLEL= + .include Modified: head/gnu/usr.bin/groff/src/preproc/Makefile == --- head/gnu/usr.bin/groff/src/preproc/Makefile Wed Dec 17 17:30:54 2014 (r275865) +++ head/gnu/usr.bin/groff/src/preproc/Makefile Wed Dec 17 19:46:12 2014 (r275866) @@ -2,4 +2,6 @@ SUBDIR=eqn grn html pic refer soelim tbl +SUBDIR_PARALLEL= + .include Modified: head/gnu/usr.bin/groff/src/roff/Makefile == --- head/gnu/usr.bin/groff/src/roff/MakefileWed Dec 17 17:30:54 2014 (r275865) +++ head/gnu/usr.bin/groff/src/roff/MakefileWed Dec 17 19:46:12 2014 (r275866) @@ -2,4 +2,6 @@ SUBDIR=groff grog nroff psroff troff +SUBDIR_PARALLEL= + .include Modified: head/gnu/usr.bin/groff/src/utils/Makefile == --- head/gnu/usr.bin/groff/src/utils/Makefile Wed Dec 17 17:30:54 2014 (r275865) +++ head/gnu/usr.bin/groff/src/utils/Makefile Wed Dec 17 19:46:12 2014 (r275866) @@ -2,4 +2,6 @@ SUBDIR=addftinfo afmtodit hpftodit indxbib lkbib lookbib pfbtops tfmtodit +SUBDIR_PARALLEL= + .include ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r275867 - head
Author: ngie Date: Wed Dec 17 20:02:07 2014 New Revision: 275867 URL: https://svnweb.freebsd.org/changeset/base/275867 Log: Fix sporadic build failures due to race when running make installworld when strip gets replaced at install time by adding it to ITOOLS for the default usr.bin/xinstall STRIP_CMD This will fix the failure noted in this Jenkins build step: https://jenkins.freebsd.org/job/Build-UFS-image/688/ This will also fix the issue reported by alfred@ dealing with installing on targets that differ from build hosts (e.g. installing on i386/i386 when built on amd64/amd64) MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Wed Dec 17 19:46:12 2014(r275866) +++ head/Makefile.inc1 Wed Dec 17 20:02:07 2014(r275867) @@ -790,7 +790,7 @@ _zoneinfo= zic tzsetup ITOOLS=[ awk cap_mkdb cat chflags chmod chown \ date echo egrep find grep id install ${_install-info} \ ln lockf make mkdir mtree mv pwd_mkdb \ - rm sed services_mkdb sh sysctl test true uname wc ${_zoneinfo} \ + rm sed services_mkdb sh strip sysctl test true uname wc ${_zoneinfo} \ ${LOCAL_ITOOLS} # Needed for share/man ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r275819 - in head/lib/msun: ld128 ld80 src
On Wed, Dec 17, 2014 at 11:12:35AM -0800, Steve Kargl wrote: > > I'm always afraid of statements like these, as they can be brought to > > the table to prevent any changes from being made. The fact that > > someone else (be it Android or openlibm) uses our code should not > > limit us as a project to make changes. Hopefully this change will > > merge into their direction as well? > > I stand corrected. Foisting unnecessary code churn on > others is now an acceptable practice. I am not happy with the fact that you put words in his mouth. This conversation IMHO is not showing the respect committers are due. I think you have a legitimate complaint but statements like this aren't going to gain you any supporters. mcl ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r275868 - head/sys/netinet6
Author: tuexen Date: Wed Dec 17 20:19:57 2014 New Revision: 275868 URL: https://svnweb.freebsd.org/changeset/base/275868 Log: Plug a memory leak in an error code path. Reported by: Coverity CID: 1018936 MFC after:3 days Modified: head/sys/netinet6/sctp6_usrreq.c Modified: head/sys/netinet6/sctp6_usrreq.c == --- head/sys/netinet6/sctp6_usrreq.cWed Dec 17 20:02:07 2014 (r275867) +++ head/sys/netinet6/sctp6_usrreq.cWed Dec 17 20:19:57 2014 (r275868) @@ -1125,8 +1125,11 @@ sctp6_peeraddr(struct socket *so, struct SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP6_USRREQ, ENOENT); return (ENOENT); } - if ((error = sa6_recoverscope(sin6)) != 0) + if ((error = sa6_recoverscope(sin6)) != 0) { + SCTP_FREE_SONAME(sin6); + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP6_USRREQ, error); return (error); + } *addr = (struct sockaddr *)sin6; return (0); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r275819 - in head/lib/msun: ld128 ld80 src
On Wed, Dec 17, 2014 at 02:15:48PM -0600, Mark Linimon wrote: > On Wed, Dec 17, 2014 at 11:12:35AM -0800, Steve Kargl wrote: > > > I'm always afraid of statements like these, as they can be brought to > > > the table to prevent any changes from being made. The fact that > > > someone else (be it Android or openlibm) uses our code should not > > > limit us as a project to make changes. Hopefully this change will > > > merge into their direction as well? > > > > I stand corrected. Foisting unnecessary code churn on > > others is now an acceptable practice. > > I am not happy with the fact that you put words in his mouth. This > conversation IMHO is not showing the respect committers are due. > I did not put words into his mouth. I simply stated what the results of his commit appear to be. It was an unreviewed drive-by commit with zero benefit that is making extra work for others. -- Steve ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r275869 - head/sys/netinet
Author: tuexen Date: Wed Dec 17 20:34:38 2014 New Revision: 275869 URL: https://svnweb.freebsd.org/changeset/base/275869 Log: Add a missing break. Reported by: Coverity CID: 1232014 MFC after:3 days Modified: head/sys/netinet/sctp_pcb.c Modified: head/sys/netinet/sctp_pcb.c == --- head/sys/netinet/sctp_pcb.c Wed Dec 17 20:19:57 2014(r275868) +++ head/sys/netinet/sctp_pcb.c Wed Dec 17 20:34:38 2014(r275869) @@ -6462,6 +6462,7 @@ sctp_load_addresses_from_init(struct sct switch (pr_supported->chunk_types[i]) { case SCTP_ASCONF: peer_supports_asconf = 1; + break; case SCTP_ASCONF_ACK: peer_supports_asconf_ack = 1; break; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r275819 - in head/lib/msun: ld128 ld80 src
On Dec 17, 2014, at 11:12, Steve Kargl wrote: > On Wed, Dec 17, 2014 at 04:30:32PM +0100, Ed Schouten wrote: … >>> This comment isn't true! These functions pre-date C11 by years. >>> See r151865. These functions were designed to deal with gcc's >>> poorly implemented I. See the paragraph above your comment. >> >> Keep in mind that the phrasing is intended to say that CMPLX*() and >> friends are part of C11. Those do not pre-date C11. > > The phrasing is wrong. cpack[fl] came at least 6 years before > C11 and were designed to work around defects in C99. CMPLX[FL] > were introduced into C11 to address those defects. Changing > cpack[fl] to CMPLX[FL] and claiming that the functions are > modeled after the C11 macros is wrong (unless the meaning of > "before" and "after" have changed). Hi Dimitry/Ed/Steve, Does it make sense to take the logic that Ed added and guard it with a conditional so people building the functions can use the C+11 definitions instead of the C99 definitions? This could preserve the old behavior for folks who don’t have C+11 capable compilers, but would allow us (and others) who do via clang or newer versions of gcc to use the new C+11 idioms, similar to some of the other macros in sys/cdefs.h, et al. Thank you! signature.asc Description: Message signed with OpenPGP using GPGMail
Re: svn commit: r275819 - in head/lib/msun: ld128 ld80 src
On Wed, Dec 17, 2014 at 12:48:37PM -0800, Garrett Cooper wrote: > On Dec 17, 2014, at 11:12, Steve Kargl > wrote: > > > On Wed, Dec 17, 2014 at 04:30:32PM +0100, Ed Schouten wrote: > > ? > > >>> This comment isn't true! These functions pre-date C11 by years. > >>> See r151865. These functions were designed to deal with gcc's > >>> poorly implemented I. See the paragraph above your comment. > >> > >> Keep in mind that the phrasing is intended to say that CMPLX*() and > >> friends are part of C11. Those do not pre-date C11. > > > > The phrasing is wrong. cpack[fl] came at least 6 years before > C11 and were designed to work around defects in C99. CMPLX[FL] > > were introduced into C11 to address those defects. Changing > > cpack[fl] to CMPLX[FL] and claiming that the functions are > > modeled after the C11 macros is wrong (unless the meaning of > > "before" and "after" have changed). > > Hi Dimitry/Ed/Steve, > Does it make sense to take the logic that Ed added and guard it with a > conditional so people building the functions can use the C+11 definitions > instead of the C99 definitions? This could preserve the old behavior for > folks who don?t have C+11 capable compilers, but would allow us (and others) > who do via clang or newer versions of gcc to use the new C+11 idioms, similar > to some of the other macros in sys/cdefs.h, et al. > Thank you! Ed's patch works for non-C11 compilers. His patch to math_private.h contained, for example, #ifndef CMPLXF static __inline float complex CMPLXF(float x, float y) { float_complex z; REALPART(z) = x; IMAGPART(z) = y; return (z.f); } #endif IMNSHO, the correct patch should have been #ifdef CMPLXF #define cpackf(x, y) CMPLXF((x), (y)) #else static __inline float complex cpackf(float x, float y) { float_complex z; REALPART(z) = x; IMAGPART(z) = y; return (z.f); } #endif Ed's diff is ~1000 lines and touches several files. Localizing the change to math_private.h would have been a ~20 line diff to a single file. -- Steve ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r275870 - head/sys/dev/mwl
Author: adrian Date: Wed Dec 17 21:26:25 2014 New Revision: 275870 URL: https://svnweb.freebsd.org/changeset/base/275870 Log: Use the correct macro for listing the maximum bus space size. Without this, it fails to compile on i386 PAE builds. Modified: head/sys/dev/mwl/if_mwl_pci.c Modified: head/sys/dev/mwl/if_mwl_pci.c == --- head/sys/dev/mwl/if_mwl_pci.c Wed Dec 17 20:34:38 2014 (r275869) +++ head/sys/dev/mwl/if_mwl_pci.c Wed Dec 17 21:26:25 2014 (r275870) @@ -178,9 +178,9 @@ mwl_pci_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - BUS_SPACE_MAXADDR, /* maxsize */ + BUS_SPACE_MAXSIZE, /* maxsize */ MWL_TXDESC, /* nsegments */ - BUS_SPACE_MAXADDR, /* maxsegsize */ + BUS_SPACE_MAXSIZE, /* maxsegsize */ 0, /* flags */ NULL,/* lockfunc */ NULL,/* lockarg */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r275871 - head/sys/dev/malo
Author: adrian Date: Wed Dec 17 21:27:27 2014 New Revision: 275871 URL: https://svnweb.freebsd.org/changeset/base/275871 Log: Update the use of bus space macros to be more correct. This was a problem on i386 PAE builds. Modified: head/sys/dev/malo/if_malo_pci.c Modified: head/sys/dev/malo/if_malo_pci.c == --- head/sys/dev/malo/if_malo_pci.c Wed Dec 17 21:26:25 2014 (r275870) +++ head/sys/dev/malo/if_malo_pci.c Wed Dec 17 21:27:27 2014 (r275871) @@ -225,9 +225,9 @@ malo_pci_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - BUS_SPACE_MAXADDR, /* maxsize */ + BUS_SPACE_MAXSIZE, /* maxsize */ 0, /* nsegments */ - BUS_SPACE_MAXADDR, /* maxsegsize */ + BUS_SPACE_MAXSIZE, /* maxsegsize */ 0, /* flags */ NULL,/* lockfunc */ NULL,/* lockarg */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r275873 - head/contrib/binutils/gas/config
Author: jhibbits Date: Thu Dec 18 03:12:46 2014 New Revision: 275873 URL: https://svnweb.freebsd.org/changeset/base/275873 Log: Make gas parse '__tls_get_addr(foo@tlsgd)'. Corresponds to 727fc41e077139570ea8b8ddfd6c546b2a55627c. This allows us to use -no-integrated-as with clang, if we prefer. Obtained from:binutils-gdb (Relicensed from Alan Modra as GPLv2) MFC after:2 weeks X-MFC-with: r275718 Modified: head/contrib/binutils/gas/config/tc-ppc.c Modified: head/contrib/binutils/gas/config/tc-ppc.c == --- head/contrib/binutils/gas/config/tc-ppc.c Wed Dec 17 21:36:45 2014 (r275872) +++ head/contrib/binutils/gas/config/tc-ppc.c Thu Dec 18 03:12:46 2014 (r275873) @@ -2509,121 +2509,168 @@ md_assemble (char *str) (char *) NULL, 0); } #ifdef OBJ_ELF - else if ((reloc = ppc_elf_suffix (&str, &ex)) != BFD_RELOC_UNUSED) + else { - /* Some TLS tweaks. */ - switch (reloc) + if (ex.X_op == O_symbol && str[0] == '(') { - default: - break; - case BFD_RELOC_PPC_TLS: - insn = ppc_insert_operand (insn, operand, ppc_obj64 ? 13 : 2, -(char *) NULL, 0); - break; - /* We'll only use the 32 (or 64) bit form of these relocations -in constants. Instructions get the 16 bit form. */ - case BFD_RELOC_PPC_DTPREL: - reloc = BFD_RELOC_PPC_DTPREL16; - break; - case BFD_RELOC_PPC_TPREL: - reloc = BFD_RELOC_PPC_TPREL16; - break; - } + const char *sym_name = S_GET_NAME (ex.X_add_symbol); + if (sym_name[0] == '.') + ++sym_name; - /* For the absolute forms of branches, convert the PC -relative form back into the absolute. */ - if ((operand->flags & PPC_OPERAND_ABSOLUTE) != 0) - { - switch (reloc) + if (strcasecmp (sym_name, "__tls_get_addr") == 0) { - case BFD_RELOC_PPC_B26: - reloc = BFD_RELOC_PPC_BA26; - break; - case BFD_RELOC_PPC_B16: - reloc = BFD_RELOC_PPC_BA16; - break; - case BFD_RELOC_PPC_B16_BRTAKEN: - reloc = BFD_RELOC_PPC_BA16_BRTAKEN; - break; - case BFD_RELOC_PPC_B16_BRNTAKEN: - reloc = BFD_RELOC_PPC_BA16_BRNTAKEN; - break; - default: - break; + expressionS tls_exp; + + hold = input_line_pointer; + input_line_pointer = str + 1; + expression (&tls_exp); + if (tls_exp.X_op == O_symbol) + { + reloc = BFD_RELOC_UNUSED; + if (strncasecmp (input_line_pointer, "@tlsgd)", 7) == 0) + { + reloc = BFD_RELOC_PPC_TLSGD; + input_line_pointer += 7; + } + else if (strncasecmp (input_line_pointer, "@tlsld)", 7) == 0) + { + reloc = BFD_RELOC_PPC_TLSLD; + input_line_pointer += 7; + } + if (reloc != BFD_RELOC_UNUSED) + { + SKIP_WHITESPACE (); + str = input_line_pointer; + + if (fc >= MAX_INSN_FIXUPS) + as_fatal (_("too many fixups")); + fixups[fc].exp = tls_exp; + fixups[fc].opindex = *opindex_ptr; + fixups[fc].reloc = reloc; + ++fc; + } + } + input_line_pointer = hold; } } - if (ppc_obj64 - && (operand->flags & (PPC_OPERAND_DS | PPC_OPERAND_DQ)) != 0) + if ((reloc = ppc_elf_suffix (&str, &ex)) != BFD_RELOC_UNUSED) { + /* Some TLS tweaks. */ switch (reloc) { - case BFD_RELOC_16: - reloc = BFD_RELOC_PPC64_ADDR16_DS; - break; - case BFD_RELOC_LO16: - reloc = BFD_RELOC_PPC64_ADDR16_LO_DS; - break; - case BFD_RELOC_16_GOTOFF: - reloc = BFD_RELOC_PPC64_GOT16_DS; - break; - case BFD_RELOC_LO16_GOTOFF: - reloc = BFD_RELOC_PPC64_GOT16_LO_DS; - break; - case BFD_RELOC_LO16_PLTOFF: - reloc = BFD_RELOC_PPC64_PLT16_LO_DS; - break; - cas
svn commit: r275874 - head/usr.sbin/bsdinstall/distextract
Author: dteske Date: Thu Dec 18 03:51:09 2014 New Revision: 275874 URL: https://svnweb.freebsd.org/changeset/base/275874 Log: In bsdinstall's distextract, replace mixed_gauge() of dialog(3) with new dpv(3) wrapper to dialog(3) dialog_gauge(). The dpv(3) library provides a more flexible and refined interface similar to dialog_mixedgauge() however is implemented atop the more generalized dialog_gauge() for portability. Noticeable improvements in bsdinstall's distextract will be a status line showing data rate information (with support for localeconv(3) to format numbers according to $LANG or $LC_ALL conversion information), i18n support, improved auto-sizing of gauge widget, a ``wheel barrow'' to keep the user informed that things are moving (even if status/progress has not changed), improved color support (mini-progress bars use the same color, if enabled, as the main gauge bar), and several other improvements (some not visible). dpv stands for "dialog progress view" (dpv was introduced in SVN r274116). Differential Revision:https://reviews.freebsd.org/D714 Discussed on: -current Reviewed by: julian MFC after:3 days X-MFC-to: stable/10 Relnotes: Improved installer feedback from bsdinstall distextract Modified: head/usr.sbin/bsdinstall/distextract/Makefile head/usr.sbin/bsdinstall/distextract/distextract.c Modified: head/usr.sbin/bsdinstall/distextract/Makefile == --- head/usr.sbin/bsdinstall/distextract/Makefile Thu Dec 18 03:12:46 2014(r275873) +++ head/usr.sbin/bsdinstall/distextract/Makefile Thu Dec 18 03:51:09 2014(r275874) @@ -2,7 +2,7 @@ BINDIR= /usr/libexec/bsdinstall PROG= distextract -LIBADD=archive ncursesw dialog m +LIBADD=archive dpv figpar ncursesw dialog m WARNS?=6 MAN= Modified: head/usr.sbin/bsdinstall/distextract/distextract.c == --- head/usr.sbin/bsdinstall/distextract/distextract.c Thu Dec 18 03:12:46 2014(r275873) +++ head/usr.sbin/bsdinstall/distextract/distextract.c Thu Dec 18 03:51:09 2014(r275874) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -42,17 +43,13 @@ __FBSDID("$FreeBSD$"); /* Data to process */ static char *distdir = NULL; -struct file_node { - char*path; - char*name; - int length; - struct file_node *next; -}; -static struct file_node *dists = NULL; +static struct archive *archive = NULL; +static struct dpv_file_node *dists = NULL; /* Function prototypes */ +static voidsig_int(int sig); static int count_files(const char *file); -static int extract_files(int nfiles, struct file_node *files); +static int extract_files(struct dpv_file_node *file, int out); #if __FreeBSD_version <= 108 /* r232154: bump for libarchive update */ #define archive_read_support_filter_all(x) \ @@ -66,11 +63,17 @@ main(void) { char *chrootdir; char *distributions; - int ndists = 0; int retval; - size_t file_node_size = sizeof(struct file_node); + size_t config_size = sizeof(struct dpv_config); + size_t file_node_size = sizeof(struct dpv_file_node); size_t span; - struct file_node *dist = dists; + struct dpv_config *config; + struct dpv_file_node *dist = dists; + static char backtitle[] = "FreeBSD Installer"; + static char title[] = "Archive Extraction"; + static char aprompt[] = "\n Overall Progress:"; + static char pprompt[] = "Extracting distribution files...\n"; + struct sigaction act; char error[PATH_MAX + 512]; if ((distributions = getenv("DISTRIBUTIONS")) == NULL) @@ -80,14 +83,14 @@ main(void) /* Initialize dialog(3) */ init_dialog(stdin, stdout); - dialog_vars.backtitle = __DECONST(char *, "FreeBSD Installer"); + dialog_vars.backtitle = backtitle; dlg_put_backtitle(); dialog_msgbox("", "Checking distribution archives.\nPlease wait...", 4, 35, FALSE); /* -* Parse $DISTRIBUTIONS into linked-list +* Parse $DISTRIBUTIONS into dpv(3) linked-list */ while (*distributions != '\0') { span = strcspn(distributions, "\t\n\v\f\r "); @@ -95,7 +98,6 @@ main(void) distributions++; continue; } - ndists++; /* Allocate a new struct for the distribution */ if (dist == NULL) { @@ -141,10 +143,30 @@ main(void) return (EXIT_FAILURE); } - retval = extract_files(ndists, dists); + /* Set cleanup routine for Ctrl-C action */ + act.sa_handler = sig_int; + sigaction(SIGINT, &act, 0);
svn commit: r275875 - head/sys/net80211
Author: adrian Date: Thu Dec 18 05:17:18 2014 New Revision: 275875 URL: https://svnweb.freebsd.org/changeset/base/275875 Log: Fix the scan handling for 11b->11g upgrades in a world where, well, it's not just 11b/11g. The following was happening, and it's quite .. annoyingly grr-y. * create vap, setup wpa_supplicant with no bgscanning, etc - there's no call to ieee80211_media_change, so vap->iv_des_mode is IEEE80211_MODE_AUTO; * do ifconfig wlan0 scan - same thing, media_change doesn't get called, iv_des_mode stays as auto. * But then, run wpa_cli and do 'scan' - it'll do a media change. * if you're on 11ng, vap->iv_des_mode gets changed to IEEE80211_MODE_11NG * Then makescanlist() is called. There's a block of code that gets called if iv_des_mode != IEEE80211_MODE_AUTO, and it does this: if (vap->iv_des_mode != IEEE80211_MODE_11G || mode != IEEE80211_MODE_11B) continue; mode = IEEE80211_MODE_11G; /* upgrade */ * .. now, iv_des_mode is not IEEE80211_MODE_11G, so it always runs 'continue' * .. and thus the scan list stays empty and no further channel scans occur. Ever.(1) If you then disassociate and try associating to something, your scan table has likely been purged / aged out and you'll never see anything in the scan list. (1) You need to do 'ifconfig wlan0 mode auto' or just destroy/re-create the VAP to get working wireless again. Tested: * iwn(4) - intel 5300 wifi; STA mode; using wpa_supplicant; bgscan enabled -and- wpa_supplicant scanning. Thanks to: * Everyone who kept poking me about this and wondering why the hell their wifi would eventually stop seeing scan lists. Grr. I eventually snapped this evening and dug back into this code. Modified: head/sys/net80211/ieee80211_scan_sta.c Modified: head/sys/net80211/ieee80211_scan_sta.c == --- head/sys/net80211/ieee80211_scan_sta.c Thu Dec 18 03:51:09 2014 (r275874) +++ head/sys/net80211/ieee80211_scan_sta.c Thu Dec 18 05:17:18 2014 (r275875) @@ -600,10 +600,12 @@ makescanlist(struct ieee80211_scan_state * so if the desired mode is 11g, then use * the 11b channel list but upgrade the mode. */ - if (vap->iv_des_mode != IEEE80211_MODE_11G || - mode != IEEE80211_MODE_11B) - continue; - mode = IEEE80211_MODE_11G; /* upgrade */ + if (vap->iv_des_mode == IEEE80211_MODE_11G) { + if (mode == IEEE80211_MODE_11G) /* Skip the G check */ + continue; + else if (mode == IEEE80211_MODE_11B) + mode = IEEE80211_MODE_11G; /* upgrade */ + } } } else { /* ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"