svn commit: r289680 - head/sys/ofed/include/linux
Author: hselasky Date: Wed Oct 21 07:59:46 2015 New Revision: 289680 URL: https://svnweb.freebsd.org/changeset/base/289680 Log: Reimplement header file, remove all comments deriving from Linux and update copyright to 2-clause BSD. Suggested by: emaste @ Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/linux/etherdevice.h Modified: head/sys/ofed/include/linux/etherdevice.h == --- head/sys/ofed/include/linux/etherdevice.h Wed Oct 21 06:23:57 2015 (r289679) +++ head/sys/ofed/include/linux/etherdevice.h Wed Oct 21 07:59:46 2015 (r289680) @@ -1,97 +1,62 @@ /*- - * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2014 Mellanox Technologies, Ltd. All rights reserved. + * Copyright (c) 2015 Mellanox Technologies, Ltd. All rights reserved. * - * This software is available to you under a choice of one of two - * licenses. You may choose to be licensed under the terms of the GNU - * General Public License (GPL) Version 2, available from the file - * COPYING in the main directory of this source tree, or the - * OpenIB.org BSD license below: - * - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * - * - Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * - 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. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. + * 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 unmodified, 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 ``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 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$ */ #ifndef _LINUX_ETHERDEVICE -#define _LINUX_ETHERDEVICE +#define_LINUX_ETHERDEVICE #include -/** - * is_zero_ether_addr - Determine if give Ethernet address is all zeros. - * @addr: Pointer to a six-byte array containing the Ethernet address - * - * Return true if the address is all zeroes. - */ -static inline bool is_zero_ether_addr(const u8 *addr) +static inline bool +is_zero_ether_addr(const u8 * addr) { -return !(addr[0] | addr[1] | addr[2] | addr[3] | addr[4] | addr[5]); + return ((addr[0] + addr[1] + addr[2] + addr[3] + addr[4] + addr[5]) == 0x00); } - - -/** - * is_multicast_ether_addr - Determine if the Ethernet address is a multicast. - * @addr: Pointer to a six-byte array containing the Ethernet address - * - * Return true if the address is a multicast address. - * By definition the broadcast address is also a multicast address. - */ -static inline bool is_multicast_ether_addr(const u8 *addr) +static inline bool +is_multicast_ether_addr(const u8 * addr) { -return (0x01 & addr[0]); + return (0x01 & addr[0]); } -/** - * is_broadcast_ether_addr - Determine if the Ethernet address is broadcast - * @addr: Pointer to a six-byte array containing the Ethernet address - * - * Return true if the address is the broadcast address. - */ -static inline bool is_broadcast_ether_addr(const u8 *addr) +static inline bool +is_broadcast_ether
Re: svn commit: r289203 - head/usr.sbin/makefs
> On Oct 12, 2015, at 19:32, Adrian Chadd wrote: > > Author: adrian > Date: Tue Oct 13 02:32:15 2015 > New Revision: 289203 > URL: https://svnweb.freebsd.org/changeset/base/289203 > > Log: > makefs: introduce a new option to specify what to round the resulting > image up to. > > From ticket: > > While trying to run FreeBSD/mips on some device having very small flash > media, > one is forced to compress file system with mkulzma(8) utility. It is > desirable > to specify small UFS block/fragment sizes like 4096/512 bytes for makefs(8) > and big compression block size like 65535 bytes to mkulzma at the same time. > Then one obtains very good comression ratios (like 75% and more) but faces > the following problem. > > geom_uncompress kernel module reports GEOM provider size rounded up to its > compression block size. Generally, this changes original media size and now > it fails to match the size of embedded UFS file system that leads to other > problems, f.e. geom_label kernel module does not like this and skips the > file system while tasting the GEOM and looking for UFS label. > > This makes it impossible to refer to the file system using known UFS label > instead of something like /dev/map/rootfs.uncompress. > > The following patch introduces new command line option "-r roundup" for > makefs > that makes it round up the image to specified block size. Hence, > geom_uncompress > does not change GEOM media size for images rounded that way and geom_label > accepts such GEOMs just fine. > > With the patch applied, one can use following commands: > > $ makefs -t ffs -r 65536 -o bsize=4096,fsize=512,label=flash > optimization=space fs.img fs > $ mkulzma -s 65536 -o fs.img.ulzma fs.img > > PR: bin/203707 > Submitted by: 1. roundup doesn’t seem like a user-friendly name. 2. “roundup” isn’t documented under the FFS-specific options. I’m going to send out a CR soon updating the documentation and changing -r to -R. Thanks, -NGie ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r289681 - head/sys/dev/isp
Author: mav Date: Wed Oct 21 08:23:19 2015 New Revision: 289681 URL: https://svnweb.freebsd.org/changeset/base/289681 Log: Some more defines and polishing for INIT_FIRMWARE. Modified: head/sys/dev/isp/isp.c head/sys/dev/isp/ispmbox.h Modified: head/sys/dev/isp/isp.c == --- head/sys/dev/isp/isp.c Wed Oct 21 07:59:46 2015(r289680) +++ head/sys/dev/isp/isp.c Wed Oct 21 08:23:19 2015(r289681) @@ -2075,10 +2075,11 @@ isp_fibre_init_2400(ispsoftc_t *isp) icbp->icb_fwoptions2 |= ICB2400_OPT2_FCTAPE; } - if (icbp->icb_fwoptions2 & ICB2400_OPT2_FCTAPE) { - FCPARAM(isp, chan)->fctape_enabled = 1; - } else { - FCPARAM(isp, chan)->fctape_enabled = 0; + for (chan = 0; chan < isp->isp_nchan; chan++) { + if (icbp->icb_fwoptions2 & ICB2400_OPT2_FCTAPE) + FCPARAM(isp, chan)->fctape_enabled = 1; + else + FCPARAM(isp, chan)->fctape_enabled = 0; } switch (isp->isp_confopts & ISP_CFG_PORT_PREF) { @@ -2209,31 +2210,39 @@ isp_fibre_init_2400(ispsoftc_t *isp) size_t amt = 0; uint8_t *off; - vpinfo.vp_count = isp->isp_nchan - 1; vpinfo.vp_global_options = 0; + if (isp->isp_fwattr & ISP2400_FW_ATTR_VP0) { + vpinfo.vp_global_options |= ICB2400_VPGOPT_VP0_DECOUPLE; + vpinfo.vp_count = isp->isp_nchan; + chan = 0; + } else { + vpinfo.vp_count = isp->isp_nchan - 1; + chan = 1; + } off = fcp->isp_scratch; off += ICB2400_VPINFO_OFF; vdst = (isp_icb_2400_vpinfo_t *) off; isp_put_icb_2400_vpinfo(isp, &vpinfo, vdst); amt = ICB2400_VPINFO_OFF + sizeof (isp_icb_2400_vpinfo_t); - for (chan = 1; chan < isp->isp_nchan; chan++) { + for (; chan < isp->isp_nchan; chan++) { fcparam *fcp2; ISP_MEMZERO(&pi, sizeof (pi)); fcp2 = FCPARAM(isp, chan); if (fcp2->role != ISP_ROLE_NONE) { pi.vp_port_options = ICB2400_VPOPT_ENABLED; - if (fcp2->role & ISP_ROLE_INITIATOR) { + if (fcp2->role & ISP_ROLE_INITIATOR) pi.vp_port_options |= ICB2400_VPOPT_INI_ENABLE; - } - if ((fcp2->role & ISP_ROLE_TARGET) == 0) { + if ((fcp2->role & ISP_ROLE_TARGET) == 0) pi.vp_port_options |= ICB2400_VPOPT_TGT_DISABLE; - } - MAKE_NODE_NAME_FROM_WWN(pi.vp_port_portname, fcp2->isp_wwpn); - MAKE_NODE_NAME_FROM_WWN(pi.vp_port_nodename, fcp2->isp_wwnn); } + MAKE_NODE_NAME_FROM_WWN(pi.vp_port_portname, fcp2->isp_wwpn); + MAKE_NODE_NAME_FROM_WWN(pi.vp_port_nodename, fcp2->isp_wwnn); off = fcp->isp_scratch; - off += ICB2400_VPINFO_PORT_OFF(chan); + if (isp->isp_fwattr & ISP2400_FW_ATTR_VP0) + off += ICB2400_VPINFO_PORT_OFF(chan); + else + off += ICB2400_VPINFO_PORT_OFF(chan - 1); pdst = (vp_port_info_t *) off; isp_put_vp_port_info(isp, &pi, pdst); amt += ICB2400_VPOPT_WRITE_SIZE; Modified: head/sys/dev/isp/ispmbox.h == --- head/sys/dev/isp/ispmbox.h Wed Oct 21 07:59:46 2015(r289680) +++ head/sys/dev/isp/ispmbox.h Wed Oct 21 08:23:19 2015(r289681) @@ -989,6 +989,13 @@ typedef struct { #defineICB2400_OPT1_FAIRNESS 0x0002 #defineICB2400_OPT1_HARD_ADDRESS 0x0001 +#defineICB2400_OPT2_ENA_ATIOMQ 0x0800 +#defineICB2400_OPT2_ENA_IHA0x0400 +#defineICB2400_OPT2_QOS0x0200 +#defineICB2400_OPT2_IOCBS 0x0100 +#defineICB2400_OPT2_ENA_IHR0x0040 +#defineICB2400_OPT2_ENA_VMS0x0020 +#defineICB2400_OPT2_ENA_TA 0x0010 #defineICB2400_OPT2_TPRLIC 0x4000 #defineICB2400_OPT2_FCTAPE 0x1000 #defineICB2400_OPT2_FCSP 0x0800 @@ -1003,14 +1010,20 @@ typedef struct { #defineICB2400_OPT2_ZIO0x0005 #
svn commit: r289682 - head/sys/ofed/include/linux
Author: hselasky Date: Wed Oct 21 08:51:49 2015 New Revision: 289682 URL: https://svnweb.freebsd.org/changeset/base/289682 Log: Remove all comments deriving from Linux. Style file for FreeBSD. Suggested by: emaste @ Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/linux/scatterlist.h Modified: head/sys/ofed/include/linux/scatterlist.h == --- head/sys/ofed/include/linux/scatterlist.h Wed Oct 21 08:23:19 2015 (r289681) +++ head/sys/ofed/include/linux/scatterlist.h Wed Oct 21 08:51:49 2015 (r289682) @@ -2,7 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2015 Mellanox Technologies, Ltd. * Copyright (c) 2015 Matthew Dillon * All rights reserved. * @@ -35,48 +35,30 @@ #include #include -/* - * SG table design. - * - * If flags bit 0 is set, then the sg field contains a pointer to the next sg - * table list. Otherwise the next entry is at sg + 1, can be determined using - * the sg_is_chain() function. - * - * If flags bit 1 is set, then this sg entry is the last element in a list, - * can be determined using the sg_is_last() function. - * - * See sg_next(). - * - */ - struct scatterlist { union { - struct page *page; - struct scatterlist *sg; - } sl_un; - dma_addr_t address; - unsigned long offset; - uint32_tlength; - uint32_tflags; + struct page *page; + struct scatterlist *sg; + } sl_un; + dma_addr_t address; + unsigned long offset; + uint32_t length; + uint32_t flags; }; struct sg_table { - struct scatterlist *sgl;/* the list */ - unsigned int nents; /* number of mapped entries */ - unsigned int orig_nents;/* original size of list */ + struct scatterlist *sgl; + unsigned int nents; + unsigned int orig_nents; }; struct sg_page_iter { - struct scatterlist *sg; - unsigned intsg_pgoffset;/* page index */ - unsigned intmaxents; + struct scatterlist *sg; + unsigned int sg_pgoffset; + unsigned int maxents; }; -/* - * Maximum number of entries that will be allocated in one piece, if - * a list larger than this is required then chaining will be utilized. - */ -#define SG_MAX_SINGLE_ALLOC (PAGE_SIZE / sizeof(struct scatterlist)) +#defineSG_MAX_SINGLE_ALLOC (PAGE_SIZE / sizeof(struct scatterlist)) #definesg_dma_address(sg) (sg)->address #definesg_dma_len(sg) (sg)->length @@ -128,60 +110,24 @@ sg_phys(struct scatterlist *sg) return sg_page(sg)->phys_addr + sg->offset; } -/** - * sg_chain - Chain two sglists together - * @prv:First scatterlist - * @prv_nents: Number of entries in prv - * @sgl:Second scatterlist - * - * Description: - * Links @prv@ and @sgl@ together, to form a longer scatterlist. - * - **/ static inline void sg_chain(struct scatterlist *prv, unsigned int prv_nents, - struct scatterlist *sgl) +struct scatterlist *sgl) { -/* - * offset and length are unused for chain entry. Clear them. - */ struct scatterlist *sg = &prv[prv_nents - 1]; sg->offset = 0; sg->length = 0; - - /* -* Indicate a link pointer, and set the link to the second list. -*/ sg->flags = SG_CHAIN; sg->sl_un.sg = sgl; } -/** - * sg_mark_end - Mark the end of the scatterlist - * @sg: SG entryScatterlist - * - * Description: - * Marks the passed in sg entry as the termination point for the sg - * table. A call to sg_next() on this entry will return NULL. - * - **/ -static inline void sg_mark_end(struct scatterlist *sg) +static inline void +sg_mark_end(struct scatterlist *sg) { -sg->flags = SG_END; + sg->flags = SG_END; } -/** - * __sg_free_table - Free a previously mapped sg table - * @table: The sg table header to use - * @max_ents: The maximum number of entries per single scatterlist - * - * Description: - *Free an sg table previously allocated and setup with - *__sg_alloc_table(). The @max_ents value must be identical to - *that previously used with __sg_alloc_table(). - * - **/ static inline void __sg_free_table(struct sg_table *table, unsigned int max_ents) { @@ -195,12 +141,6 @@ __sg_free_table(struct sg_table *table, unsigned int alloc_size = table->orig_nents; unsigned int sg_size; - /* -* If we have more than max_ents segments left, -* then assign 'next' to the sg table after the current one. -
svn commit: r289683 - head/sys/ofed/include/linux
Author: hselasky Date: Wed Oct 21 09:37:34 2015 New Revision: 289683 URL: https://svnweb.freebsd.org/changeset/base/289683 Log: Remove all comments deriving from Linux. Minor rework of ilog2() function. Suggested by: emaste @ Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/linux/log2.h Modified: head/sys/ofed/include/linux/log2.h == --- head/sys/ofed/include/linux/log2.h Wed Oct 21 08:51:49 2015 (r289682) +++ head/sys/ofed/include/linux/log2.h Wed Oct 21 09:37:34 2015 (r289683) @@ -2,7 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2015 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -53,50 +53,10 @@ rounddown_pow_of_two(unsigned long x) return (1UL << (flsl(x) - 1)); } - -/* - * deal with unrepresentable constant logarithms - */ -extern __attribute__((const, noreturn)) -int ilog2_NaN(void); - -/* - * non-constant log of base 2 calculators - * - the arch may override these in asm/bitops.h if they can be implemented - * more efficiently than using fls() and fls64() - * - the arch is not required to handle n==0 if implementing the fallback - */ -#ifndef CONFIG_ARCH_HAS_ILOG2_U32 -static inline __attribute__((const)) -int __ilog2_u32(u32 n) -{ - return flsl(n) - 1; -} -#endif - -#ifndef CONFIG_ARCH_HAS_ILOG2_U64 -static inline __attribute__((const)) -int __ilog2_u64(u64 n) -{ - return flsl(n) - 1; -} -#endif - - -/** - * ilog2 - log of base 2 of 32-bit or a 64-bit unsigned value - * @n - parameter - * - * constant-capable log of base 2 calculation - * - this can be used to initialise global variables from constant data, hence - * the massive ternary operator construction - * - * selects the appropriately-sized optimised version depending on sizeof(n) - */ -#define ilog2(n) \ +#defineilog2(n)\ ( \ __builtin_constant_p(n) ? ( \ - (n) < 1 ? ilog2_NaN() : \ + (n) < 1 ? -1 : \ (n) & (1ULL << 63) ? 63 : \ (n) & (1ULL << 62) ? 62 : \ (n) & (1ULL << 61) ? 61 : \ @@ -161,12 +121,10 @@ int __ilog2_u64(u64 n) (n) & (1ULL << 2) ? 2 : \ (n) & (1ULL << 1) ? 1 : \ (n) & (1ULL << 0) ? 0 : \ - ilog2_NaN() \ - ) : \ + -1) : \ (sizeof(n) <= 4) ? \ - __ilog2_u32(n) :\ - __ilog2_u64(n) \ - ) + fls((u32)(n)) - 1 : flsll((u64)(n)) - 1 \ +) #defineorder_base_2(x) ilog2(roundup_pow_of_two(x)) ___ 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: r289685 - in head/sys: amd64/include/xen i386/include/xen x86/include/xen
Author: royger Date: Wed Oct 21 10:04:35 2015 New Revision: 289685 URL: https://svnweb.freebsd.org/changeset/base/289685 Log: x86/xen: Consolidate xen-os.h in a single place amd64 and i386 platform code contain very similar xen/xen-os.h The only differences are: - Functions/variables/types which were unused in i386/xen/xen-os.h: * xen_xchg * __xchg_dummy * __xg * __xchg * atomic_t * atomic_inc * rdtscll The functions/variables/types unused in xen-os.h can be dropped and there is no more differences betwen amd64 and i386. The new header is placed in x86/include/xen and each platform will have dummy headers include x86/xen/*.h. This is to be able to include machine/xen/*.h in the PV drivers. Submitted by: Julien Grall Reviewed by: royger Differential Revision:https://reviews.freebsd.org/D3880 Sponsored by: Citrix Systems R&D Added: head/sys/x86/include/xen/ head/sys/x86/include/xen/xen-os.h (contents, props changed) Modified: head/sys/amd64/include/xen/xen-os.h head/sys/i386/include/xen/xen-os.h Modified: head/sys/amd64/include/xen/xen-os.h == --- head/sys/amd64/include/xen/xen-os.h Wed Oct 21 09:44:50 2015 (r289684) +++ head/sys/amd64/include/xen/xen-os.h Wed Oct 21 10:04:35 2015 (r289685) @@ -1,132 +1,6 @@ -/** - * amd64/xen/xen-os.h - * - * Random collection of macros and definition - * - * Copyright (c) 2003, 2004 Keir Fraser (on behalf of the Xen team) - * All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * $FreeBSD$ +/*- + * This file is in the public domain. */ +/* $FreeBSD$ */ -#ifndef _MACHINE_XEN_XEN_OS_H_ -#define _MACHINE_XEN_XEN_OS_H_ - -#ifdef PAE -#define CONFIG_X86_PAE -#endif - -/* Everything below this point is not included by assembler (.S) files. */ -#ifndef __ASSEMBLY__ - -/* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ -static inline void rep_nop(void) -{ -__asm__ __volatile__ ( "rep;nop" : : : "memory" ); -} -#define cpu_relax() rep_nop() - -/* This is a barrier for the compiler only, NOT the processor! */ -#define barrier() __asm__ __volatile__("": : :"memory") - -#define LOCK_PREFIX "" -#define LOCK "" -#define ADDR (*(volatile long *) addr) - -/** - * test_and_clear_bit - Clear a bit and return its old value - * @nr: Bit to set - * @addr: Address to count from - * - * This operation is atomic and cannot be reordered. - * It also implies a memory barrier. - */ -static __inline int test_and_clear_bit(int nr, volatile void * addr) -{ -int oldbit; - -__asm__ __volatile__( LOCK_PREFIX -"btrl %2,%1\n\tsbbl %0,%0" -:"=r" (oldbit),"=m" (ADDR) -:"Ir" (nr) : "memory"); -return oldbit; -} - -static __inline int constant_test_bit(int nr, const volatile void * addr) -{ -return ((1UL << (nr & 31)) & (((const volatile unsigned int *) addr)[nr >> 5])) != 0; -} - -static __inline int variable_test_bit(int nr, volatile void * addr) -{ -int oldbit; - -__asm__ __volatile__( -"btl %2,%1\n\tsbbl %0,%0" -:"=r" (oldbit) -:"m" (ADDR),"Ir" (nr)); -return oldbit; -} - -#define test_bit(nr,addr) \ -(__builtin_constant_p(nr) ? \ - constant_test_bit((nr),(addr)) : \ - variable_test_bit((nr),(addr))) - -/** - * set_bit - Atomically set a bit in memory - * @nr: the bit to set - * @addr: the address to start counting from - * - * This function is atomic and may not be reordered. See __set_bit() - * if you do not require the atomic guarantees. - * Note that @nr may be almost arbitrarily large; this function is not - * restricted to acting on a single-word quantity. - */ -static __inline__ void set_bit(int nr, volatile
svn commit: r289686 - in head/sys: dev/xen/balloon dev/xen/blkback dev/xen/control dev/xen/grant_table dev/xen/netback dev/xen/netfront dev/xen/xenpci dev/xen/xenstore x86/include x86/include/xen x...
Author: royger Date: Wed Oct 21 10:44:07 2015 New Revision: 289686 URL: https://svnweb.freebsd.org/changeset/base/289686 Log: xen: Code cleanup and small bug fixes xen/hypervisor.h: - Remove unused helpers: MULTI_update_va_mapping, is_initial_xendomain, is_running_on_xen - Remove unused define CONFIG_X86_PAE - Remove unused variable xen_start_info: note that it's used inpcifront which is not built at all - Remove forward declaration of HYPERVISOR_crash xen/xen-os.h: - Remove unused define CONFIG_X86_PAE - Drop unused helpers: test_and_clear_bit, clear_bit, force_evtchn_callback - Implement a generic version (based on ofed/include/linux/bitops.h) of set_bit and test_bit and prefix them by xen_ to avoid any use by other code than Xen. Note that It would be worth to investigate a generic implementation in FreeBSD. - Replace barrier() by __compiler_membar() - Replace cpu_relax() by cpu_spinwait(): it's exactly the same as rep;nop = pause xen/xen_intr.h: - Move the prototype of xen_intr_handle_upcall in it: Use by all the platform x86/xen/xen_intr.c: - Use BITSET* for the enabledbits: Avoid to use custom helpers - test_bit/set_bit has been renamed to xen_test_bit/xen_set_bit - Don't export the variable xen_intr_pcpu dev/xen/blkback/blkback.c: - Fix the string format when XBB_DEBUG is enabled: host_addr is typed uint64_t dev/xen/balloon/balloon.c: - Remove set but not used variable - Use the correct type for frame_list: xen_pfn_t represents the frame number on any architecture dev/xen/control/control.c: - Return BUS_PROBE_WILDCARD in xs_probe: Returning 0 in a probe callback means the driver can handle this device. If by any chance xenstore is the first driver, every new device with the driver is unset will use xenstore. dev/xen/grant-table/grant_table.c: - Remove unused cmpxchg - Drop unused include opt_pmap.h: Doesn't exist on ARM64 and it doesn't contain anything required for the code on x86 dev/xen/netfront/netfront.c: - Use the correct type for rx_pfn_array: xen_pfn_t represents the frame number on any architecture dev/xen/netback/netback.c: - Use the correct type for gmfn: xen_pfn_t represents the frame number on any architecture dev/xen/xenstore/xenstore.c: - Return BUS_PROBE_WILDCARD in xctrl_probe: Returning 0 in a probe callback means the driver can handle this device. If by any chance xenstore is the first driver, every new device with the driver is unset will use xenstore. Note that with the changes, x86/include/xen/xen-os.h doesn't contain anymore arch-specific code. Although, a new series will add some helpers that differ between x86 and ARM64, so I've kept the headers for now. Submitted by: Julien Grall Reviewed by: royger Differential Revision:https://reviews.freebsd.org/D3921 Sponsored by: Citrix Systems R&D Modified: head/sys/dev/xen/balloon/balloon.c head/sys/dev/xen/blkback/blkback.c head/sys/dev/xen/control/control.c head/sys/dev/xen/grant_table/grant_table.c head/sys/dev/xen/netback/netback.c head/sys/dev/xen/netfront/netfront.c head/sys/dev/xen/xenpci/xenpci.c head/sys/dev/xen/xenstore/xenstore.c head/sys/x86/include/apicvar.h head/sys/x86/include/xen/xen-os.h head/sys/x86/xen/xen_intr.c head/sys/xen/blkif.h head/sys/xen/hypervisor.h head/sys/xen/xen-os.h head/sys/xen/xen_intr.h Modified: head/sys/dev/xen/balloon/balloon.c == --- head/sys/dev/xen/balloon/balloon.c Wed Oct 21 10:04:35 2015 (r289685) +++ head/sys/dev/xen/balloon/balloon.c Wed Oct 21 10:44:07 2015 (r289686) @@ -57,7 +57,7 @@ static MALLOC_DEFINE(M_BALLOON, "Balloon struct mtx balloon_mutex; /* We increase/decrease in batches which fit in a page */ -static unsigned long frame_list[PAGE_SIZE / sizeof(unsigned long)]; +static xen_pfn_t frame_list[PAGE_SIZE / sizeof(xen_pfn_t)]; struct balloon_stats { /* We aim for 'current allocation' == 'target allocation'. */ @@ -149,7 +149,7 @@ minimum_target(void) static int increase_reservation(unsigned long nr_pages) { - unsigned long pfn, i; + unsigned long i; vm_page_t page; long rc; struct xen_memory_reservation reservation = { @@ -195,7 +195,6 @@ increase_reservation(unsigned long nr_pa TAILQ_REMOVE(&ballooned_pages, page, plinks.q); bs.balloon_low--; - pfn = (VM_PAGE_TO_PHYS(page) >> PAGE_SHIFT); KASSERT(xen_feature(XENFEAT_auto_translated_physmap), ("auto translated physmap but mapping is valid")); @@ -211,7 +210,7 @@ increase_reservation(unsigned long nr_pa static int decrease_reservation(unsigned long nr_pages) { - unsigned long pf
svn commit: r289687 - head/usr.sbin/makefs/cd9660
Author: ngie Date: Wed Oct 21 11:38:48 2015 New Revision: 289687 URL: https://svnweb.freebsd.org/changeset/base/289687 Log: Free buffer before returning from cd9660_write_path_table to avoid leaking it after returning from the function MFC after: 1 week PR: 203647 Submitted by: Thomas Schmitt Coverity CID: 978431 Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/makefs/cd9660/cd9660_write.c Modified: head/usr.sbin/makefs/cd9660/cd9660_write.c == --- head/usr.sbin/makefs/cd9660/cd9660_write.c Wed Oct 21 10:44:07 2015 (r289686) +++ head/usr.sbin/makefs/cd9660/cd9660_write.c Wed Oct 21 11:38:48 2015 (r289687) @@ -165,7 +165,7 @@ cd9660_write_path_table(FILE *fd, off_t diskStructure.pathTableLength); unsigned char *buffer; unsigned char *buffer_head; - int len; + int len, ret; path_table_entry temp_entry; cd9660node *ptcur; @@ -213,8 +213,10 @@ cd9660_write_path_table(FILE *fd, off_t ptcur = ptcur->ptnext; } - return cd9660_write_filedata(fd, sector, buffer_head, + ret = cd9660_write_filedata(fd, sector, buffer_head, path_table_sectors); + free(buffer); + return ret; } ___ 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: r289664 - head/sys/kern
On 10/20/15 23:42, Bryan Drewery wrote: On 10/20/2015 1:38 PM, Konstantin Belousov wrote: Author: kib Date: Tue Oct 20 20:38:20 2015 New Revision: 289664 URL: https://svnweb.freebsd.org/changeset/base/289664 Log: Trim spaces at end of line to record the proper commit message for r289660: I really think we should just do a full revert and recommit in these cases, and not even a forced commit. Neither this commit or a forced commit will show in 'svn blame' or even during a bisect. It really just becomes luck to find the right commit noting the message. IMHO 'svn blame' is more important than some extra churn in 'svn log' or email. It does add more steps in 'svn blame' but it ends up giving the right message more obviously. I'm not asking to redo this commit now, but I think we should have a standard of just recommitting to fix mistakes. Why svn propedit svn:log --revprop -r289660 Is not used? AFAIR this was disabled, because revprop edit can't be synced with CVS. But there is no official CVS repo for a log time. ___ 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: r289690 - in head/cddl/contrib/opensolaris: . cmd/zfs
Author: mav Date: Wed Oct 21 12:16:38 2015 New Revision: 289690 URL: https://svnweb.freebsd.org/changeset/base/289690 Log: Record MFV r289689. The change itself was directly committed earlier at r284309. Modified: Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/cmd/zfs/ (props changed) ___ 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: r289693 - head/usr.sbin/makefs/cd9660
Author: ngie Date: Wed Oct 21 12:54:15 2015 New Revision: 289693 URL: https://svnweb.freebsd.org/changeset/base/289693 Log: Unbreak makefs -t cd9660 after r289687 buffer_head needs to be freed -- not buffer Detected by jemalloc, i.e. running makefs failed the arena assert because my copy of malloc on CURRENT is compiled with the default !MALLOC_PRODUCTION asserts on Pointyhat to: ngie PR: 203647 X-MFC with: r289687 Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/makefs/cd9660/cd9660_write.c Modified: head/usr.sbin/makefs/cd9660/cd9660_write.c == --- head/usr.sbin/makefs/cd9660/cd9660_write.c Wed Oct 21 12:44:51 2015 (r289692) +++ head/usr.sbin/makefs/cd9660/cd9660_write.c Wed Oct 21 12:54:15 2015 (r289693) @@ -215,7 +215,7 @@ cd9660_write_path_table(FILE *fd, off_t ret = cd9660_write_filedata(fd, sector, buffer_head, path_table_sectors); - free(buffer); + free(buffer_head); return ret; } ___ 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: r289694 - in head: etc/mtree usr.sbin/makefs usr.sbin/makefs/cd9660 usr.sbin/makefs/tests
Author: ngie Date: Wed Oct 21 13:13:38 2015 New Revision: 289694 URL: https://svnweb.freebsd.org/changeset/base/289694 Log: Add some rudimentary [smoke] testcases for makefs MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Added: head/usr.sbin/makefs/tests/ head/usr.sbin/makefs/tests/Makefile (contents, props changed) head/usr.sbin/makefs/tests/makefs_cd9660_tests.sh (contents, props changed) head/usr.sbin/makefs/tests/makefs_ffs_tests.sh (contents, props changed) head/usr.sbin/makefs/tests/makefs_tests_common.sh (contents, props changed) Modified: head/etc/mtree/BSD.tests.dist head/usr.sbin/makefs/Makefile head/usr.sbin/makefs/cd9660/iso9660_rrip.c head/usr.sbin/makefs/makefs.8 head/usr.sbin/makefs/makefs.c Modified: head/etc/mtree/BSD.tests.dist == --- head/etc/mtree/BSD.tests.dist Wed Oct 21 12:54:15 2015 (r289693) +++ head/etc/mtree/BSD.tests.dist Wed Oct 21 13:13:38 2015 (r289694) @@ -596,6 +596,8 @@ .. fstyp .. +makefs +.. newsyslog .. nmtree Modified: head/usr.sbin/makefs/Makefile == --- head/usr.sbin/makefs/Makefile Wed Oct 21 12:54:15 2015 (r289693) +++ head/usr.sbin/makefs/Makefile Wed Oct 21 13:13:38 2015 (r289694) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + PROG= makefs CFLAGS+=-I${.CURDIR} @@ -32,4 +34,8 @@ SRCS+=ffs_tables.c CFLAGS+= -I${.CURDIR}/../../lib/libnetbsd LIBADD=netbsd util sbuf +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Modified: head/usr.sbin/makefs/cd9660/iso9660_rrip.c == --- head/usr.sbin/makefs/cd9660/iso9660_rrip.c Wed Oct 21 12:54:15 2015 (r289693) +++ head/usr.sbin/makefs/cd9660/iso9660_rrip.c Wed Oct 21 13:13:38 2015 (r289694) @@ -1,4 +1,4 @@ -/* $NetBSD: iso9660_rrip.c,v 1.11 2012/04/29 13:32:21 joerg Exp $ */ +/* $NetBSD: iso9660_rrip.c,v 1.14 2014/05/30 13:14:47 martin Exp $ */ /* * Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan @@ -656,13 +656,14 @@ cd9660node_rrip_pn(struct ISO_SUSP_ATTRI pn_field->attr.rr_entry.PN.h.length[0] = 20; pn_field->attr.rr_entry.PN.h.version[0] = 1; - if (sizeof (fnode->inode->st.st_dev) > 32) - cd9660_bothendian_dword((uint64_t)fnode->inode->st.st_dev >> 32, + if (sizeof (fnode->inode->st.st_rdev) > 4) + cd9660_bothendian_dword( + (uint64_t)fnode->inode->st.st_rdev >> 32, pn_field->attr.rr_entry.PN.high); else cd9660_bothendian_dword(0, pn_field->attr.rr_entry.PN.high); - cd9660_bothendian_dword(fnode->inode->st.st_dev & 0x, + cd9660_bothendian_dword(fnode->inode->st.st_rdev & 0x, pn_field->attr.rr_entry.PN.low); return 1; } Modified: head/usr.sbin/makefs/makefs.8 == --- head/usr.sbin/makefs/makefs.8 Wed Oct 21 12:54:15 2015 (r289693) +++ head/usr.sbin/makefs/makefs.8 Wed Oct 21 13:13:38 2015 (r289694) @@ -53,7 +53,7 @@ .Op Fl m Ar maximum-size .Op Fl N Ar userdb-dir .Op Fl o Ar fs-options -.Op Fl r Ar roundup +.Op Fl R Ar roundup-size .Op Fl S Ar sector-size .Op Fl s Ar image-size .Op Fl t Ar fs-type @@ -196,9 +196,12 @@ Deprecated. See the .Fl Z flag. -.It Fl r Ar roundup -Round the image up to specified block size that should be multiple -of block size. +.It Fl R Ar roundup-size +Round the image up to +.Ar roundup-size . +.Ar roundup-size +should be a multiple of the file system block size specified by +.Ar bsize . .It Fl S Ar sector-size Set the file system sector size to .Ar sector-size . @@ -277,6 +280,11 @@ or .Ql time . .It Sy extent Maximum extent size. +.It Sy roundup +Round the image up to +.Ar roundup-size . +should be a multiple of +.Ar bsize . .It Sy maxbpcg Maximum total number of blocks in a cylinder group. .It Sy version Modified: head/usr.sbin/makefs/makefs.c == --- head/usr.sbin/makefs/makefs.c Wed Oct 21 12:54:15 2015 (r289693) +++ head/usr.sbin/makefs/makefs.c Wed Oct 21 13:13:38 2015 (r289694) @@ -209,10 +209,10 @@ main(int argc, char *argv[]) fsoptions.sparse = 1; break; - case 'r': + case 'R': /* Round image size up to specified block size */ fsoptions.roundup = - strsuftoll("roundup", optarg, 0, LLONG_MAX); + strsuftoll("rou
svn commit: r289695 - in head: etc/mtree lib/libc/gen usr.sbin/makefs usr.sbin/makefs/cd9660 usr.sbin/makefs/tests
Author: ngie Date: Wed Oct 21 13:15:04 2015 New Revision: 289695 URL: https://svnweb.freebsd.org/changeset/base/289695 Log: Revert r289694 I committed some other undesirable local changes by accident Deleted: head/usr.sbin/makefs/tests/ Modified: head/etc/mtree/BSD.tests.dist head/lib/libc/gen/dirname.3 head/usr.sbin/makefs/Makefile head/usr.sbin/makefs/cd9660/iso9660_rrip.c head/usr.sbin/makefs/makefs.8 head/usr.sbin/makefs/makefs.c Modified: head/etc/mtree/BSD.tests.dist == --- head/etc/mtree/BSD.tests.dist Wed Oct 21 13:13:38 2015 (r289694) +++ head/etc/mtree/BSD.tests.dist Wed Oct 21 13:15:04 2015 (r289695) @@ -596,8 +596,6 @@ .. fstyp .. -makefs -.. newsyslog .. nmtree Modified: head/lib/libc/gen/dirname.3 == --- head/lib/libc/gen/dirname.3 Wed Oct 21 13:13:38 2015(r289694) +++ head/lib/libc/gen/dirname.3 Wed Oct 21 13:15:04 2015(r289695) @@ -78,6 +78,8 @@ The following error codes may be set in .It Bq Er ENAMETOOLONG The path component to be returned was larger than .Dv MAXPATHLEN . +.It Bq Er ENOMEM +The path component to be returned was larger than .El .Sh SEE ALSO .Xr basename 1 , Modified: head/usr.sbin/makefs/Makefile == --- head/usr.sbin/makefs/Makefile Wed Oct 21 13:13:38 2015 (r289694) +++ head/usr.sbin/makefs/Makefile Wed Oct 21 13:15:04 2015 (r289695) @@ -1,7 +1,5 @@ # $FreeBSD$ -.include - PROG= makefs CFLAGS+=-I${.CURDIR} @@ -34,8 +32,4 @@ SRCS+=ffs_tables.c CFLAGS+= -I${.CURDIR}/../../lib/libnetbsd LIBADD=netbsd util sbuf -.if ${MK_TESTS} != "no" -SUBDIR+= tests -.endif - .include Modified: head/usr.sbin/makefs/cd9660/iso9660_rrip.c == --- head/usr.sbin/makefs/cd9660/iso9660_rrip.c Wed Oct 21 13:13:38 2015 (r289694) +++ head/usr.sbin/makefs/cd9660/iso9660_rrip.c Wed Oct 21 13:15:04 2015 (r289695) @@ -1,4 +1,4 @@ -/* $NetBSD: iso9660_rrip.c,v 1.14 2014/05/30 13:14:47 martin Exp $ */ +/* $NetBSD: iso9660_rrip.c,v 1.11 2012/04/29 13:32:21 joerg Exp $ */ /* * Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan @@ -656,14 +656,13 @@ cd9660node_rrip_pn(struct ISO_SUSP_ATTRI pn_field->attr.rr_entry.PN.h.length[0] = 20; pn_field->attr.rr_entry.PN.h.version[0] = 1; - if (sizeof (fnode->inode->st.st_rdev) > 4) - cd9660_bothendian_dword( - (uint64_t)fnode->inode->st.st_rdev >> 32, + if (sizeof (fnode->inode->st.st_dev) > 32) + cd9660_bothendian_dword((uint64_t)fnode->inode->st.st_dev >> 32, pn_field->attr.rr_entry.PN.high); else cd9660_bothendian_dword(0, pn_field->attr.rr_entry.PN.high); - cd9660_bothendian_dword(fnode->inode->st.st_rdev & 0x, + cd9660_bothendian_dword(fnode->inode->st.st_dev & 0x, pn_field->attr.rr_entry.PN.low); return 1; } Modified: head/usr.sbin/makefs/makefs.8 == --- head/usr.sbin/makefs/makefs.8 Wed Oct 21 13:13:38 2015 (r289694) +++ head/usr.sbin/makefs/makefs.8 Wed Oct 21 13:15:04 2015 (r289695) @@ -53,7 +53,7 @@ .Op Fl m Ar maximum-size .Op Fl N Ar userdb-dir .Op Fl o Ar fs-options -.Op Fl R Ar roundup-size +.Op Fl r Ar roundup .Op Fl S Ar sector-size .Op Fl s Ar image-size .Op Fl t Ar fs-type @@ -196,12 +196,9 @@ Deprecated. See the .Fl Z flag. -.It Fl R Ar roundup-size -Round the image up to -.Ar roundup-size . -.Ar roundup-size -should be a multiple of the file system block size specified by -.Ar bsize . +.It Fl r Ar roundup +Round the image up to specified block size that should be multiple +of block size. .It Fl S Ar sector-size Set the file system sector size to .Ar sector-size . @@ -280,11 +277,6 @@ or .Ql time . .It Sy extent Maximum extent size. -.It Sy roundup -Round the image up to -.Ar roundup-size . -should be a multiple of -.Ar bsize . .It Sy maxbpcg Maximum total number of blocks in a cylinder group. .It Sy version Modified: head/usr.sbin/makefs/makefs.c == --- head/usr.sbin/makefs/makefs.c Wed Oct 21 13:13:38 2015 (r289694) +++ head/usr.sbin/makefs/makefs.c Wed Oct 21 13:15:04 2015 (r289695) @@ -209,10 +209,10 @@ main(int argc, char *argv[]) fsoptions.sparse = 1; break; - case 'R': + case 'r':
svn commit: r289696 - head/lib/libc/gen
Author: ngie Date: Wed Oct 21 13:16:03 2015 New Revision: 289696 URL: https://svnweb.freebsd.org/changeset/base/289696 Log: Revert lib/libc/gen/dirname.3@r289695 This is why I use branches usually, not commit directly to head Modified: head/lib/libc/gen/dirname.3 Modified: head/lib/libc/gen/dirname.3 == --- head/lib/libc/gen/dirname.3 Wed Oct 21 13:15:04 2015(r289695) +++ head/lib/libc/gen/dirname.3 Wed Oct 21 13:16:03 2015(r289696) @@ -78,8 +78,6 @@ The following error codes may be set in .It Bq Er ENAMETOOLONG The path component to be returned was larger than .Dv MAXPATHLEN . -.It Bq Er ENOMEM -The path component to be returned was larger than .El .Sh SEE ALSO .Xr basename 1 , ___ 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: r289697 - head/sys/dev/xen/netfront
Author: royger Date: Wed Oct 21 13:53:07 2015 New Revision: 289697 URL: https://svnweb.freebsd.org/changeset/base/289697 Log: netfront: fix LINT-NOIP r289587 broke LINT-NOIP kernels because the lro and queued local variables are defined but not used. Add preprocessor guards around them. Reported by: emaste Sponsored by: Citrix Systems R&D Modified: head/sys/dev/xen/netfront/netfront.c Modified: head/sys/dev/xen/netfront/netfront.c == --- head/sys/dev/xen/netfront/netfront.cWed Oct 21 13:16:03 2015 (r289696) +++ head/sys/dev/xen/netfront/netfront.cWed Oct 21 13:53:07 2015 (r289697) @@ -842,8 +842,10 @@ static void xn_rxeof(struct netfront_info *np) { struct ifnet *ifp; +#if (defined(INET) || defined(INET6)) struct lro_ctrl *lro = &np->xn_lro; struct lro_entry *queued; +#endif struct netfront_rx_info rinfo; struct netif_rx_response *rx = &rinfo.rx; struct netif_extra_info *extras = rinfo.extras; ___ 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: r289698 - head/sys/arm/arm
Author: ian Date: Wed Oct 21 13:59:00 2015 New Revision: 289698 URL: https://svnweb.freebsd.org/changeset/base/289698 Log: Move arm_gic_bind() out of the #ifdef SMP block to fix compile errors in the not-SMP case. This is safe because arm_irq_next_cpu() will return the cpuid of the current/only core in the not-SMP case. Submitted by: Bartosz Szczepanek @ semihalf Modified: head/sys/arm/arm/gic.c Modified: head/sys/arm/arm/gic.c == --- head/sys/arm/arm/gic.c Wed Oct 21 13:53:07 2015(r289697) +++ head/sys/arm/arm/gic.c Wed Oct 21 13:59:00 2015(r289698) @@ -860,7 +860,6 @@ arm_gic_post_filter(device_t dev, struct gic_c_write_4(sc, GICC_EOIR, isrc->isrc_data); } -#ifdef SMP static int arm_gic_bind(device_t dev, struct arm_irqsrc *isrc) { @@ -877,6 +876,7 @@ arm_gic_bind(device_t dev, struct arm_ir return (gic_bind(sc, irq, &isrc->isrc_cpu)); } +#ifdef SMP static void arm_gic_ipi_send(device_t dev, struct arm_irqsrc *isrc, cpuset_t cpus) { ___ 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: r289699 - in head/sys/mips: include mips
Author: ian Date: Wed Oct 21 14:57:59 2015 New Revision: 289699 URL: https://svnweb.freebsd.org/changeset/base/289699 Log: Switch from a stub to a real implementation of pmap_page_set_attr() for mips, and implement support for VM_MEMATTR_UNCACHEABLE. This will be used in upcoming changes to support BUS_DMA_COHERENT in bus_dmamem_alloc(). Reviewed by: adrian, imp Modified: head/sys/mips/include/pmap.h head/sys/mips/mips/pmap.c Modified: head/sys/mips/include/pmap.h == --- head/sys/mips/include/pmap.hWed Oct 21 13:59:00 2015 (r289698) +++ head/sys/mips/include/pmap.hWed Oct 21 14:57:59 2015 (r289699) @@ -74,6 +74,7 @@ struct md_page { }; #definePV_TABLE_REF0x02/* referenced */ +#definePV_MEMATTR_UNCACHEABLE 0x04 #defineASID_BITS 8 #defineASIDGEN_BITS(32 - ASID_BITS) @@ -165,7 +166,6 @@ extern vm_paddr_t dump_avail[PHYS_AVAIL_ #definepmap_page_get_memattr(m)VM_MEMATTR_DEFAULT #definepmap_page_is_mapped(m) (!TAILQ_EMPTY(&(m)->md.pv_list)) #definepmap_page_is_write_mapped(m)(((m)->aflags & PGA_WRITEABLE) != 0) -#definepmap_page_set_memattr(m, ma)(void)0 void pmap_bootstrap(void); void *pmap_mapdev(vm_paddr_t, vm_size_t); @@ -179,6 +179,7 @@ void pmap_kenter_temporary_free(vm_paddr void pmap_flush_pvcache(vm_page_t m); int pmap_emulate_modified(pmap_t pmap, vm_offset_t va); void pmap_grow_direct_page_cache(void); +void pmap_page_set_memattr(vm_page_t, vm_memattr_t); #endif /* _KERNEL */ Modified: head/sys/mips/mips/pmap.c == --- head/sys/mips/mips/pmap.c Wed Oct 21 13:59:00 2015(r289698) +++ head/sys/mips/mips/pmap.c Wed Oct 21 14:57:59 2015(r289699) @@ -314,6 +314,15 @@ pmap_lmem_unmap(void) } #endif /* !__mips_n64 */ +static __inline int +is_cacheable_page(vm_paddr_t pa, vm_page_t m) +{ + + return ((m->md.pv_flags & PV_MEMATTR_UNCACHEABLE) == 0 && + is_cacheable_mem(pa)); + +} + /* * Page table entry lookup routines. */ @@ -2009,7 +2018,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, newpte |= PTE_W; if (is_kernel_pmap(pmap)) newpte |= PTE_G; - if (is_cacheable_mem(pa)) + if (is_cacheable_page(pa, m)) newpte |= PTE_C_CACHE; else newpte |= PTE_C_UNCACHED; @@ -2280,7 +2289,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ if ((m->oflags & VPO_UNMANAGED) == 0) *pte |= PTE_MANAGED; - if (is_cacheable_mem(pa)) + if (is_cacheable_page(pa, m)) *pte |= PTE_C_CACHE; else *pte |= PTE_C_UNCACHED; @@ -2650,9 +2659,12 @@ pmap_quick_enter_page(vm_page_t m) pa = VM_PAGE_TO_PHYS(m); - if (MIPS_DIRECT_MAPPABLE(pa)) - return (MIPS_PHYS_TO_DIRECT(pa)); - + if (MIPS_DIRECT_MAPPABLE(pa)) { + if (m->md.pv_flags & PV_MEMATTR_UNCACHEABLE) + return (MIPS_PHYS_TO_DIRECT_UNCACHED(pa)); + else + return (MIPS_PHYS_TO_DIRECT(pa)); + } critical_enter(); sysm = &sysmap_lmem[PCPU_GET(cpuid)]; @@ -2660,7 +2672,7 @@ pmap_quick_enter_page(vm_page_t m) pte = pmap_pte(kernel_pmap, sysm->base); *pte = TLBLO_PA_TO_PFN(pa) | PTE_D | PTE_V | PTE_G | - (is_cacheable_mem(pa) ? PTE_C_CACHE : PTE_C_UNCACHED); + (is_cacheable_page(pa, m) ? PTE_C_CACHE : PTE_C_UNCACHED); sysm->valid1 = 1; return (sysm->base); @@ -3520,3 +3532,27 @@ pmap_flush_pvcache(vm_page_t m) } } } + +void +pmap_page_set_memattr(vm_page_t m, vm_memattr_t ma) +{ + + /* +* It appears that this function can only be called before any mappings +* for the page are established. If this ever changes, this code will +* need to walk the pv_list and make each of the existing mappings +* uncacheable, being careful to sync caches and PTEs (and maybe +* invalidate TLB?) for any current mapping it modifies. +*/ + if (TAILQ_FIRST(&m->md.pv_list) != NULL) + panic("Can't change memattr on page with existing mappings"); + + /* +* The only memattr we support is UNCACHEABLE, translate the (semi-)MI +* representation of that into our internal flag in the page MD struct. +*/ + if (ma == VM_MEMATTR_UNCACHEABLE) + m->md.pv_flags |= PV_MEMATTR_UNCACHEABLE; + else + m->md.pv_flags &= ~PV_MEMATTR_UNCACHEABLE; +} ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "s
svn commit: r289700 - in head/sys/compat/linuxkpi: . common common/include common/include/asm common/include/linux common/src
Author: hselasky Date: Wed Oct 21 15:01:51 2015 New Revision: 289700 URL: https://svnweb.freebsd.org/changeset/base/289700 Log: Start process of moving the LinuxKPI into the default kernel build by creating an empty directory tree. Sponsored by: Mellanox Technologies Added: head/sys/compat/linuxkpi/ head/sys/compat/linuxkpi/common/ head/sys/compat/linuxkpi/common/include/ head/sys/compat/linuxkpi/common/include/asm/ head/sys/compat/linuxkpi/common/include/linux/ head/sys/compat/linuxkpi/common/src/ ___ 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: r289701 - in head/sys: conf mips/mips
Author: ian Date: Wed Oct 21 15:06:48 2015 New Revision: 289701 URL: https://svnweb.freebsd.org/changeset/base/289701 Log: Switch mips busdma to using the common busdma_buffalloc code. This amounts to copying in some code from the armv4 busdma, and adapting a few variable and flag names to match the surrounding mips code. Instead of keeping a local cache of prealloced busdma_map structs on a mutex-protected list, set up an uma zone to cache them. Instead of all memory allocations using M_DEVBUF, use new categories M_BUSDMA for allocations of metadata (tags, maps, segment tracking lists), and M_BOUNCE for bounce pages. When buffers are allocated out of the busdma_bufalloc zones the alignment and size of the buffers is known, and the code can skip doing any "partial cacheline flush" logic to preserve data that may be adjacent to the DMA buffer but contain non-DMA data. Reviewed by: adrian, imp Modified: head/sys/conf/files.mips head/sys/mips/mips/busdma_machdep.c Modified: head/sys/conf/files.mips == --- head/sys/conf/files.mipsWed Oct 21 15:01:51 2015(r289700) +++ head/sys/conf/files.mipsWed Oct 21 15:06:48 2015(r289701) @@ -50,6 +50,7 @@ mips/mips/vm_machdep.cstandard # misc opt-in bits kern/kern_clocksource.cstandard kern/link_elf_obj.cstandard +kern/subr_busdma_bufalloc.cstandard kern/subr_dummy_vdso_tc.c standard kern/subr_sfbuf.c optionalmips | mipsel | mipsn32 Modified: head/sys/mips/mips/busdma_machdep.c == --- head/sys/mips/mips/busdma_machdep.c Wed Oct 21 15:01:51 2015 (r289700) +++ head/sys/mips/mips/busdma_machdep.c Wed Oct 21 15:06:48 2015 (r289701) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -47,7 +48,10 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include +#include +#include #include #include @@ -129,9 +133,8 @@ static SYSCTL_NODE(_hw, OID_AUTO, busdma SYSCTL_INT(_hw_busdma, OID_AUTO, total_bpages, CTLFLAG_RD, &total_bpages, 0, "Total bounce pages"); -#define DMAMAP_UNCACHEABLE 0x8 -#define DMAMAP_ALLOCATED 0x10 -#define DMAMAP_MALLOCUSED 0x20 +#define DMAMAP_UNCACHEABLE 0x08 +#define DMAMAP_CACHE_ALIGNED 0x10 struct bus_dmamap { struct bp_list bpages; @@ -153,16 +156,6 @@ struct bus_dmamap { static STAILQ_HEAD(, bus_dmamap) bounce_map_waitinglist; static STAILQ_HEAD(, bus_dmamap) bounce_map_callbacklist; -static TAILQ_HEAD(,bus_dmamap) dmamap_freelist = - TAILQ_HEAD_INITIALIZER(dmamap_freelist); - -#define BUSDMA_STATIC_MAPS 128 -static struct bus_dmamap map_pool[BUSDMA_STATIC_MAPS]; - -static struct mtx busdma_mtx; - -MTX_SYSINIT(busdma_mtx, &busdma_mtx, "busdma lock", MTX_DEF); - static void init_bounce_pages(void *dummy); static int alloc_bounce_zone(bus_dma_tag_t dmat); static int alloc_bounce_pages(bus_dma_tag_t dmat, u_int numpages); @@ -176,6 +169,80 @@ static void free_bounce_page(bus_dma_tag /* Default tag, as most drivers provide no parent tag. */ bus_dma_tag_t mips_root_dma_tag; +static uma_zone_t dmamap_zone; /* Cache of struct bus_dmamap items */ + +static busdma_bufalloc_t coherent_allocator; /* Cache of coherent buffers */ +static busdma_bufalloc_t standard_allocator; /* Cache of standard buffers */ + +MALLOC_DEFINE(M_BUSDMA, "busdma", "busdma metadata"); +MALLOC_DEFINE(M_BOUNCE, "bounce", "busdma bounce pages"); + +/* + * This is the ctor function passed to uma_zcreate() for the pool of dma maps. + * It'll need platform-specific changes if this code is copied. + */ +static int +dmamap_ctor(void *mem, int size, void *arg, int flags) +{ + bus_dmamap_t map; + bus_dma_tag_t dmat; + + map = (bus_dmamap_t)mem; + dmat = (bus_dma_tag_t)arg; + + dmat->map_count++; + + map->dmat = dmat; + map->flags = 0; + map->slist = NULL; + map->allocbuffer = NULL; + map->sync_count = 0; + STAILQ_INIT(&map->bpages); + + return (0); +} + +/* + * This is the dtor function passed to uma_zcreate() for the pool of dma maps. + * It may need platform-specific changes if this code is copied . + */ +static void +dmamap_dtor(void *mem, int size, void *arg) +{ + bus_dmamap_t map; + + map = (bus_dmamap_t)mem; + + map->dmat->map_count--; +} + +static void +busdma_init(void *dummy) +{ + + /* Create a cache of maps for bus_dmamap_create(). */ + dmamap_zone = uma_zcreate("dma maps", sizeof(struct bus_dmamap), + dmamap_ctor, dmamap_dtor, NULL, NULL, UMA_ALIGN_PTR, 0); + + /* Create a cache of buffers in standard (cacheable) memory. */ + standard_a
svn commit: r289702 - head/sys/cam/ctl
Author: mav Date: Wed Oct 21 15:31:26 2015 New Revision: 289702 URL: https://svnweb.freebsd.org/changeset/base/289702 Log: Make some panic strings mode informative. Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_backend_block.c Modified: head/sys/cam/ctl/ctl.c == --- head/sys/cam/ctl/ctl.c Wed Oct 21 15:06:48 2015(r289701) +++ head/sys/cam/ctl/ctl.c Wed Oct 21 15:31:26 2015(r289702) @@ -3810,7 +3810,7 @@ ctl_expand_number(const char *buf, uint6 static int ctl_init_page_index(struct ctl_lun *lun) { - int i; + int i, page_code; struct ctl_page_index *page_index; const char *value; uint64_t ival; @@ -3831,10 +3831,12 @@ ctl_init_page_index(struct ctl_lun *lun) (page_index->page_flags & CTL_PAGE_FLAG_CDROM) == 0) continue; - switch (page_index->page_code & SMPH_PC_MASK) { + page_code = page_index->page_code & SMPH_PC_MASK; + switch (page_code) { case SMS_RW_ERROR_RECOVERY_PAGE: { - if (page_index->subpage != SMS_SUBPAGE_PAGE_0) - panic("subpage is incorrect!"); + KASSERT(page_index->subpage == SMS_SUBPAGE_PAGE_0, + ("subpage %#x for page %#x is incorrect!", + page_index->subpage, page_code)); memcpy(&lun->mode_pages.rw_er_page[CTL_PAGE_CURRENT], &rw_er_page_default, sizeof(rw_er_page_default)); @@ -3854,8 +3856,9 @@ ctl_init_page_index(struct ctl_lun *lun) case SMS_FORMAT_DEVICE_PAGE: { struct scsi_format_page *format_page; - if (page_index->subpage != SMS_SUBPAGE_PAGE_0) - panic("subpage is incorrect!"); + KASSERT(page_index->subpage == SMS_SUBPAGE_PAGE_0, + ("subpage %#x for page %#x is incorrect!", + page_index->subpage, page_code)); /* * Sectors per track are set above. Bytes per @@ -3901,9 +3904,9 @@ ctl_init_page_index(struct ctl_lun *lun) int shift; #endif /* !__XSCALE__ */ - if (page_index->subpage != SMS_SUBPAGE_PAGE_0) - panic("invalid subpage value %d", - page_index->subpage); + KASSERT(page_index->subpage == SMS_SUBPAGE_PAGE_0, + ("subpage %#x for page %#x is incorrect!", + page_index->subpage, page_code)); /* * Rotation rate and sectors per track are set @@ -3981,9 +3984,9 @@ ctl_init_page_index(struct ctl_lun *lun) case SMS_CACHING_PAGE: { struct scsi_caching_page *caching_page; - if (page_index->subpage != SMS_SUBPAGE_PAGE_0) - panic("invalid subpage value %d", - page_index->subpage); + KASSERT(page_index->subpage == SMS_SUBPAGE_PAGE_0, + ("subpage %#x for page %#x is incorrect!", + page_index->subpage, page_code)); memcpy(&lun->mode_pages.caching_page[CTL_PAGE_DEFAULT], &caching_page_default, sizeof(caching_page_default)); @@ -4066,6 +4069,9 @@ ctl_init_page_index(struct ctl_lun *lun) page_index->page_data = (uint8_t *)lun->mode_pages.control_ext_page; break; + default: + panic("subpage %#x for page %#x is incorrect!", + page_index->subpage, page_code); } break; } @@ -4157,10 +4163,18 @@ ctl_init_page_index(struct ctl_lun *lun) sizeof(lbp_page_default)); page_index->page_data = (uint8_t *)lun->mode_pages.lbp_page; - }} + break; + } + default: + panic("subpage %#x for page %#x is incorrect!", + page_index->subpage, page_code); + } break; } case SMS_CDDVD_CAPS_PAGE:{ + KASSERT(page_index->subpage == SMS_SUBPAGE_PAGE_0, + ("subpage %#x for page %#x is incorrec
Re: svn commit: r289700 - in head/sys/compat/linuxkpi: . common common/include common/include/asm common/include/linux common/src
On 10/21/2015 8:01 AM, Hans Petter Selasky wrote: > Author: hselasky > Date: Wed Oct 21 15:01:51 2015 > New Revision: 289700 > URL: https://svnweb.freebsd.org/changeset/base/289700 > > Log: > Start process of moving the LinuxKPI into the default kernel build by > creating an empty directory tree. > > Sponsored by: Mellanox Technologies > > Added: > head/sys/compat/linuxkpi/ > head/sys/compat/linuxkpi/common/ > head/sys/compat/linuxkpi/common/include/ > head/sys/compat/linuxkpi/common/include/asm/ > head/sys/compat/linuxkpi/common/include/linux/ > head/sys/compat/linuxkpi/common/src/ > This makes me think a branch should be used instead. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
Re: svn commit: r289700 - in head/sys/compat/linuxkpi: . common common/include common/include/asm common/include/linux common/src
On 10/21/15 17:28, Bryan Drewery wrote: On 10/21/2015 8:01 AM, Hans Petter Selasky wrote: Author: hselasky Date: Wed Oct 21 15:01:51 2015 New Revision: 289700 URL: https://svnweb.freebsd.org/changeset/base/289700 Log: Start process of moving the LinuxKPI into the default kernel build by creating an empty directory tree. Sponsored by:Mellanox Technologies Added: head/sys/compat/linuxkpi/ head/sys/compat/linuxkpi/common/ head/sys/compat/linuxkpi/common/include/ head/sys/compat/linuxkpi/common/include/asm/ head/sys/compat/linuxkpi/common/include/linux/ head/sys/compat/linuxkpi/common/src/ This makes me think a branch should be used instead. Most of what will be done is "svn mv" out of "sys/ofed" and changing some include paths in sys/modules and sys/conf . Can you explain why you think a branch is required ? --HPS ___ 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: r289704 - in head/sys: arm/ti/am335x dev/ofw
Author: ian Date: Wed Oct 21 15:41:16 2015 New Revision: 289704 URL: https://svnweb.freebsd.org/changeset/base/289704 Log: Fix parsing of I2C addresses properties in fdt data. I2C address is represented in 7-bits format in DT files, but system expect it in 8-bit format. Also, fix two drivers that locally hack around this bug. Submitted by: Michal Meloun Modified: head/sys/arm/ti/am335x/am335x_pmic.c head/sys/arm/ti/am335x/tda19988.c head/sys/dev/ofw/ofw_iicbus.c Modified: head/sys/arm/ti/am335x/am335x_pmic.c == --- head/sys/arm/ti/am335x/am335x_pmic.cWed Oct 21 15:32:21 2015 (r289703) +++ head/sys/arm/ti/am335x/am335x_pmic.cWed Oct 21 15:41:16 2015 (r289704) @@ -147,7 +147,7 @@ am335x_pmic_probe(device_t dev) sc = device_get_softc(dev); sc->sc_dev = dev; /* Convert to 8-bit addressing */ - sc->sc_addr = iicbus_get_addr(dev) << 1; + sc->sc_addr = iicbus_get_addr(dev); device_set_desc(dev, "TI TPS65217 Power Management IC"); Modified: head/sys/arm/ti/am335x/tda19988.c == --- head/sys/arm/ti/am335x/tda19988.c Wed Oct 21 15:32:21 2015 (r289703) +++ head/sys/arm/ti/am335x/tda19988.c Wed Oct 21 15:41:16 2015 (r289704) @@ -731,7 +731,7 @@ tda19988_attach(device_t dev) sc = device_get_softc(dev); sc->sc_dev = dev; - sc->sc_addr = iicbus_get_addr(dev) << 1; + sc->sc_addr = iicbus_get_addr(dev); sc->sc_cec_addr = (0x34 << 1); /* hardcoded */ sc->sc_edid = malloc(EDID_LENGTH, M_DEVBUF, M_WAITOK | M_ZERO); sc->sc_edid_len = EDID_LENGTH; Modified: head/sys/dev/ofw/ofw_iicbus.c == --- head/sys/dev/ofw/ofw_iicbus.c Wed Oct 21 15:32:21 2015 (r289703) +++ head/sys/dev/ofw/ofw_iicbus.c Wed Oct 21 15:41:16 2015 (r289704) @@ -147,7 +147,11 @@ ofw_iicbus_attach(device_t dev) M_NOWAIT | M_ZERO); if (dinfo == NULL) continue; - dinfo->opd_dinfo.addr = paddr; + /* +* OFW uses 7-bit I2C address format (see ePAPR), +* but system expect 8-bit. +*/ + dinfo->opd_dinfo.addr = paddr << 1; if (ofw_bus_gen_setup_devinfo(&dinfo->opd_obdinfo, child) != 0) { free(dinfo, M_DEVBUF); ___ 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: r289700 - in head/sys/compat/linuxkpi: . common common/include common/include/asm common/include/linux common/src
On 10/21/2015 8:39 AM, Hans Petter Selasky wrote: > On 10/21/15 17:28, Bryan Drewery wrote: >> On 10/21/2015 8:01 AM, Hans Petter Selasky wrote: >>> Author: hselasky >>> Date: Wed Oct 21 15:01:51 2015 >>> New Revision: 289700 >>> URL: https://svnweb.freebsd.org/changeset/base/289700 >>> >>> Log: >>>Start process of moving the LinuxKPI into the default kernel build by >>>creating an empty directory tree. >>> >>>Sponsored by:Mellanox Technologies >>> >>> Added: >>>head/sys/compat/linuxkpi/ >>>head/sys/compat/linuxkpi/common/ >>>head/sys/compat/linuxkpi/common/include/ >>>head/sys/compat/linuxkpi/common/include/asm/ >>>head/sys/compat/linuxkpi/common/include/linux/ >>>head/sys/compat/linuxkpi/common/src/ >>> >> >> This makes me think a branch should be used instead. >> > > Most of what will be done is "svn mv" out of "sys/ofed" and changing > some include paths in sys/modules and sys/conf . Can you explain why you > think a branch is required ? Because you're splitting commits up that should otherwise not be split up. There's no reason to commit empty directories before a 'svn mv' into them. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
Re: svn commit: r289700 - in head/sys/compat/linuxkpi: . common common/include common/include/asm common/include/linux common/src
On 10/21/15 17:42, Bryan Drewery wrote: On 10/21/2015 8:39 AM, Hans Petter Selasky wrote: On 10/21/15 17:28, Bryan Drewery wrote: On 10/21/2015 8:01 AM, Hans Petter Selasky wrote: Author: hselasky Date: Wed Oct 21 15:01:51 2015 New Revision: 289700 URL: https://svnweb.freebsd.org/changeset/base/289700 Log: Start process of moving the LinuxKPI into the default kernel build by creating an empty directory tree. Sponsored by:Mellanox Technologies Added: head/sys/compat/linuxkpi/ head/sys/compat/linuxkpi/common/ head/sys/compat/linuxkpi/common/include/ head/sys/compat/linuxkpi/common/include/asm/ head/sys/compat/linuxkpi/common/include/linux/ head/sys/compat/linuxkpi/common/src/ This makes me think a branch should be used instead. Most of what will be done is "svn mv" out of "sys/ofed" and changing some include paths in sys/modules and sys/conf . Can you explain why you think a branch is required ? Because you're splitting commits up that should otherwise not be split up. There's no reason to commit empty directories before a 'svn mv' into them. OK, I see. Do you want me to revert the "svn add" and put it altogether in a single commit, or is not not that big deal if I keep the next linuxkpi file moving as a single commit? --HPS ___ 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: r289700 - in head/sys/compat/linuxkpi: . common common/include common/include/asm common/include/linux common/src
On 10/21/2015 8:56 AM, Hans Petter Selasky wrote: > On 10/21/15 17:42, Bryan Drewery wrote: >> On 10/21/2015 8:39 AM, Hans Petter Selasky wrote: >>> On 10/21/15 17:28, Bryan Drewery wrote: On 10/21/2015 8:01 AM, Hans Petter Selasky wrote: > Author: hselasky > Date: Wed Oct 21 15:01:51 2015 > New Revision: 289700 > URL: https://svnweb.freebsd.org/changeset/base/289700 > > Log: > Start process of moving the LinuxKPI into the default kernel > build by > creating an empty directory tree. > > Sponsored by:Mellanox Technologies > > Added: > head/sys/compat/linuxkpi/ > head/sys/compat/linuxkpi/common/ > head/sys/compat/linuxkpi/common/include/ > head/sys/compat/linuxkpi/common/include/asm/ > head/sys/compat/linuxkpi/common/include/linux/ > head/sys/compat/linuxkpi/common/src/ > This makes me think a branch should be used instead. >>> >>> Most of what will be done is "svn mv" out of "sys/ofed" and changing >>> some include paths in sys/modules and sys/conf . Can you explain why you >>> think a branch is required ? >> >> Because you're splitting commits up that should otherwise not be split >> up. There's no reason to commit empty directories before a 'svn mv' into >> them. > > OK, I see. Do you want me to revert the "svn add" and put it altogether > in a single commit, or is not not that big deal if I keep the next > linuxkpi file moving as a single commit? No, it's fine. I just didn't want to see subsequent partial commits that broke the tree. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
svn commit: r289705 - head/share/mk
Author: bdrewery Date: Wed Oct 21 16:24:44 2015 New Revision: 289705 URL: https://svnweb.freebsd.org/changeset/base/289705 Log: Remove indirection of _sub target for using _SUBDIR. This reverts r266473 as the need for it, working around .MAKE and '+' issues, is no longer needed after r289460. This avoids extra log output in -j builds of '-- _sub.TARGET --' that are redundant with the '-- TARGET --' and '-- TARGET_subdir_DIR --' entries already showing. r266473 also made a subtle change in the ordering of _SUBDIR handling. Before the change, SUBDIRS were recursed into after building the TARGET due to the .USE of _SUBDIR *appending* the commands onto the TARGET. After the change though the indirection caused TARGET to depend on _sub.TARGET which had the _SUBDIR handling in it. This TARGET would run after recursing. However, the SUBDIR_PARALLEL handling from r263778 has this ordering as well. Since this has so far not been a problem, for now make this behavior for non-SUBDIR_PARALLEL use of _SUBDIR explicit by using .USEBEFORE. Further research may change this back to .USE as well as the SUBDIR_PARALLEL handling and bsd.progs.mk recursing. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.subdir.mk Modified: head/share/mk/bsd.subdir.mk == --- head/share/mk/bsd.subdir.mk Wed Oct 21 15:41:16 2015(r289704) +++ head/share/mk/bsd.subdir.mk Wed Oct 21 16:24:44 2015(r289705) @@ -72,9 +72,9 @@ _SUBDIR_SH= \ cd ${.CURDIR}/$${dir}; \ ${MAKE} $${target} DIRPRFX=${DIRPRFX}$${dir}/ -_SUBDIR: .USE .MAKE +_SUBDIR: .USEBEFORE .if defined(SUBDIR) && !empty(SUBDIR) && !defined(NO_SUBDIR) - @${_+_}target=${.TARGET:S,realinstall,install,:S,^_sub.,,}; \ + @${_+_}target=${.TARGET:S,realinstall,install,}; \ for dir in ${SUBDIR:N.WAIT}; do ${_SUBDIR_SH}; done .endif @@ -107,8 +107,7 @@ ${__target}_subdir_${__dir}: .PHONY .MAK .endfor ${__target}: ${__subdir_targets} .else -${__target}: _sub.${__target} -_sub.${__target}: _SUBDIR +${__target}: _SUBDIR .endif .endfor @@ -119,8 +118,7 @@ _sub.${__target}: _SUBDIR .for __stage in build install ${__stage}${__target}: .if make(${__stage}${__target}) -${__stage}${__target}: _sub.${__stage}${__target} -_sub.${__stage}${__target}: _SUBDIR +${__stage}${__target}: _SUBDIR .endif .endfor .if !target(${__target}) ___ 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: r289706 - head/sys/sys
Author: ed Date: Wed Oct 21 16:32:01 2015 New Revision: 289706 URL: https://svnweb.freebsd.org/changeset/base/289706 Log: Add missing forward declaration of struct image_params. Modified: head/sys/sys/imgact_elf.h Modified: head/sys/sys/imgact_elf.h == --- head/sys/sys/imgact_elf.h Wed Oct 21 16:24:44 2015(r289705) +++ head/sys/sys/imgact_elf.h Wed Oct 21 16:32:01 2015(r289706) @@ -37,6 +37,7 @@ #defineAUXARGS_ENTRY(pos, id, val) {suword(pos++, id); suword(pos++, val);} +struct image_params; struct thread; /* ___ 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: r289707 - head/sys/dev/ata/chipsets
Author: mav Date: Wed Oct 21 17:27:43 2015 New Revision: 289707 URL: https://svnweb.freebsd.org/changeset/base/289707 Log: Pass proper device to pci_read_config(). For some reason JMicron driver was different from others at this point. Modified: head/sys/dev/ata/chipsets/ata-jmicron.c Modified: head/sys/dev/ata/chipsets/ata-jmicron.c == --- head/sys/dev/ata/chipsets/ata-jmicron.c Wed Oct 21 16:32:01 2015 (r289706) +++ head/sys/dev/ata/chipsets/ata-jmicron.c Wed Oct 21 17:27:43 2015 (r289707) @@ -142,12 +142,13 @@ ata_jmicron_ch_attach(device_t dev) static int ata_jmicron_setmode(device_t dev, int target, int mode) { - struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); + device_t parent = device_get_parent(dev); + struct ata_pci_controller *ctlr = device_get_softc(parent); mode = min(mode, ctlr->chip->max_dma); /* check for 80pin cable present */ if (ata_dma_check_80pin && mode > ATA_UDMA2 && - pci_read_config(dev, 0x40, 1) & 0x08) { + pci_read_config(parent, 0x40, 1) & 0x08) { ata_print_cable(dev, "controller"); mode = ATA_UDMA2; } ___ 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: r289708 - head/sys/mips/mips
Author: ian Date: Wed Oct 21 17:41:20 2015 New Revision: 289708 URL: https://svnweb.freebsd.org/changeset/base/289708 Log: Free memory back into the categories it was allocated from. Noticed by: sbruno Pointy hat: ian Modified: head/sys/mips/mips/busdma_machdep.c Modified: head/sys/mips/mips/busdma_machdep.c == --- head/sys/mips/mips/busdma_machdep.c Wed Oct 21 17:27:43 2015 (r289707) +++ head/sys/mips/mips/busdma_machdep.c Wed Oct 21 17:41:20 2015 (r289708) @@ -340,14 +340,15 @@ _busdma_alloc_dmamap(bus_dma_tag_t dmat) if (map != NULL) map->slist = slist; else - free(slist, M_DEVBUF); + free(slist, M_BUSDMA); return (map); } static __inline void _busdma_free_dmamap(bus_dmamap_t map) { - free(map->slist, M_DEVBUF); + + free(map->slist, M_BUSDMA); uma_zfree(dmamap_zone, map); } @@ -439,7 +440,7 @@ bus_dma_tag_create(bus_dma_tag_t parent, /* Must bounce */ if ((error = alloc_bounce_zone(newtag)) != 0) { - free(newtag, M_DEVBUF); + free(newtag, M_BUSDMA); return (error); } bz = newtag->bounce_zone; @@ -458,7 +459,7 @@ bus_dma_tag_create(bus_dma_tag_t parent, } else newtag->bounce_zone = NULL; if (error != 0) - free(newtag, M_DEVBUF); + free(newtag, M_BUSDMA); else *dmat = newtag; CTR4(KTR_BUSDMA, "%s returned tag %p tag flags 0x%x error %d", @@ -485,8 +486,8 @@ bus_dma_tag_destroy(bus_dma_tag_t dmat) atomic_subtract_int(&dmat->ref_count, 1); if (dmat->ref_count == 0) { if (dmat->segments != NULL) - free(dmat->segments, M_DEVBUF); - free(dmat, M_DEVBUF); + free(dmat->segments, M_BUSDMA); + free(dmat, M_BUSDMA); /* * Last reference count, so * release our reference @@ -724,7 +725,7 @@ bus_dmamem_free(bus_dma_tag_t dmat, void else ba = standard_allocator; - free(map->slist, M_DEVBUF); + free(map->slist, M_BUSDMA); uma_zfree(dmamap_zone, map); bufzone = busdma_bufalloc_findzone(ba, dmat->maxsize); @@ -1348,7 +1349,7 @@ alloc_bounce_pages(bus_dma_tag_t dmat, u PAGE_SIZE, 0); if (bpage->vaddr == 0) { - free(bpage, M_DEVBUF); + free(bpage, M_BUSDMA); break; } bpage->busaddr = pmap_kextract(bpage->vaddr); ___ 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: r289710 - in head/sys/modules: i2c/iicbb uart
Author: emaste Date: Wed Oct 21 18:30:42 2015 New Revision: 289710 URL: https://svnweb.freebsd.org/changeset/base/289710 Log: Build ofw_bus_if.h for modules that need it on arm64 Modified: head/sys/modules/i2c/iicbb/Makefile head/sys/modules/uart/Makefile Modified: head/sys/modules/i2c/iicbb/Makefile == --- head/sys/modules/i2c/iicbb/Makefile Wed Oct 21 17:49:54 2015 (r289709) +++ head/sys/modules/i2c/iicbb/Makefile Wed Oct 21 18:30:42 2015 (r289710) @@ -1,7 +1,8 @@ # $FreeBSD$ .PATH: ${.CURDIR}/../../../dev/iicbus -.if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "powerpc" +.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" || \ +${MACHINE_CPUARCH} == "powerpc" ofw_bus_if=ofw_bus_if.h .endif KMOD = iicbb Modified: head/sys/modules/uart/Makefile == --- head/sys/modules/uart/Makefile Wed Oct 21 17:49:54 2015 (r289709) +++ head/sys/modules/uart/Makefile Wed Oct 21 18:30:42 2015 (r289710) @@ -10,8 +10,8 @@ uart_bus_ebus=uart_bus_ebus.c uart_dev_lpc= uart_dev_lpc.c .endif -.if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "sparc64" || \ -${MACHINE_CPUARCH} == "powerpc" +.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" || \ +${MACHINE_CPUARCH} == "sparc64" || ${MACHINE_CPUARCH} == "powerpc" ofw_bus_if=ofw_bus_if.h .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: r289712 - head
Author: bdrewery Date: Wed Oct 21 18:58:46 2015 New Revision: 289712 URL: https://svnweb.freebsd.org/changeset/base/289712 Log: Fix my change in r289435 causing 'etc' to be added to SUBDIR when using SUBDIR_OVERRIDE. MFC after:2 weeks X-MFC-With: r289435 Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Wed Oct 21 18:52:38 2015(r289711) +++ head/Makefile.inc1 Wed Oct 21 18:58:46 2015(r289712) @@ -113,7 +113,6 @@ SUBDIR+=${_DIR} .warning ${_DIR} not added to SUBDIR list. See UPDATING 20141121. .endif .endfor -.endif # We must do etc/ last as it hooks into building the man whatis file # by calling 'makedb' in share/man. This is only relevant for @@ -124,6 +123,8 @@ SUBDIR+=.WAIT .endif SUBDIR+=etc +.endif # defined(SUBDIR_OVERRIDE) + .if defined(NOCLEAN) NO_CLEAN= ${NOCLEAN} .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: r289714 - head/sys/arm64/conf
Author: emaste Date: Wed Oct 21 19:08:16 2015 New Revision: 289714 URL: https://svnweb.freebsd.org/changeset/base/289714 Log: arm64: Enable CTF for DTrace support Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/conf/GENERIC Modified: head/sys/arm64/conf/GENERIC == --- head/sys/arm64/conf/GENERIC Wed Oct 21 19:06:51 2015(r289713) +++ head/sys/arm64/conf/GENERIC Wed Oct 21 19:08:16 2015(r289714) @@ -22,6 +22,7 @@ cpu ARM64 ident GENERIC makeoptionsDEBUG=-g# Build kernel with gdb(1) debug symbols +makeoptionsWITH_CTF=1 # Run ctfconvert(1) for DTrace support optionsSCHED_ULE # ULE scheduler optionsPREEMPTION # Enable kernel thread preemption ___ 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: r289710 - in head/sys/modules: i2c/iicbb uart
On 21 October 2015 at 14:30, Ed Maste wrote: > Author: emaste > Date: Wed Oct 21 18:30:42 2015 > New Revision: 289710 > URL: https://svnweb.freebsd.org/changeset/base/289710 > > Log: > Build ofw_bus_if.h for modules that need it on arm64 Module Makefile build rules for ofw_bus_if.h are a bit of a mess; some modules build it unconditionally while others build it only on certain archs. There are a large number of different combinations of sparc64, mips, powerpc, arm, and aarch64. This is true for a number of other arch-specific module Makefile support. Should we have MK_* knobs to control these cases -- e.g. MK_OFW (MK_FDT?) here? That would at least move the arch-specific tests to a common location. ___ 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: r289716 - head/sys/mips/mips
Author: ian Date: Wed Oct 21 19:24:20 2015 New Revision: 289716 URL: https://svnweb.freebsd.org/changeset/base/289716 Log: Treat mbufs as cacheline-aligned. Even when the transfer begins at an offset within the buffer to align the L3 headers we know the buffer itself was allocated and sized on cacheline boundaries and we don't need to preserve partitial cachelines at the start and end of the buffer when doing busdma sync operations. Modified: head/sys/mips/mips/busdma_machdep.c Modified: head/sys/mips/mips/busdma_machdep.c == --- head/sys/mips/mips/busdma_machdep.c Wed Oct 21 19:16:13 2015 (r289715) +++ head/sys/mips/mips/busdma_machdep.c Wed Oct 21 19:24:20 2015 (r289716) @@ -951,6 +951,8 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm if (segs == NULL) segs = dmat->segments; + if ((flags & BUS_DMA_LOAD_MBUF) != 0) + map->flags |= DMAMAP_CACHE_ALIGNED; if ((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0) { _bus_dmamap_count_pages(dmat, map, pmap, buf, buflen, flags); @@ -1071,10 +1073,16 @@ bus_dmamap_sync_buf(vm_offset_t buf, int * prevent a data loss we save these chunks in temporary buffer * before invalidation and restore them afer it. * -* If the aligned flag is set the buffer came from our allocator caches -* which are always sized and aligned to cacheline boundaries, so we can -* skip preserving nearby data if a transfer is unaligned (especially -* it's likely to not end on a boundary). +* If the aligned flag is set the buffer is either an mbuf or came from +* our allocator caches. In both cases they are always sized and +* aligned to cacheline boundaries, so we can skip preserving nearby +* data if a transfer appears to overlap cachelines. An mbuf in +* particular will usually appear to be overlapped because of offsetting +* within the buffer to align the L3 headers, but we know that the bytes +* preceeding that offset are part of the same mbuf memory and are not +* unrelated adjacent data (and a rule of mbuf handling is that the cpu +* is not allowed to touch the mbuf while dma is in progress, including +* header fields). */ if (aligned) { size_cl = 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: r289717 - head/sys/arm64/arm64
Author: jah Date: Wed Oct 21 19:44:20 2015 New Revision: 289717 URL: https://svnweb.freebsd.org/changeset/base/289717 Log: Use pmap_quick* functions in arm64 busdma to make bounce buffer synchronization more flexible and avoid borrowing UVAs for userspace buffers. This is mostly equivalent to r286785 and r286787 for x86. Differential Revision:https://reviews.freebsd.org/D3870 Modified: head/sys/arm64/arm64/busdma_bounce.c Modified: head/sys/arm64/arm64/busdma_bounce.c == --- head/sys/arm64/arm64/busdma_bounce.cWed Oct 21 19:24:20 2015 (r289716) +++ head/sys/arm64/arm64/busdma_bounce.cWed Oct 21 19:44:20 2015 (r289717) @@ -78,7 +78,8 @@ struct bounce_page { vm_offset_t vaddr; /* kva of bounce buffer */ bus_addr_t busaddr;/* Physical address */ vm_offset_t datavaddr; /* kva of client data */ - bus_addr_t dataaddr; /* client physical address */ + vm_page_t datapage; /* physical page of client data */ + vm_offset_t dataoffs; /* page offset of client data */ bus_size_t datacount; /* client data count */ STAILQ_ENTRY(bounce_page) links; }; @@ -478,7 +479,8 @@ _bus_dmamap_count_phys(bus_dma_tag_t dma while (buflen != 0) { sgsize = MIN(buflen, dmat->common.maxsegsz); if (bus_dma_run_filter(&dmat->common, curaddr)) { - sgsize = MIN(sgsize, PAGE_SIZE); + sgsize = MIN(sgsize, + PAGE_SIZE - (curaddr & PAGE_MASK)); map->pagesneeded++; } curaddr += sgsize; @@ -632,7 +634,7 @@ bounce_bus_dmamap_load_phys(bus_dma_tag_ if (((dmat->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0) && map->pagesneeded != 0 && bus_dma_run_filter(&dmat->common, curaddr)) { - sgsize = MIN(sgsize, PAGE_SIZE); + sgsize = MIN(sgsize, PAGE_SIZE - (curaddr & PAGE_MASK)); curaddr = add_bounce_page(dmat, map, 0, curaddr, sgsize); } @@ -661,7 +663,7 @@ bounce_bus_dmamap_load_buffer(bus_dma_ta { bus_size_t sgsize, max_sgsize; bus_addr_t curaddr; - vm_offset_t vaddr; + vm_offset_t kvaddr, vaddr; int error; if (map == NULL) @@ -684,22 +686,25 @@ bounce_bus_dmamap_load_buffer(bus_dma_ta /* * Get the physical address for this segment. */ - if (pmap == kernel_pmap) + if (pmap == kernel_pmap) { curaddr = pmap_kextract(vaddr); - else + kvaddr = vaddr; + } else { curaddr = pmap_extract(pmap, vaddr); + kvaddr = 0; + } /* * Compute the segment size, and adjust counts. */ max_sgsize = MIN(buflen, dmat->common.maxsegsz); - sgsize = PAGE_SIZE - ((vm_offset_t)curaddr & PAGE_MASK); + sgsize = PAGE_SIZE - (curaddr & PAGE_MASK); if (((dmat->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0) && map->pagesneeded != 0 && bus_dma_run_filter(&dmat->common, curaddr)) { sgsize = roundup2(sgsize, dmat->common.alignment); sgsize = MIN(sgsize, max_sgsize); - curaddr = add_bounce_page(dmat, map, vaddr, curaddr, + curaddr = add_bounce_page(dmat, map, kvaddr, curaddr, sgsize); } else { sgsize = MIN(sgsize, max_sgsize); @@ -760,6 +765,10 @@ bounce_bus_dmamap_sync(bus_dma_tag_t dma bus_dmasync_op_t op) { struct bounce_page *bpage; + vm_offset_t datavaddr, tempvaddr; + + if ((bpage = STAILQ_FIRST(&map->bpages)) == NULL) + return; /* * XXX ARM64TODO: @@ -768,47 +777,47 @@ bounce_bus_dmamap_sync(bus_dma_tag_t dma * added to this function. */ - if ((bpage = STAILQ_FIRST(&map->bpages)) != NULL) { - /* -* Handle data bouncing. We might also -* want to add support for invalidating -* the caches on broken hardware -*/ - CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x op 0x%x " - "performing bounce", __func__, dmat, - dmat->common.flags, op); - - if ((op & BUS_DMASYNC_PREWRITE) != 0) { - while (bpage != NULL) { - if
svn commit: r289718 - head/sys/net
Author: emaste Date: Wed Oct 21 19:56:16 2015 New Revision: 289718 URL: https://svnweb.freebsd.org/changeset/base/289718 Log: if_tap: correct typo in sysctl description (Enably) Sponsored by: The FreeBSD Foundation Modified: head/sys/net/if_tap.c Modified: head/sys/net/if_tap.c == --- head/sys/net/if_tap.c Wed Oct 21 19:44:20 2015(r289717) +++ head/sys/net/if_tap.c Wed Oct 21 19:56:16 2015(r289718) @@ -171,7 +171,7 @@ SYSCTL_INT(_net_link_tap, OID_AUTO, user SYSCTL_INT(_net_link_tap, OID_AUTO, up_on_open, CTLFLAG_RW, &tapuponopen, 0, "Bring interface up when /dev/tap is opened"); SYSCTL_INT(_net_link_tap, OID_AUTO, devfs_cloning, CTLFLAG_RWTUN, &tapdclone, 0, - "Enably legacy devfs interface creation"); + "Enable legacy devfs interface creation"); SYSCTL_INT(_net_link_tap, OID_AUTO, debug, CTLFLAG_RW, &tapdebug, 0, ""); DEV_MODULE(if_tap, tapmodevent, 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: r289719 - head/sys/dev/drm2/i915
Author: jhb Date: Wed Oct 21 20:49:45 2015 New Revision: 289719 URL: https://svnweb.freebsd.org/changeset/base/289719 Log: i915_gem_do_execbuffer() holds the pages backing each relocation region for various reasons while executing user commands. After these commands are completed, the pages backing the relocation regions are unheld. Since relocation regions do not have to be page aligned, the code in validate_exec_list() allocates 2 extra page pointers in the array of held pages populated by vm_fault_quick_hold_pages(). However, the cleanup code that unheld the pages always assumed that only the buffer size / PAGE_SIZE pages were used. This meant that non-page aligned buffers would not unheld the last 1 or 2 pages in the list. Fix this by saving the number of held pages returned by vm_fault_quick_hold_pages() for each relocation region and using this count during cleanup. Reviewed by: dumbbell, kib MFC after:1 week Differential Revision:https://reviews.freebsd.org/D3965 Modified: head/sys/dev/drm2/i915/i915_gem_execbuffer.c Modified: head/sys/dev/drm2/i915/i915_gem_execbuffer.c == --- head/sys/dev/drm2/i915/i915_gem_execbuffer.cWed Oct 21 19:56:16 2015(r289718) +++ head/sys/dev/drm2/i915/i915_gem_execbuffer.cWed Oct 21 20:49:45 2015(r289719) @@ -941,13 +941,15 @@ i915_gem_check_execbuffer(struct drm_i91 static int validate_exec_list(struct drm_i915_gem_exec_object2 *exec, int count, -vm_page_t ***map) +vm_page_t ***map, int **maplen) { vm_page_t *ma; int i, length, page_count; /* XXXKIB various limits checking is missing there */ *map = malloc(count * sizeof(*ma), DRM_I915_GEM, M_WAITOK | M_ZERO); + *maplen = malloc(count * sizeof(*maplen), DRM_I915_GEM, M_WAITOK | + M_ZERO); for (i = 0; i < count; i++) { /* First check for malicious input causing overflow */ if (exec[i].relocation_count > @@ -969,9 +971,10 @@ validate_exec_list(struct drm_i915_gem_e page_count = howmany(length, PAGE_SIZE) + 2; ma = (*map)[i] = malloc(page_count * sizeof(vm_page_t), DRM_I915_GEM, M_WAITOK | M_ZERO); - if (vm_fault_quick_hold_pages(&curproc->p_vmspace->vm_map, - exec[i].relocs_ptr, length, VM_PROT_READ | VM_PROT_WRITE, - ma, page_count) == -1) { + (*maplen)[i] = vm_fault_quick_hold_pages( + &curproc->p_vmspace->vm_map, exec[i].relocs_ptr, length, + VM_PROT_READ | VM_PROT_WRITE, ma, page_count); + if ((*maplen)[i] == -1) { free(ma, DRM_I915_GEM); (*map)[i] = NULL; return (-EFAULT); @@ -1123,6 +1126,7 @@ i915_gem_do_execbuffer(struct drm_device struct drm_clip_rect *cliprects = NULL; struct intel_ring_buffer *ring; vm_page_t **relocs_ma; + int *relocs_len; u32 ctx_id = i915_execbuffer2_get_context_id(*args); u32 exec_start, exec_len; u32 seqno; @@ -1137,7 +1141,8 @@ i915_gem_do_execbuffer(struct drm_device if (args->batch_len == 0) return (0); - ret = validate_exec_list(exec, args->buffer_count, &relocs_ma); + ret = validate_exec_list(exec, args->buffer_count, &relocs_ma, + &relocs_len); if (ret != 0) goto pre_struct_lock_err; @@ -1411,13 +1416,11 @@ err: pre_struct_lock_err: for (i = 0; i < args->buffer_count; i++) { if (relocs_ma[i] != NULL) { - vm_page_unhold_pages(relocs_ma[i], howmany( - exec[i].relocation_count * - sizeof(struct drm_i915_gem_relocation_entry), - PAGE_SIZE)); + vm_page_unhold_pages(relocs_ma[i], relocs_len[i]); free(relocs_ma[i], DRM_I915_GEM); } } + free(relocs_len, DRM_I915_GEM); free(relocs_ma, DRM_I915_GEM); free(cliprects, DRM_I915_GEM); return ret; ___ 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: r289719 - head/sys/dev/drm2/i915
On Wednesday, October 21, 2015 08:49:46 PM John Baldwin wrote: > Author: jhb > Date: Wed Oct 21 20:49:45 2015 > New Revision: 289719 > URL: https://svnweb.freebsd.org/changeset/base/289719 > > Log: > i915_gem_do_execbuffer() holds the pages backing each relocation region for > various reasons while executing user commands. After these commands are > completed, the pages backing the relocation regions are unheld. > > Since relocation regions do not have to be page aligned, the code in > validate_exec_list() allocates 2 extra page pointers in the array of > held pages populated by vm_fault_quick_hold_pages(). However, the cleanup > code that unheld the pages always assumed that only the buffer size / > PAGE_SIZE pages were used. This meant that non-page aligned buffers would > not unheld the last 1 or 2 pages in the list. Fix this by saving the > number of held pages returned by vm_fault_quick_hold_pages() for each > relocation region and using this count during cleanup. > > Reviewed by:dumbbell, kib > MFC after: 1 week > Differential Revision: https://reviews.freebsd.org/D3965 I have been getting panics on my x220 due to vm_page_unhold() finding a reference count on a page of 0 every 2-3 days for the past month or so. When I examined the dumps I would find other pages backing the relocation regions that had insanely high hold counts (like 30 to 60 thousand). Given that hold_count is a unsigned short I figured it was overflowing. The first attempt to fix this was the changes in r288452. However, even with that in place I was still seeing the same panics. I've only run this for a day, but it "looks" correct. If you have been getting vm_page_unhold panics with i915kms loaded this is worth trying. I'm not sure why my x220 was so prone to this when other people have been able to run X with i915kms without any problems. I do have CPUTYPE set to enable AVX, but I don't know that that would suddenly make lots of buffers non-page aligned that would be page-aligned otherwise. -- John Baldwin ___ 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: r289724 - head/share/misc
Author: avos Date: Wed Oct 21 22:31:17 2015 New Revision: 289724 URL: https://svnweb.freebsd.org/changeset/base/289724 Log: Add myself (avos) to committers-src.dot Approved by: adrian (mentor) Differential Revision:https://reviews.freebsd.org/D3941 Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot == --- head/share/misc/committers-src.dot Wed Oct 21 22:23:37 2015 (r289723) +++ head/share/misc/committers-src.dot Wed Oct 21 22:31:17 2015 (r289724) @@ -119,6 +119,7 @@ art [label="Artem Belevich\nart@FreeBSD. arybchik [label="Andrew Rybchenko\narybc...@freebsd.org\n2014/10/12"] asomers [label="Alan Somers\nasom...@freebsd.org\n2013/04/24"] avg [label="Andriy Gapon\n...@freebsd.org\n2009/02/18"] +avos [label="Andriy Voskoboinyk\na...@freebsd.org\n2015/09/24"] bapt [label="Baptiste Daroussin\nb...@freebsd.org\n2011/12/23"] bdrewery [label="Bryan Drewery\nbdrew...@freebsd.org\n2013/12/14"] benl [label="Ben Laurie\nb...@freebsd.org\n2011/05/18"] @@ -332,6 +333,7 @@ day1 -> rgrimes day1 -> alm day1 -> dg +adrian -> avos adrian -> loos adrian -> monthadar adrian -> ray ___ 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: r289725 - in head: . share/man/man7
Author: bdrewery Date: Thu Oct 22 00:07:48 2015 New Revision: 289725 URL: https://svnweb.freebsd.org/changeset/base/289725 Log: Let SUBDIR_OVERRIDE with 'make buildworld' be more useful. Now it can be used to effectively "build in a subdir". It will use the 'cross-tools', 'libraries', and 'includes' phases of 'buildworld' to properly setup a WORLDTMP to use. Then it will build 'everything' only in the listed SUBDIR_OVERRIDE directories. It is still required to list custom library directories in LOCAL_LIB_DIRS if SUBDIR_OVERRIDE is something that contains libraries outside of the normal area (such as SUBDIR_OVERRIDE=contrib/ofed needing LOCAL_LIB_DIRS=contrib/ofed/usr.lib) Without these changes, SUBDIR_OVERRIDE with buildworld was broken or hit obscure failures due to missing libraries, includes, or cross compiler. SUBDIR_OVERRIDE with 'make ' will continue to work as it did before although its usefulness is questionable. With a fully populated WORLDTMP, building with a SUBDIR_OVERRIDE with -DNO_CLEAN only takes a few minutes to start building the target directories. This is still much better than building unneeded things via 'everything' when testing small subset changes. A BUILDFAST or SKIPWORLDTMP might make sense for this as well. - Add in '_worldtmp' as we still need to create WORLDTMP as later targets, such as '_libraries' and '_includes' use it. This probably was avoiding calling '_worldtmp' to not remove WORLDTMP for debugging purposes, but -DNO_CLEAN can be used for that. - '_legacy' must be included since '_build-tools' uses -legacy. The SUBDIR_OVERRIDE change came in r95509, while -legacy being part of build-tools came in r113136. - 'bootstrap-tools' is still skipped as this feature is not for upgrades. - Fix buildworld combined with SUBDIR_OVERRIDE not installing all includes. The original change for SUBDIR_OVERRIDE in r95509 kept '_includes' and '_libraries' as building everything possible as the SUBDIR_OVERRIDE could need anything from them. However in r96462 the real 'includes' target was changed from manual sub-makes to just recursing 'includes' on SUBDIR, thus not all includes have been installed into WORLDTMP since then when combined with 'buildworld'. This is not done unless calling 'make buildworld' as it would be unexpected to have it go into all directories when doing 'make SUBDIR_OVERRIDE=mydir includes'. - Also need to build the cross-compiler so it is used with --sysroot. If this is burdensome then telling the build to use the local compiler as an external compiler (thus using a proper --sysroot to WORLDTMP) is possible by setting CC=/usr/bin/cc, CXX=/usr/bin/c++, etc. - Don't build the lib32 distribution with SUBDIR_OVERRIDE in buildworld since it won't contain anything related to SUBDIR_OVERRIDE. Testing of the lib32 build can be done with 'make build32'. - Document these changes in build.7 Sponsored by: EMC / Isilon Storage Division MFC after:2 weeks Modified: head/Makefile.inc1 head/share/man/man7/build.7 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Wed Oct 21 22:31:17 2015(r289724) +++ head/Makefile.inc1 Thu Oct 22 00:07:48 2015(r289725) @@ -30,6 +30,8 @@ # BUILDENV_SHELL= shell to launch for the buildenv target (def:/bin/sh) # WORLD_FLAGS= additional flags to pass to make(1) during buildworld # KERNEL_FLAGS= additional flags to pass to make(1) during buildkernel +# SUBDIR_OVERRIDE="list of dirs" to build rather than everything. +# All libraries and includes, and some build tools will still build. # # The intended user-driven targets are: @@ -59,7 +61,7 @@ # system here would require fine-grained ordering of all components based # on their dependencies. SRCDIR?= ${.CURDIR} -.if defined(SUBDIR_OVERRIDE) +.if !empty(SUBDIR_OVERRIDE) SUBDIR=${SUBDIR_OVERRIDE} .else SUBDIR=lib libexec @@ -123,7 +125,7 @@ SUBDIR+=.WAIT .endif SUBDIR+=etc -.endif # defined(SUBDIR_OVERRIDE) +.endif # !empty(SUBDIR_OVERRIDE) .if defined(NOCLEAN) NO_CLEAN= ${NOCLEAN} @@ -631,8 +633,16 @@ _includes: @echo "--" @echo ">>> stage 4.1: building includes" @echo "--" +# Special handling for SUBDIR_OVERRIDE in buildworld as they most likely need +# headers from default SUBDIR. Do SUBDIR_OVERRIDE includes last. + ${_+_}cd ${.CURDIR}; ${WMAKE} SUBDIR_OVERRIDE= SHARED=symlinks \ + buildincludes + ${_+_}cd ${.CURDIR}; ${WMAKE} SUBDIR_OVERRIDE= SHARED=symlinks \ + installincludes +.if !empty(SUBDIR_OVERRIDE) && make(buildworld) ${_+_}cd ${.CURDIR}; ${WMAKE} SHARED=s
Re: svn commit: r289725 - in head: . share/man/man7
On 10/21/2015 5:07 PM, Bryan Drewery wrote: > Author: bdrewery > Date: Thu Oct 22 00:07:48 2015 > New Revision: 289725 > URL: https://svnweb.freebsd.org/changeset/base/289725 > > Log: > Let SUBDIR_OVERRIDE with 'make buildworld' be more useful. > The main point is that it used to require a full buildworld first but now can work without doing that. > With a fully populated WORLDTMP, building with a SUBDIR_OVERRIDE with > -DNO_CLEAN only takes a few minutes to start building the target > directories. This is still much better than building unneeded things via > 'everything' when testing small subset changes. A BUILDFAST or > SKIPWORLDTMP might make sense for this as well. I do think it would be a good idea to have a BUILDFAST type thing here. I've had the same suggestion come across IRC just now. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
svn commit: r289726 - head/sys/dev/iicbus
Author: ian Date: Thu Oct 22 00:54:59 2015 New Revision: 289726 URL: https://svnweb.freebsd.org/changeset/base/289726 Log: Add iicbus_transfer_excl(), a helper routine to do an i2c bus transaction while holding exclusive ownership of the bus. This is the routine most slave drivers should use unless they have a need to acquire and hold the bus across a series of related operations that involves multiple transfers. Modified: head/sys/dev/iicbus/iiconf.c head/sys/dev/iicbus/iiconf.h Modified: head/sys/dev/iicbus/iiconf.c == --- head/sys/dev/iicbus/iiconf.cThu Oct 22 00:07:48 2015 (r289725) +++ head/sys/dev/iicbus/iiconf.cThu Oct 22 00:54:59 2015 (r289726) @@ -395,6 +395,21 @@ iicbus_transfer(device_t bus, struct iic return (IICBUS_TRANSFER(device_get_parent(bus), msgs, nmsgs)); } +int +iicbus_transfer_excl(device_t dev, struct iic_msg *msgs, uint32_t nmsgs, +int how) +{ + device_t bus; + int error; + + bus = device_get_parent(dev); + error = iicbus_request_bus(bus, dev, how); + if (error == 0) + error = IICBUS_TRANSFER(bus, msgs, nmsgs); + iicbus_release_bus(bus, dev); + return (error); +} + /* * Generic version of iicbus_transfer that calls the appropriate * routines to accomplish this. See note above about acceptable Modified: head/sys/dev/iicbus/iiconf.h == --- head/sys/dev/iicbus/iiconf.hThu Oct 22 00:07:48 2015 (r289725) +++ head/sys/dev/iicbus/iiconf.hThu Oct 22 00:54:59 2015 (r289726) @@ -129,6 +129,8 @@ extern int iicbus_block_read(device_t, u /* vectors of iic operations to pass to bridge */ int iicbus_transfer(device_t bus, struct iic_msg *msgs, uint32_t nmsgs); +int iicbus_transfer_excl(device_t bus, struct iic_msg *msgs, uint32_t nmsgs, +int how); int iicbus_transfer_gen(device_t bus, struct iic_msg *msgs, uint32_t nmsgs); #define IICBUS_MODVER 1 ___ 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: r289727 - head/sys/dev/iicbus
Author: ian Date: Thu Oct 22 01:04:31 2015 New Revision: 289727 URL: https://svnweb.freebsd.org/changeset/base/289727 Log: Add FDT compatibility to the icee driver. The FDT bindings for eeprom parts don't include any metadata about the device other than the part name encoded in the compatible property. Instead, a driver is required to have a compiled-in table of information about the various parts (page size, device capacity, addressing scheme). So much for FDT being an abstract description of hardware characteristics, huh? In addition to the FDT-specific changes, this also switches to using the newer iicbus_transfer_excl() mechanism which holds bus ownership for the duration of the transfer. Previously this code held the bus across all the transfers needed to complete the user's IO request, which could be up to 128KB of data which might occupy the bus for 10-20 seconds. Now the bus will be released and re-aquired between every page-sized (8-256 byte) transfer, making this driver a much nicer citizen on the i2c bus. The hint-based configuration mechanism is still in place for non-FDT systems. Michal Meloun contributed some of the code for these changes. Modified: head/sys/dev/iicbus/icee.c Modified: head/sys/dev/iicbus/icee.c == --- head/sys/dev/iicbus/icee.c Thu Oct 22 00:54:59 2015(r289726) +++ head/sys/dev/iicbus/icee.c Thu Oct 22 01:04:31 2015(r289727) @@ -27,6 +27,9 @@ __FBSDID("$FreeBSD$"); /* * Generic IIC eeprom support, modeled after the AT24C family of products. */ + +#include "opt_platform.h" + #include #include #include @@ -37,26 +40,73 @@ __FBSDID("$FreeBSD$"); #include #include #include + +#ifdef FDT +#include +#include +#endif + #include #include #include "iicbus_if.h" -#defineIIC_M_WR0 /* write operation */ +/* + * AT24 parts have a "write page size" that differs per-device, and a "read page + * size" that is always equal to the full device size. We define maximum values + * here to limit how long we occupy the bus with a single transfer, and because + * there are temporary buffers of these sizes allocated on the stack. + */ #defineMAX_RD_SZ 256 /* Largest read size we support */ -#define MAX_WR_SZ 256 /* Largest write size we support */ +#defineMAX_WR_SZ 256 /* Largest write size we support */ struct icee_softc { - device_tsc_dev; /* Myself */ - device_tsc_busdev; /* Parent bus */ + device_tdev;/* Myself */ struct cdev *cdev; /* user interface */ - int addr; + int addr; /* Slave address on the bus */ int size; /* How big am I? */ - int type; /* What type 8 or 16 bit? */ - int rd_sz; /* What's the read page size */ + int type; /* What address type 8 or 16 bit? */ int wr_sz; /* What's the write page size */ }; +#ifdef FDT +struct eeprom_desc { + int type; + int size; + int wr_sz; + const char *name; +}; + +static struct eeprom_desc type_desc[] = { + { 8,128, 8, "AT24C01"}, + { 8,256, 8, "AT24C02"}, + { 8,512, 16, "AT24C04"}, + { 8, 1024, 16, "AT24C08"}, + { 8, 2 * 1024, 16, "AT24C16"}, + {16, 4 * 1024, 32, "AT24C32"}, + {16, 8 * 1024, 32, "AT24C64"}, + {16, 16 * 1024, 64, "AT24C128"}, + {16, 32 * 1024, 64, "AT24C256"}, + {16, 64 * 1024, 128, "AT24C512"}, + {16, 128 * 1024, 256, "AT24CM01"}, +}; + +static struct ofw_compat_data compat_data[] = { + {"atmel,24c01", (uintptr_t)(&type_desc[0])}, + {"atmel,24c02", (uintptr_t)(&type_desc[1])}, + {"atmel,24c04", (uintptr_t)(&type_desc[2])}, + {"atmel,24c08", (uintptr_t)(&type_desc[3])}, + {"atmel,24c16", (uintptr_t)(&type_desc[4])}, + {"atmel,24c32", (uintptr_t)(&type_desc[5])}, + {"atmel,24c64", (uintptr_t)(&type_desc[6])}, + {"atmel,24c128", (uintptr_t)(&type_desc[7])}, + {"atmel,24c256", (uintptr_t)(&type_desc[8])}, + {"atmel,24c512", (uintptr_t)(&type_desc[9])}, + {"atmel,24c1024", (uintptr_t)(&type_desc[10])}, + {NULL,(uintptr_t)NULL}, +}; +#endif + #define CDEV2SOFTC(dev)((dev)->si_drv1) /* cdev routines */ @@ -75,6 +125,39 @@ static struct cdevsw icee_cdevsw = .d_write = icee_write }; +#ifdef FDT +static int +icee_probe(device_t dev) +{ + struct eeprom_desc *d; + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + d = (struct eeprom_desc *) + ofw_bus_search_compatible(dev, compat_data)->ocd_da
svn commit: r289728 - head
Author: emaste Date: Thu Oct 22 01:32:11 2015 New Revision: 289728 URL: https://svnweb.freebsd.org/changeset/base/289728 Log: Warn that NOCLEAN is deprecated - use NO_CLEAN instead NO_CLEAN has been the correct spelling for over a decade. Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Thu Oct 22 01:04:31 2015(r289727) +++ head/Makefile.inc1 Thu Oct 22 01:32:11 2015(r289728) @@ -128,6 +128,7 @@ SUBDIR+=etc .endif # !empty(SUBDIR_OVERRIDE) .if defined(NOCLEAN) +.warning NOCLEAN option is deprecated. Use NO_CLEAN instead. NO_CLEAN= ${NOCLEAN} .endif .if defined(NO_CLEANDIR) ___ 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: r289729 - head/sys/dev/iwm
Author: kevlo Date: Thu Oct 22 01:36:16 2015 New Revision: 289729 URL: https://svnweb.freebsd.org/changeset/base/289729 Log: Fix IEEE80211_ADDR_COPY() usage. Reviewed by: adrian Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c == --- head/sys/dev/iwm/if_iwm.c Thu Oct 22 01:32:11 2015(r289728) +++ head/sys/dev/iwm/if_iwm.c Thu Oct 22 01:36:16 2015(r289729) @@ -2081,7 +2081,7 @@ iwm_run_init_mvm_ucode(struct iwm_softc device_printf(sc->sc_dev, "failed to read nvm\n"); return error; } - IEEE80211_ADDR_COPY(sc->sc_ic.ic_macaddr, &sc->sc_nvm.hw_addr); + IEEE80211_ADDR_COPY(sc->sc_ic.ic_macaddr, sc->sc_nvm.hw_addr); sc->sc_scan_cmd_len = sizeof(struct iwm_scan_cmd) + sc->sc_capa_max_probe_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"
Re: svn commit: r289728 - head
On Thu, 22 Oct 2015 01:32:11 + (UTC) Ed Maste wrote: > Author: emaste > Date: Thu Oct 22 01:32:11 2015 > New Revision: 289728 > URL: https://svnweb.freebsd.org/changeset/base/289728 > > Log: > Warn that NOCLEAN is deprecated - use NO_CLEAN instead > > NO_CLEAN has been the correct spelling for over a decade. > > Modified: > head/Makefile.inc1 > > Modified: head/Makefile.inc1 > == > --- head/Makefile.inc1Thu Oct 22 01:04:31 2015 > (r289727) +++ head/Makefile.inc1 Thu Oct 22 01:32:11 > 2015 (r289728) @@ -128,6 +128,7 @@ SUBDIR+=etc > .endif # !empty(SUBDIR_OVERRIDE) > > .if defined(NOCLEAN) > +.warning NOCLEAN option is deprecated. Use NO_CLEAN instead. > NO_CLEAN=${NOCLEAN} > .endif > .if defined(NO_CLEANDIR) For some definition of 'correct'. It definitely is not for those who have -DNOCLEAN wired into their finger memory and above mentioned decade did not help with that any. I think some of the common spellings were left as is in great NO_ revolution for a reason and I see no reason why the sudden itch to change that. -- Alexander Kabaev pgp9NKfVWunAl.pgp Description: OpenPGP digital signature
Re: svn commit: r289728 - head
On 10/21/2015 6:45 PM, Alexander Kabaev wrote: > On Thu, 22 Oct 2015 01:32:11 + (UTC) > Ed Maste wrote: > >> Author: emaste >> Date: Thu Oct 22 01:32:11 2015 >> New Revision: 289728 >> URL: https://svnweb.freebsd.org/changeset/base/289728 >> >> Log: >> Warn that NOCLEAN is deprecated - use NO_CLEAN instead >> >> NO_CLEAN has been the correct spelling for over a decade. >> >> Modified: >> head/Makefile.inc1 >> >> Modified: head/Makefile.inc1 >> == >> --- head/Makefile.inc1 Thu Oct 22 01:04:31 2015 >> (r289727) +++ head/Makefile.inc1 Thu Oct 22 01:32:11 >> 2015 (r289728) @@ -128,6 +128,7 @@ SUBDIR+=etc >> .endif # !empty(SUBDIR_OVERRIDE) >> >> .if defined(NOCLEAN) >> +.warning NOCLEAN option is deprecated. Use NO_CLEAN instead. >> NO_CLEAN= ${NOCLEAN} >> .endif >> .if defined(NO_CLEANDIR) > > > For some definition of 'correct'. It definitely is not for those who > have -DNOCLEAN wired into their finger memory and above mentioned > decade did not help with that any. > > I think some of the common spellings were left as is in great NO_ > revolution for a reason and I see no reason why the sudden itch to > change that. > I almost argued against this before it went in but I felt I had outspent my negative credits for the week on gdb->lldb and login(1) and stayed out of it. I've always been confused on the "correct" spelling and usually go open the file to see which is supported. I do see both being suggested often though and see that at work our build configuration does use -DNOCLEAN too (not my change). This is something that doesn't seem worth hassling people over. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
Re: svn commit: r289728 - head
On 22 October 2015 at 01:59, Bryan Drewery wrote: > > I've always been confused on the "correct" spelling and usually go open > the file to see which is supported. That's why I added it, to avoid developers having to go spelunking in search of the "correct" spelling. I'll track down mentions of NOCLEAN in our docs etc., and see what other reports come out as a result of this warning. If it turns out to be an annoyance I'm happy to revert and add a comment instead, but would like to leave it for a while. ___ 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: r289728 - head
On 10/21/2015 7:08 PM, Ed Maste wrote: > On 22 October 2015 at 01:59, Bryan Drewery wrote: >> >> I've always been confused on the "correct" spelling and usually go open >> the file to see which is supported. > > That's why I added it, to avoid developers having to go spelunking in > search of the "correct" spelling. I'll track down mentions of NOCLEAN > in our docs etc., and see what other reports come out as a result of > this warning. > > If it turns out to be an annoyance I'm happy to revert and add a > comment instead, but would like to leave it for a while. > Sounds reasonable. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
Re: svn commit: r289728 - head
> On Oct 21, 2015, at 7:45 PM, Alexander Kabaev wrote: > > On Thu, 22 Oct 2015 01:32:11 + (UTC) > Ed Maste wrote: > >> Author: emaste >> Date: Thu Oct 22 01:32:11 2015 >> New Revision: 289728 >> URL: https://svnweb.freebsd.org/changeset/base/289728 >> >> Log: >> Warn that NOCLEAN is deprecated - use NO_CLEAN instead >> >> NO_CLEAN has been the correct spelling for over a decade. >> >> Modified: >> head/Makefile.inc1 >> >> Modified: head/Makefile.inc1 >> == >> --- head/Makefile.inc1 Thu Oct 22 01:04:31 2015 >> (r289727) +++ head/Makefile.inc1 Thu Oct 22 01:32:11 >> 2015 (r289728) @@ -128,6 +128,7 @@ SUBDIR+=etc >> .endif # !empty(SUBDIR_OVERRIDE) >> >> .if defined(NOCLEAN) >> +.warning NOCLEAN option is deprecated. Use NO_CLEAN instead. >> NO_CLEAN=${NOCLEAN} >> .endif >> .if defined(NO_CLEANDIR) > > > For some definition of 'correct'. It definitely is not for those who > have -DNOCLEAN wired into their finger memory and above mentioned > decade did not help with that any. > > I think some of the common spellings were left as is in great NO_ > revolution for a reason and I see no reason why the sudden itch to > change that. There’s no sudden itch. We’ve been scratching at the NO_ irritants in the tree regularly for years, and more regularly in the past year. I eliminated a boatload of them 9 months ago. More will go away. Warner signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r289730 - in head: contrib/groff/tmac contrib/mdocml lib/libgpib targets/pseudo/userland/lib
Author: bdrewery Date: Thu Oct 22 03:51:25 2015 New Revision: 289730 URL: https://svnweb.freebsd.org/changeset/base/289730 Log: Remove more disconnected libgpib items missed in r276214. Sponsored by: EMC / Isilon Storage Division Deleted: head/lib/libgpib/ Modified: head/contrib/groff/tmac/doc-syms head/contrib/groff/tmac/groff_mdoc.man head/contrib/mdocml/lib.in head/targets/pseudo/userland/lib/Makefile.depend Modified: head/contrib/groff/tmac/doc-syms == --- head/contrib/groff/tmac/doc-symsThu Oct 22 01:36:16 2015 (r289729) +++ head/contrib/groff/tmac/doc-symsThu Oct 22 03:51:25 2015 (r289730) @@ -780,7 +780,6 @@ .ds doc-str-Lb-libfetchFile Transfer Library for URLs (libfetch, \-lfetch) .ds doc-str-Lb-libform Curses Form Library (libform, \-lform) .ds doc-str-Lb-libgeom Userland API Library for kernel GEOM subsystem (libgeom, \-lgeom) -.ds doc-str-Lb-libgpib General-Purpose Instrument Bus (GPIB) library (libgpib, \-lgpib) .ds doc-str-Lb-libi386 i386 Architecture Library (libi386, \-li386) .ds doc-str-Lb-libintl Internationalized Message Handling Library (libintl, \-lintl) .ds doc-str-Lb-libipsecIPsec Policy Control Library (libipsec, \-lipsec) Modified: head/contrib/groff/tmac/groff_mdoc.man == --- head/contrib/groff/tmac/groff_mdoc.man Thu Oct 22 01:36:16 2015 (r289729) +++ head/contrib/groff/tmac/groff_mdoc.man Thu Oct 22 03:51:25 2015 (r289730) @@ -1732,8 +1732,6 @@ and their results are: .Lb libform .It Li libgeom .Lb libgeom -.It Li libgpib -.Lb libgpib .It Li libi386 .Lb libi386 .It Li libintl Modified: head/contrib/mdocml/lib.in == --- head/contrib/mdocml/lib.in Thu Oct 22 01:36:16 2015(r289729) +++ head/contrib/mdocml/lib.in Thu Oct 22 03:51:25 2015(r289730) @@ -57,7 +57,6 @@ LINE("libfsid", "Filesystem Identificat LINE("libftpio", "FTP Connection Management Library (libftpio, \\-lftpio)") LINE("libform","Curses Form Library (libform, \\-lform)") LINE("libgeom","Userland API Library for Kernel GEOM subsystem (libgeom, \\-lgeom)") -LINE("libgpib","General-Purpose Instrument Bus (GPIB) library (libgpib, \\-lgpib)") LINE("libgpio","General-Purpose Input Output (GPIO) library (libgpio, \\-lgpio)") LINE("libhammer", "HAMMER Filesystem Userland Library (libhammer, \\-lhammer)") LINE("libi386","i386 Architecture Library (libi386, \\-li386)") Modified: head/targets/pseudo/userland/lib/Makefile.depend == --- head/targets/pseudo/userland/lib/Makefile.dependThu Oct 22 01:36:16 2015(r289729) +++ head/targets/pseudo/userland/lib/Makefile.dependThu Oct 22 03:51:25 2015(r289730) @@ -42,7 +42,6 @@ DIRDEPS = \ lib/libexpat \ lib/libfetch \ lib/libgeom \ - lib/libgpib \ lib/libgssapi \ lib/libiconv_modules/BIG5 \ lib/libiconv_modules/DECHanyu \ ___ 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: r289731 - head/share/mk
Author: bdrewery Date: Thu Oct 22 04:28:22 2015 New Revision: 289731 URL: https://svnweb.freebsd.org/changeset/base/289731 Log: Clean up some bsd.crunchgen.mk issues. - Remove handling of 'make -P' since that is for fmake only. - Add '+' where appropriate for sub-make calls. - Pass MK_TESTS=no to all of the sub-makes to prevent recursing into test directories for targets such as 'obj', 'clean', 'depend', etc. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.crunchgen.mk Modified: head/share/mk/bsd.crunchgen.mk == --- head/share/mk/bsd.crunchgen.mk Thu Oct 22 03:51:25 2015 (r289730) +++ head/share/mk/bsd.crunchgen.mk Thu Oct 22 04:28:22 2015 (r289731) @@ -107,26 +107,27 @@ $(CONF): Makefile .endfor CRUNCHGEN?= crunchgen -# XXX Make sure we don't pass -P to crunchgen(1). -.MAKEFLAGS:= ${.MAKEFLAGS:N-P} +CRUNCHENV?= MK_TESTS=no .ORDER: $(OUTPUTS) objs $(OUTPUTS): $(CONF) .META MAKE=${MAKE} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${CRUNCHGEN} -fq -m $(OUTMK) \ -c $(OUTC) $(CONF) +# These 2 targets cannot use .MAKE since they depend on the generated +# ${OUTMK} above. $(PROG): $(OUTPUTS) objs - MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) exe + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) exe objs: $(OUTMK) - MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) objs + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) objs # Someone should replace the bin/csh and bin/sh build-tools with # shell scripts so we can remove this nonsense. build-tools: .for _tool in $(CRUNCH_BUILDTOOLS) - cd $(.CURDIR)/../../${_tool}; \ - MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} obj; \ - MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} build-tools + ${_+_}cd $(.CURDIR)/../../${_tool}; \ + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} obj; \ + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} build-tools .endfor # Use a separate build tree to hold files compiled for this crunchgen binary @@ -137,12 +138,12 @@ cleandepend cleandir obj objlink: .for D in $(CRUNCH_SRCDIRS) .for P in $(CRUNCH_PROGS_$(D)) .ifdef CRUNCH_SRCDIR_${P} - cd ${CRUNCH_SRCDIR_$(P)} && \ - MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ + ${_+_}cd ${CRUNCH_SRCDIR_$(P)} && \ + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET} .else - cd $(.CURDIR)/../../${D}/${P} && \ - MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ + ${_+_}cd $(.CURDIR)/../../${D}/${P} && \ + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET} .endif .endfor @@ -150,18 +151,18 @@ cleandepend cleandir obj objlink: clean: rm -f ${CLEANFILES} - if [ -e ${.OBJDIR}/$(OUTMK) ]; then \ - MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) clean; \ + ${_+_}if [ -e ${.OBJDIR}/$(OUTMK) ]; then \ + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) clean; \ fi .for D in $(CRUNCH_SRCDIRS) .for P in $(CRUNCH_PROGS_$(D)) .ifdef CRUNCH_SRCDIR_${P} - cd ${CRUNCH_SRCDIR_$(P)} && \ - MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ + ${_+_}cd ${CRUNCH_SRCDIR_$(P)} && \ + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET} .else - cd $(.CURDIR)/../../${D}/${P} && \ - MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ + ${_+_}cd $(.CURDIR)/../../${D}/${P} && \ + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET} .endif .endfor ___ 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: r289732 - head/sys/dev/ioat
Author: cem Date: Thu Oct 22 04:33:05 2015 New Revision: 289732 URL: https://svnweb.freebsd.org/changeset/base/289732 Log: ioat: Define IOAT_XFERCAP_VALID_MASK and use in ioat_read_xfercap Instead of ANDing a magic constant later. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ioat/ioat.c head/sys/dev/ioat/ioat_hw.h head/sys/dev/ioat/ioat_internal.h Modified: head/sys/dev/ioat/ioat.c == --- head/sys/dev/ioat/ioat.cThu Oct 22 04:28:22 2015(r289731) +++ head/sys/dev/ioat/ioat.cThu Oct 22 04:33:05 2015(r289732) @@ -341,9 +341,6 @@ ioat3_attach(device_t device) capabilities = ioat_read_dmacapability(ioat); xfercap = ioat_read_xfercap(ioat); - - /* Only bits [4:0] are valid. */ - xfercap &= 0x1f; ioat->max_xfer_size = 1 << xfercap; /* TODO: need to check DCA here if we ever do XOR/PQ */ Modified: head/sys/dev/ioat/ioat_hw.h == --- head/sys/dev/ioat/ioat_hw.h Thu Oct 22 04:28:22 2015(r289731) +++ head/sys/dev/ioat/ioat_hw.h Thu Oct 22 04:33:05 2015(r289732) @@ -34,6 +34,8 @@ __FBSDID("$FreeBSD$"); #defineIOAT_CHANCNT_OFFSET 0x00 #defineIOAT_XFERCAP_OFFSET 0x01 +/* Only bits [4:0] are valid. */ +#defineIOAT_XFERCAP_VALID_MASK 0x1f #defineIOAT_GENCTRL_OFFSET 0x02 Modified: head/sys/dev/ioat/ioat_internal.h == --- head/sys/dev/ioat/ioat_internal.h Thu Oct 22 04:28:22 2015 (r289731) +++ head/sys/dev/ioat/ioat_internal.h Thu Oct 22 04:33:05 2015 (r289732) @@ -35,7 +35,7 @@ __FBSDID("$FreeBSD$"); ioat_read_1((ioat), IOAT_CHANCNT_OFFSET) #defineioat_read_xfercap(ioat) \ - ioat_read_1((ioat), IOAT_XFERCAP_OFFSET) + (ioat_read_1((ioat), IOAT_XFERCAP_OFFSET) & IOAT_XFERCAP_VALID_MASK) #defineioat_write_intrctrl(ioat, value) \ ioat_write_1((ioat), IOAT_INTRCTRL_OFFSET, (value)) ___ 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: r289733 - in head: sys/dev/ioat tools/tools/ioat
Author: cem Date: Thu Oct 22 04:38:05 2015 New Revision: 289733 URL: https://svnweb.freebsd.org/changeset/base/289733 Log: Improve flexibility of ioat_test / ioatcontrol(8) The test logic now preallocates memory before running the test. The buffer size is now configurable. Post-copy verification is configurable. The number of copies to chain into one transaction (one interrupt) is configurable. A 'duration' mode is added, which repeats the test until the duration has elapsed, reporting the B/s and transactions completed. ioatcontrol.8 has been updated to document the new arguments. Initial limits (on this particular Broadwell-DE) (and when the interrupts are working) seem to be: 256 interrupts/sec or ~6 GB/s, whichever limit is more restrictive. Unfortunately, it seems the interrupt-reset handling on Broadwell isn't working as intended. That will be fixed in a later commit. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ioat/ioat_test.c head/sys/dev/ioat/ioat_test.h head/tools/tools/ioat/Makefile head/tools/tools/ioat/ioatcontrol.8 head/tools/tools/ioat/ioatcontrol.c Modified: head/sys/dev/ioat/ioat_test.c == --- head/sys/dev/ioat/ioat_test.c Thu Oct 22 04:33:05 2015 (r289732) +++ head/sys/dev/ioat/ioat_test.c Thu Oct 22 04:38:05 2015 (r289733) @@ -51,18 +51,28 @@ __FBSDID("$FreeBSD$"); #include "ioat_internal.h" #include "ioat_test.h" +#ifndef time_after +#definetime_after(a,b) ((long)(b) - (long)(a) < 0) +#endif + MALLOC_DEFINE(M_IOAT_TEST, "ioat_test", "ioat test allocations"); -#defineIOAT_TEST_SIZE 0x4 -#defineIOAT_MAX_BUFS 8 +#defineIOAT_MAX_BUFS 256 struct test_transaction { - uint8_t num_buffers; void*buf[IOAT_MAX_BUFS]; uint32_tlength; + uint32_tdepth; struct ioat_test*test; + TAILQ_ENTRY(test_transaction) entry; }; +#defineIT_LOCK() mtx_lock(&ioat_test_lk) +#defineIT_UNLOCK() mtx_unlock(&ioat_test_lk) +#defineIT_ASSERT() mtx_assert(&ioat_test_lk, MA_OWNED) +static struct mtx ioat_test_lk; +MTX_SYSINIT(ioat_test_lk, &ioat_test_lk, "test coordination mtx", MTX_DEF); + static int g_thread_index = 1; static struct cdev *g_ioat_cdev = NULL; @@ -73,7 +83,7 @@ ioat_test_transaction_destroy(struct tes for (i = 0; i < IOAT_MAX_BUFS; i++) { if (tx->buf[i] != NULL) { - contigfree(tx->buf[i], IOAT_TEST_SIZE, M_IOAT_TEST); + contigfree(tx->buf[i], tx->length, M_IOAT_TEST); tx->buf[i] = NULL; } } @@ -82,17 +92,16 @@ ioat_test_transaction_destroy(struct tes } static struct -test_transaction *ioat_test_transaction_create(uint8_t num_buffers, +test_transaction *ioat_test_transaction_create(unsigned num_buffers, uint32_t buffer_size) { struct test_transaction *tx; - int i; + unsigned i; - tx = malloc(sizeof(struct test_transaction), M_IOAT_TEST, M_NOWAIT | M_ZERO); + tx = malloc(sizeof(*tx), M_IOAT_TEST, M_NOWAIT | M_ZERO); if (tx == NULL) return (NULL); - tx->num_buffers = num_buffers; tx->length = buffer_size; for (i = 0; i < num_buffers; i++) { @@ -107,6 +116,18 @@ test_transaction *ioat_test_transaction_ return (tx); } +static bool +ioat_compare_ok(struct test_transaction *tx) +{ + uint32_t i; + + for (i = 0; i < tx->depth; i++) { + if (memcmp(tx->buf[2*i], tx->buf[2*i+1], tx->length) != 0) + return (false); + } + return (true); +} + static void ioat_dma_test_callback(void *arg) { @@ -116,82 +137,195 @@ ioat_dma_test_callback(void *arg) tx = arg; test = tx->test; - if (memcmp(tx->buf[0], tx->buf[1], tx->length) != 0) { + if (test->verify && !ioat_compare_ok(tx)) { ioat_log_message(0, "miscompare found\n"); - test->status = IOAT_TEST_MISCOMPARE; + atomic_add_32(&test->status[IOAT_TEST_MISCOMPARE], tx->depth); + } else if (!test->too_late) + atomic_add_32(&test->status[IOAT_TEST_OK], tx->depth); + + IT_LOCK(); + TAILQ_REMOVE(&test->pend_q, tx, entry); + TAILQ_INSERT_TAIL(&test->free_q, tx, entry); + wakeup(&test->free_q); + IT_UNLOCK(); +} + +static int +ioat_test_prealloc_memory(struct ioat_test *test, int index) +{ + uint32_t i, j, k; + struct test_transaction *tx; + + for (i = 0; i < test->transactions; i++) { + tx = ioat_test_transaction_create(test->chain_depth * 2, + test->buffer_size); + if (tx == NULL) { + ioat_
svn commit: r289734 - head/share/mk
Author: bdrewery Date: Thu Oct 22 04:42:17 2015 New Revision: 289734 URL: https://svnweb.freebsd.org/changeset/base/289734 Log: Rewrite crunchgen target handling for progs so that it can be parallelized. This covers 'clean', 'cleandepend', 'cleandir', 'obj', 'objlink' and 'build-tools'. This uses the same method as bsd.subdir.mk. MFC after:2 weeks X-MFC-With: r289731 Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.crunchgen.mk Modified: head/share/mk/bsd.crunchgen.mk == --- head/share/mk/bsd.crunchgen.mk Thu Oct 22 04:38:05 2015 (r289733) +++ head/share/mk/bsd.crunchgen.mk Thu Oct 22 04:42:17 2015 (r289734) @@ -123,29 +123,32 @@ objs: $(OUTMK) # Someone should replace the bin/csh and bin/sh build-tools with # shell scripts so we can remove this nonsense. -build-tools: .for _tool in $(CRUNCH_BUILDTOOLS) +build-tools-${_tool}: ${_+_}cd $(.CURDIR)/../../${_tool}; \ - ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} obj; \ - ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} build-tools + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} obj; \ + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} build-tools +build-tools: build-tools-${_tool} .endfor # Use a separate build tree to hold files compiled for this crunchgen binary # Yes, this does seem to partly duplicate bsd.subdir.mk, but I can't # get that to cooperate with bsd.prog.mk. Besides, many of the standard # targets should NOT be propagated into the components. -cleandepend cleandir obj objlink: +.for __target in clean cleandepend cleandir obj objlink .for D in $(CRUNCH_SRCDIRS) .for P in $(CRUNCH_PROGS_$(D)) .ifdef CRUNCH_SRCDIR_${P} - ${_+_}cd ${CRUNCH_SRCDIR_$(P)} && \ - ${CRUNCHENV} MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ - DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET} +__dir= ${CRUNCH_SRCDIR_$(P)} .else - ${_+_}cd $(.CURDIR)/../../${D}/${P} && \ - ${CRUNCHENV} MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ - DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET} +__dir= ${.CURDIR}/../../${D}/${P} .endif +${__target}_crunchdir_${P}: .PHONY .MAKE + ${_+_}cd ${__dir} && \ + ${CRUNCHENV} MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ + DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${__target} +${__target}: ${__target}_crunchdir_${P} +.endfor .endfor .endfor @@ -154,16 +157,3 @@ clean: ${_+_}if [ -e ${.OBJDIR}/$(OUTMK) ]; then \ ${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} ${MAKE} -f $(OUTMK) clean; \ fi -.for D in $(CRUNCH_SRCDIRS) -.for P in $(CRUNCH_PROGS_$(D)) -.ifdef CRUNCH_SRCDIR_${P} - ${_+_}cd ${CRUNCH_SRCDIR_$(P)} && \ - ${CRUNCHENV} MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ - DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET} -.else - ${_+_}cd $(.CURDIR)/../../${D}/${P} && \ - ${CRUNCHENV} MAKEOBJDIRPREFIX=${CANONICALOBJDIR} ${MAKE} \ - DIRPRFX=${DIRPRFX}${P}/ ${CRUNCH_BUILDOPTS} ${.TARGET} -.endif -.endfor -.endfor ___ 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: r289735 - head/share/mk
Author: bdrewery Date: Thu Oct 22 04:47:52 2015 New Revision: 289735 URL: https://svnweb.freebsd.org/changeset/base/289735 Log: Fix style. Namely use {} rather than (). MFC after:2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.crunchgen.mk Modified: head/share/mk/bsd.crunchgen.mk == --- head/share/mk/bsd.crunchgen.mk Thu Oct 22 04:42:17 2015 (r289734) +++ head/share/mk/bsd.crunchgen.mk Thu Oct 22 04:47:52 2015 (r289735) @@ -13,14 +13,14 @@ # local architecture. # # Special options can be specified for individual programs -# CRUNCH_SRCDIR_$(P): base source directory for program $(P) -# CRUNCH_BUILDOPTS_$(P): additional build options for $(P) -# CRUNCH_ALIAS_$(P): additional names to be used for $(P) +# CRUNCH_SRCDIR_${P}: base source directory for program ${P} +# CRUNCH_BUILDOPTS_${P}: additional build options for ${P} +# CRUNCH_ALIAS_${P}: additional names to be used for ${P} # # By default, any name appearing in CRUNCH_PROGS or CRUNCH_ALIAS_${P} # will be used to generate a hard link to the resulting binary. # Specific links can be suppressed by setting -# CRUNCH_SUPPRESS_LINK_$(NAME) to 1. +# CRUNCH_SUPPRESS_LINK_${NAME} to 1. # # If CRUNCH_GENERATE_LINKS is set to no, no links will be generated. # @@ -31,101 +31,101 @@ # The following is pretty nearly a generic crunchgen-handling makefile # -CONF= $(PROG).conf -OUTMK= $(PROG).mk -OUTC= $(PROG).c -OUTPUTS=$(OUTMK) $(OUTC) $(PROG).cache +CONF= ${PROG}.conf +OUTMK= ${PROG}.mk +OUTC= ${PROG}.c +OUTPUTS=${OUTMK} ${OUTC} ${PROG}.cache CRUNCHOBJS= ${.OBJDIR} -.if defined(MAKEOBJDIRPREFIX) +.if defined{MAKEOBJDIRPREFIX} CANONICALOBJDIR:= ${MAKEOBJDIRPREFIX}${.CURDIR} -.elif defined(MAKEOBJDIR) && ${MAKEOBJDIR:M/*} != "" -CANONICALOBJDIR:=${MAKEOBJDIR} +.elif defined{MAKEOBJDIR} && ${MAKEOBJDIR:M/*} != "" +CANONICALOBJDIR:= ${MAKEOBJDIR} .else CANONICALOBJDIR:= /usr/obj${.CURDIR} .endif -CRUNCH_GENERATE_LINKS?=yes +CRUNCH_GENERATE_LINKS?= yes -CLEANFILES+= $(CONF) *.o *.lo *.c *.mk *.cache *.a *.h +CLEANFILES+= ${CONF} *.o *.lo *.c *.mk *.cache *.a *.h # Don't try to extract debug info from ${PROG}. -MK_DEBUG_FILES=no +MK_DEBUG_FILES= no # Program names and their aliases contribute hardlinks to 'rescue' executable, # except for those that get suppressed. -.for D in $(CRUNCH_SRCDIRS) -.for P in $(CRUNCH_PROGS_$(D)) +.for D in ${CRUNCH_SRCDIRS} +.for P in ${CRUNCH_PROGS_${D}} .ifdef CRUNCH_SRCDIR_${P} -$(OUTPUTS): $(CRUNCH_SRCDIR_${P})/Makefile +${OUTPUTS}: ${CRUNCH_SRCDIR_${P}}/Makefile .else -$(OUTPUTS): $(.CURDIR)/../../$(D)/$(P)/Makefile +${OUTPUTS}: ${.CURDIR}/../../${D}/${P}/Makefile .endif .if ${CRUNCH_GENERATE_LINKS} == "yes" .ifndef CRUNCH_SUPPRESS_LINK_${P} -LINKS+= $(BINDIR)/$(PROG) $(BINDIR)/$(P) +LINKS+= ${BINDIR}/${PROG} ${BINDIR}/${P} .endif -.for A in $(CRUNCH_ALIAS_$(P)) +.for A in ${CRUNCH_ALIAS_${P}} .ifndef CRUNCH_SUPPRESS_LINK_${A} -LINKS+= $(BINDIR)/$(PROG) $(BINDIR)/$(A) +LINKS+= ${BINDIR}/${PROG} ${BINDIR}/${A} .endif .endfor .endif .endfor .endfor -all: $(PROG) -exe: $(PROG) +all: ${PROG} +exe: ${PROG} -$(CONF): Makefile - echo \# Auto-generated, do not edit >$(.TARGET) +${CONF}: Makefile + echo \# Auto-generated, do not edit >${.TARGET} .ifdef CRUNCH_BUILDOPTS - echo buildopts $(CRUNCH_BUILDOPTS) >>$(.TARGET) + echo buildopts ${CRUNCH_BUILDOPTS} >>${.TARGET} .endif .ifdef CRUNCH_LIBS - echo libs $(CRUNCH_LIBS) >>$(.TARGET) + echo libs ${CRUNCH_LIBS} >>${.TARGET} .endif .ifdef CRUNCH_SHLIBS - echo libs_so $(CRUNCH_SHLIBS) >>$(.TARGET) + echo libs_so ${CRUNCH_SHLIBS} >>${.TARGET} .endif -.for D in $(CRUNCH_SRCDIRS) -.for P in $(CRUNCH_PROGS_$(D)) - echo progs $(P) >>$(.TARGET) +.for D in ${CRUNCH_SRCDIRS} +.for P in ${CRUNCH_PROGS_${D}} + echo progs ${P} >>${.TARGET} .ifdef CRUNCH_SRCDIR_${P} - echo special $(P) srcdir $(CRUNCH_SRCDIR_${P}) >>$(.TARGET) + echo special ${P} srcdir ${CRUNCH_SRCDIR_${P}} >>${.TARGET} .else - echo special $(P) srcdir $(.CURDIR)/../../$(D)/$(P) >>$(.TARGET) + echo special ${P} srcdir ${.CURDIR}/../../${D}/${P} >>${.TARGET} .endif .ifdef CRUNCH_BUILDOPTS_${P} - echo special $(P) buildopts DIRPRFX=${DIRPRFX}${P}/ \ - $(CRUNCH_BUILDOPTS_${P}) >>$(.TARGET) + echo special ${P} buildopts DIRPRFX=${DIRPRFX}${P}/ \ + ${CRUNCH_BUILDOPTS_${P}} >>${.TARGET} .else - echo special $(P) buildopts DIRPRFX=${DIRPRFX}${P}/ >>$(.TARGET) + echo special ${P} buildopts DIRPRFX=${DIRPRFX}${P}/ >>${.TARGET} .endif -.for A in $(CRUNCH_ALIAS_$(P)) - echo ln $(P) $(A) >>$(.TARGET) +.for A in ${CRUNCH_ALIAS_${P}} + echo ln ${P} ${A} >>${.TARGET} .endfor .endfor .endfor CRUNCHGEN?= crunchgen CRUNCHENV?= MK_TESTS=no -.ORDER: $(OUTPUTS) objs -$(OUTPUTS): $(CONF) .META
Re: svn commit: r289735 - head/share/mk
> On Oct 21, 2015, at 21:47, Bryan Drewery wrote: > > +.if defined{MAKEOBJDIRPREFIX} Uh... ___ 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: r289736 - head/share/man/man5
Author: bdrewery Date: Thu Oct 22 04:50:52 2015 New Revision: 289736 URL: https://svnweb.freebsd.org/changeset/base/289736 Log: Document that we use {} for variable expansion. MFC after:1 week Sponsored by: EMC / Isilon Storage Division Modified: head/share/man/man5/style.Makefile.5 Modified: head/share/man/man5/style.Makefile.5 == --- head/share/man/man5/style.Makefile.5Thu Oct 22 04:47:52 2015 (r289735) +++ head/share/man/man5/style.Makefile.5Thu Oct 22 04:50:52 2015 (r289736) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 8, 2005 +.Dd October 21, 2015 .Dt STYLE.MAKEFILE 5 .Os .Sh NAME @@ -117,6 +117,13 @@ i.e., no space between the variable name .Ic = . Keep values sorted alphabetically, if possible. .It +Variables are expanded with +.Sy {} , +not +.Sy () . +Such as +.Va ${VARIABLE} . +.It Do not use .Ic += to set variables that are only set once ___ 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: r289735 - head/share/mk
On 10/21/2015 9:49 PM, NGie Cooper wrote: > >> On Oct 21, 2015, at 21:47, Bryan Drewery wrote: >> >> +.if defined{MAKEOBJDIRPREFIX} > > Uh... > Hah. Thanks. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
svn commit: r289737 - head/share/mk
Author: bdrewery Date: Thu Oct 22 04:52:37 2015 New Revision: 289737 URL: https://svnweb.freebsd.org/changeset/base/289737 Log: Fix incorrect defined() usage from style clean up in r289735. Submitted by: ngie MFC after:2 weeks X-MFC-With: r289735 Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.crunchgen.mk Modified: head/share/mk/bsd.crunchgen.mk == --- head/share/mk/bsd.crunchgen.mk Thu Oct 22 04:50:52 2015 (r289736) +++ head/share/mk/bsd.crunchgen.mk Thu Oct 22 04:52:37 2015 (r289737) @@ -36,9 +36,9 @@ OUTMK=${PROG}.mk OUTC= ${PROG}.c OUTPUTS=${OUTMK} ${OUTC} ${PROG}.cache CRUNCHOBJS= ${.OBJDIR} -.if defined{MAKEOBJDIRPREFIX} +.if defined(MAKEOBJDIRPREFIX) CANONICALOBJDIR:= ${MAKEOBJDIRPREFIX}${.CURDIR} -.elif defined{MAKEOBJDIR} && ${MAKEOBJDIR:M/*} != "" +.elif defined(MAKEOBJDIR) && ${MAKEOBJDIR:M/*} != "" CANONICALOBJDIR:= ${MAKEOBJDIR} .else CANONICALOBJDIR:= /usr/obj${.CURDIR} ___ 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: r289738 - head
Author: bdrewery Date: Thu Oct 22 05:01:14 2015 New Revision: 289738 URL: https://svnweb.freebsd.org/changeset/base/289738 Log: Parallelize build-tools. MFC after:3 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Thu Oct 22 04:52:37 2015(r289737) +++ head/Makefile.inc1 Thu Oct 22 05:01:14 2015(r289738) @@ -1507,7 +1507,6 @@ _gcc_tools= gnu/usr.bin/cc/cc_tools _rescue=rescue/rescue .endif -build-tools: .MAKE .for _tool in \ bin/csh \ bin/sh \ @@ -1521,18 +1520,22 @@ build-tools: .MAKE usr.bin/mkesdb_static \ usr.bin/mkcsmapper_static \ usr.bin/vi/catalog +build-tools_${_tool}: .PHONY ${_+_}@${ECHODIR} "===> ${_tool} (obj,build-tools)"; \ cd ${.CURDIR}/${_tool} && \ ${MAKE} DIRPRFX=${_tool}/ obj && \ ${MAKE} DIRPRFX=${_tool}/ build-tools +build-tools: build-tools_${_tool} .endfor .for _tool in \ ${_gcc_tools} +build-tools_${_tool}: .PHONY ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all)"; \ cd ${.CURDIR}/${_tool} && \ ${MAKE} DIRPRFX=${_tool}/ obj && \ ${MAKE} DIRPRFX=${_tool}/ depend && \ ${MAKE} DIRPRFX=${_tool}/ all +build-tools: build-tools_${_tool} .endfor # ___ 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: r289438 - head
On 10/16/2015 8:51 PM, Bryan Drewery wrote: > Author: bdrewery > Date: Sat Oct 17 03:51:50 2015 > New Revision: 289438 > URL: https://svnweb.freebsd.org/changeset/base/289438 > > Log: > Rework the world subdir build targets to use the standard SUBDIR_PARALLEL > mechanism. This accidentally deparallelized the 'includes' phase for a cost of a few minutes. It's quite special. I have a fix I've been testing for a few days and will have it in over the next few days. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
svn commit: r289739 - in head: etc/mtree usr.sbin/makefs usr.sbin/makefs/tests
Author: ngie Date: Thu Oct 22 05:32:45 2015 New Revision: 289739 URL: https://svnweb.freebsd.org/changeset/base/289739 Log: Correctly reintroduce the rudimentary smoke tests I botched up in r289684 MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Added: head/usr.sbin/makefs/tests/ - copied from r289694, head/usr.sbin/makefs/tests/ Modified: head/etc/mtree/BSD.tests.dist head/usr.sbin/makefs/Makefile Modified: head/etc/mtree/BSD.tests.dist == --- head/etc/mtree/BSD.tests.dist Thu Oct 22 05:01:14 2015 (r289738) +++ head/etc/mtree/BSD.tests.dist Thu Oct 22 05:32:45 2015 (r289739) @@ -596,6 +596,8 @@ .. fstyp .. +makefs +.. newsyslog .. nmtree Modified: head/usr.sbin/makefs/Makefile == --- head/usr.sbin/makefs/Makefile Thu Oct 22 05:01:14 2015 (r289738) +++ head/usr.sbin/makefs/Makefile Thu Oct 22 05:32:45 2015 (r289739) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + PROG= makefs CFLAGS+=-I${.CURDIR} @@ -32,4 +34,8 @@ SRCS+=ffs_tables.c CFLAGS+= -I${.CURDIR}/../../lib/libnetbsd LIBADD=netbsd util sbuf +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .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"