svn commit: r289620 - head/sys/dev/isp

2015-10-20 Thread Alexander Motin
Author: mav
Date: Tue Oct 20 08:29:30 2015
New Revision: 289620
URL: https://svnweb.freebsd.org/changeset/base/289620

Log:
  Decode more firmware attributes.

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  Tue Oct 20 03:27:59 2015(r289619)
+++ head/sys/dev/isp/isp.c  Tue Oct 20 08:29:30 2015(r289620)
@@ -1090,8 +1090,13 @@ isp_reset(ispsoftc_t *isp, int do_load_d
} else {
isp->isp_fwattr = mbs.param[6];
}
-   if (IS_24XX(isp) && (isp->isp_fwattr & 
ISP2400_FW_ATTR_EXTNDED)) {
-   isp->isp_fwattr |= (((uint64_t) mbs.param[15]) << 16) | 
(((uint64_t) mbs.param[16]) << 32) | (((uint64_t) mbs.param[17]) << 48);
+   if (IS_24XX(isp)) {
+   isp->isp_fwattr |= ((uint64_t) mbs.param[15]) << 16;
+   if (isp->isp_fwattr & ISP2400_FW_ATTR_EXTNDED) {
+   isp->isp_fwattr |=
+   (((uint64_t) mbs.param[16]) << 32) |
+   (((uint64_t) mbs.param[17]) << 48);
+   }
}
} else if (IS_SCSI(isp)) {
 #ifndefISP_TARGET_MODE
@@ -1132,6 +1137,18 @@ isp_reset(ispsoftc_t *isp, int do_load_d
fwt ^=ISP2400_FW_ATTR_VI;
ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s VI", 
buf);
}
+   if (fwt & ISP2400_FW_ATTR_MQ) {
+   fwt ^=ISP2400_FW_ATTR_MQ;
+   ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s MQ", 
buf);
+   }
+   if (fwt & ISP2400_FW_ATTR_MSIX) {
+   fwt ^=ISP2400_FW_ATTR_MSIX;
+   ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s 
MSIX", buf);
+   }
+   if (fwt & ISP2400_FW_ATTR_FCOE) {
+   fwt ^=ISP2400_FW_ATTR_FCOE;
+   ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s 
FCOE", buf);
+   }
if (fwt & ISP2400_FW_ATTR_VP0) {
fwt ^= ISP2400_FW_ATTR_VP0;
ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s 
VP0_Decoupling", buf);
@@ -1140,7 +1157,43 @@ isp_reset(ispsoftc_t *isp, int do_load_d
fwt ^= ISP2400_FW_ATTR_EXPFW;
ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s 
(Experimental)", buf);
}
+   if (fwt & ISP2400_FW_ATTR_HOTFW) {
+   fwt ^= ISP2400_FW_ATTR_HOTFW;
+   ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s 
HotFW", buf);
+   }
fwt &= ~ISP2400_FW_ATTR_EXTNDED;
+   if (fwt & ISP2400_FW_ATTR_EXTVP) {
+   fwt ^= ISP2400_FW_ATTR_EXTVP;
+   ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s 
ExtVP", buf);
+   }
+   if (fwt & ISP2400_FW_ATTR_VN2VN) {
+   fwt ^= ISP2400_FW_ATTR_VN2VN;
+   ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s 
VN2VN", buf);
+   }
+   if (fwt & ISP2400_FW_ATTR_EXMOFF) {
+   fwt ^= ISP2400_FW_ATTR_EXMOFF;
+   ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s 
EXMOFF", buf);
+   }
+   if (fwt & ISP2400_FW_ATTR_NPMOFF) {
+   fwt ^= ISP2400_FW_ATTR_NPMOFF;
+   ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s 
NPMOFF", buf);
+   }
+   if (fwt & ISP2400_FW_ATTR_DIFCHOP) {
+   fwt ^= ISP2400_FW_ATTR_DIFCHOP;
+   ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s 
DIFCHOP", buf);
+   }
+   if (fwt & ISP2400_FW_ATTR_SRIOV) {
+   fwt ^= ISP2400_FW_ATTR_SRIOV;
+   ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s 
SRIOV", buf);
+   }
+   if (fwt & ISP2400_FW_ATTR_ASICTMP) {
+   fwt ^= ISP2400_FW_ATTR_ASICTMP;
+   ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s 
ASICTMP", buf);
+   }
+   if (fwt & ISP2400_FW_ATTR_ATIOMQ) {
+   fwt ^= ISP2400_FW_ATTR_ATIOMQ;
+   ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s 
ATIOMQ", buf);
+   }
if (fwt) {
ISP_SNPRINTF(buf, ISP_FC_SCRLEN - strlen(buf), "%s 
(unknown 0x%08x%08x)", buf,
(uint32_t) (fwt >> 32), (uint32_t) fwt);

Modified: head/sys/dev/isp/ispmbox.h
==
--- head/sys/dev/isp/ispmbox.h  Tue Oct 

svn commit: r289621 - head/sys/ofed/include/linux

2015-10-20 Thread Hans Petter Selasky
Author: hselasky
Date: Tue Oct 20 09:13:35 2015
New Revision: 289621
URL: https://svnweb.freebsd.org/changeset/base/289621

Log:
  Merge LinuxKPI changes from DragonflyBSD:
  - Remove redundant NBLONG macro and use BIT_WORD()
and BIT_MASK() instead.
  - Correctly define BIT_MASK() according to Linux and
update all users of this macro.
  - Add missing GENMASK() macro.
  - Remove all comments deriving from Linux.
  
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/ofed/include/linux/bitops.h

Modified: head/sys/ofed/include/linux/bitops.h
==
--- head/sys/ofed/include/linux/bitops.hTue Oct 20 08:29:30 2015
(r289620)
+++ head/sys/ofed/include/linux/bitops.hTue Oct 20 09:13:35 2015
(r289621)
@@ -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
@@ -29,15 +29,21 @@
 #ifndef_LINUX_BITOPS_H_
 #define_LINUX_BITOPS_H_
 
+#include 
+#include 
+
+#defineBIT(nr) (1UL << (nr))
 #ifdef __LP64__
 #defineBITS_PER_LONG   64
 #else
 #defineBITS_PER_LONG   32
 #endif
-#defineBIT_MASK(n) (~0UL >> (BITS_PER_LONG - (n)))
+#defineBITMAP_FIRST_WORD_MASK(start)   (~0UL << ((start) % 
BITS_PER_LONG))
+#defineBITMAP_LAST_WORD_MASK(n)(~0UL >> (BITS_PER_LONG - (n)))
 #defineBITS_TO_LONGS(n)howmany((n), BITS_PER_LONG)
+#defineBIT_MASK(nr)(1UL << ((nr) & (BITS_PER_LONG - 1)))
 #define BIT_WORD(nr)   ((nr) / BITS_PER_LONG)
-
+#defineGENMASK(lo, hi) (((2UL << ((hi) - (lo))) - 1UL) << (lo))
 #define BITS_PER_BYTE   8
 
 static inline int
@@ -90,7 +96,7 @@ find_first_bit(unsigned long *addr, unsi
return (bit + __ffsl(*addr));
}
if (size) {
-   mask = (*addr) & BIT_MASK(size);
+   mask = (*addr) & BITMAP_LAST_WORD_MASK(size);
if (mask)
bit += __ffsl(mask);
else
@@ -112,7 +118,7 @@ find_first_zero_bit(unsigned long *addr,
return (bit + __ffsl(~(*addr)));
}
if (size) {
-   mask = ~(*addr) & BIT_MASK(size);
+   mask = ~(*addr) & BITMAP_LAST_WORD_MASK(size);
if (mask)
bit += __ffsl(mask);
else
@@ -134,7 +140,7 @@ find_last_bit(unsigned long *addr, unsig
bit = BITS_PER_LONG * pos;
addr += pos;
if (offs) {
-   mask = (*addr) & BIT_MASK(offs);
+   mask = (*addr) & BITMAP_LAST_WORD_MASK(offs);
if (mask)
return (bit + __flsl(mask));
}
@@ -162,7 +168,7 @@ find_next_bit(unsigned long *addr, unsig
bit = BITS_PER_LONG * pos;
addr += pos;
if (offs) {
-   mask = (*addr) & ~BIT_MASK(offs);
+   mask = (*addr) & ~BITMAP_LAST_WORD_MASK(offs);
if (mask)
return (bit + __ffsl(mask));
if (size - bit <= BITS_PER_LONG)
@@ -177,7 +183,7 @@ find_next_bit(unsigned long *addr, unsig
return (bit + __ffsl(*addr));
}
if (size) {
-   mask = (*addr) & BIT_MASK(size);
+   mask = (*addr) & BITMAP_LAST_WORD_MASK(size);
if (mask)
bit += __ffsl(mask);
else
@@ -202,7 +208,7 @@ find_next_zero_bit(unsigned long *addr, 
bit = BITS_PER_LONG * pos;
addr += pos;
if (offs) {
-   mask = ~(*addr) & ~BIT_MASK(offs);
+   mask = ~(*addr) & ~BITMAP_LAST_WORD_MASK(offs);
if (mask)
return (bit + __ffsl(mask));
if (size - bit <= BITS_PER_LONG)
@@ -217,7 +223,7 @@ find_next_zero_bit(unsigned long *addr, 
return (bit + __ffsl(~(*addr)));
}
if (size) {
-   mask = ~(*addr) & BIT_MASK(size);
+   mask = ~(*addr) & BITMAP_LAST_WORD_MASK(size);
if (mask)
bit += __ffsl(mask);
else
@@ -245,13 +251,13 @@ bitmap_fill(unsigned long *addr, int siz
memset(addr, 0xff, len);
tail = size & (BITS_PER_LONG - 1);
if (tail) 
-   addr[size / BITS_PER_LONG] = BIT_MASK(tail);
+   addr[size / BITS_PER_LONG] = BITMAP_LAST_WORD_MASK(tail);
 }
 
 static inline int
 bitmap_full(unsigned long *addr, int size)
 {
-   long mask;
+   unsigned long mask;
int tail;
int len;
int i;
@@ -262,7 +268,7 @@ bitmap_full(unsigned 

svn commit: r289622 - head/sys/dev/isp

2015-10-20 Thread Alexander Motin
Author: mav
Date: Tue Oct 20 10:16:03 2015
New Revision: 289622
URL: https://svnweb.freebsd.org/changeset/base/289622

Log:
  Zero mbox[0] for INIT_FIRMWARE to fix version 7.3 firmware.
  
  While there, add new fields to isp_icb_2400_t structure.

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  Tue Oct 20 09:13:35 2015(r289621)
+++ head/sys/dev/isp/isp.c  Tue Oct 20 10:16:03 2015(r289622)
@@ -1954,6 +1954,7 @@ isp_fibre_init(ispsoftc_t *isp)
 * Init the firmware
 */
MBSINIT(, MBOX_INIT_FIRMWARE, MBLOGALL, 3000);
+   mbs.param[1] = 0;
mbs.param[2] = DMA_WD1(fcp->isp_scdma);
mbs.param[3] = DMA_WD0(fcp->isp_scdma);
mbs.param[6] = DMA_WD3(fcp->isp_scdma);
@@ -2253,6 +2254,7 @@ isp_fibre_init_2400(ispsoftc_t *isp)
} else {
mbs.param[0] = MBOX_INIT_FIRMWARE;
}
+   mbs.param[1] = 0;
mbs.param[2] = DMA_WD1(fcp->isp_scdma);
mbs.param[3] = DMA_WD0(fcp->isp_scdma);
mbs.param[6] = DMA_WD3(fcp->isp_scdma);
@@ -7108,7 +7110,7 @@ static const uint32_t mbpfc[] = {
ISP_FC_OPMAP(0x00, 0x00),   /* 0x45: */
ISP_FC_OPMAP(0x00, 0x00),   /* 0x46: */
ISP_FC_OPMAP(0xcf, 0x03),   /* 0x47: GET PORT_DATABASE ENHANCED */
-   ISP_FC_OPMAP(0xcd, 0x01),   /* 0x48: MBOX_INIT_FIRMWARE_MULTI_ID */
+   ISP_FC_OPMAP(0xcf, 0x0f),   /* 0x48: MBOX_INIT_FIRMWARE_MULTI_ID */
ISP_FC_OPMAP(0xcd, 0x01),   /* 0x49: MBOX_GET_VP_DATABASE */
ISP_FC_OPMAP_HALF(0x2, 0xcd, 0x0, 0x01),/* 0x4a: 
MBOX_GET_VP_DATABASE_ENTRY */
ISP_FC_OPMAP(0x00, 0x00),   /* 0x4b: */
@@ -7132,7 +7134,7 @@ static const uint32_t mbpfc[] = {
ISP_FC_OPMAP(0x07, 0x03),   /* 0x5d: MBOX_GET_SET_DATA_RATE */
ISP_FC_OPMAP(0x00, 0x00),   /* 0x5e: */
ISP_FC_OPMAP(0x00, 0x00),   /* 0x5f: */
-   ISP_FC_OPMAP(0xcd, 0x01),   /* 0x60: MBOX_INIT_FIRMWARE */
+   ISP_FC_OPMAP(0xcf, 0x0f),   /* 0x60: MBOX_INIT_FIRMWARE */
ISP_FC_OPMAP(0x00, 0x00),   /* 0x61: */
ISP_FC_OPMAP(0x01, 0x01),   /* 0x62: MBOX_INIT_LIP */
ISP_FC_OPMAP(0xcd, 0x03),   /* 0x63: MBOX_GET_FC_AL_POSITION_MAP */

Modified: head/sys/dev/isp/ispmbox.h
==
--- head/sys/dev/isp/ispmbox.h  Tue Oct 20 09:13:35 2015(r289621)
+++ head/sys/dev/isp/ispmbox.h  Tue Oct 20 10:16:03 2015(r289622)
@@ -1055,8 +1055,10 @@ typedef struct {
uint16_ticb_prqstqlen;
uint16_ticb_rqstaddr[4];
uint16_ticb_respaddr[4];
-   uint16_ticb_priaddr[4]; 
-   uint16_ticb_reserved1[4];
+   uint16_ticb_priaddr[4];
+   uint16_ticb_msixresp;
+   uint16_ticb_msixatio;
+   uint16_ticb_reserved1[2];
uint16_ticb_atio_in;
uint16_ticb_atioqlen;
uint16_ticb_atioqaddr[4];
@@ -1065,7 +1067,11 @@ typedef struct {
uint32_ticb_fwoptions1;
uint32_ticb_fwoptions2;
uint32_ticb_fwoptions3;
-   uint16_ticb_reserved2[12];
+   uint16_ticb_qos;
+   uint16_ticb_reserved2[3];
+   uint16_ticb_enodemac[3];
+   uint16_ticb_disctime;
+   uint16_ticb_reserved3[4];
 } isp_icb_2400_t;
 
 #defineRQRSP_ADDR0015  0
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289624 - head/sys/ofed/include/linux

2015-10-20 Thread Hans Petter Selasky
Author: hselasky
Date: Tue Oct 20 11:40:04 2015
New Revision: 289624
URL: https://svnweb.freebsd.org/changeset/base/289624

Log:
  Add missing FreeBSD RCS keyword and SVN properties.
  
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/ofed/include/linux/bitops.h   (contents, props changed)
  head/sys/ofed/include/linux/cache.h   (contents, props changed)
  head/sys/ofed/include/linux/cdev.h   (contents, props changed)
  head/sys/ofed/include/linux/clocksource.h   (contents, props changed)
  head/sys/ofed/include/linux/compat.h   (contents, props changed)
  head/sys/ofed/include/linux/compiler.h   (contents, props changed)
  head/sys/ofed/include/linux/completion.h   (contents, props changed)
  head/sys/ofed/include/linux/delay.h   (contents, props changed)
  head/sys/ofed/include/linux/device.h   (contents, props changed)
  head/sys/ofed/include/linux/dma-attrs.h   (contents, props changed)
  head/sys/ofed/include/linux/dma-mapping.h   (contents, props changed)
  head/sys/ofed/include/linux/dmapool.h   (contents, props changed)
  head/sys/ofed/include/linux/err.h   (contents, props changed)
  head/sys/ofed/include/linux/errno.h   (contents, props changed)
  head/sys/ofed/include/linux/etherdevice.h   (contents, props changed)
  head/sys/ofed/include/linux/file.h   (contents, props changed)
  head/sys/ofed/include/linux/fs.h   (contents, props changed)
  head/sys/ofed/include/linux/gfp.h   (contents, props changed)
  head/sys/ofed/include/linux/hardirq.h   (contents, props changed)
  head/sys/ofed/include/linux/idr.h   (contents, props changed)
  head/sys/ofed/include/linux/if_arp.h   (contents, props changed)
  head/sys/ofed/include/linux/if_ether.h   (contents, props changed)
  head/sys/ofed/include/linux/if_vlan.h   (contents, props changed)
  head/sys/ofed/include/linux/in.h   (contents, props changed)
  head/sys/ofed/include/linux/in6.h   (contents, props changed)
  head/sys/ofed/include/linux/inetdevice.h   (contents, props changed)
  head/sys/ofed/include/linux/interrupt.h   (contents, props changed)
  head/sys/ofed/include/linux/ioctl.h   (contents, props changed)
  head/sys/ofed/include/linux/jiffies.h   (contents, props changed)
  head/sys/ofed/include/linux/kdev_t.h   (contents, props changed)
  head/sys/ofed/include/linux/kernel.h   (contents, props changed)
  head/sys/ofed/include/linux/kmod.h   (contents, props changed)
  head/sys/ofed/include/linux/kobject.h   (contents, props changed)
  head/sys/ofed/include/linux/kref.h   (contents, props changed)
  head/sys/ofed/include/linux/kthread.h   (contents, props changed)
  head/sys/ofed/include/linux/ktime.h   (contents, props changed)
  head/sys/ofed/include/linux/list.h   (contents, props changed)
  head/sys/ofed/include/linux/lockdep.h   (contents, props changed)
  head/sys/ofed/include/linux/log2.h   (contents, props changed)
  head/sys/ofed/include/linux/math64.h   (contents, props changed)
  head/sys/ofed/include/linux/miscdevice.h   (contents, props changed)
  head/sys/ofed/include/linux/mm.h   (contents, props changed)
  head/sys/ofed/include/linux/module.h   (contents, props changed)
  head/sys/ofed/include/linux/moduleparam.h   (contents, props changed)
  head/sys/ofed/include/linux/mutex.h   (contents, props changed)
  head/sys/ofed/include/linux/net.h   (contents, props changed)
  head/sys/ofed/include/linux/netdevice.h   (contents, props changed)
  head/sys/ofed/include/linux/notifier.h   (contents, props changed)
  head/sys/ofed/include/linux/page.h   (contents, props changed)
  head/sys/ofed/include/linux/pci.h   (contents, props changed)
  head/sys/ofed/include/linux/poll.h   (contents, props changed)
  head/sys/ofed/include/linux/printk.h   (contents, props changed)
  head/sys/ofed/include/linux/radix-tree.h   (contents, props changed)
  head/sys/ofed/include/linux/random.h   (contents, props changed)
  head/sys/ofed/include/linux/rbtree.h   (contents, props changed)
  head/sys/ofed/include/linux/rwlock.h   (contents, props changed)
  head/sys/ofed/include/linux/rwsem.h   (contents, props changed)
  head/sys/ofed/include/linux/scatterlist.h   (contents, props changed)
  head/sys/ofed/include/linux/sched.h   (contents, props changed)
  head/sys/ofed/include/linux/semaphore.h   (contents, props changed)
  head/sys/ofed/include/linux/slab.h   (contents, props changed)
  head/sys/ofed/include/linux/socket.h   (contents, props changed)
  head/sys/ofed/include/linux/spinlock.h   (contents, props changed)
  head/sys/ofed/include/linux/string.h   (contents, props changed)
  head/sys/ofed/include/linux/sysfs.h   (contents, props changed)
  head/sys/ofed/include/linux/timer.h   (contents, props changed)
  head/sys/ofed/include/linux/types.h   (contents, props changed)
  head/sys/ofed/include/linux/uaccess.h   (contents, props changed)
  head/sys/ofed/include/linux/wait.h   (contents, props changed)
  head/sys/ofed/include/linux/workqueue.h   (contents, props changed)

Modified: head/sys/ofed/include/linux/bitops.h

svn commit: r289623 - head/share/misc

2015-10-20 Thread Sergey Kandaurov
Author: pluknet
Date: Tue Oct 20 11:37:16 2015
New Revision: 289623
URL: https://svnweb.freebsd.org/changeset/base/289623

Log:
  o NetBSD 7.0, OpenBSD 5.8, FreeBSD 10.2, OS X 10.11 added.

Modified:
  head/share/misc/bsd-family-tree

Modified: head/share/misc/bsd-family-tree
==
--- head/share/misc/bsd-family-tree Tue Oct 20 10:16:03 2015
(r289622)
+++ head/share/misc/bsd-family-tree Tue Oct 20 11:37:16 2015
(r289623)
@@ -320,17 +320,21 @@ FreeBSD 5.2   |  |  
  | |  |  |OpenBSD 5.6  |
  |  FreeBSD   |  | |   |
  |   10.1 |  | |   DragonFly 4.0.1
- ||  | |   |
- ||  | |   DragonFly 4.0.2
- ||  | |   |
- ||  | |   DragonFly 4.0.3
- ||  | |   |
- ||  | |   DragonFly 4.0.4
- ||  | |   |
- ||  | |   DragonFly 4.0.5
- ||  | |   |
- ||  |OpenBSD 5.7  |
- ||  | |   DragonFly 4.2.0
+ | |  |  | |   |
+ | |  |  | |   DragonFly 4.0.2
+ | |  |  | |   |
+ | |  |  | |   DragonFly 4.0.3
+ | |  |  | |   |
+ | |  |  | |   DragonFly 4.0.4
+ | |  |  | |   |
+ | |  |  | |   DragonFly 4.0.5
+ | |  |  | |   |
+ | |  |  |OpenBSD 5.7  |
+ | |  |  | |   DragonFly 4.2.0
+ |  FreeBSD   |  | |   |
+ |   10.2 |  | |   |
+ |  OS X  NetBSD 7.0   |   |
+ |  10.11|OpenBSD 5.8  |
  ||  | |   |
 FreeBSD 11 -current   |  NetBSD -current  OpenBSD -current DragonFly 
-current
  ||  | |   |
@@ -673,6 +677,10 @@ DragonFly 4.0.42015-03-09 [DFB]
 DragonFly 4.0.52015-03-23 [DFB]
 OpenBSD 5.72015-05-01 [OBD]
 DragonFly 4.2.02015-06-29 [DFB]
+FreeBSD 10.22015-08-13 [FBD]
+NetBSD 7.0 2015-09-25 [NBD]
+OS X 10.11 2015-09-30 [APL]
+OpenBSD 5.82015-10-18 [OBD]
 
 Bibliography
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289626 - in head/sys: dev/isp dev/ispfw modules/ispfw modules/ispfw/isp_2400_multi modules/ispfw/isp_2500_multi

2015-10-20 Thread Alexander Motin
Author: mav
Date: Tue Oct 20 12:27:59 2015
New Revision: 289626
URL: https://svnweb.freebsd.org/changeset/base/289626

Log:
  Update firmware images for Qlogic 24xx/25xx from 5.5.0 to 7.3.0.
  
  This also removes separate "_multi" images, since this funcationality is
  now in base, and there is simply no new images without it for years.

Deleted:
  head/sys/modules/ispfw/isp_2400_multi/
  head/sys/modules/ispfw/isp_2500_multi/
Modified:
  head/sys/dev/isp/isp_pci.c
  head/sys/dev/ispfw/asm_2400.h
  head/sys/dev/ispfw/asm_2500.h
  head/sys/dev/ispfw/ispfw.c
  head/sys/modules/ispfw/Makefile

Modified: head/sys/dev/isp/isp_pci.c
==
--- head/sys/dev/isp/isp_pci.c  Tue Oct 20 11:42:00 2015(r289625)
+++ head/sys/dev/isp/isp_pci.c  Tue Oct 20 12:27:59 2015(r289626)
@@ -899,9 +899,6 @@ isp_pci_attach(device_t dev)
if (IS_SCSI(isp) && (ISP_SPI_PC(isp, 0)->def_role & ISP_ROLE_TARGET)) {
snprintf(fwname, sizeof (fwname), "isp_%04x_it", did);
isp->isp_osinfo.fw = firmware_get(fwname);
-   } else if (IS_24XX(isp)) {
-   snprintf(fwname, sizeof (fwname), "isp_%04x_multi", did);
-   isp->isp_osinfo.fw = firmware_get(fwname);
}
if (isp->isp_osinfo.fw == NULL) {
snprintf(fwname, sizeof (fwname), "isp_%04x", did);

Modified: head/sys/dev/ispfw/asm_2400.h
==
--- head/sys/dev/ispfw/asm_2400.h   Tue Oct 20 11:42:00 2015
(r289625)
+++ head/sys/dev/ispfw/asm_2400.h   Tue Oct 20 12:27:59 2015
(r289626)
@@ -1,6 +1,6 @@
 /* $FreeBSD$ */
 /*-
- * Copyright (C) 2005-2010 by Qlogic, Inc.
+ * Copyright (C) 2005-2014 by Qlogic, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms are permitted provided
@@ -25,23 +25,23 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */ 
 /*
- * Firmware Version 5.05.00 (15:31 Dec 14, 2010)
+ * Firmware Version 7.03.00 (Apr 14, 2014)
  */
 #ifdef ISP_2400
 static const uint32_t isp_2400_risc_code[] = {
-   0x0401f195, 0x0011, 0x0010, 0xafb1,
-   0x0005, 0x0005, 0x, 0x8482,
+   0x0401f195, 0x00112000, 0x0010, 0xc798,
+   0x0007, 0x0003, 0x, 0x9496,
0x0003, 0x, 0x20434f50, 0x59524947,
0x48542032, 0x30303720, 0x514c4f47, 0x49432043,
0x4f52504f, 0x52415449, 0x4f4e2020, 0x20495350,
0x32347878, 0x20466972, 0x6d776172, 0x65202020,
-   0x56657273, 0x696f6e20, 0x2020352e, 0x30352e30,
+   0x56657273, 0x696f6e20, 0x2020372e, 0x30332e30,
0x30202024, 0x, 0x, 0x,
0x, 0x, 0x, 0x,
0x, 0x, 0x, 0x,
0x, 0x, 0x, 0x,
0x, 0x, 0x, 0x,
-   0x42001800, 0x0010014c, 0x42002000, 0x0010bdc7,
+   0x42001800, 0x0010014c, 0x42002000, 0x0010e36f,
0x500c0800, 0x800c1800, 0x500c1000, 0x800c1800,
0x54042000, 0x80102000, 0x80040800, 0x80081040,
0x040207fc, 0x500c0800, 0x800409c0, 0x040207f6,
@@ -124,23 +124,23 @@ static const uint32_t isp_2400_risc_code
0x6150, 0x0010, 0x6170, 0x0010,
0x6190, 0x0010, 0x61b0, 0x0010,
0x, 0x, 0x, 0x,
-   0x, 0x0010, 0x0010, 0xafb1,
-   0x, 0x00110004, 0x0002, 0x0b53,
-   0x, 0x00110b57, 0x0010d700, 0x1ac0,
-   0x, 0x00112617, 0xc000, 0x07e8,
-   0x00ff, 0x00112dff, 0x8000, 0x05e5,
+   0x, 0x0010, 0x0010, 0xc798,
+   0x, 0x00112004, 0x0002, 0x0c50,
+   0x, 0x00112c54, 0x0010fd00, 0x1b58,
+   0x, 0x001147ac, 0xc000, 0x08b1,
+   0x00ff, 0x0011505d, 0x8000, 0x0696,
0x00ff, 0x, 0x, 0x,
0x, 0x4203f000, 0x00021fff, 0x4000,
0x4203e000, 0x9100, 0x4000, 0x42000800,
-   0x00020b54, 0x4202f000, 0x, 0x4200,
+   0x00020c51, 0x4202f000, 0x, 0x4200,
0x7023, 0x5000, 0x8c000500, 0x04020003,
0x42000800, 0x0002, 0x45780800, 0x80040800,
0x82040580, 0x00022000, 0x040207fc, 0x4178a000,
-   0x4200a800, 0x0010afb1, 0x42000800, 0x0010d700,
-   0x4054, 0x8004b480, 0x0201f800, 0x0010aeeb,
-   0x0401fac9, 0x0401fa00, 0x4803c856, 0x4200,
+   0x4200a800, 0x0010c798, 0x42000800, 0x0010fd00,
+   0x4054, 0x8004b480, 0x0201f800, 0x0010c5e6,
+   0x0401fade, 0x0401fa0a, 0x4803c856, 0x4200,
0x1000, 0x5000, 0x82000480, 0x24320002,
-   0x0402000d, 0x0201f800, 0x0010af26, 

svn commit: r289625 - head/sys/ofed/include/linux

2015-10-20 Thread Hans Petter Selasky
Author: hselasky
Date: Tue Oct 20 11:42:00 2015
New Revision: 289625
URL: https://svnweb.freebsd.org/changeset/base/289625

Log:
  Add missing dash to copyright clause.
  
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/ofed/include/linux/time.h

Modified: head/sys/ofed/include/linux/time.h
==
--- head/sys/ofed/include/linux/time.h  Tue Oct 20 11:40:04 2015
(r289624)
+++ head/sys/ofed/include/linux/time.h  Tue Oct 20 11:42:00 2015
(r289625)
@@ -1,5 +1,5 @@
 /* $FreeBSD$ */
-/*
+/*-
  * Copyright (c) 2014-2015 François Tigeot
  * All rights reserved.
  *
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

svn commit: r289627 - head/etc/rc.d

2015-10-20 Thread Poul-Henning Kamp
Author: phk
Date: Tue Oct 20 12:49:38 2015
New Revision: 289627
URL: https://svnweb.freebsd.org/changeset/base/289627

Log:
  Allow osreldate and osrelease to be set per jail

Modified:
  head/etc/rc.d/jail

Modified: head/etc/rc.d/jail
==
--- head/etc/rc.d/jail  Tue Oct 20 12:27:59 2015(r289626)
+++ head/etc/rc.d/jail  Tue Oct 20 12:49:38 2015(r289627)
@@ -243,6 +243,8 @@ parse_options()
 
extract_var $_j set_hostname_allow allow.set_hostname YN NO
extract_var $_j sysvipc_allow allow.sysvipc YN NO
+   extract_var $_j osreldate osreldate
+   extract_var $_j osrelease osrelease
for _p in $_parameters; do
echo "  ${_p%\;};"
done
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r289633 - head/sys/ofed/include/linux

2015-10-20 Thread John Baldwin
On Tuesday, October 20, 2015 04:02:11 PM Hans Petter Selasky wrote:
> Author: hselasky
> Date: Tue Oct 20 16:02:11 2015
> New Revision: 289633
> URL: https://svnweb.freebsd.org/changeset/base/289633
> 
> Log:
>   Add missing FreeBSD RCS keyword and SVN properties.
>   
>   Sponsored by:   Mellanox Technologies
> 
> Modified:
>   head/sys/ofed/include/linux/io-mapping.h   (contents, props changed)
>   head/sys/ofed/include/linux/io.h   (contents, props changed)
>   head/sys/ofed/include/linux/jhash.h   (contents, props changed)
>   head/sys/ofed/include/linux/linux_compat.c   (contents, props changed)
>   head/sys/ofed/include/linux/linux_idr.c   (contents, props changed)
>   head/sys/ofed/include/linux/linux_radix.c   (contents, props changed)
>   head/sys/ofed/include/linux/vmalloc.h   (contents, props changed)
> 
> Modified: head/sys/ofed/include/linux/io-mapping.h
> ==
> --- head/sys/ofed/include/linux/io-mapping.h  Tue Oct 20 15:28:02 2015
> (r289632)
> +++ head/sys/ofed/include/linux/io-mapping.h  Tue Oct 20 16:02:11 2015
> (r289633)
> @@ -1,3 +1,4 @@
> +/* $FreeBSD$ */
>  /*-
>   * Copyright (c) 2010 Isilon Systems, Inc.
>   * Copyright (c) 2010 iX Systems, Inc.

Just a note on style.  Most headers put the tag below the license block like so
from :

/*-
 * Copyright (c) 1997,1998,2003 Doug Rabson
 * All rights reserved.
 *
...

 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 * $FreeBSD: head/sys/sys/bus.h 284088 2015-06-06 17:25:45Z marcel $
 */

It would have been nice to be more consistent with the rest of the tree.  Maybe
look around next time to see if there is an existing style?

> Modified: head/sys/ofed/include/linux/jhash.h
> ==
> --- head/sys/ofed/include/linux/jhash.h   Tue Oct 20 15:28:02 2015
> (r289632)
> +++ head/sys/ofed/include/linux/jhash.h   Tue Oct 20 16:02:11 2015
> (r289633)
> @@ -18,6 +18,7 @@
>   *
>   * I've modified Bob's hash to be useful in the Linux kernel, and
>   * any bugs present are surely my fault.  -DaveM
> + * $FreeBSD$
>   */

Please fix this one to leave a blank line before the tag at least.

-- 
John Baldwin
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r289633 - head/sys/ofed/include/linux

2015-10-20 Thread Hans Petter Selasky

Hi,

On 10/20/15 20:04, John Baldwin wrote:

On Tuesday, October 20, 2015 04:02:11 PM Hans Petter Selasky wrote:

Author: hselasky
Date: Tue Oct 20 16:02:11 2015
New Revision: 289633
URL: https://svnweb.freebsd.org/changeset/base/289633

Log:
   Add missing FreeBSD RCS keyword and SVN properties.

   Sponsored by:Mellanox Technologies

Modified:
   head/sys/ofed/include/linux/io-mapping.h   (contents, props changed)
   head/sys/ofed/include/linux/io.h   (contents, props changed)
   head/sys/ofed/include/linux/jhash.h   (contents, props changed)
   head/sys/ofed/include/linux/linux_compat.c   (contents, props changed)
   head/sys/ofed/include/linux/linux_idr.c   (contents, props changed)
   head/sys/ofed/include/linux/linux_radix.c   (contents, props changed)
   head/sys/ofed/include/linux/vmalloc.h   (contents, props changed)

Modified: head/sys/ofed/include/linux/io-mapping.h
==
--- head/sys/ofed/include/linux/io-mapping.hTue Oct 20 15:28:02 2015
(r289632)
+++ head/sys/ofed/include/linux/io-mapping.hTue Oct 20 16:02:11 2015
(r289633)
@@ -1,3 +1,4 @@
+/* $FreeBSD$ */
  /*-
   * Copyright (c) 2010 Isilon Systems, Inc.
   * Copyright (c) 2010 iX Systems, Inc.


Just a note on style.  Most headers put the tag below the license block like so
from :


I'll fix that.



/*-
  * Copyright (c) 1997,1998,2003 Doug Rabson
  * All rights reserved.
  *
...

  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
  * $FreeBSD: head/sys/sys/bus.h 284088 2015-06-06 17:25:45Z marcel $
  */

It would have been nice to be more consistent with the rest of the tree.  Maybe
look around next time to see if there is an existing style?


Modified: head/sys/ofed/include/linux/jhash.h
==
--- head/sys/ofed/include/linux/jhash.h Tue Oct 20 15:28:02 2015
(r289632)
+++ head/sys/ofed/include/linux/jhash.h Tue Oct 20 16:02:11 2015
(r289633)
@@ -18,6 +18,7 @@
   *
   * I've modified Bob's hash to be useful in the Linux kernel, and
   * any bugs present are surely my fault.  -DaveM
+ * $FreeBSD$
   */


Please fix this one to leave a blank line before the tag at least.



I tried to make linux/jhash.h similar to dev/cxgb/common/jhash.h, which 
are actually duplicate files.


--HPS


___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289643 - head

2015-10-20 Thread Alexander Motin
Author: mav
Date: Tue Oct 20 19:04:13 2015
New Revision: 289643
URL: https://svnweb.freebsd.org/changeset/base/289643

Log:
  Document isp_*_multi firmware kernel modules removal at r289626.

Modified:
  head/UPDATING

Modified: head/UPDATING
==
--- head/UPDATING   Tue Oct 20 18:37:42 2015(r289642)
+++ head/UPDATING   Tue Oct 20 19:04:13 2015(r289643)
@@ -31,6 +31,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11
disable the most expensive debugging functionality run
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
 
+20151020:
+   Qlogic 24xx/25xx firmware images were updated from 5.5.0 to 7.3.0.
+   Kernel modules isp_2400_multi and isp_2500_multi were removed and
+   should be replaced with isp_2400 and isp_2500 modules respectively.
+
 20151017:
The build previously allowed using 'make -n' to not recurse into
sub-directories while showing what commands would be executed, and
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289636 - in head: lib/libc/sys sys/kern sys/sys

2015-10-20 Thread John Baldwin
Author: jhb
Date: Tue Oct 20 17:58:21 2015
New Revision: 289636
URL: https://svnweb.freebsd.org/changeset/base/289636

Log:
  Switch pl_child_pid from int to pid_t.
  
  Reviewed by:  emaste, kib
  MFC after:1 week
  Differential Revision:https://reviews.freebsd.org/D3857

Modified:
  head/lib/libc/sys/ptrace.2
  head/sys/kern/sys_process.c
  head/sys/sys/ptrace.h

Modified: head/lib/libc/sys/ptrace.2
==
--- head/lib/libc/sys/ptrace.2  Tue Oct 20 17:27:11 2015(r289635)
+++ head/lib/libc/sys/ptrace.2  Tue Oct 20 17:58:21 2015(r289636)
@@ -2,7 +2,7 @@
 .\"$NetBSD: ptrace.2,v 1.2 1995/02/27 12:35:37 cgd Exp $
 .\"
 .\" This file is in the public domain.
-.Dd October 6, 2015
+.Dd October 20, 2015
 .Dt PTRACE 2
 .Os
 .Sh NAME
@@ -306,7 +306,7 @@ struct ptrace_lwpinfo {
sigset_t pl_siglist;
siginfo_t pl_siginfo;
charpl_tdname[MAXCOMLEN + 1];
-   int pl_child_pid;
+   pid_t   pl_child_pid;
u_int   pl_syscall_code;
u_int   pl_syscall_narg;
 };

Modified: head/sys/kern/sys_process.c
==
--- head/sys/kern/sys_process.c Tue Oct 20 17:27:11 2015(r289635)
+++ head/sys/kern/sys_process.c Tue Oct 20 17:58:21 2015(r289636)
@@ -96,7 +96,7 @@ struct ptrace_lwpinfo32 {
sigset_tpl_siglist; /* LWP pending signal */
struct siginfo32 pl_siginfo;/* siginfo for signal */
charpl_tdname[MAXCOMLEN + 1];   /* LWP name. */
-   int pl_child_pid;   /* New child pid */
+   pid_t   pl_child_pid;   /* New child pid */
u_int   pl_syscall_code;
u_int   pl_syscall_narg;
 };

Modified: head/sys/sys/ptrace.h
==
--- head/sys/sys/ptrace.h   Tue Oct 20 17:27:11 2015(r289635)
+++ head/sys/sys/ptrace.h   Tue Oct 20 17:58:21 2015(r289636)
@@ -112,7 +112,7 @@ struct ptrace_lwpinfo {
sigset_tpl_siglist; /* LWP pending signal */
struct __siginfo pl_siginfo;/* siginfo for signal */
charpl_tdname[MAXCOMLEN + 1]; /* LWP name */
-   int pl_child_pid;   /* New child pid */
+   pid_t   pl_child_pid;   /* New child pid */
u_int   pl_syscall_code;
u_int   pl_syscall_narg;
 };
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289646 - head/sys/dev/ntb/ntb_hw

2015-10-20 Thread Conrad E. Meyer
Author: cem
Date: Tue Oct 20 19:19:57 2015
New Revision: 289646
URL: https://svnweb.freebsd.org/changeset/base/289646

Log:
  NTB: Fix typo in bar5 tunables
  
  Typo introduced in r289614.
  
  Pointy-hat:   cem
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/ntb/ntb_hw/ntb_hw.c

Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c
==
--- head/sys/dev/ntb/ntb_hw/ntb_hw.cTue Oct 20 19:19:48 2015
(r289645)
+++ head/sys/dev/ntb/ntb_hw/ntb_hw.cTue Oct 20 19:19:57 2015
(r289646)
@@ -427,7 +427,7 @@ SYSCTL_UQUAD(_hw_ntb_xeon_b2b, OID_AUTO,
 _b2b_usd_addr.bar4_addr32, 0, "See usd_bar2_addr64, but BAR4 "
 "(split-BAR mode).");
 SYSCTL_UQUAD(_hw_ntb_xeon_b2b, OID_AUTO, usd_bar5_addr32, CTLFLAG_RDTUN,
-_b2b_usd_addr.bar4_addr32, 0, "See usd_bar2_addr64, but BAR5 "
+_b2b_usd_addr.bar5_addr32, 0, "See usd_bar2_addr64, but BAR5 "
 "(split-BAR mode).");
 
 SYSCTL_UQUAD(_hw_ntb_xeon_b2b, OID_AUTO, dsd_bar2_addr64, CTLFLAG_RDTUN,
@@ -441,7 +441,7 @@ SYSCTL_UQUAD(_hw_ntb_xeon_b2b, OID_AUTO,
 _b2b_dsd_addr.bar4_addr32, 0, "See dsd_bar2_addr64, but BAR4 "
 "(split-BAR mode).");
 SYSCTL_UQUAD(_hw_ntb_xeon_b2b, OID_AUTO, dsd_bar5_addr32, CTLFLAG_RDTUN,
-_b2b_dsd_addr.bar4_addr32, 0, "See dsd_bar2_addr64, but BAR5 "
+_b2b_dsd_addr.bar5_addr32, 0, "See dsd_bar2_addr64, but BAR5 "
 "(split-BAR mode).");
 
 /*
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289647 - head/sys/dev/ntb/ntb_hw

2015-10-20 Thread Conrad E. Meyer
Author: cem
Date: Tue Oct 20 19:20:06 2015
New Revision: 289647
URL: https://svnweb.freebsd.org/changeset/base/289647

Log:
  NTB: Don't abort if setting a MW write-combine fails
  
  Also log BAR mapping results more verbosely.
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/ntb/ntb_hw/ntb_hw.c

Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c
==
--- head/sys/dev/ntb/ntb_hw/ntb_hw.cTue Oct 20 19:19:57 2015
(r289646)
+++ head/sys/dev/ntb/ntb_hw/ntb_hw.cTue Oct 20 19:20:06 2015
(r289647)
@@ -265,7 +265,8 @@ static inline bool bar_is_64bit(struct n
 static inline void bar_get_xlat_params(struct ntb_softc *, enum ntb_bar,
 uint32_t *base, uint32_t *xlat, uint32_t *lmt);
 static int ntb_map_pci_bars(struct ntb_softc *ntb);
-static void print_map_success(struct ntb_softc *, struct ntb_pci_bar_info *);
+static void print_map_success(struct ntb_softc *, struct ntb_pci_bar_info *,
+const char *);
 static int map_mmr_bar(struct ntb_softc *ntb, struct ntb_pci_bar_info *bar);
 static int map_memory_window_bar(struct ntb_softc *ntb,
 struct ntb_pci_bar_info *bar);
@@ -676,11 +677,16 @@ out:
 }
 
 static void
-print_map_success(struct ntb_softc *ntb, struct ntb_pci_bar_info *bar)
+print_map_success(struct ntb_softc *ntb, struct ntb_pci_bar_info *bar,
+const char *kind)
 {
 
-   device_printf(ntb->device, "Bar size = %lx, v %p, p %p\n",
-   bar->size, bar->vbase, (void *)(bar->pbase));
+   device_printf(ntb->device,
+   "Mapped BAR%d v:[%p-%p] p:[%p-%p] (0x%jx bytes) (%s)\n",
+   PCI_RID2BAR(bar->pci_resource_id), bar->vbase,
+   (char *)bar->vbase + bar->size - 1,
+   (void *)bar->pbase, (void *)(bar->pbase + bar->size - 1),
+   (uintmax_t)bar->size, kind);
 }
 
 static int
@@ -693,7 +699,7 @@ map_mmr_bar(struct ntb_softc *ntb, struc
return (ENXIO);
 
save_bar_parameters(bar);
-   print_map_success(ntb, bar);
+   print_map_success(ntb, bar, "mmr");
return (0);
 }
 
@@ -749,12 +755,23 @@ map_memory_window_bar(struct ntb_softc *
/* Mark bar region as write combining to improve performance. */
rc = pmap_change_attr((vm_offset_t)bar->vbase, bar->size,
VM_MEMATTR_WRITE_COMBINING);
-   if (rc != 0) {
+   print_map_success(ntb, bar, "mw");
+   if (rc == 0)
device_printf(ntb->device,
-   "unable to mark bar as WRITE_COMBINING\n");
-   return (rc);
-   }
-   print_map_success(ntb, bar);
+   "Marked BAR%d v:[%p-%p] p:[%p-%p] as "
+   "WRITE_COMBINING.\n",
+   PCI_RID2BAR(bar->pci_resource_id), bar->vbase,
+   (char *)bar->vbase + bar->size - 1,
+   (void *)bar->pbase, (void *)(bar->pbase + bar->size - 1));
+   else
+   device_printf(ntb->device,
+   "Unable to mark BAR%d v:[%p-%p] p:[%p-%p] as "
+   "WRITE_COMBINING: %d\n",
+   PCI_RID2BAR(bar->pci_resource_id), bar->vbase,
+   (char *)bar->vbase + bar->size - 1,
+   (void *)bar->pbase, (void *)(bar->pbase + bar->size - 1),
+   rc);
+   /* Proceed anyway */
return (0);
 }
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289645 - in head/sys/dev/ntb: if_ntb ntb_hw

2015-10-20 Thread Conrad E. Meyer
Author: cem
Date: Tue Oct 20 19:19:48 2015
New Revision: 289645
URL: https://svnweb.freebsd.org/changeset/base/289645

Log:
  NTB: MFV 7eb38781: Print driver name in module init
  
  Prints driver name to indicate what is being loaded.
  
  Authored by:  Dave Jiang
  Obtained from:Linux (Dual BSD/GPL driver)
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/ntb/if_ntb/if_ntb.c
  head/sys/dev/ntb/ntb_hw/ntb_hw.c

Modified: head/sys/dev/ntb/if_ntb/if_ntb.c
==
--- head/sys/dev/ntb/if_ntb/if_ntb.cTue Oct 20 19:08:26 2015
(r289644)
+++ head/sys/dev/ntb/if_ntb/if_ntb.cTue Oct 20 19:19:48 2015
(r289645)
@@ -393,6 +393,9 @@ ntb_setup_interface(void)
ntb_transport_link_up(net_softc.qp);
net_softc.bufsize = ntb_transport_max_size(net_softc.qp) +
sizeof(struct ether_header);
+
+   if_printf(ifp, "if_ntb device setup\n");
+
return (0);
 }
 
@@ -404,6 +407,7 @@ ntb_teardown_interface(void)
ntb_transport_link_down(net_softc.qp);
 
if (net_softc.ifp != NULL) {
+   if_printf(net_softc.ifp, "if_ntb device destroyed\n");
ether_ifdetach(net_softc.ifp);
if_free(net_softc.ifp);
}

Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c
==
--- head/sys/dev/ntb/ntb_hw/ntb_hw.cTue Oct 20 19:08:26 2015
(r289644)
+++ head/sys/dev/ntb/ntb_hw/ntb_hw.cTue Oct 20 19:19:48 2015
(r289645)
@@ -530,6 +530,8 @@ ntb_attach(device_t device)
 
pci_enable_busmaster(ntb->device);
 
+   device_printf(ntb->device, "NTB device registered\n");
+
 out:
if (error != 0)
ntb_detach(device);
@@ -561,6 +563,8 @@ ntb_detach(device_t device)
ntb_detect_max_mw(ntb);
ntb_unmap_pci_bar(ntb);
 
+   device_printf(ntb->device, "NTB device unregistered\n");
+
return (0);
 }
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289632 - head/sys/ofed/include/asm

2015-10-20 Thread Hans Petter Selasky
Author: hselasky
Date: Tue Oct 20 15:28:02 2015
New Revision: 289632
URL: https://svnweb.freebsd.org/changeset/base/289632

Log:
  Add missing FreeBSD RCS keyword and SVN properties.
  
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/ofed/include/asm/atomic-long.h   (contents, props changed)
  head/sys/ofed/include/asm/atomic.h   (contents, props changed)
  head/sys/ofed/include/asm/byteorder.h   (contents, props changed)
  head/sys/ofed/include/asm/fcntl.h   (contents, props changed)
  head/sys/ofed/include/asm/io.h   (contents, props changed)
  head/sys/ofed/include/asm/pgtable.h   (contents, props changed)
  head/sys/ofed/include/asm/uaccess.h   (contents, props changed)
Directory Properties:
  head/sys/ofed/include/asm/types.h   (props changed)

Modified: head/sys/ofed/include/asm/atomic-long.h
==
--- head/sys/ofed/include/asm/atomic-long.h Tue Oct 20 15:15:30 2015
(r289631)
+++ head/sys/ofed/include/asm/atomic-long.h Tue Oct 20 15:28:02 2015
(r289632)
@@ -1,3 +1,4 @@
+/* $FreeBSD$ */
 /*-
  * Copyright (c) 2010 Isilon Systems, Inc.
  * Copyright (c) 2010 iX Systems, Inc.

Modified: head/sys/ofed/include/asm/atomic.h
==
--- head/sys/ofed/include/asm/atomic.h  Tue Oct 20 15:15:30 2015
(r289631)
+++ head/sys/ofed/include/asm/atomic.h  Tue Oct 20 15:28:02 2015
(r289632)
@@ -1,3 +1,4 @@
+/* $FreeBSD$ */
 /*-
  * Copyright (c) 2010 Isilon Systems, Inc.
  * Copyright (c) 2010 iX Systems, Inc.

Modified: head/sys/ofed/include/asm/byteorder.h
==
--- head/sys/ofed/include/asm/byteorder.h   Tue Oct 20 15:15:30 2015
(r289631)
+++ head/sys/ofed/include/asm/byteorder.h   Tue Oct 20 15:28:02 2015
(r289632)
@@ -1,3 +1,4 @@
+/* $FreeBSD$ */
 /*-
  * Copyright (c) 2010 Isilon Systems, Inc.
  * Copyright (c) 2010 iX Systems, Inc.

Modified: head/sys/ofed/include/asm/fcntl.h
==
--- head/sys/ofed/include/asm/fcntl.h   Tue Oct 20 15:15:30 2015
(r289631)
+++ head/sys/ofed/include/asm/fcntl.h   Tue Oct 20 15:28:02 2015
(r289632)
@@ -1,3 +1,4 @@
+/* $FreeBSD$ */
 /*-
  * Copyright (c) 2010 Isilon Systems, Inc.
  * Copyright (c) 2010 iX Systems, Inc.

Modified: head/sys/ofed/include/asm/io.h
==
--- head/sys/ofed/include/asm/io.h  Tue Oct 20 15:15:30 2015
(r289631)
+++ head/sys/ofed/include/asm/io.h  Tue Oct 20 15:28:02 2015
(r289632)
@@ -1,4 +1,5 @@
-/*
+/* $FreeBSD$ */
+/*-
  * Copyright (c) 2010 Isilon Systems, Inc.
  * Copyright (c) 2010 iX Systems, Inc.
  * Copyright (c) 2010 Panasas, Inc.

Modified: head/sys/ofed/include/asm/pgtable.h
==
--- head/sys/ofed/include/asm/pgtable.h Tue Oct 20 15:15:30 2015
(r289631)
+++ head/sys/ofed/include/asm/pgtable.h Tue Oct 20 15:28:02 2015
(r289632)
@@ -1,3 +1,4 @@
+/* $FreeBSD$ */
 /*-
  * Copyright (c) 2010 Isilon Systems, Inc.
  * Copyright (c) 2010 iX Systems, Inc.

Modified: head/sys/ofed/include/asm/uaccess.h
==
--- head/sys/ofed/include/asm/uaccess.h Tue Oct 20 15:15:30 2015
(r289631)
+++ head/sys/ofed/include/asm/uaccess.h Tue Oct 20 15:28:02 2015
(r289632)
@@ -1,3 +1,4 @@
+/* $FreeBSD$ */
 /*-
  * Copyright (c) 2010 Isilon Systems, Inc.
  * Copyright (c) 2010 iX Systems, Inc.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r289421 - in head/etc: . mtree ntp

2015-10-20 Thread Ian Lepore
On Sat, 2015-10-17 at 22:20 +0100, David Malone wrote:
> On Sat, Oct 17, 2015 at 12:25:50PM -0600, Ian Lepore wrote:
> > If the leapseconds file is present, the leap bits for reference
> > clocks and downstratum servers are ignored.
> > 
> > I can't determine from casual code examination (and I don't have
> > time
> > to experiment now) whether that is true even if the file is
> > expired.
> 
> The way the code seems to work is:
> 
>   1) Take a vote from your peers on if there is an upcoming
>   leap second. Refclocks can outvote other peers. (This is
>   in ntp_proto.c:clock_update() - search for leap_vote_ins).
> 
>   2) If one seems to be pending, try to insert it into an
>   in-memory table for the end of the month.
> 
>   3) If you find that you loaded a table and the leapsecond
>   you are trying to insert is within the valid range of the
>   table, return an error. (This is in
> ntp_leapsec.c:leapsec_add())
> 
> So, I think the change should be safe, if the comments match the
> code.
> 
>   David.

I am slightly less worried after absorbing this info.  Only slightly. 
 The leap second is accepted if the time it arrives from the peers is
later than the current expiration date in the leapfile.  For some
reason, nist has always set that expiration date to be 2 days before
the actual leap event.  That is insane, always has been.  The
information in that file is valid right up until the second of the leap
event.

I've always thought that some day they'd straighten that out and use a
real expiration date.  If they ever do, ntpd is going to turn into a
pumpkin at midnight, because it will then reject incoming leap
notification from peers right up until the second that it is too late
to act on them.

But, all of that is theoretical and the way things stand right now it
appears to be safe to enable this.  I'm probably just scared because
I've been burned by leap seconds so many times, especially related to
handling leapfiles and their expiration dates (and things like the
corner cases that happen when a unit has been powered down for months
and gets powered up 30 seconds before a leap event).

-- Ian

___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289637 - head/usr.sbin/bluetooth/sdpcontrol

2015-10-20 Thread Maksim Yevmenkin
Author: emax
Date: Tue Oct 20 18:01:08 2015
New Revision: 289637
URL: https://svnweb.freebsd.org/changeset/base/289637

Log:
  check boundaries while parsing SDP responses
  
  Reported by:  hps
  Reviewed by:  hps
  MFC after:1 week

Modified:
  head/usr.sbin/bluetooth/sdpcontrol/search.c

Modified: head/usr.sbin/bluetooth/sdpcontrol/search.c
==
--- head/usr.sbin/bluetooth/sdpcontrol/search.c Tue Oct 20 17:58:21 2015
(r289636)
+++ head/usr.sbin/bluetooth/sdpcontrol/search.c Tue Oct 20 18:01:08 2015
(r289637)
@@ -103,6 +103,12 @@ print_service_class_id_list(uint8_t cons
/* NOT REACHED */
}
 
+   if (len > (end - start)) {
+   fprintf(stderr, "Invalid Service Class ID List. " \
+   "Too long len=%d\n", len);
+   return;
+   }
+
while (start < end) {
SDP_GET8(type, start);
switch (type) {
@@ -259,28 +265,31 @@ print_protocol_descriptor(uint8_t const 
case SDP_DATA_STR8:
case SDP_DATA_URL8:
SDP_GET8(len, start);
-   fprintf(stdout, "%*.*s\n", len, len, (char *) start);
-   start += len;
+   for (; start < end && len > 0; start ++, len --)
+   fprintf(stdout, "%c", *start);
+   fprintf(stdout, "\n");
break;
 
case SDP_DATA_STR16:
case SDP_DATA_URL16:
SDP_GET16(len, start);
-   fprintf(stdout, "%*.*s\n", len, len, (char *) start);
-   start += len;
+   for (; start < end && len > 0; start ++, len --)
+   fprintf(stdout, "%c", *start);
+   fprintf(stdout, "\n");
break;
 
case SDP_DATA_STR32:
case SDP_DATA_URL32:
SDP_GET32(len, start);
-   fprintf(stdout, "%*.*s\n", len, len, (char *) start);
-   start += len;
+   for (; start < end && len > 0; start ++, len --)
+   fprintf(stdout, "%c", *start);
+   fprintf(stdout, "\n");
break;
 
case SDP_DATA_SEQ8:
case SDP_DATA_ALT8:
SDP_GET8(len, start);
-   for (; len > 0; start ++, len --)
+   for (; start < end && len > 0; start ++, len --)
fprintf(stdout, "%#2.2x ", *start);
fprintf(stdout, "\n");
break;
@@ -288,7 +297,7 @@ print_protocol_descriptor(uint8_t const 
case SDP_DATA_SEQ16:
case SDP_DATA_ALT16:
SDP_GET16(len, start);
-   for (; len > 0; start ++, len --)
+   for (; start < end && len > 0; start ++, len --)
fprintf(stdout, "%#2.2x ", *start);
fprintf(stdout, "\n");
break;
@@ -296,7 +305,7 @@ print_protocol_descriptor(uint8_t const 
case SDP_DATA_SEQ32:
case SDP_DATA_ALT32:
SDP_GET32(len, start);
-   for (; len > 0; start ++, len --)
+   for (; start < end && len > 0; start ++, len --)
fprintf(stdout, "%#2.2x ", *start);
fprintf(stdout, "\n");
break;
@@ -342,6 +351,12 @@ print_protocol_descriptor_list(uint8_t c
/* NOT REACHED */
}
 
+   if (len > (end - start)) {
+   fprintf(stderr, "Invalid Protocol Descriptor List. " \
+   "Too long, len=%d\n", len);
+   return;
+   }
+
while (start < end) {
SDP_GET8(type, start);
switch (type) {
@@ -364,6 +379,12 @@ print_protocol_descriptor_list(uint8_t c
/* NOT REACHED */
}
 
+   if (len > (end - start)) {
+   fprintf(stderr, "Invalid Protocol Descriptor List. " \
+   "Too long, len=%d\n", len);
+   return;
+   }
+
print_protocol_descriptor(start, start + len);
start += len;
}
@@ -416,6 +437,12 @@ print_bluetooth_profile_descriptor_list(
/* NOT REACHED */
}
 
+   if (len > (end - start)) {
+   fprintf(stderr, "Invalid Bluetooth Profile Descriptor List. " \
+   "Too long, len=%d\n", len);
+   return;
+   }
+
while (start < end) {

svn commit: r289638 - stable/10/gnu/usr.bin/groff/tmac

2015-10-20 Thread Bryan Drewery
Author: bdrewery
Date: Tue Oct 20 18:20:38 2015
New Revision: 289638
URL: https://svnweb.freebsd.org/changeset/base/289638

Log:
  MFC r288429:
  
Replace most of the beforeinstall: hack with FILES mechanism.

Added:
  stable/10/gnu/usr.bin/groff/tmac/fr.ISO8859-1.in
 - copied unchanged from r289637, 
stable/10/gnu/usr.bin/groff/tmac/fr.ISO8859-1
  stable/10/gnu/usr.bin/groff/tmac/mdoc.local.in
 - copied unchanged from r289637, 
stable/10/gnu/usr.bin/groff/tmac/mdoc.local
  stable/10/gnu/usr.bin/groff/tmac/ru.KOI8-R.in
 - copied unchanged from r289637, stable/10/gnu/usr.bin/groff/tmac/ru.KOI8-R
Deleted:
  stable/10/gnu/usr.bin/groff/tmac/fr.ISO8859-1
  stable/10/gnu/usr.bin/groff/tmac/mdoc.local
  stable/10/gnu/usr.bin/groff/tmac/ru.KOI8-R
Modified:
  stable/10/gnu/usr.bin/groff/tmac/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/gnu/usr.bin/groff/tmac/Makefile
==
--- stable/10/gnu/usr.bin/groff/tmac/Makefile   Tue Oct 20 18:01:08 2015
(r289637)
+++ stable/10/gnu/usr.bin/groff/tmac/Makefile   Tue Oct 20 18:20:38 2015
(r289638)
@@ -15,7 +15,7 @@ MLINKS+=  groff_man.7 man.7
 MLINKS+=   groff_me.7 me.7
 MLINKS+=   groff_mdoc.7 mdoc.7 groff_mdoc.7 mdoc.samples.7
 
-CLEANFILES=${MAN} ${MDOCFILES:S/$/-s/} ${STRIPFILES:S/$/-s/} 
${SPECIALFILES:S/$/-s/}
+CLEANFILES=${MAN}
 
 NORMALFILES=   mandoc.tmac andoc.tmac an-old.tmac \
me.tmac \
@@ -40,45 +40,59 @@ NORMALFILES=mandoc.tmac andoc.tmac an-o
composite.tmac \
eqnrc \
troffrc troffrc-end \
+   koi8-r.tmac hyphen.ru \
hyphen.us hyphenex.us
+# These are all generated into the OBJDIR.
 SPECIALFILES=  an.tmac man.tmac s.tmac ms.tmac www.tmac
 STRIPFILES=e.tmac doc.tmac mdoc.local
 MDOCFILES= doc-common doc-ditroff doc-nroff doc-syms \
fr.ISO8859-1 ru.KOI8-R
+# These are in srcdir and must be built special to avoid colliding with
+# CURDIR=OBJDIR.
+SRCFILES=  fr.ISO8859-1 mdoc.local ru.KOI8-R
+CLEANFILES+=   ${SRCFILES}
+
+FILESGROUPS=   FILES
+FILES= ${NORMALFILES}
+FILESOWN=  ${TMACOWN}
+FILESGRP=  ${TMACGRP}
+FILESMODE= ${TMACMODE}
+FILESDIR=  ${TMACDIR}
+MDOCFILESDIR=  ${MDOCDIR}
+
+# Setup handling for the generated and special file groups
+.for var in SPECIAL STRIP MDOC
+FILESGROUPS+=  ${var}FILES
+CLEANFILES+=   ${${var}FILES}
+${var}FILESOWN?=${TMACOWN}
+${var}FILESGRP?=${TMACGRP}
+${var}FILESMODE?=${TMACMODE}
+${var}FILESDIR?=${TMACDIR}
+.endfor
 
-all: ${MDOCFILES:S/$/-s/} ${STRIPFILES:S/$/-s/} ${SPECIALFILES:S/$/-s/}
+beforeinstall:
+.if !exists(${DESTDIR}${TMACDIR}/man.local)
+   ${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
+   ${DIST_DIR}/man.local ${DESTDIR}${TMACDIR}
+.endif
 
+.include 
+
+# Do this after ../Makefile.inc gets included so DIST_DIR is defined.
 .for f in ${MDOCFILES} ${STRIPFILES}
-$f-s: $f
+# Generate the file from the contrib dir or src dir as needed.
+.if ${SRCFILES:M${f}} != ""
+${f}: ${.CURDIR}/${f}.in
+.else
+${f}: ${DIST_DIR}/${f}
+.endif
sed -f ${DIST_DIR}/strip.sed ${.ALLSRC} > ${.TARGET}
 .endfor
 
 .for f in ${SPECIALFILES}
-$f-s: $f
+${f}: ${DIST_DIR}/${f}
sed -e "s;@TMAC_AN_PREFIX@;${tmac_an_prefix};g" \
-e "s;@TMAC_S_PREFIX@;${tmac_s_prefix};g" \
-e "s;@PNMTOPS_NOSETPAGE@;pnmtops;g" \
${.ALLSRC} > ${.TARGET}
 .endfor
-
-beforeinstall:
-   (cd ${DIST_DIR} && \
-   ${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
-   ${NORMALFILES} ${DESTDIR}${TMACDIR})
-   (cd ${.CURDIR} && \
-   ${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
-   koi8-r.tmac hyphen.ru ${DESTDIR}${TMACDIR})
-.for f in ${STRIPFILES} ${SPECIALFILES}
-   ${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
-   $f-s ${DESTDIR}${TMACDIR}/$f
-.endfor
-.for f in ${MDOCFILES}
-   ${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
-   $f-s ${DESTDIR}${MDOCDIR}/$f
-.endfor
-.if !exists(${DESTDIR}${TMACDIR}/man.local)
-   ${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \
-   ${DIST_DIR}/man.local ${DESTDIR}${TMACDIR}
-.endif
-
-.include 

Copied: stable/10/gnu/usr.bin/groff/tmac/fr.ISO8859-1.in (from r289637, 
stable/10/gnu/usr.bin/groff/tmac/fr.ISO8859-1)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ stable/10/gnu/usr.bin/groff/tmac/fr.ISO8859-1.inTue Oct 20 18:20:38 
2015(r289638, copy of r289637, 
stable/10/gnu/usr.bin/groff/tmac/fr.ISO8859-1)
@@ -0,0 +1,140 @@
+.\" Copyright (c) 2002 Sebastien Gioria .
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted 

svn commit: r289642 - stable/9/usr.bin/truss

2015-10-20 Thread Bryan Drewery
Author: bdrewery
Date: Tue Oct 20 18:37:42 2015
New Revision: 289642
URL: https://svnweb.freebsd.org/changeset/base/289642

Log:
  MFC r288903:
  
Fix crash if a process sends itself a SIGTRAP.  Just forward it as expected.
  
This does not match head as the code was rewritten significantly there.
  
  Relnotes: yes

Modified:
  stable/9/usr.bin/truss/setup.c
Directory Properties:
  stable/9/usr.bin/truss/   (props changed)

Modified: stable/9/usr.bin/truss/setup.c
==
--- stable/9/usr.bin/truss/setup.c  Tue Oct 20 18:35:52 2015
(r289641)
+++ stable/9/usr.bin/truss/setup.c  Tue Oct 20 18:37:42 2015
(r289642)
@@ -221,11 +221,9 @@ detach:
info->pr_why = S_SCX;
info->curthread->in_syscall = 0;
break;
-   } else {
-   errx(1,
-  "pl_flags %x contains neither PL_FLAG_SCE nor PL_FLAG_SCX",
-   lwpinfo.pl_flags);
}
+   /* We didn't send the SIGTRAP, just forward it. */
+   /* FALLTHROUGH */
default:
info->pr_why = S_SIG;
info->pr_data = WSTOPSIG(waitval);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289644 - in head/sys/ofed/include: asm linux

2015-10-20 Thread Hans Petter Selasky
Author: hselasky
Date: Tue Oct 20 19:08:26 2015
New Revision: 289644
URL: https://svnweb.freebsd.org/changeset/base/289644

Log:
  Move location of RCS keyword according to style.
  
  Suggested by: jhb @
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/ofed/include/asm/atomic-long.h
  head/sys/ofed/include/asm/atomic.h
  head/sys/ofed/include/asm/byteorder.h
  head/sys/ofed/include/asm/fcntl.h
  head/sys/ofed/include/asm/io.h
  head/sys/ofed/include/asm/pgtable.h
  head/sys/ofed/include/asm/types.h
  head/sys/ofed/include/asm/uaccess.h
  head/sys/ofed/include/linux/bitops.h
  head/sys/ofed/include/linux/cache.h
  head/sys/ofed/include/linux/cdev.h
  head/sys/ofed/include/linux/clocksource.h
  head/sys/ofed/include/linux/compat.h
  head/sys/ofed/include/linux/compiler.h
  head/sys/ofed/include/linux/completion.h
  head/sys/ofed/include/linux/delay.h
  head/sys/ofed/include/linux/device.h
  head/sys/ofed/include/linux/dma-attrs.h
  head/sys/ofed/include/linux/dma-mapping.h
  head/sys/ofed/include/linux/dmapool.h
  head/sys/ofed/include/linux/err.h
  head/sys/ofed/include/linux/errno.h
  head/sys/ofed/include/linux/etherdevice.h
  head/sys/ofed/include/linux/file.h
  head/sys/ofed/include/linux/fs.h
  head/sys/ofed/include/linux/gfp.h
  head/sys/ofed/include/linux/hardirq.h
  head/sys/ofed/include/linux/idr.h
  head/sys/ofed/include/linux/if_arp.h
  head/sys/ofed/include/linux/if_ether.h
  head/sys/ofed/include/linux/if_vlan.h
  head/sys/ofed/include/linux/in.h
  head/sys/ofed/include/linux/in6.h
  head/sys/ofed/include/linux/inetdevice.h
  head/sys/ofed/include/linux/interrupt.h
  head/sys/ofed/include/linux/io-mapping.h
  head/sys/ofed/include/linux/io.h
  head/sys/ofed/include/linux/ioctl.h
  head/sys/ofed/include/linux/jhash.h
  head/sys/ofed/include/linux/jiffies.h
  head/sys/ofed/include/linux/kdev_t.h
  head/sys/ofed/include/linux/kernel.h
  head/sys/ofed/include/linux/kmod.h
  head/sys/ofed/include/linux/kobject.h
  head/sys/ofed/include/linux/kref.h
  head/sys/ofed/include/linux/kthread.h
  head/sys/ofed/include/linux/ktime.h
  head/sys/ofed/include/linux/linux_compat.c
  head/sys/ofed/include/linux/linux_idr.c
  head/sys/ofed/include/linux/linux_kmod.c
  head/sys/ofed/include/linux/linux_pci.c
  head/sys/ofed/include/linux/linux_radix.c
  head/sys/ofed/include/linux/list.h
  head/sys/ofed/include/linux/lockdep.h
  head/sys/ofed/include/linux/log2.h
  head/sys/ofed/include/linux/math64.h
  head/sys/ofed/include/linux/miscdevice.h
  head/sys/ofed/include/linux/mm.h
  head/sys/ofed/include/linux/module.h
  head/sys/ofed/include/linux/moduleparam.h
  head/sys/ofed/include/linux/mutex.h
  head/sys/ofed/include/linux/net.h
  head/sys/ofed/include/linux/netdevice.h
  head/sys/ofed/include/linux/notifier.h
  head/sys/ofed/include/linux/page.h
  head/sys/ofed/include/linux/pci.h
  head/sys/ofed/include/linux/poll.h
  head/sys/ofed/include/linux/printk.h
  head/sys/ofed/include/linux/radix-tree.h
  head/sys/ofed/include/linux/random.h
  head/sys/ofed/include/linux/rbtree.h
  head/sys/ofed/include/linux/rwlock.h
  head/sys/ofed/include/linux/rwsem.h
  head/sys/ofed/include/linux/scatterlist.h
  head/sys/ofed/include/linux/sched.h
  head/sys/ofed/include/linux/semaphore.h
  head/sys/ofed/include/linux/slab.h
  head/sys/ofed/include/linux/socket.h
  head/sys/ofed/include/linux/spinlock.h
  head/sys/ofed/include/linux/string.h
  head/sys/ofed/include/linux/sysfs.h
  head/sys/ofed/include/linux/time.h
  head/sys/ofed/include/linux/timer.h
  head/sys/ofed/include/linux/types.h
  head/sys/ofed/include/linux/uaccess.h
  head/sys/ofed/include/linux/vmalloc.h
  head/sys/ofed/include/linux/wait.h
  head/sys/ofed/include/linux/workqueue.h

Modified: head/sys/ofed/include/asm/atomic-long.h
==
--- head/sys/ofed/include/asm/atomic-long.h Tue Oct 20 19:04:13 2015
(r289643)
+++ head/sys/ofed/include/asm/atomic-long.h Tue Oct 20 19:08:26 2015
(r289644)
@@ -1,4 +1,3 @@
-/* $FreeBSD$ */
 /*-
  * Copyright (c) 2010 Isilon Systems, Inc.
  * Copyright (c) 2010 iX Systems, Inc.
@@ -26,8 +25,9 @@
  * 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_ATOMIC_LONG_H_
 #define_ATOMIC_LONG_H_
 

Modified: head/sys/ofed/include/asm/atomic.h
==
--- head/sys/ofed/include/asm/atomic.h  Tue Oct 20 19:04:13 2015
(r289643)
+++ head/sys/ofed/include/asm/atomic.h  Tue Oct 20 19:08:26 2015
(r289644)
@@ -1,4 +1,3 @@
-/* $FreeBSD$ */
 /*-
  * Copyright (c) 2010 Isilon Systems, Inc.
  * Copyright (c) 2010 iX Systems, Inc.
@@ -26,8 +25,9 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR 

svn commit: r289649 - head/sys/dev/ntb/if_ntb

2015-10-20 Thread Conrad E. Meyer
Author: cem
Date: Tue Oct 20 19:20:24 2015
New Revision: 289649
URL: https://svnweb.freebsd.org/changeset/base/289649

Log:
  if_ntb: Use if_printf instead of device_printf
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/ntb/if_ntb/if_ntb.c

Modified: head/sys/dev/ntb/if_ntb/if_ntb.c
==
--- head/sys/dev/ntb/if_ntb/if_ntb.cTue Oct 20 19:20:15 2015
(r289648)
+++ head/sys/dev/ntb/if_ntb/if_ntb.cTue Oct 20 19:20:24 2015
(r289649)
@@ -797,7 +797,7 @@ ntb_transport_link_up(struct ntb_transpo
 
qp->client_ready = true;
if (bootverbose)
-   device_printf(ntb_get_device(qp->ntb), "qp client ready\n");
+   if_printf(qp->transport->ifp, "qp client ready\n");
 
if (qp->transport->link_is_up)
callout_reset(>link_work, 0, ntb_qp_link_work, qp);
@@ -1166,11 +1166,11 @@ ntb_transport_event_callback(void *data)
 
if (ntb_link_is_up(nt->ntb, NULL, NULL)) {
if (bootverbose)
-   device_printf(ntb_get_device(nt->ntb), "HW link up\n");
+   if_printf(nt->ifp, "HW link up\n");
callout_reset(>link_work, 0, ntb_transport_link_work, nt);
} else {
if (bootverbose)
-   device_printf(ntb_get_device(nt->ntb), "HW link 
down\n");
+   if_printf(nt->ifp, "HW link down\n");
ntb_transport_link_cleanup(nt);
}
 }
@@ -1233,7 +1233,7 @@ ntb_transport_link_work(void *arg)
 
nt->link_is_up = true;
if (bootverbose)
-   device_printf(ntb_get_device(ntb), "transport link up\n");
+   if_printf(nt->ifp, "transport link up\n");
 
for (i = 0; i < nt->qp_count; i++) {
qp = >qp_vec[i];
@@ -1294,7 +1294,7 @@ ntb_set_mw(struct ntb_transport_ctx *nt,
 * with the Linux driver.
 */
if (mw->dma_addr % mw->xlat_align != 0) {
-   device_printf(ntb_get_device(nt->ntb),
+   if_printf(nt->ifp,
"DMA memory 0x%jx not aligned to BAR size 0x%x\n",
(uintmax_t)mw->dma_addr, size);
ntb_free_mw(nt, num_mw);
@@ -1304,8 +1304,7 @@ ntb_set_mw(struct ntb_transport_ctx *nt,
/* Notify HW the memory location of the receive buffer */
rc = ntb_mw_set_trans(nt->ntb, num_mw, mw->dma_addr, mw->xlat_size);
if (rc) {
-   device_printf(ntb_get_device(nt->ntb),
-   "Unable to set mw%d translation", num_mw);
+   if_printf(nt->ifp, "Unable to set mw%d translation", num_mw);
ntb_free_mw(nt, num_mw);
return (rc);
}
@@ -1397,7 +1396,7 @@ ntb_qp_link_work(void *arg)
/* See if the remote side is up */
if ((val & (1ull << qp->qp_num)) != 0) {
if (bootverbose)
-   device_printf(ntb_get_device(ntb), "qp link up\n");
+   if_printf(nt->ifp, "qp link up\n");
qp->link_is_up = true;
 
if (qp->event_handler != NULL)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289650 - head/sys/dev/ntb/if_ntb

2015-10-20 Thread Conrad E. Meyer
Author: cem
Date: Tue Oct 20 19:20:33 2015
New Revision: 289650
URL: https://svnweb.freebsd.org/changeset/base/289650

Log:
  if_ntb: Correct over-long lines, use qmin()
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/ntb/if_ntb/if_ntb.c

Modified: head/sys/dev/ntb/if_ntb/if_ntb.c
==
--- head/sys/dev/ntb/if_ntb/if_ntb.cTue Oct 20 19:20:24 2015
(r289649)
+++ head/sys/dev/ntb/if_ntb/if_ntb.cTue Oct 20 19:20:33 2015
(r289650)
@@ -673,8 +673,8 @@ ntb_transport_init_queue(struct ntb_tran
qp->rx_info = (void *)((char *)qp->tx_mw + tx_size);
 
/* Due to house-keeping, there must be at least 2 buffs */
-   qp->tx_max_frame = min(transport_mtu + sizeof(struct 
ntb_payload_header),
-   tx_size / 2);
+   qp->tx_max_frame = qmin(tx_size / 2,
+   transport_mtu + sizeof(struct ntb_payload_header));
qp->tx_max_entry = tx_size / qp->tx_max_frame;
 
callout_init(>link_work, 0);
@@ -1356,8 +1356,8 @@ ntb_transport_setup_qp_mw(struct ntb_tra
qp->remote_rx_info = (void*)((char *)qp->rx_buff + rx_size);
 
/* Due to house-keeping, there must be at least 2 buffs */
-   qp->rx_max_frame = min(transport_mtu + sizeof(struct 
ntb_payload_header),
-   rx_size / 2);
+   qp->rx_max_frame = qmin(rx_size / 2,
+   transport_mtu + sizeof(struct ntb_payload_header));
qp->rx_max_entry = rx_size / qp->rx_max_frame;
qp->rx_index = 0;
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289648 - head/sys/dev/ntb/ntb_hw

2015-10-20 Thread Conrad E. Meyer
Author: cem
Date: Tue Oct 20 19:20:15 2015
New Revision: 289648
URL: https://svnweb.freebsd.org/changeset/base/289648

Log:
  NTB: MFV 2f887b9a: Rename Intel code names to platform names
  
  Mechanically replace "SOC" with "ATOM" to match Linux.  No functional
  change.  Original Linux commit log follows:
  
  Instead of using the platform code names, use the correct platform names
  to identify the respective Intel NTB hardware.
  
  Authored by:  Dave Jiang
  Obtained from:Linux (Dual BSD/GPL driver)
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/ntb/ntb_hw/ntb_hw.c
  head/sys/dev/ntb/ntb_hw/ntb_regs.h

Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c
==
--- head/sys/dev/ntb/ntb_hw/ntb_hw.cTue Oct 20 19:20:06 2015
(r289647)
+++ head/sys/dev/ntb/ntb_hw/ntb_hw.cTue Oct 20 19:20:15 2015
(r289648)
@@ -60,16 +60,16 @@ __FBSDID("$FreeBSD$");
  * be picked up and redistributed in Linux with a dual GPL/BSD license.
  */
 
-#define MAX_MSIX_INTERRUPTS MAX(XEON_DB_COUNT, SOC_DB_COUNT)
+#define MAX_MSIX_INTERRUPTS MAX(XEON_DB_COUNT, ATOM_DB_COUNT)
 
 #define NTB_HB_TIMEOUT 1 /* second */
-#define SOC_LINK_RECOVERY_TIME 500 /* ms */
+#define ATOM_LINK_RECOVERY_TIME500 /* ms */
 
 #define DEVICE2SOFTC(dev) ((struct ntb_softc *) device_get_softc(dev))
 
 enum ntb_device_type {
NTB_XEON,
-   NTB_SOC
+   NTB_ATOM
 };
 
 /* ntb_conn_type are hardware numbers, cannot change. */
@@ -287,11 +287,11 @@ static void ntb_free_msix_vec(struct ntb
 static struct ntb_hw_info *ntb_get_device_info(uint32_t device_id);
 static void ntb_detect_max_mw(struct ntb_softc *ntb);
 static int ntb_detect_xeon(struct ntb_softc *ntb);
-static int ntb_detect_soc(struct ntb_softc *ntb);
+static int ntb_detect_atom(struct ntb_softc *ntb);
 static int ntb_xeon_init_dev(struct ntb_softc *ntb);
-static int ntb_soc_init_dev(struct ntb_softc *ntb);
+static int ntb_atom_init_dev(struct ntb_softc *ntb);
 static void ntb_teardown_xeon(struct ntb_softc *ntb);
-static void configure_soc_secondary_side_bars(struct ntb_softc *ntb);
+static void configure_atom_secondary_side_bars(struct ntb_softc *ntb);
 static void xeon_reset_sbar_size(struct ntb_softc *, enum ntb_bar idx,
 enum ntb_bar regbar);
 static void xeon_set_sbar_base_and_limit(struct ntb_softc *,
@@ -301,19 +301,19 @@ static void xeon_set_pbar_xlat(struct nt
 static int xeon_setup_b2b_mw(struct ntb_softc *,
 const struct ntb_b2b_addr *addr, const struct ntb_b2b_addr *peer_addr);
 static inline bool link_is_up(struct ntb_softc *ntb);
-static inline bool soc_link_is_err(struct ntb_softc *ntb);
+static inline bool atom_link_is_err(struct ntb_softc *ntb);
 static inline enum ntb_speed ntb_link_sta_speed(struct ntb_softc *);
 static inline enum ntb_width ntb_link_sta_width(struct ntb_softc *);
-static void soc_link_hb(void *arg);
+static void atom_link_hb(void *arg);
 static void ntb_db_event(struct ntb_softc *ntb, uint32_t vec);
-static void recover_soc_link(void *arg);
+static void recover_atom_link(void *arg);
 static bool ntb_poll_link(struct ntb_softc *ntb);
 static void save_bar_parameters(struct ntb_pci_bar_info *bar);
 
 static struct ntb_hw_info pci_ids[] = {
/* XXX: PS/SS IDs left out until they are supported. */
{ 0x0C4E8086, "BWD Atom Processor S1200 Non-Transparent Bridge B2B",
-   NTB_SOC, 0 },
+   NTB_ATOM, 0 },
 
{ 0x37258086, "JSF Xeon C35xx/C55xx Non-Transparent Bridge B2B",
NTB_XEON, NTB_SDOORBELL_LOCKUP | NTB_B2BDOORBELL_BIT14 },
@@ -329,40 +329,40 @@ static struct ntb_hw_info pci_ids[] = {
NTB_SDOORBELL_LOCKUP | NTB_B2BDOORBELL_BIT14 |
NTB_SB01BASE_LOCKUP },
 
-   { 0x, NULL, NTB_SOC, 0 }
+   { 0x, NULL, NTB_ATOM, 0 }
 };
 
-static const struct ntb_reg soc_reg = {
-   .ntb_ctl = SOC_NTBCNTL_OFFSET,
-   .lnk_sta = SOC_LINK_STATUS_OFFSET,
+static const struct ntb_reg atom_reg = {
+   .ntb_ctl = ATOM_NTBCNTL_OFFSET,
+   .lnk_sta = ATOM_LINK_STATUS_OFFSET,
.db_size = sizeof(uint64_t),
.mw_bar = { NTB_B2B_BAR_1, NTB_B2B_BAR_2 },
 };
 
-static const struct ntb_alt_reg soc_pri_reg = {
-   .db_bell = SOC_PDOORBELL_OFFSET,
-   .db_mask = SOC_PDBMSK_OFFSET,
-   .spad = SOC_SPAD_OFFSET,
+static const struct ntb_alt_reg atom_pri_reg = {
+   .db_bell = ATOM_PDOORBELL_OFFSET,
+   .db_mask = ATOM_PDBMSK_OFFSET,
+   .spad = ATOM_SPAD_OFFSET,
 };
 
-static const struct ntb_alt_reg soc_b2b_reg = {
-   .db_bell = SOC_B2B_DOORBELL_OFFSET,
-   .spad = SOC_B2B_SPAD_OFFSET,
+static const struct ntb_alt_reg atom_b2b_reg = {
+   .db_bell = ATOM_B2B_DOORBELL_OFFSET,
+   .spad = ATOM_B2B_SPAD_OFFSET,
 };
 
-static const struct ntb_xlat_reg soc_sec_xlat = {
+static const struct ntb_xlat_reg atom_sec_xlat = {
 #if 0
/* "FIXME" says the Linux 

svn commit: r289652 - head/sys/dev/ntb/if_ntb

2015-10-20 Thread Conrad E. Meyer
Author: cem
Date: Tue Oct 20 19:20:52 2015
New Revision: 289652
URL: https://svnweb.freebsd.org/changeset/base/289652

Log:
  NTB: MFV 8c9edf63: Fix zero size or integer overflow in ntb_set_mw
  
  A plain 32 bit integer will overflow for values over 4GiB.
  
  Change the plain integer size to the appropriate size type in
  ntb_set_mw.  Change the type of the size parameter and two local
  variables used for size.
  
  Even if there is no overflow, a size of zero is invalid here.
  
  Authored by:  Allen Hubbe
  Reported by:  Juyoung Jung
  Obtained from:Linux (Dual BSD/GPL driver)
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/ntb/if_ntb/if_ntb.c

Modified: head/sys/dev/ntb/if_ntb/if_ntb.c
==
--- head/sys/dev/ntb/if_ntb/if_ntb.cTue Oct 20 19:20:42 2015
(r289651)
+++ head/sys/dev/ntb/if_ntb/if_ntb.cTue Oct 20 19:20:52 2015
(r289652)
@@ -295,7 +295,7 @@ static void ntb_complete_rxc(void *arg, 
 static void ntb_transport_doorbell_callback(void *data, uint32_t vector);
 static void ntb_transport_event_callback(void *data);
 static void ntb_transport_link_work(void *arg);
-static int ntb_set_mw(struct ntb_transport_ctx *, int num_mw, unsigned size);
+static int ntb_set_mw(struct ntb_transport_ctx *, int num_mw, size_t size);
 static void ntb_free_mw(struct ntb_transport_ctx *nt, int num_mw);
 static int ntb_transport_setup_qp_mw(struct ntb_transport_ctx *nt,
 unsigned int qp_num);
@@ -1266,12 +1266,15 @@ out:
 }
 
 static int
-ntb_set_mw(struct ntb_transport_ctx *nt, int num_mw, unsigned size)
+ntb_set_mw(struct ntb_transport_ctx *nt, int num_mw, size_t size)
 {
struct ntb_transport_mw *mw = >mw_vec[num_mw];
-   unsigned xlat_size, buff_size;
+   size_t xlat_size, buff_size;
int rc;
 
+   if (size == 0)
+   return (EINVAL);
+
xlat_size = roundup(size, mw->xlat_align_size);
buff_size = roundup(size, mw->xlat_align);
 
@@ -1305,7 +1308,7 @@ ntb_set_mw(struct ntb_transport_ctx *nt,
 */
if (mw->dma_addr % mw->xlat_align != 0) {
if_printf(nt->ifp,
-   "DMA memory 0x%jx not aligned to BAR size 0x%x\n",
+   "DMA memory 0x%jx not aligned to BAR size 0x%zx\n",
(uintmax_t)mw->dma_addr, size);
ntb_free_mw(nt, num_mw);
return (ENOMEM);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289653 - head/sys/dev/ntb/if_ntb

2015-10-20 Thread Conrad E. Meyer
Author: cem
Date: Tue Oct 20 19:21:01 2015
New Revision: 289653
URL: https://svnweb.freebsd.org/changeset/base/289653

Log:
  if_ntb: Diff-reduce with Linux; add queue index type
  
  Add ntb_q_idx_t so it is more clear which struct members are of the same
  type (some bogus uint64_ts snuck in that should have been unsigned int).
  
  Add tx_err_no_buf and s/ENOMEM/EBUSY/ in tx_enqueue to match Linux.
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/ntb/if_ntb/if_ntb.c

Modified: head/sys/dev/ntb/if_ntb/if_ntb.c
==
--- head/sys/dev/ntb/if_ntb/if_ntb.cTue Oct 20 19:20:52 2015
(r289652)
+++ head/sys/dev/ntb/if_ntb/if_ntb.cTue Oct 20 19:21:01 2015
(r289653)
@@ -105,6 +105,8 @@ SYSCTL_UINT(_hw_ntb, OID_AUTO, max_num_c
 
 STAILQ_HEAD(ntb_queue_list, ntb_queue_entry);
 
+typedef unsigned ntb_q_idx_t;
+
 struct ntb_queue_entry {
/* ntb_queue list reference */
STAILQ_ENTRY(ntb_queue_entry) entry;
@@ -117,11 +119,11 @@ struct ntb_queue_entry {
 
struct ntb_transport_qp *qp;
struct ntb_payload_header   *x_hdr;
-   unsignedindex;
+   ntb_q_idx_t index;
 };
 
 struct ntb_rx_info {
-   unsigned int entry;
+   ntb_q_idx_t entry;
 };
 
 struct ntb_transport_qp {
@@ -143,8 +145,8 @@ struct ntb_transport_qp {
struct mtx  ntb_tx_free_q_lock;
void*tx_mw;
bus_addr_t  tx_mw_phys;
-   uint64_ttx_index;
-   uint64_ttx_max_entry;
+   ntb_q_idx_t tx_index;
+   ntb_q_idx_t tx_max_entry;
uint64_ttx_max_frame;
 
void (*rx_handler)(struct ntb_transport_qp *qp, void *qp_data,
@@ -157,8 +159,8 @@ struct ntb_transport_qp {
struct task rx_completion_task;
struct task rxc_db_work;
void*rx_buff;
-   uint64_trx_index;
-   uint64_trx_max_entry;
+   ntb_q_idx_t rx_index;
+   ntb_q_idx_t rx_max_entry;
uint64_trx_max_frame;
 
void (*event_handler)(void *data, enum ntb_link_event status);
@@ -178,6 +180,7 @@ struct ntb_transport_qp {
uint64_ttx_bytes;
uint64_ttx_pkts;
uint64_ttx_ring_full;
+   uint64_ttx_err_no_buf;
 };
 
 struct ntb_queue_handlers {
@@ -842,7 +845,8 @@ ntb_transport_tx_enqueue(struct ntb_tran
entry = ntb_list_rm(>ntb_tx_free_q_lock, >tx_free_q);
if (entry == NULL) {
CTR0(KTR_NTB, "TX: could not get entry from tx_free_q");
-   return (ENOMEM);
+   qp->tx_err_no_buf++;
+   return (EBUSY);
}
CTR1(KTR_NTB, "TX: got entry %p from tx_free_q", entry);
 
@@ -961,7 +965,7 @@ static void
 ntb_transport_rxc_db(void *arg, int pending __unused)
 {
struct ntb_transport_qp *qp = arg;
-   uint64_t i;
+   ntb_q_idx_t i;
int rc;
 
/*
@@ -1346,7 +1350,7 @@ ntb_transport_setup_qp_mw(struct ntb_tra
struct ntb_transport_qp *qp = >qp_vec[qp_num];
struct ntb_transport_mw *mw;
void *offset;
-   uint64_t i;
+   ntb_q_idx_t i;
size_t rx_size;
unsigned num_qps_mw, mw_num, mw_count;
 
@@ -1473,7 +1477,8 @@ ntb_qp_link_down_reset(struct ntb_transp
qp->rx_ring_empty = 0;
qp->tx_ring_full = 0;
 
-   qp->rx_err_no_buf = qp->rx_err_oflow = qp->rx_err_ver = 0;
+   qp->rx_err_no_buf = qp->tx_err_no_buf = 0;
+   qp->rx_err_oflow = qp->rx_err_ver = 0;
 }
 
 static void
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r289643 - head

2015-10-20 Thread Eric van Gyzen
On 10/20/2015 14:04, Alexander Motin wrote:
> Author: mav
> Date: Tue Oct 20 19:04:13 2015
> New Revision: 289643
> URL: https://svnweb.freebsd.org/changeset/base/289643
> 
> Log:
>   Document isp_*_multi firmware kernel modules removal at r289626.
> 
> Modified:
>   head/UPDATING

Thanks!

Eric
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289635 - head/sys/dev/qlxgbe

2015-10-20 Thread David C Somayajulu
Author: davidcs
Date: Tue Oct 20 17:27:11 2015
New Revision: 289635
URL: https://svnweb.freebsd.org/changeset/base/289635

Log:
  ql_hw.c: fixed error code INJCT_HEARTBEAT_FAILURE
  ql_os.c: removed unnecessary debug printf
  ql_ver.h: updated version number
  MFC after:5 days

Modified:
  head/sys/dev/qlxgbe/ql_hw.c
  head/sys/dev/qlxgbe/ql_os.c
  head/sys/dev/qlxgbe/ql_ver.h

Modified: head/sys/dev/qlxgbe/ql_hw.c
==
--- head/sys/dev/qlxgbe/ql_hw.c Tue Oct 20 16:10:46 2015(r289634)
+++ head/sys/dev/qlxgbe/ql_hw.c Tue Oct 20 17:27:11 2015(r289635)
@@ -387,6 +387,7 @@ ql_hw_add_sysctls(qla_host_t *ha)
"Minidump Utility can start minidump process");
 #ifdef QL_DBG
 
+   ha->err_inject = 0;
 SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev),
 SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
 OID_AUTO, "err_inject",
@@ -3057,7 +3058,7 @@ ql_hw_check_health(qla_host_t *ha)
val = READ_REG32(ha, Q8_FIRMWARE_HEARTBEAT);
 
if ((val != ha->hw.hbeat_value) &&
-   (!(QL_ERR_INJECT(ha, INJCT_TEMPERATURE_FAILURE {
+   (!(QL_ERR_INJECT(ha, INJCT_HEARTBEAT_FAILURE {
ha->hw.hbeat_value = val;
return 0;
}

Modified: head/sys/dev/qlxgbe/ql_os.c
==
--- head/sys/dev/qlxgbe/ql_os.c Tue Oct 20 16:10:46 2015(r289634)
+++ head/sys/dev/qlxgbe/ql_os.c Tue Oct 20 17:27:11 2015(r289635)
@@ -289,8 +289,6 @@ qla_pci_attach(device_t dev)
int i;
uint32_t num_rcvq = 0;
 
-   QL_DPRINT2(ha, (dev, "%s: enter\n", __func__));
-
 if ((ha = device_get_softc(dev)) == NULL) {
 device_printf(dev, "cannot get softc\n");
 return (ENOMEM);

Modified: head/sys/dev/qlxgbe/ql_ver.h
==
--- head/sys/dev/qlxgbe/ql_ver.hTue Oct 20 16:10:46 2015
(r289634)
+++ head/sys/dev/qlxgbe/ql_ver.hTue Oct 20 17:27:11 2015
(r289635)
@@ -36,6 +36,6 @@
 
 #define QLA_VERSION_MAJOR  3
 #define QLA_VERSION_MINOR  10
-#define QLA_VERSION_BUILD   24
+#define QLA_VERSION_BUILD   25
 
 #endif /* #ifndef _QL_VER_H_ */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289655 - head/sys/mips/conf

2015-10-20 Thread Sean Bruno
Author: sbruno
Date: Tue Oct 20 19:32:26 2015
New Revision: 289655
URL: https://svnweb.freebsd.org/changeset/base/289655

Log:
  Disable SWAPPING as we don't do it on this board.

Modified:
  head/sys/mips/conf/TP-MR3020

Modified: head/sys/mips/conf/TP-MR3020
==
--- head/sys/mips/conf/TP-MR3020Tue Oct 20 19:32:16 2015
(r289654)
+++ head/sys/mips/conf/TP-MR3020Tue Oct 20 19:32:26 2015
(r289655)
@@ -27,6 +27,9 @@ hints "TP-MR3020.hints"
 # Board memory - 32MB
 optionsAR71XX_REALMEM=(32*1024*1024)
 
+# Disable support for paging
+optionsNO_SWAPPING
+
 # i2c GPIO bus
 device gpioiic
 device iicbb
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289654 - in head/sys/dev/ntb: if_ntb ntb_hw

2015-10-20 Thread Conrad E. Meyer
Author: cem
Date: Tue Oct 20 19:32:16 2015
New Revision: 289654
URL: https://svnweb.freebsd.org/changeset/base/289654

Log:
  NTB: Revert r289645
  
  Per Benno, this is a Linuxism we do not need in FreeBSD.
  
  Suggested by: benno
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/ntb/if_ntb/if_ntb.c
  head/sys/dev/ntb/ntb_hw/ntb_hw.c

Modified: head/sys/dev/ntb/if_ntb/if_ntb.c
==
--- head/sys/dev/ntb/if_ntb/if_ntb.cTue Oct 20 19:21:01 2015
(r289653)
+++ head/sys/dev/ntb/if_ntb/if_ntb.cTue Oct 20 19:32:16 2015
(r289654)
@@ -400,9 +400,6 @@ ntb_setup_interface(void)
ntb_transport_link_up(net_softc.qp);
net_softc.bufsize = ntb_transport_max_size(net_softc.qp) +
sizeof(struct ether_header);
-
-   if_printf(ifp, "if_ntb device setup\n");
-
return (0);
 }
 
@@ -414,7 +411,6 @@ ntb_teardown_interface(void)
ntb_transport_link_down(net_softc.qp);
 
if (net_softc.ifp != NULL) {
-   if_printf(net_softc.ifp, "if_ntb device destroyed\n");
ether_ifdetach(net_softc.ifp);
if_free(net_softc.ifp);
}

Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c
==
--- head/sys/dev/ntb/ntb_hw/ntb_hw.cTue Oct 20 19:21:01 2015
(r289653)
+++ head/sys/dev/ntb/ntb_hw/ntb_hw.cTue Oct 20 19:32:16 2015
(r289654)
@@ -531,8 +531,6 @@ ntb_attach(device_t device)
 
pci_enable_busmaster(ntb->device);
 
-   device_printf(ntb->device, "NTB device registered\n");
-
 out:
if (error != 0)
ntb_detach(device);
@@ -564,8 +562,6 @@ ntb_detach(device_t device)
ntb_detect_max_mw(ntb);
ntb_unmap_pci_bar(ntb);
 
-   device_printf(ntb->device, "NTB device unregistered\n");
-
return (0);
 }
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r289633 - head/sys/ofed/include/linux

2015-10-20 Thread Navdeep Parhar

On 10/20/2015 11:39, Hans Petter Selasky wrote:

Hi,

On 10/20/15 20:04, John Baldwin wrote:

On Tuesday, October 20, 2015 04:02:11 PM Hans Petter Selasky wrote:

Author: hselasky
Date: Tue Oct 20 16:02:11 2015
New Revision: 289633
URL: https://svnweb.freebsd.org/changeset/base/289633

Log:
   Add missing FreeBSD RCS keyword and SVN properties.

   Sponsored by:Mellanox Technologies

Modified:
   head/sys/ofed/include/linux/io-mapping.h   (contents, props changed)
   head/sys/ofed/include/linux/io.h   (contents, props changed)
   head/sys/ofed/include/linux/jhash.h   (contents, props changed)
   head/sys/ofed/include/linux/linux_compat.c   (contents, props
changed)
   head/sys/ofed/include/linux/linux_idr.c   (contents, props changed)
   head/sys/ofed/include/linux/linux_radix.c   (contents, props changed)
   head/sys/ofed/include/linux/vmalloc.h   (contents, props changed)

Modified: head/sys/ofed/include/linux/io-mapping.h
==

--- head/sys/ofed/include/linux/io-mapping.hTue Oct 20 15:28:02
2015(r289632)
+++ head/sys/ofed/include/linux/io-mapping.hTue Oct 20 16:02:11
2015(r289633)
@@ -1,3 +1,4 @@
+/* $FreeBSD$ */
  /*-
   * Copyright (c) 2010 Isilon Systems, Inc.
   * Copyright (c) 2010 iX Systems, Inc.


Just a note on style.  Most headers put the tag below the license
block like so
from :


I'll fix that.



/*-
  * Copyright (c) 1997,1998,2003 Doug Rabson
  * All rights reserved.
  *
...

  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF
  * SUCH DAMAGE.
  *
  * $FreeBSD: head/sys/sys/bus.h 284088 2015-06-06 17:25:45Z marcel $
  */

It would have been nice to be more consistent with the rest of the
tree.  Maybe
look around next time to see if there is an existing style?


Modified: head/sys/ofed/include/linux/jhash.h
==

--- head/sys/ofed/include/linux/jhash.hTue Oct 20 15:28:02
2015(r289632)
+++ head/sys/ofed/include/linux/jhash.hTue Oct 20 16:02:11
2015(r289633)
@@ -18,6 +18,7 @@
   *
   * I've modified Bob's hash to be useful in the Linux kernel, and
   * any bugs present are surely my fault.  -DaveM
+ * $FreeBSD$
   */


Please fix this one to leave a blank line before the tag at least.



I tried to make linux/jhash.h similar to dev/cxgb/common/jhash.h, which
are actually duplicate files.


cxgb's copy of jhash.h does have a blank line before the $FreeBSD$ tag. 
 These days jenkins_hash is available in the kernel (see hash(9)) so 
there's no real need for cxgb to include this file, but I don't touch 
cxgb except for bug fixes.


cxgbe (with the 'e') uses FNV hash from the kernel and so it doesn't 
have any duplicate hashing implementation.


Regards,
Navdeep

___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r289203 - head/usr.sbin/makefs

2015-10-20 Thread Ed Maste
On 12 October 2015 at 22: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.
>...
> +.Op Fl r Ar roundup

Note that NetBSD's makefs already has -r assigned
-r When merging multiple directories replace duplicate files with the
last found.

We should pick a different option, and push this patch there too.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289640 - stable/9/sbin/ipf/ipftest

2015-10-20 Thread Bryan Drewery
Author: bdrewery
Date: Tue Oct 20 18:23:44 2015
New Revision: 289640
URL: https://svnweb.freebsd.org/changeset/base/289640

Log:
  MFC r288477:
  
META_MODE: For some reason meta mode cannot generate the intermediate tab.c
files.  Split up all of the targets to be more clear on how they are
generated to fix the problem.

Modified:
  stable/9/sbin/ipf/ipftest/Makefile
Directory Properties:
  stable/9/sbin/ipf/   (props changed)

Modified: stable/9/sbin/ipf/ipftest/Makefile
==
--- stable/9/sbin/ipf/ipftest/Makefile  Tue Oct 20 18:23:14 2015
(r289639)
+++ stable/9/sbin/ipf/ipftest/Makefile  Tue Oct 20 18:23:44 2015
(r289640)
@@ -25,15 +25,19 @@ CLEANFILES+=ipnat.tab.c ipnat.tab.h
 CLEANFILES+=   ippool_y.c ippool_l.c
 CLEANFILES+=   ippool.tab.c ippool.tab.h
 
-ipnat_y.c: ipnat_y.y
+ipnat.tab.c ipnat.tab.h: ipnat_y.y
${YACC} -b ipnat -d ${.ALLSRC}
+
+ipnat_y.c: ipnat.tab.c
sed -e 's/yy/ipnat_yy/g' \
-e 's/y.tab.c/ipnat_y.c/' \
-e s/\"ipnat_y.y\"/\"..\\/tools\\/ipnat_y.y\"/ \
ipnat.tab.c > ${.TARGET}
+
+ipnat_y.h: ipnat.tab.h
sed -e 's/yy/ipnat_yy/g' \
-e 's/y.tab.h/ipnat_y.h/' \
-   ipnat.tab.h > ${.TARGET:.c=.h}
+   ipnat.tab.h > ${.TARGET}
 
 ipnat_y.h: ipnat_y.c
 
@@ -47,13 +51,17 @@ ipnat_l.h: lexer.h
sed -e 's/yy/ipnat_yy/g' \
${.ALLSRC} > ${.TARGET}
 
-ippool_y.c: ippool_y.y
+ippool.tab.c ippool.tab.h: ippool_y.y
${YACC} -b ippool -d ${.ALLSRC}
+
+ippool_y.c: ippool.tab.c
sed -e 's/yy/ippool_yy/g' \
-e 's/"ippool_y.y"/"..\/tools\/ippool_y.y"/' \
ippool.tab.c > ${.TARGET}
+
+ippool_y.h: ippool.tab.h
sed -e 's/yy/ippool_yy/g' \
-   ippool.tab.h > ${.TARGET:.c=.h}
+   ippool.tab.h > ${.TARGET}
 
 ippool_y.h: ippool_y.c
 
@@ -67,13 +75,17 @@ ippool_l.h: lexer.h
sed -e 's/yy/ippool_yy/g' \
${.ALLSRC} > ${.TARGET}
 
-ipf_y.c: ipf_y.y
+ipf.tab.c ipf.tab.h: ipf_y.y
${YACC} -b ipf -d ${.ALLSRC}
+
+ipf_y.c: ipf.tab.c
sed -e 's/yy/ipf_yy/g' \
-e 's/"ipf_y.y"/"..\/tools\/ipf_y.y"/' \
ipf.tab.c > ${.TARGET}
+
+ipf_y.h: ipf.tab.h
sed -e 's/yy/ipf_yy/g' \
-   ipf.tab.h > ${.TARGET:.c=.h}
+   ipf.tab.h > ${.TARGET}
 
 ipf_y.h: ipf_y.c
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289639 - stable/10/sbin/ipf/ipftest

2015-10-20 Thread Bryan Drewery
Author: bdrewery
Date: Tue Oct 20 18:23:14 2015
New Revision: 289639
URL: https://svnweb.freebsd.org/changeset/base/289639

Log:
  MFC r288477:
  
META_MODE: For some reason meta mode cannot generate the intermediate tab.c
files.  Split up all of the targets to be more clear on how they are
generated to fix the problem.

Modified:
  stable/10/sbin/ipf/ipftest/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/ipf/ipftest/Makefile
==
--- stable/10/sbin/ipf/ipftest/Makefile Tue Oct 20 18:20:38 2015
(r289638)
+++ stable/10/sbin/ipf/ipftest/Makefile Tue Oct 20 18:23:14 2015
(r289639)
@@ -32,15 +32,19 @@ CLEANFILES+=ipnat.tab.c ipnat.tab.h
 CLEANFILES+=   ippool_y.c ippool_l.c
 CLEANFILES+=   ippool.tab.c ippool.tab.h
 
-ipnat_y.c: ipnat_y.y
+ipnat.tab.c ipnat.tab.h: ipnat_y.y
${YACC} -b ipnat -d ${.ALLSRC}
+
+ipnat_y.c: ipnat.tab.c
sed -e 's/yy/ipnat_yy/g' \
-e 's/y.tab.c/ipnat_y.c/' \
-e s/\"ipnat_y.y\"/\"..\\/tools\\/ipnat_y.y\"/ \
ipnat.tab.c > ${.TARGET}
+
+ipnat_y.h: ipnat.tab.h
sed -e 's/yy/ipnat_yy/g' \
-e 's/y.tab.h/ipnat_y.h/' \
-   ipnat.tab.h > ${.TARGET:.c=.h}
+   ipnat.tab.h > ${.TARGET}
 
 ipnat_y.h: ipnat_y.c
 
@@ -54,13 +58,17 @@ ipnat_l.h: lexer.h
sed -e 's/yy/ipnat_yy/g' \
${.ALLSRC} > ${.TARGET}
 
-ippool_y.c: ippool_y.y
+ippool.tab.c ippool.tab.h: ippool_y.y
${YACC} -b ippool -d ${.ALLSRC}
+
+ippool_y.c: ippool.tab.c
sed -e 's/yy/ippool_yy/g' \
-e 's/"ippool_y.y"/"..\/tools\/ippool_y.y"/' \
ippool.tab.c > ${.TARGET}
+
+ippool_y.h: ippool.tab.h
sed -e 's/yy/ippool_yy/g' \
-   ippool.tab.h > ${.TARGET:.c=.h}
+   ippool.tab.h > ${.TARGET}
 
 ippool_y.h: ippool_y.c
 
@@ -74,13 +82,17 @@ ippool_l.h: lexer.h
sed -e 's/yy/ippool_yy/g' \
${.ALLSRC} > ${.TARGET}
 
-ipf_y.c: ipf_y.y
+ipf.tab.c ipf.tab.h: ipf_y.y
${YACC} -b ipf -d ${.ALLSRC}
+
+ipf_y.c: ipf.tab.c
sed -e 's/yy/ipf_yy/g' \
-e 's/"ipf_y.y"/"..\/tools\/ipf_y.y"/' \
ipf.tab.c > ${.TARGET}
+
+ipf_y.h: ipf.tab.h
sed -e 's/yy/ipf_yy/g' \
-   ipf.tab.h > ${.TARGET:.c=.h}
+   ipf.tab.h > ${.TARGET}
 
 ipf_y.h: ipf_y.c
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289641 - stable/10/usr.bin/truss

2015-10-20 Thread Bryan Drewery
Author: bdrewery
Date: Tue Oct 20 18:35:52 2015
New Revision: 289641
URL: https://svnweb.freebsd.org/changeset/base/289641

Log:
  MFC r288903:
  
Fix crash if a process sends itself a SIGTRAP.  Just forward it as expected.
  
This does not match head as the code was rewritten significantly there.
  
  Relnotes: yes

Modified:
  stable/10/usr.bin/truss/setup.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/truss/setup.c
==
--- stable/10/usr.bin/truss/setup.c Tue Oct 20 18:23:44 2015
(r289640)
+++ stable/10/usr.bin/truss/setup.c Tue Oct 20 18:35:52 2015
(r289641)
@@ -221,11 +221,9 @@ detach:
info->pr_why = S_SCX;
info->curthread->in_syscall = 0;
break;
-   } else {
-   errx(1,
-  "pl_flags %x contains neither PL_FLAG_SCE nor PL_FLAG_SCX",
-   lwpinfo.pl_flags);
}
+   /* We didn't send the SIGTRAP, just forward it. */
+   /* FALLTHROUGH */
default:
info->pr_why = S_SIG;
info->pr_data = WSTOPSIG(waitval);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289651 - head/sys/dev/ntb/if_ntb

2015-10-20 Thread Conrad E. Meyer
Author: cem
Date: Tue Oct 20 19:20:42 2015
New Revision: 289651
URL: https://svnweb.freebsd.org/changeset/base/289651

Log:
  NTB: MFV da2e5ae5: Fix ntb_transport out-of-order RX update
  
  It was possible for a synchronous update of the RX index in the error
  case to get ahead of the asynchronous RX index update in the normal
  case.  Change the RX processing to preserve an RX completion order.
  
  There were two error cases.  First, if a buffer is not present to
  receive data, there would be no queue entry to preserve the RX
  completion order.  Instead of dropping the RX frame, leave the RX frame
  in the ring.  Schedule RX processing when RX entries are enqueued, in
  case there are RX frames waiting in the ring to be received.
  
  Second, if a buffer is too small to receive data, drop the frame in the
  ring, mark the RX entry as done, and indicate the error in the RX entry
  length.  Check for a negative length in the receive callback in
  ntb_netdev, and count occurrences as rx_length_errors.
  
  Authored by:  Allen Hubbe
  Obtained from:Linux (Dual BSD/GPL driver)
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/ntb/if_ntb/if_ntb.c

Modified: head/sys/dev/ntb/if_ntb/if_ntb.c
==
--- head/sys/dev/ntb/if_ntb/if_ntb.cTue Oct 20 19:20:33 2015
(r289650)
+++ head/sys/dev/ntb/if_ntb/if_ntb.cTue Oct 20 19:20:42 2015
(r289651)
@@ -149,10 +149,11 @@ struct ntb_transport_qp {
 
void (*rx_handler)(struct ntb_transport_qp *qp, void *qp_data,
void *data, int len);
+   struct ntb_queue_list   rx_post_q;
struct ntb_queue_list   rx_pend_q;
struct ntb_queue_list   rx_free_q;
-   struct mtx  ntb_rx_pend_q_lock;
-   struct mtx  ntb_rx_free_q_lock;
+   /* ntb_rx_q_lock: synchronize access to rx__q */
+   struct mtx  ntb_rx_q_lock;
struct task rx_completion_task;
struct task rxc_db_work;
void*rx_buff;
@@ -285,10 +286,11 @@ static void ntb_memcpy_tx(struct ntb_tra
 struct ntb_queue_entry *entry, void *offset);
 static void ntb_qp_full(void *arg);
 static void ntb_transport_rxc_db(void *arg, int pending);
-static void ntb_rx_pendq_full(void *arg);
 static int ntb_process_rxc(struct ntb_transport_qp *qp);
-static void ntb_rx_copy_task(struct ntb_transport_qp *qp,
+static void ntb_memcpy_rx(struct ntb_transport_qp *qp,
 struct ntb_queue_entry *entry, void *offset);
+static inline void ntb_rx_copy_callback(struct ntb_transport_qp *qp,
+void *data);
 static void ntb_complete_rxc(void *arg, int pending);
 static void ntb_transport_doorbell_callback(void *data, uint32_t vector);
 static void ntb_transport_event_callback(void *data);
@@ -308,6 +310,8 @@ static void ntb_list_add(struct mtx *loc
 struct ntb_queue_list *list);
 static struct ntb_queue_entry *ntb_list_rm(struct mtx *lock,
 struct ntb_queue_list *list);
+static struct ntb_queue_entry *ntb_list_mv(struct mtx *lock,
+struct ntb_queue_list *from, struct ntb_queue_list *to);
 static void create_random_local_eui48(u_char *eaddr);
 static unsigned int ntb_transport_max_size(struct ntb_transport_qp *qp);
 
@@ -681,12 +685,12 @@ ntb_transport_init_queue(struct ntb_tran
callout_init(>queue_full, 1);
callout_init(>rx_full, 1);
 
-   mtx_init(>ntb_rx_pend_q_lock, "ntb rx pend q", NULL, MTX_SPIN);
-   mtx_init(>ntb_rx_free_q_lock, "ntb rx free q", NULL, MTX_SPIN);
+   mtx_init(>ntb_rx_q_lock, "ntb rx q", NULL, MTX_SPIN);
mtx_init(>ntb_tx_free_q_lock, "ntb tx free q", NULL, MTX_SPIN);
TASK_INIT(>rx_completion_task, 0, ntb_complete_rxc, qp);
TASK_INIT(>rxc_db_work, 0, ntb_transport_rxc_db, qp);
 
+   STAILQ_INIT(>rx_post_q);
STAILQ_INIT(>rx_pend_q);
STAILQ_INIT(>rx_free_q);
STAILQ_INIT(>tx_free_q);
@@ -711,10 +715,13 @@ ntb_transport_free_queue(struct ntb_tran
qp->tx_handler = NULL;
qp->event_handler = NULL;
 
-   while ((entry = ntb_list_rm(>ntb_rx_free_q_lock, >rx_free_q)))
+   while ((entry = ntb_list_rm(>ntb_rx_q_lock, >rx_free_q)))
free(entry, M_NTB_IF);
 
-   while ((entry = ntb_list_rm(>ntb_rx_pend_q_lock, >rx_pend_q)))
+   while ((entry = ntb_list_rm(>ntb_rx_q_lock, >rx_pend_q)))
+   free(entry, M_NTB_IF);
+
+   while ((entry = ntb_list_rm(>ntb_rx_q_lock, >rx_post_q)))
free(entry, M_NTB_IF);
 
while ((entry = ntb_list_rm(>ntb_tx_free_q_lock, >tx_free_q)))
@@ -769,7 +776,7 @@ ntb_transport_create_queue(void *data, s
entry->cb_data = nt->ifp;
entry->buf = NULL;
entry->len = transport_mtu;
-   ntb_list_add(>ntb_rx_pend_q_lock, entry, >rx_pend_q);
+   ntb_list_add(>ntb_rx_q_lock, entry, >rx_pend_q);
}
 
for 

Re: svn commit: r289653 - head/sys/dev/ntb/if_ntb

2015-10-20 Thread Conrad Meyer
This catches us up to Linus' master branch as of today (the most
recent NTB patch there is from Sep 7, 2015) — modulo no DMA offload in
if_ntb, no debugfs-equivalent statistics, and neither of Linux' NTB
test drivers. Also we don't make any attempt to allocate memory in the
device-local NUMA zone, because that API doesn't exist yet. Nor do we
push back on the upper network stack layers to stop sending when our
queues are full, for the same reason.

That's not quite finished, though; Intel and EMC (ex-Isilon) have some
patches queued up waiting to go into Linux that should be applied too.

Thanks,
Conrad

On Tue, Oct 20, 2015 at 12:21 PM, Conrad E. Meyer  wrote:
> Author: cem
> Date: Tue Oct 20 19:21:01 2015
> New Revision: 289653
> URL: https://svnweb.freebsd.org/changeset/base/289653
>
> Log:
>   if_ntb: Diff-reduce with Linux; add queue index type
>
>   Add ntb_q_idx_t so it is more clear which struct members are of the same
>   type (some bogus uint64_ts snuck in that should have been unsigned int).
>
>   Add tx_err_no_buf and s/ENOMEM/EBUSY/ in tx_enqueue to match Linux.
>
>   Sponsored by: EMC / Isilon Storage Division
>
> Modified:
>   head/sys/dev/ntb/if_ntb/if_ntb.c
>
> Modified: head/sys/dev/ntb/if_ntb/if_ntb.c
> ==
> --- head/sys/dev/ntb/if_ntb/if_ntb.cTue Oct 20 19:20:52 2015
> (r289652)
> +++ head/sys/dev/ntb/if_ntb/if_ntb.cTue Oct 20 19:21:01 2015
> (r289653)
> @@ -105,6 +105,8 @@ SYSCTL_UINT(_hw_ntb, OID_AUTO, max_num_c
>
>  STAILQ_HEAD(ntb_queue_list, ntb_queue_entry);
>
> +typedef unsigned ntb_q_idx_t;
> +
>  struct ntb_queue_entry {
> /* ntb_queue list reference */
> STAILQ_ENTRY(ntb_queue_entry) entry;
> @@ -117,11 +119,11 @@ struct ntb_queue_entry {
>
> struct ntb_transport_qp *qp;
> struct ntb_payload_header   *x_hdr;
> -   unsignedindex;
> +   ntb_q_idx_t index;
>  };
>
>  struct ntb_rx_info {
> -   unsigned int entry;
> +   ntb_q_idx_t entry;
>  };
>
>  struct ntb_transport_qp {
> @@ -143,8 +145,8 @@ struct ntb_transport_qp {
> struct mtx  ntb_tx_free_q_lock;
> void*tx_mw;
> bus_addr_t  tx_mw_phys;
> -   uint64_ttx_index;
> -   uint64_ttx_max_entry;
> +   ntb_q_idx_t tx_index;
> +   ntb_q_idx_t tx_max_entry;
> uint64_ttx_max_frame;
>
> void (*rx_handler)(struct ntb_transport_qp *qp, void *qp_data,
> @@ -157,8 +159,8 @@ struct ntb_transport_qp {
> struct task rx_completion_task;
> struct task rxc_db_work;
> void*rx_buff;
> -   uint64_trx_index;
> -   uint64_trx_max_entry;
> +   ntb_q_idx_t rx_index;
> +   ntb_q_idx_t rx_max_entry;
> uint64_trx_max_frame;
>
> void (*event_handler)(void *data, enum ntb_link_event status);
> @@ -178,6 +180,7 @@ struct ntb_transport_qp {
> uint64_ttx_bytes;
> uint64_ttx_pkts;
> uint64_ttx_ring_full;
> +   uint64_ttx_err_no_buf;
>  };
>
>  struct ntb_queue_handlers {
> @@ -842,7 +845,8 @@ ntb_transport_tx_enqueue(struct ntb_tran
> entry = ntb_list_rm(>ntb_tx_free_q_lock, >tx_free_q);
> if (entry == NULL) {
> CTR0(KTR_NTB, "TX: could not get entry from tx_free_q");
> -   return (ENOMEM);
> +   qp->tx_err_no_buf++;
> +   return (EBUSY);
> }
> CTR1(KTR_NTB, "TX: got entry %p from tx_free_q", entry);
>
> @@ -961,7 +965,7 @@ static void
>  ntb_transport_rxc_db(void *arg, int pending __unused)
>  {
> struct ntb_transport_qp *qp = arg;
> -   uint64_t i;
> +   ntb_q_idx_t i;
> int rc;
>
> /*
> @@ -1346,7 +1350,7 @@ ntb_transport_setup_qp_mw(struct ntb_tra
> struct ntb_transport_qp *qp = >qp_vec[qp_num];
> struct ntb_transport_mw *mw;
> void *offset;
> -   uint64_t i;
> +   ntb_q_idx_t i;
> size_t rx_size;
> unsigned num_qps_mw, mw_num, mw_count;
>
> @@ -1473,7 +1477,8 @@ ntb_qp_link_down_reset(struct ntb_transp
> qp->rx_ring_empty = 0;
> qp->tx_ring_full = 0;
>
> -   qp->rx_err_no_buf = qp->rx_err_oflow = qp->rx_err_ver = 0;
> +   qp->rx_err_no_buf = qp->tx_err_no_buf = 0;
> +   qp->rx_err_oflow = qp->rx_err_ver = 0;
>  }
>
>  static void
>
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

svn commit: r289634 - in head/etc: etc.amd64 etc.i386 etc.mips etc.pc98 etc.powerpc etc.sparc64

2015-10-20 Thread Glen Barber
Author: gjb
Date: Tue Oct 20 16:10:46 2015
New Revision: 289634
URL: https://svnweb.freebsd.org/changeset/base/289634

Log:
  Enable all callin ttys if the tty is an available console.
  
  Discussed on: -arch@ (no objections)
  MFC after:1 week
  Sponsored by: The FreeBSD Foundation

Modified:
  head/etc/etc.amd64/ttys
  head/etc/etc.i386/ttys
  head/etc/etc.mips/ttys
  head/etc/etc.pc98/ttys
  head/etc/etc.powerpc/ttys
  head/etc/etc.sparc64/ttys

Modified: head/etc/etc.amd64/ttys
==
--- head/etc/etc.amd64/ttys Tue Oct 20 16:02:11 2015(r289633)
+++ head/etc/etc.amd64/ttys Tue Oct 20 16:10:46 2015(r289634)
@@ -42,8 +42,8 @@ ttyv8 "/usr/local/bin/xdm -nodaemon"  xte
 # Serial terminals
 # The 'dialup' keyword identifies dialin lines to login, fingerd etc.
 ttyu0  "/usr/libexec/getty 3wire"  vt100   onifconsole secure
-ttyu1  "/usr/libexec/getty std.9600"   dialup  off secure
-ttyu2  "/usr/libexec/getty std.9600"   dialup  off secure
-ttyu3  "/usr/libexec/getty std.9600"   dialup  off secure
+ttyu1  "/usr/libexec/getty 3wire"  vt100   onifconsole secure
+ttyu2  "/usr/libexec/getty 3wire"  vt100   onifconsole secure
+ttyu3  "/usr/libexec/getty 3wire"  vt100   onifconsole secure
 # Dumb console
 dcons  "/usr/libexec/getty std.9600"   vt100   off secure

Modified: head/etc/etc.i386/ttys
==
--- head/etc/etc.i386/ttys  Tue Oct 20 16:02:11 2015(r289633)
+++ head/etc/etc.i386/ttys  Tue Oct 20 16:10:46 2015(r289634)
@@ -42,8 +42,8 @@ ttyv8 "/usr/local/bin/xdm -nodaemon"  xte
 # Serial terminals
 # The 'dialup' keyword identifies dialin lines to login, fingerd etc.
 ttyu0  "/usr/libexec/getty 3wire"  vt100   onifconsole secure
-ttyu1  "/usr/libexec/getty std.9600"   dialup  off secure
-ttyu2  "/usr/libexec/getty std.9600"   dialup  off secure
-ttyu3  "/usr/libexec/getty std.9600"   dialup  off secure
+ttyu1  "/usr/libexec/getty 3wire"  vt100   onifconsole secure
+ttyu2  "/usr/libexec/getty 3wire"  vt100   onifconsole secure
+ttyu3  "/usr/libexec/getty 3wire"  vt100   onifconsole secure
 # Dumb console
 dcons  "/usr/libexec/getty std.9600"   vt100   off secure

Modified: head/etc/etc.mips/ttys
==
--- head/etc/etc.mips/ttys  Tue Oct 20 16:02:11 2015(r289633)
+++ head/etc/etc.mips/ttys  Tue Oct 20 16:10:46 2015(r289634)
@@ -30,7 +30,7 @@
 consolenoneunknown off secure
 # Serial terminals
 # The 'dialup' keyword identifies dialin lines to login, fingerd etc.
-ttyu0  "/usr/libexec/getty 3wire"  vt100   on  secure
-ttyu1  "/usr/libexec/getty std.115200" dialup  off secure
-ttyu2  "/usr/libexec/getty std.115200" dialup  off secure
-ttyu3  "/usr/libexec/getty std.115200" dialup  off secure
+ttyu0  "/usr/libexec/getty 3wire"  vt100   onifconsole secure
+ttyu1  "/usr/libexec/getty 3wire"  vt100   onifconsole secure
+ttyu2  "/usr/libexec/getty 3wire"  vt100   onifconsole secure
+ttyu3  "/usr/libexec/getty 3wire"  vt100   onifconsole secure

Modified: head/etc/etc.pc98/ttys
==
--- head/etc/etc.pc98/ttys  Tue Oct 20 16:02:11 2015(r289633)
+++ head/etc/etc.pc98/ttys  Tue Oct 20 16:10:46 2015(r289634)
@@ -41,9 +41,9 @@ ttyv7 "/usr/libexec/getty Pc" cons25w o
 ttyv8  "/usr/local/bin/xdm -nodaemon"  xterm   off secure
 # Serial terminals
 # The 'dialup' keyword identifies dialin lines to login, fingerd etc.
-ttyu0  "/usr/libexec/getty std.9600"   dialup  off secure
-ttyu1  "/usr/libexec/getty std.9600"   dialup  off secure
-ttyu2  "/usr/libexec/getty std.9600"   dialup  off secure
-ttyu3  "/usr/libexec/getty std.9600"   dialup  off secure
+ttyu0  "/usr/libexec/getty 3wire"  vt100   onifconsole secure
+ttyu1  "/usr/libexec/getty 3wire"  vt100   onifconsole secure
+ttyu2  "/usr/libexec/getty 3wire"  vt100   onifconsole secure
+ttyu3  "/usr/libexec/getty 3wire"  vt100   onifconsole secure
 # Dumb console
 dcons  "/usr/libexec/getty std.9600"   vt100   off secure

Modified: head/etc/etc.powerpc/ttys
==
--- head/etc/etc.powerpc/ttys   Tue Oct 20 16:02:11 2015(r289633)
+++ head/etc/etc.powerpc/ttys   Tue Oct 20 16:10:46 2015(r289634)
@@ -41,9 +41,9 @@ ttyv7 "/usr/libexec/getty Pc" xterm   on 
 #ttyv8 "/usr/local/bin/xdm -nodaemon"  xterm   off secure
 # Serial terminals
 # The 'dialup' keyword identifies dialin lines to login, fingerd etc.
-ttyu0  "/usr/libexec/getty 3wire"  vt100   on  secure
-ttyu1  "/usr/libexec/getty std.9600"   dialup  off secure
-ttyu2  "/usr/libexec/getty std.9600"   dialup  off secure
-ttyu3  

svn commit: r289631 - head/sys/arm/arm

2015-10-20 Thread Ian Lepore
Author: ian
Date: Tue Oct 20 15:15:30 2015
New Revision: 289631
URL: https://svnweb.freebsd.org/changeset/base/289631

Log:
  Uncomment some rather important code that was commented out for benchmarking.
  Normally this routine is supposed to loop until the PIC returns a "no more
  interrupts pending" indication.  I had commented that out to do just one
  interrupt per invokation to do some timing tests.
  
  Spotted by:   Svata Kraus
  Pointy Hat:   ian

Modified:
  head/sys/arm/arm/gic.c

Modified: head/sys/arm/arm/gic.c
==
--- head/sys/arm/arm/gic.c  Tue Oct 20 13:47:36 2015(r289630)
+++ head/sys/arm/arm/gic.c  Tue Oct 20 15:15:30 2015(r289631)
@@ -554,10 +554,10 @@ dispatch_irq:
arm_irq_dispatch(isrc, tf);
 
 next_irq:
-//  arm_irq_memory_barrier(irq); /* XXX */
-//  irq_active_reg = gic_c_read_4(sc, GICC_IAR);
-//  irq = irq_active_reg & 0x3FF;
-   if (0 && irq < sc->nirqs)
+   arm_irq_memory_barrier(irq);
+   irq_active_reg = gic_c_read_4(sc, GICC_IAR);
+   irq = irq_active_reg & 0x3FF;
+   if (irq < sc->nirqs)
goto dispatch_irq;
 
return (FILTER_HANDLED);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289633 - head/sys/ofed/include/linux

2015-10-20 Thread Hans Petter Selasky
Author: hselasky
Date: Tue Oct 20 16:02:11 2015
New Revision: 289633
URL: https://svnweb.freebsd.org/changeset/base/289633

Log:
  Add missing FreeBSD RCS keyword and SVN properties.
  
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/ofed/include/linux/io-mapping.h   (contents, props changed)
  head/sys/ofed/include/linux/io.h   (contents, props changed)
  head/sys/ofed/include/linux/jhash.h   (contents, props changed)
  head/sys/ofed/include/linux/linux_compat.c   (contents, props changed)
  head/sys/ofed/include/linux/linux_idr.c   (contents, props changed)
  head/sys/ofed/include/linux/linux_radix.c   (contents, props changed)
  head/sys/ofed/include/linux/vmalloc.h   (contents, props changed)

Modified: head/sys/ofed/include/linux/io-mapping.h
==
--- head/sys/ofed/include/linux/io-mapping.hTue Oct 20 15:28:02 2015
(r289632)
+++ head/sys/ofed/include/linux/io-mapping.hTue Oct 20 16:02:11 2015
(r289633)
@@ -1,3 +1,4 @@
+/* $FreeBSD$ */
 /*-
  * Copyright (c) 2010 Isilon Systems, Inc.
  * Copyright (c) 2010 iX Systems, Inc.

Modified: head/sys/ofed/include/linux/io.h
==
--- head/sys/ofed/include/linux/io.hTue Oct 20 15:28:02 2015
(r289632)
+++ head/sys/ofed/include/linux/io.hTue Oct 20 16:02:11 2015
(r289633)
@@ -1,3 +1,4 @@
+/* $FreeBSD$ */
 /*-
  * Copyright (c) 2010 Isilon Systems, Inc.
  * Copyright (c) 2010 iX Systems, Inc.

Modified: head/sys/ofed/include/linux/jhash.h
==
--- head/sys/ofed/include/linux/jhash.h Tue Oct 20 15:28:02 2015
(r289632)
+++ head/sys/ofed/include/linux/jhash.h Tue Oct 20 16:02:11 2015
(r289633)
@@ -18,6 +18,7 @@
  *
  * I've modified Bob's hash to be useful in the Linux kernel, and
  * any bugs present are surely my fault.  -DaveM
+ * $FreeBSD$
  */
 
 /* NOTE: Arguments are modified. */

Modified: head/sys/ofed/include/linux/linux_compat.c
==
--- head/sys/ofed/include/linux/linux_compat.c  Tue Oct 20 15:28:02 2015
(r289632)
+++ head/sys/ofed/include/linux/linux_compat.c  Tue Oct 20 16:02:11 2015
(r289633)
@@ -1,3 +1,4 @@
+/* $FreeBSD$ */
 /*-
  * Copyright (c) 2010 Isilon Systems, Inc.
  * Copyright (c) 2010 iX Systems, Inc.

Modified: head/sys/ofed/include/linux/linux_idr.c
==
--- head/sys/ofed/include/linux/linux_idr.c Tue Oct 20 15:28:02 2015
(r289632)
+++ head/sys/ofed/include/linux/linux_idr.c Tue Oct 20 16:02:11 2015
(r289633)
@@ -1,3 +1,4 @@
+/* $FreeBSD$ */
 /*-
  * Copyright (c) 2010 Isilon Systems, Inc.
  * Copyright (c) 2010 iX Systems, Inc.

Modified: head/sys/ofed/include/linux/linux_radix.c
==
--- head/sys/ofed/include/linux/linux_radix.c   Tue Oct 20 15:28:02 2015
(r289632)
+++ head/sys/ofed/include/linux/linux_radix.c   Tue Oct 20 16:02:11 2015
(r289633)
@@ -1,3 +1,4 @@
+/* $FreeBSD$ */
 /*-
  * Copyright (c) 2010 Isilon Systems, Inc.
  * Copyright (c) 2010 iX Systems, Inc.

Modified: head/sys/ofed/include/linux/vmalloc.h
==
--- head/sys/ofed/include/linux/vmalloc.h   Tue Oct 20 15:28:02 2015
(r289632)
+++ head/sys/ofed/include/linux/vmalloc.h   Tue Oct 20 16:02:11 2015
(r289633)
@@ -1,3 +1,4 @@
+/* $FreeBSD$ */
 /*-
  * Copyright (c) 2010 Isilon Systems, Inc.
  * Copyright (c) 2010 iX Systems, Inc.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r289644 - in head/sys/ofed/include: asm linux

2015-10-20 Thread John Baldwin
On Tuesday, October 20, 2015 07:08:26 PM Hans Petter Selasky wrote:
> Author: hselasky
> Date: Tue Oct 20 19:08:26 2015
> New Revision: 289644
> URL: https://svnweb.freebsd.org/changeset/base/289644
> 
> Log:
>   Move location of RCS keyword according to style.
>   
>   Suggested by:   jhb @
>   Sponsored by:   Mellanox Technologies

Thanks.

-- 
John Baldwin
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r289663 - head/share/mk

2015-10-20 Thread Conrad Meyer
On Tue, Oct 20, 2015 at 1:37 PM, Bryan Drewery  wrote:
> Author: bdrewery
> Date: Tue Oct 20 20:37:00 2015
> New Revision: 289663
> URL: https://svnweb.freebsd.org/changeset/base/289663
>
> Log:

I think this should read:

>   Improve safety of caching from r289659 by only importing of none of the

... by only importing *if* none of the ...

>   variables are already set.  This should cover odd cases such as the
>   COMPILER_TYPE override in lib/csu/powerpc64.

Best,
Conrad
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289656 - head/sys/dev/iicbus

2015-10-20 Thread Jean-Sébastien Pédron
Author: dumbbell
Date: Tue Oct 20 19:47:08 2015
New Revision: 289656
URL: https://svnweb.freebsd.org/changeset/base/289656

Log:
  iicbus: Remove trailing whitespaces
  
  MFC after:1 week

Modified:
  head/sys/dev/iicbus/iicbus.c

Modified: head/sys/dev/iicbus/iicbus.c
==
--- head/sys/dev/iicbus/iicbus.cTue Oct 20 19:32:26 2015
(r289655)
+++ head/sys/dev/iicbus/iicbus.cTue Oct 20 19:47:08 2015
(r289656)
@@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include  
+#include 
 
 #include 
 #include 
@@ -61,7 +61,7 @@ iicbus_probe(device_t dev)
 }
 
 #if SCAN_IICBUS
-static int 
+static int
 iic_probe_device(device_t dev, u_char addr)
 {
int count;
@@ -127,7 +127,7 @@ iicbus_attach(device_t dev)
bus_generic_attach(dev);
 return (0);
 }
-  
+
 static int
 iicbus_detach(device_t dev)
 {
@@ -138,7 +138,7 @@ iicbus_detach(device_t dev)
mtx_destroy(>lock);
return (0);
 }
-  
+
 static int
 iicbus_print_child(device_t dev, device_t child)
 {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289659 - head/share/mk

2015-10-20 Thread Bryan Drewery
Author: bdrewery
Date: Tue Oct 20 20:15:25 2015
New Revision: 289659
URL: https://svnweb.freebsd.org/changeset/base/289659

Log:
  Pass COMPILER_TYPE and COMPILER_VERSION to sub-makes to avoid redundant
  lookups.
  
  This uses a special variable name based on a hash of ${CC}, ${PATH}, and
  ${MACHINE} to ensure that a cached value is not used if any of these
  values changes to use a new compiler.
  
  Before this there were 34,620 fork/exec from bsd.compiler.mk during a 
buildworld.
  After this there are 608.  More improvement is needed to cache a value from
  the top-level before descending into subdirs in the various build phases.
  
  Reviewed by:  brooks (earlier version)
  MFC after:3 weeks
  Sponsored by: EMC / Isilon Storage Division
  Differential Revision:https://reviews.freebsd.org/D3898

Modified:
  head/share/mk/bsd.compiler.mk

Modified: head/share/mk/bsd.compiler.mk
==
--- head/share/mk/bsd.compiler.mk   Tue Oct 20 20:12:42 2015
(r289658)
+++ head/share/mk/bsd.compiler.mk   Tue Oct 20 20:15:25 2015
(r289659)
@@ -25,6 +25,18 @@
 .if !target()
 :
 
+# Try to import COMPILER_TYPE and COMPILER_VERSION from parent make.
+# The value is only used/exported for the same environment that impacts
+# CC and COMPILER_* settings here.
+_exported_vars=COMPILER_TYPE COMPILER_VERSION
+_cc_hash=  ${CC}${MACHINE}${PATH}
+_cc_hash:= ${_cc_hash:hash}
+.for var in ${_exported_vars}
+.if defined(${var}.${_cc_hash})
+${var}=${${var}.${_cc_hash}}
+.endif
+.endfor
+
 .if ${MACHINE} == "common"
 # common is a pseudo machine for architecture independent
 # generated files - thus there is no compiler.
@@ -54,6 +66,14 @@ COMPILER_VERSION!=echo ${_v:M[1-9].[0-9]
 .undef _v
 .endif
 
+# Export the values so sub-makes don't have to look them up again, using the
+# hash key computed above.
+.for var in ${_exported_vars}
+${var}.${_cc_hash}:=   ${${var}}
+.export-env ${var}.${_cc_hash}
+.undef ${var}.${_cc_hash}
+.endfor
+
 .if ${COMPILER_TYPE} == "clang" || \
(${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 40800)
 COMPILER_FEATURES= c++11
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289663 - head/share/mk

2015-10-20 Thread Bryan Drewery
Author: bdrewery
Date: Tue Oct 20 20:37:00 2015
New Revision: 289663
URL: https://svnweb.freebsd.org/changeset/base/289663

Log:
  Improve safety of caching from r289659 by only importing of none of the
  variables are already set.  This should cover odd cases such as the
  COMPILER_TYPE override in lib/csu/powerpc64.
  
  X-MFC-With:   r289659
  MFC after:3 weeks
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/share/mk/bsd.compiler.mk

Modified: head/share/mk/bsd.compiler.mk
==
--- head/share/mk/bsd.compiler.mk   Tue Oct 20 20:35:34 2015
(r289662)
+++ head/share/mk/bsd.compiler.mk   Tue Oct 20 20:37:00 2015
(r289663)
@@ -31,11 +31,20 @@ :
 _exported_vars=COMPILER_TYPE COMPILER_VERSION
 _cc_hash=  ${CC}${MACHINE}${PATH}
 _cc_hash:= ${_cc_hash:hash}
+# Only import if none of the vars are set somehow else.
+_can_export=   yes
+.for var in ${_exported_vars}
+.if defined(${var})
+_can_export=   no
+.endif
+.endfor
+.if ${_can_export} == yes
 .for var in ${_exported_vars}
 .if defined(${var}.${_cc_hash})
 ${var}=${${var}.${_cc_hash}}
 .endif
 .endfor
+.endif
 
 .if ${MACHINE} == "common"
 # common is a pseudo machine for architecture independent
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289662 - in head: . etc etc/mtree tools/build/mk

2015-10-20 Thread Julio Merino
Author: jmmv
Date: Tue Oct 20 20:35:34 2015
New Revision: 289662
URL: https://svnweb.freebsd.org/changeset/base/289662

Log:
  Handle lib32 files during delete-old* when MK_LIB32=no.
  
  Extend OptionalObsoleteFiles.inc to delete all lib32 files when MK_LIB32 is
  set to no on a system that previously had lib32 libraries installed.
  
  Also, to prevent "make delete-old-dirs" from always deleting lib32 directories
  after an installworld, move the lib32 subtree to its own mtree file that only
  gets applied when MK_LIB32=yes.
  
  Test: Ran "make delete-old" and "make delete-old-libs" on a system that never
  had MK_LIB32 enabled, and on a system where MK_LIB32 was enabled and later
  disabled.  Did this both on amd64 and powerpc64.
  
  Test: Ran "make tinderbox" without errors.
  
  Reviewed by:  emaste
  Differential Revision:https://reviews.freebsd.org/D3923

Added:
  head/etc/mtree/BSD.lib32.dist   (contents, props changed)
Modified:
  head/Makefile.inc1
  head/etc/Makefile
  head/etc/mtree/BSD.debug.dist
  head/etc/mtree/BSD.usr.dist
  head/etc/mtree/Makefile
  head/tools/build/mk/OptionalObsoleteFiles.inc

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Tue Oct 20 20:29:21 2015(r289661)
+++ head/Makefile.inc1  Tue Oct 20 20:35:34 2015(r289662)
@@ -560,6 +560,16 @@ _worldtmp:
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.debug.dist \
-p ${WORLDTMP}/usr/lib >/dev/null
 .endif
+.if ${MK_LIB32} != "no"
+   mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib32.dist \
+   -p ${WORLDTMP}/usr >/dev/null
+.if ${MK_DEBUG_FILES} != "no"
+   mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib32.dist \
+   -p ${WORLDTMP}/legacy/usr/lib/debug/usr >/dev/null
+   mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib32.dist \
+   -p ${WORLDTMP}/usr/lib/debug/usr >/dev/null
+.endif
+.endif
 .if ${MK_TESTS} != "no"
mkdir -p ${WORLDTMP}${TESTSBASE}
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \
@@ -653,9 +663,13 @@ build32:
-p ${LIB32TMP}/usr >/dev/null
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
-p ${LIB32TMP}/usr/include >/dev/null
+   mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib32.dist \
+   -p ${LIB32TMP}/usr >/dev/null
 .if ${MK_DEBUG_FILES} != "no"
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.debug.dist \
-p ${LIB32TMP}/usr/lib >/dev/null
+   mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib32.dist \
+   -p ${LIB32TMP}/usr/lib/debug/usr >/dev/null
 .endif
mkdir -p ${WORLDTMP}
ln -sf ${.CURDIR}/sys ${WORLDTMP}
@@ -901,6 +915,14 @@ distributeworld installworld: _installch
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.debug.dist \
-p ${DESTDIR}/${DISTDIR}/${dist}/usr/lib >/dev/null
 .endif
+.if ${MK_LIB32} != "no"
+   mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib32.dist \
+   -p ${DESTDIR}/${DISTDIR}/${dist}/usr >/dev/null
+.if ${MK_DEBUG_FILES} != "no"
+   mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib32.dist \
+   -p ${DESTDIR}/${DISTDIR}/${dist}/usr/lib/debug/usr >/dev/null
+.endif
+.endif
 .if ${MK_TESTS} != "no" && ${dist} == "tests"
-mkdir -p ${DESTDIR}/${DISTDIR}/${dist}${TESTSBASE}
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \
@@ -917,6 +939,10 @@ distributeworld installworld: _installch
sed -e 's#^\./#./${dist}/usr/#' >> ${METALOG}
${IMAKEENV} mtree -C -f ${.CURDIR}/etc/mtree/BSD.include.dist | \
sed -e 's#^\./#./${dist}/usr/include/#' >> ${METALOG}
+.if ${MK_LIB32} != "no"
+   ${IMAKEENV} mtree -C -f ${.CURDIR}/etc/mtree/BSD.lib32.dist | \
+   sed -e 's#^\./#./${dist}/usr/#' >> ${METALOG}
+.endif
 .endif
 .endfor
-mkdir ${DESTDIR}/${DISTDIR}/base
@@ -2241,6 +2267,10 @@ _xi-mtree:
-p ${XDDESTDIR}/usr >/dev/null
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
-p ${XDDESTDIR}/usr/include >/dev/null
+.if ${MK_LIB32} != "no"
+   mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib32.dist \
+   -p ${XDDESTDIR}/usr >/dev/null
+.endif
 .if ${MK_TESTS} != "no"
mkdir -p ${XDDESTDIR}${TESTSBASE}
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \

Modified: head/etc/Makefile
==
--- head/etc/Makefile   Tue Oct 20 20:29:21 2015(r289661)
+++ head/etc/Makefile   Tue Oct 20 20:35:34 2015(r289662)
@@ -151,6 +151,9 @@ BIN1+= regdomain.xml
 BIN2=  netstart pccard_ether rc.suspend rc.resume
 
 MTREE= BSD.debug.dist BSD.include.dist BSD.root.dist BSD.usr.dist BSD.var.dist
+.if ${MK_LIB32} != "no"
+MTREE+=BSD.lib32.dist
+.endif
 .if ${MK_TESTS} != "no"
 MTREE+=BSD.tests.dist
 .endif
@@ -344,6 +347,10 @@ MTREES=mtree/BSD.root.dist /   
\
 .if ${MK_GROFF} != "no"
 MTREES+=   

svn commit: r289657 - head/sys/dev/iicbus

2015-10-20 Thread Jean-Sébastien Pédron
Author: dumbbell
Date: Tue Oct 20 19:52:59 2015
New Revision: 289657
URL: https://svnweb.freebsd.org/changeset/base/289657

Log:
  iicbus: Use device_delete_children() instead of explicit child removal
  
  If the bus is detached and deleted by a call to device_delete_child() or
  device_delete_children() on a device higher in the tree, I²C children
  were already detached and deleted. So the device_t pointer stored in sc
  points to freed memory: we must not try to delete it again.
  
  By using device_delete_children(), we let subr_bus.c figure out if there
  are children to take care of.
  
  While here, make sure iicbus_detach() and iicoc_detach() call
  device_delete_children() too, to be safe.
  
  Reviewed by:  jhb, imp
  Approved by:  jhb, imp
  MFC after:1 week
  Differential Revision:https://reviews.freebsd.org/D3926

Modified:
  head/sys/dev/iicbus/iicbb.c
  head/sys/dev/iicbus/iicbus.c
  head/sys/dev/iicbus/iicoc.c
  head/sys/dev/iicbus/iicsmb.c

Modified: head/sys/dev/iicbus/iicbb.c
==
--- head/sys/dev/iicbus/iicbb.c Tue Oct 20 19:47:08 2015(r289656)
+++ head/sys/dev/iicbus/iicbb.c Tue Oct 20 19:52:59 2015(r289657)
@@ -149,22 +149,9 @@ iicbb_attach(device_t dev)
 static int
 iicbb_detach(device_t dev)
 {
-   struct iicbb_softc *sc = (struct iicbb_softc *)device_get_softc(dev);
-   device_t child;
 
-   /*
-* We need to save child because the detach indirectly causes
-* sc->iicbus to be zeroed.  Since we added the device
-* unconditionally in iicbb_attach, we need to make sure we
-* delete it here.  See iicbb_child_detached.  We need that
-* callback in case newbus detached our children w/o detaching
-* us (say iicbus is a module and unloaded w/o iicbb being
-* unloaded).
-*/
-   child = sc->iicbus;
bus_generic_detach(dev);
-   if (child)
-   device_delete_child(dev, child);
+   device_delete_children(dev);
 
return (0);
 }

Modified: head/sys/dev/iicbus/iicbus.c
==
--- head/sys/dev/iicbus/iicbus.cTue Oct 20 19:47:08 2015
(r289656)
+++ head/sys/dev/iicbus/iicbus.cTue Oct 20 19:52:59 2015
(r289657)
@@ -135,6 +135,7 @@ iicbus_detach(device_t dev)
 
iicbus_reset(dev, IIC_FASTEST, 0, NULL);
bus_generic_detach(dev);
+   device_delete_children(dev);
mtx_destroy(>lock);
return (0);
 }

Modified: head/sys/dev/iicbus/iicoc.c
==
--- head/sys/dev/iicbus/iicoc.c Tue Oct 20 19:47:08 2015(r289656)
+++ head/sys/dev/iicbus/iicoc.c Tue Oct 20 19:52:59 2015(r289657)
@@ -229,6 +229,7 @@ static int
 iicoc_detach(device_t dev)
 {
bus_generic_detach(dev);
+   device_delete_children(dev);
 
return (0);
 }

Modified: head/sys/dev/iicbus/iicsmb.c
==
--- head/sys/dev/iicbus/iicsmb.cTue Oct 20 19:47:08 2015
(r289656)
+++ head/sys/dev/iicbus/iicsmb.cTue Oct 20 19:52:59 2015
(r289657)
@@ -167,11 +167,9 @@ static int
 iicsmb_detach(device_t dev)
 {
struct iicsmb_softc *sc = (struct iicsmb_softc *)device_get_softc(dev);
-   
+
bus_generic_detach(dev);
-   if (sc->smbus) {
-   device_delete_child(dev, sc->smbus);
-   }
+   device_delete_children(dev);
mtx_destroy(>lock);
 
return (0);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

svn commit: r289660 - head/sys/kern

2015-10-20 Thread Konstantin Belousov
Author: kib
Date: Tue Oct 20 20:22:57 2015
New Revision: 289660
URL: https://svnweb.freebsd.org/changeset/base/289660

Log:
  Reviewed by:  jhb, pho
  Reported and tested by:   pho
  Sponsored by: The FreeBSD Foundation
  MFC after:2 weeks
  Differential revision:https://reviews.freebsd.org/D3908

Modified:
  head/sys/kern/sys_process.c

Modified: head/sys/kern/sys_process.c
==
--- head/sys/kern/sys_process.c Tue Oct 20 20:15:25 2015(r289659)
+++ head/sys/kern/sys_process.c Tue Oct 20 20:22:57 2015(r289660)
@@ -744,7 +744,18 @@ kern_ptrace(struct thread *td, int req, 
 */
switch (req) {
case PT_TRACE_ME:
-   /* Always legal. */
+   /*
+* Always legal, when there is a parent process which
+* could trace us.  Otherwise, reject.
+*/
+   if ((p->p_flag & P_TRACED) != 0) {
+   error = EBUSY;
+   goto fail;
+   }
+   if (p->p_pptr == initproc) {
+   error = EPERM;
+   goto fail;
+   }
break;
 
case PT_ATTACH:
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289661 - head/sys/kern

2015-10-20 Thread Konstantin Belousov
Author: kib
Date: Tue Oct 20 20:29:21 2015
New Revision: 289661
URL: https://svnweb.freebsd.org/changeset/base/289661

Log:
  Mark struct thread zone as type-stable.
  
  When establishing the locking state for several lock types (including
  blockable mutexes and sx) failed, locking primitives try to spin while
  the owner thread is running.  The spinning loop performs the test for
  running condition by dereferencing the owner->td_state field of the
  owner thread.  If the owner thread exited while spinner was put off
  the processor, it is harmless to access reused struct thread owner,
  since in some near future the current processor would notice the owner
  change and make appropriate progress.  But it could be that the page
  which carried the freed struct thread was unmapped, then we fault
  (this cannot happen on amd64).
  
  For now, disallowing free of the struct thread seems to be good
  enough, and tests which create a lot of threads once, did not
  demonstrated regressions.
  
  Reviewed by:  jhb, pho
  Reported and tested by:   pho
  Sponsored by: The FreeBSD Foundation
  MFC after:2 weeks
  Differential revision:https://reviews.freebsd.org/D3908

Modified:
  head/sys/kern/kern_thread.c

Modified: head/sys/kern/kern_thread.c
==
--- head/sys/kern/kern_thread.c Tue Oct 20 20:22:57 2015(r289660)
+++ head/sys/kern/kern_thread.c Tue Oct 20 20:29:21 2015(r289661)
@@ -281,7 +281,7 @@ threadinit(void)
 
thread_zone = uma_zcreate("THREAD", sched_sizeof_thread(),
thread_ctor, thread_dtor, thread_init, thread_fini,
-   16 - 1, 0);
+   16 - 1, UMA_ZONE_NOFREE);
tidhashtbl = hashinit(maxproc / 2, M_TIDHASH, );
rw_init(_lock, "tidhash");
 }
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r289660 - head/sys/kern

2015-10-20 Thread Bryan Drewery
On 10/20/2015 1:22 PM, Konstantin Belousov wrote:
> Author: kib
> Date: Tue Oct 20 20:22:57 2015
> New Revision: 289660
> URL: https://svnweb.freebsd.org/changeset/base/289660
> 
> Log:
>   Reviewed by:jhb, pho
>   Reported and tested by: pho
>   Sponsored by:   The FreeBSD Foundation
>   MFC after:  2 weeks
>   Differential revision:  https://reviews.freebsd.org/D3908

Missing commit message.

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r289664 - head/sys/kern

2015-10-20 Thread Konstantin Belousov
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:
  
  Do not allow to execute ptrace(PT_TRACE_ME) when the process is
  already traced.
  
  Do not allow to execute ptrace(PT_TRACE_ME) when there is no parent
  which can trace the process, i.e. when the parent is already init.
  Note that after the PT_TRACE_ME request the process is unkillable and
  non-continuable until a debugger is attached, or parent is killed, the
  later clears P_TRACED state.  Since init clearly would not debug the
  caller, and cannot be killed, disallow creation of unkillable
  processes.
  
  Reviewed by:  jhb, pho
  Reported and tested by:   pho
  Sponsored by: The FreeBSD Foundation
  MFC after:2 weeks
  Differential revision:https://reviews.freebsd.org/D3908

Modified:
  head/sys/kern/sys_process.c

Modified: head/sys/kern/sys_process.c
==
--- head/sys/kern/sys_process.c Tue Oct 20 20:37:00 2015(r289663)
+++ head/sys/kern/sys_process.c Tue Oct 20 20:38:20 2015(r289664)
@@ -443,7 +443,7 @@ ptrace_vm_entry(struct thread *td, struc
 }
 
 #ifdef COMPAT_FREEBSD32
-static int  
+static int
 ptrace_vm_entry32(struct thread *td, struct proc *p,
 struct ptrace_vm_entry32 *pve32)
 {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289665 - head/sys/dev/etherswitch/arswitch

2015-10-20 Thread Adrian Chadd
Author: adrian
Date: Tue Oct 20 21:18:02 2015
New Revision: 289665
URL: https://svnweb.freebsd.org/changeset/base/289665

Log:
  AR8327: Fix up the ability to configure the vlangroup configuration for the 
CPU port
  
  I messed up when doing the reset_vlans method - setting vid[0] = 1 here
  was making it 'hidden' from configuration (as it needed ETHERSWITCH_VID_VALID
  as well) and so there was no way to configure vlangroup0.
  
  In per-port VLAN mode, vlangroup0 is for the CPU port (port0).
  Now, it normally wouldn't really matter - the CPU port thus sees
  all other ports. However there are two CPU ports on the AR8327 and
  so port0 (arge0) was seeing all traffic on port6 (arge1).
  If you thus tried to use arge1/port6 for anything (eg a WAN port)
  in a bridge group then things would very upset very quickly.
  
  Whilst here, add a comment to remind myself that yes, it'd be nice
  if we could specify a boot-time switch config.
  
  Tested:
  
  * AP135 reference platform w/ AR8327N switch

Modified:
  head/sys/dev/etherswitch/arswitch/arswitch_8327.c

Modified: head/sys/dev/etherswitch/arswitch/arswitch_8327.c
==
--- head/sys/dev/etherswitch/arswitch/arswitch_8327.c   Tue Oct 20 20:38:20 
2015(r289664)
+++ head/sys/dev/etherswitch/arswitch/arswitch_8327.c   Tue Oct 20 21:18:02 
2015(r289665)
@@ -66,6 +66,14 @@
 #include "miibus_if.h"
 #include "etherswitch_if.h"
 
+/*
+ * AR8327 TODO:
+ *
+ * There should be a default hardware setup hint set for the default
+ * switch config.  Otherwise the default is "all ports in one vlangroup",
+ * which means both CPU ports can see each other and that will quickly
+ * lead to traffic storms/loops.
+ */
 
 static int
 ar8327_vlan_op(struct arswitch_softc *sc, uint32_t op, uint32_t vid,
@@ -897,8 +905,8 @@ ar8327_reset_vlans(struct arswitch_softc
/*
 * If dot1q - set pvid; dot1q, etc.
 */
-   sc->vid[0] = 1;
if (sc->vlan_mode == ETHERSWITCH_VLAN_DOT1Q) {
+   sc->vid[0] = 1;
for (i = 0; i < AR8327_NUM_PORTS; i++) {
/* Each port - pvid 1 */
sc->hal.arswitch_vlan_set_pvid(sc, i, sc->vid[0]);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289658 - head/sys/kern

2015-10-20 Thread Konstantin Belousov
Author: kib
Date: Tue Oct 20 20:12:42 2015
New Revision: 289658
URL: https://svnweb.freebsd.org/changeset/base/289658

Log:
  No need to dereference struct proc to pids when comparing processes
  for equality.
  
  Reviewed by:  jhb, pho
  Tested by:pho
  Sponsored by: The FreeBSD Foundation
  MFC after:2 weeks

Modified:
  head/sys/kern/sys_process.c

Modified: head/sys/kern/sys_process.c
==
--- head/sys/kern/sys_process.c Tue Oct 20 19:52:59 2015(r289657)
+++ head/sys/kern/sys_process.c Tue Oct 20 20:12:42 2015(r289658)
@@ -749,7 +749,7 @@ kern_ptrace(struct thread *td, int req, 
 
case PT_ATTACH:
/* Self */
-   if (p->p_pid == td->td_proc->p_pid) {
+   if (p == td->td_proc) {
error = EINVAL;
goto fail;
}
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r289663 - head/share/mk

2015-10-20 Thread Bryan Drewery
On 10/20/2015 1:49 PM, Conrad Meyer wrote:
> On Tue, Oct 20, 2015 at 1:37 PM, Bryan Drewery  wrote:
>> Author: bdrewery
>> Date: Tue Oct 20 20:37:00 2015
>> New Revision: 289663
>> URL: https://svnweb.freebsd.org/changeset/base/289663
>>
>> Log:
> 
> I think this should read:
> 
>>   Improve safety of caching from r289659 by only importing of none of the
> 
> ... by only importing *if* none of the ...
> 

Yes. It's a common typo I make :(


-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r289666 - in stable/10/sys: arm/freescale/imx arm/freescale/vybrid arm/samsung/exynos dev/iicbus dev/pcf powerpc/mpc85xx

2015-10-20 Thread Ian Lepore
Author: ian
Date: Tue Oct 20 21:20:34 2015
New Revision: 289666
URL: https://svnweb.freebsd.org/changeset/base/289666

Log:
  MFC r281828, r289083, r289084, r289091, r289093, r289095, r289097, r289098,
  r289104, r289105, r289118:  various i2c fixes...
  
Fix numerous issues in iic(4) and iicbus(4):
--Allow multiple open iic fds by storing addressing state in cdevpriv
--Fix, as much as possible, the baked-in race conditions in the iic
ioctl interface by requesting bus ownership on I2CSTART, releasing it on
I2CSTOP/I2CRSTCARD, and requiring bus ownership by the current cdevpriv
to use the I/O ioctls
--Reduce internal iic buffer size and remove 1K read/write limit by
iteratively calling iicbus_read/iicbus_write
--Eliminate dynamic allocation in I2CWRITE/I2CREAD
--Move handling of I2CRDWR to separate function and improve error handling
--Add new I2CSADDR ioctl to store address in current cdevpriv so that
I2CSTART is not needed for read(2)/write(2) to work
--Redesign iicbus_request_bus() and iicbus_release_bus():
--iicbus_request_bus() no longer falls through if the bus is already
owned by the requesting device.  Multiple threads on the same device may
want exclusive access.  Also, iicbus_release_bus() was never
device-recursive anyway.
--Previously, if IICBUS_CALLBACK failed in iicbus_release_bus(), but
the following iicbus_poll() call succeeded, IICBUS_CALLBACK would not be
issued again
--Do not hold iicbus mtx during IICBUS_CALLBACK call.  There are
several drivers that may sleep in IICBUS_CALLBACK, if IIC_WAIT is passed.
--Do not loop in iicbus_request_bus if IICBUS_CALLBACK returns
EWOULDBLOCK; instead pass that to the caller so that it can retry if so
desired.
  
Bugfix: Exit the transfer loop if any read or write operation fails.  Also,
perform a stop operation on the bus if there was an error, otherwise the
bus will remain hung forever.  Consistantly use 'if (error != 0)' style in
the function.
  
Mostly rewrite the imx i2c driver.  This started out as an attempt to fix
one specific problem: the driver didn't check for ACK/NAK after writing a
slave address byte to the bus, and some slaves signal that they are busy
(such as when completing an internal write to flash memory) by sending a
NAK in response to being addressed.
  
Use IIC_EBUSBSY and IIC_BUSERR status values consistantly across all 
drivers.
Make it clearer what each one means in the comments that define them.
  
Add iic2errno(), a helper function to translate IIC_Ex status values to
errno values that are at least vaguely equivelent.  Also add a new status
value, IIC_ERESOURCE, to indicate a failure to acquire memory or other
required resources to complete a transaction.
  
Return only IIC_E status values from iicbus-layer functions.  Most of
these functions are thin wrappers around calling the hardware-layer driver,
but some of them do sanity checks and return an error.
  
Add a short name, IIC_INTRWAIT, for the common case (IIC_INTR | IIC_WAIT).
  
Replace a local sx lock that allowed only one client at a time to access
an eeprom device with iicbus_request/release_bus(), which achieves the
same effect and also keeps other i2c slave drivers from clashing on the bus.

Modified:
  stable/10/sys/arm/freescale/imx/imx_i2c.c
  stable/10/sys/arm/freescale/vybrid/vf_i2c.c
  stable/10/sys/arm/samsung/exynos/exynos5_i2c.c
  stable/10/sys/dev/iicbus/icee.c
  stable/10/sys/dev/iicbus/iic.c
  stable/10/sys/dev/iicbus/iic.h
  stable/10/sys/dev/iicbus/iicbus_if.m
  stable/10/sys/dev/iicbus/iicoc.c
  stable/10/sys/dev/iicbus/iiconf.c
  stable/10/sys/dev/iicbus/iiconf.h
  stable/10/sys/dev/pcf/pcf.c
  stable/10/sys/powerpc/mpc85xx/i2c.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/arm/freescale/imx/imx_i2c.c
==
--- stable/10/sys/arm/freescale/imx/imx_i2c.c   Tue Oct 20 21:18:02 2015
(r289665)
+++ stable/10/sys/arm/freescale/imx/imx_i2c.c   Tue Oct 20 21:20:34 2015
(r289666)
@@ -1,6 +1,7 @@
 /*-
  * Copyright (C) 2008-2009 Semihalf, Michal Hajduk
  * Copyright (c) 2012, 2013 The FreeBSD Foundation
+ * Copyright (c) 2015 Ian Lepore 
  * All rights reserved.
  *
  * Portions of this software were developed by Oleksandr Rybalko
@@ -28,6 +29,19 @@
  * SUCH DAMAGE.
  */
 
+/*
+ * I2C driver for Freescale i.MX hardware.
+ *
+ * Note that the hardware is capable of running as both a master and a slave.
+ * This driver currently implements only master-mode operations.
+ *
+ * This driver supports multi-master i2c busses, by detecting bus arbitration
+ * loss and returning IIC_EBUSBSY status.  Notably, it does not do any kind of
+ * retries if some other master jumps onto the bus and interrupts one of our
+ * 

Re: svn commit: r289664 - head/sys/kern

2015-10-20 Thread Bryan Drewery
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:
>   
>   Do not allow to execute ptrace(PT_TRACE_ME) when the process is
>   already traced.
>   
>   Do not allow to execute ptrace(PT_TRACE_ME) when there is no parent
>   which can trace the process, i.e. when the parent is already init.
>   Note that after the PT_TRACE_ME request the process is unkillable and
>   non-continuable until a debugger is attached, or parent is killed, the
>   later clears P_TRACED state.  Since init clearly would not debug the
>   caller, and cannot be killed, disallow creation of unkillable
>   processes.
>   
>   Reviewed by:jhb, pho
>   Reported and tested by: pho
>   Sponsored by:   The FreeBSD Foundation
>   MFC after:  2 weeks
>   Differential revision:  https://reviews.freebsd.org/D3908
> 
> Modified:
>   head/sys/kern/sys_process.c
> 
> Modified: head/sys/kern/sys_process.c
> ==
> --- head/sys/kern/sys_process.c   Tue Oct 20 20:37:00 2015
> (r289663)
> +++ head/sys/kern/sys_process.c   Tue Oct 20 20:38:20 2015
> (r289664)
> @@ -443,7 +443,7 @@ ptrace_vm_entry(struct thread *td, struc
>  }
>  
>  #ifdef COMPAT_FREEBSD32
> -static int  
> +static int
>  ptrace_vm_entry32(struct thread *td, struct proc *p,
>  struct ptrace_vm_entry32 *pve32)
>  {
> 

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.

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


Re: svn commit: r289203 - head/usr.sbin/makefs

2015-10-20 Thread Adrian Chadd
please absolutely do reassign the option to something that doesn't clash ASAP.



-adrian


On 20 October 2015 at 12:12, Ed Maste  wrote:
> On 12 October 2015 at 22: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.
>>...
>> +.Op Fl r Ar roundup
>
> Note that NetBSD's makefs already has -r assigned
> -r When merging multiple directories replace duplicate files with the
> last found.
>
> We should pick a different option, and push this patch there too.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r289664 - head/sys/kern

2015-10-20 Thread Ed Maste
On 20 October 2015 at 16:42, Bryan Drewery  wrote:
>
> 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.

This is the approach taken by LLVM and it works well there. You're
right that it introduces a bit of churn but I think it's worth the
cost.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r289661 - head/sys/kern

2015-10-20 Thread John Baldwin
On Tuesday, October 20, 2015 08:29:21 PM Konstantin Belousov wrote:
> Author: kib
> Date: Tue Oct 20 20:29:21 2015
> New Revision: 289661
> URL: https://svnweb.freebsd.org/changeset/base/289661
> 
> Log:
>   Mark struct thread zone as type-stable.
>   
>   When establishing the locking state for several lock types (including
>   blockable mutexes and sx) failed, locking primitives try to spin while
>   the owner thread is running.  The spinning loop performs the test for
>   running condition by dereferencing the owner->td_state field of the
>   owner thread.  If the owner thread exited while spinner was put off
>   the processor, it is harmless to access reused struct thread owner,
>   since in some near future the current processor would notice the owner
>   change and make appropriate progress.  But it could be that the page
>   which carried the freed struct thread was unmapped, then we fault
>   (this cannot happen on amd64).
>   
>   For now, disallowing free of the struct thread seems to be good
>   enough, and tests which create a lot of threads once, did not
>   demonstrated regressions.
>   
>   Reviewed by:jhb, pho
>   Reported and tested by: pho
>   Sponsored by:   The FreeBSD Foundation
>   MFC after:  2 weeks
>   Differential revision:  https://reviews.freebsd.org/D3908

PR:65448

-- 
John Baldwin
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r289626 - in head/sys: dev/isp dev/ispfw modules/ispfw modules/ispfw/isp_2400_multi modules/ispfw/isp_2500_multi

2015-10-20 Thread Eric van Gyzen
On 10/20/2015 07:27, Alexander Motin wrote:
> Author: mav
> Date: Tue Oct 20 12:27:59 2015
> New Revision: 289626
> URL: https://svnweb.freebsd.org/changeset/base/289626
> 
> Log:
>   Update firmware images for Qlogic 24xx/25xx from 5.5.0 to 7.3.0.
>   
>   This also removes separate "_multi" images, since this funcationality is
>   now in base, and there is simply no new images without it for years.

Thank you for updating the firmware!  I use these cards in practically
all of my FreeBSD systems at work.

Does this warrant an entry in UPDATING and/or the Release Notes?  Users
that load a "multi" kernel module via loader.conf might be astonished.

Cheers,

Eric
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289667 - head/share/man/man9

2015-10-20 Thread Conrad E. Meyer
Author: cem
Date: Tue Oct 20 23:48:14 2015
New Revision: 289667
URL: https://svnweb.freebsd.org/changeset/base/289667

Log:
  Document cpuset(9)
  
  A follow-up to r289467.
  
  Coerced by:   jhb
  Sponsored by: EMC / Isilon Storage Division

Added:
  head/share/man/man9/cpuset.9   (contents, props changed)
Modified:
  head/share/man/man9/Makefile
  head/share/man/man9/bitset.9

Modified: head/share/man/man9/Makefile
==
--- head/share/man/man9/MakefileTue Oct 20 21:20:34 2015
(r289666)
+++ head/share/man/man9/MakefileTue Oct 20 23:48:14 2015
(r289667)
@@ -57,6 +57,7 @@ MAN=  accept_filter.9 \
contigmalloc.9 \
copy.9 \
counter.9 \
+   cpuset.9 \
cr_cansee.9 \
critical_enter.9 \
cr_seeothergids.9 \
@@ -636,6 +637,31 @@ MLINKS+=counter.9 counter_u64_alloc.9 \
counter.9 counter_u64_add_protected.9 \
counter.9 counter_u64_fetch.9 \
counter.9 counter_u64_zero.9
+MLINKS+=cpuset.9 CPUSET_T_INITIALIZER.9 \
+   cpuset.9 CPUSET_FSET.9 \
+   cpuset.9 CPU_CLR.9 \
+   cpuset.9 CPU_COPY.9 \
+   cpuset.9 CPU_ISSET.9 \
+   cpuset.9 CPU_SET.9 \
+   cpuset.9 CPU_ZERO.9 \
+   cpuset.9 CPU_FILL.9 \
+   cpuset.9 CPU_SETOF.9 \
+   cpuset.9 CPU_EMPTY.9 \
+   cpuset.9 CPU_ISFULLSET.9 \
+   cpuset.9 CPU_FFS.9 \
+   cpuset.9 CPU_COUNT.9 \
+   cpuset.9 CPU_SUBSET.9 \
+   cpuset.9 CPU_OVERLAP.9 \
+   cpuset.9 CPU_CMP.9 \
+   cpuset.9 CPU_OR.9 \
+   cpuset.9 CPU_AND.9 \
+   cpuset.9 CPU_NAND.9 \
+   cpuset.9 CPU_CLR_ATOMIC.9 \
+   cpuset.9 CPU_SET_ATOMIC.9 \
+   cpuset.9 CPU_SET_ATOMIC_ACQ.9 \
+   cpuset.9 CPU_AND_ATOMIC.9 \
+   cpuset.9 CPU_OR_ATOMIC.9 \
+   cpuset.9 CPU_COPY_STORE_REL.9
 MLINKS+=critical_enter.9 critical.9 \
critical_enter.9 critical_exit.9
 MLINKS+=crypto.9 crypto_dispatch.9 \

Modified: head/share/man/man9/bitset.9
==
--- head/share/man/man9/bitset.9Tue Oct 20 21:20:34 2015
(r289666)
+++ head/share/man/man9/bitset.9Tue Oct 20 23:48:14 2015
(r289667)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd October 17, 2015
+.Dd October 20, 2015
 .Dt BITSET 9
 .Os
 .Sh NAME
@@ -352,16 +352,9 @@ myset = BITSET_T_INITIALIZER(BITSET_FSET
 myset = BITSET_T_INITIALIZER(0x1);
 .Ed
 .Sh SEE ALSO
-The older
-.Xr bitstring 3 .
+.Xr bitstring 3 ,
+.Xr cpuset 9
 .Sh HISTORY
-.In sys/cpuset.h
-first appeared in
-.Fx 7.1 ,
-released in January 2009, and in
-.Fx 8.0 ,
-released in November 2009 .
-.Pp
 The
 .Nm
 macros first appeared in
@@ -377,11 +370,9 @@ This manual page first appeared in
 .An -nosplit
 The
 .Nm
-macros were written for
+macros were generalized and pulled out of
 .In sys/cpuset.h
-by
-.An Jeff Roberson Aq Mt j...@freebsd.org ;
-they were generalized and pulled out as
+as
 .In sys/_bitset.h
 and
 .In sys/bitset.h

Added: head/share/man/man9/cpuset.9
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/man/man9/cpuset.9Tue Oct 20 23:48:14 2015
(r289667)
@@ -0,0 +1,350 @@
+.\" Copyright (c) 2015 Conrad Meyer 
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"notice, this list of conditions and the following disclaimer in the
+.\"documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS''
+.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE
+.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 20, 2015
+.Dt CPUSET 9
+.Os
+.Sh NAME
+.Nm cpuset(9)
+\(em
+.Nm CPUSET_T_INITIALIZER ,
+.Nm CPUSET_FSET ,
+.Nm CPU_CLR ,
+.Nm CPU_COPY ,
+.Nm CPU_ISSET ,
+.Nm CPU_SET ,
+.Nm CPU_ZERO ,
+.Nm CPU_FILL ,
+.Nm CPU_SETOF ,

svn commit: r289669 - head/share/mk

2015-10-20 Thread Bryan Drewery
Author: bdrewery
Date: Wed Oct 21 00:25:18 2015
New Revision: 289669
URL: https://svnweb.freebsd.org/changeset/base/289669

Log:
  Fix building in a directory with SUBDIRs and SUBDIR_PARALLEL.
  
  The SUBDIR_PARALLEL feature uses a .for dir in ${SUBDIR} loop.  The old code
  here for recursing was setting SUBDIR= as a make *argument*.  The SUBDIR=
  replacement was not actually handled until after the .for loop was unrolled.
  This could be seen with a '.info ${SUBDIR} ${dir}' inside of the loop which
  showed an empty ${SUBDIR} and a set ${dir}.  Setting NO_SUBIDR= before calling
  ${MAKE} as an *environment* variable handles the case fine and is a more
  proper mechanism for disabling subdir handling.
  
  This could be seen with 'make -C tests/sys/kern -j15 SUBDIR_PARALLEL=yes'.
  
  MFC after:2 weeks
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/share/mk/bsd.progs.mk

Modified: head/share/mk/bsd.progs.mk
==
--- head/share/mk/bsd.progs.mk  Tue Oct 20 23:52:37 2015(r289668)
+++ head/share/mk/bsd.progs.mk  Wed Oct 21 00:25:18 2015(r289669)
@@ -116,16 +116,16 @@ x.$p= PROG_CXX=$p
 $p ${p}_p: .PHONY .MAKE
(cd ${.CURDIR} && \
DEPENDFILE=.depend.$p \
-   ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \
-   SUBDIR= PROG=$p ${x.$p})
+   NO_SUBDIR=1 ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \
+   PROG=$p ${x.$p})
 
 # Pseudo targets for PROG, such as 'install'.
 .for t in ${PROGS_TARGETS:O:u}
 $p.$t: .PHONY .MAKE
(cd ${.CURDIR} && \
DEPENDFILE=.depend.$p \
-   ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \
-   SUBDIR= PROG=$p ${x.$p} ${@:E})
+   NO_SUBDIR=1 ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \
+   PROG=$p ${x.$p} ${@:E})
 .endfor
 .endfor
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r289667 - head/share/man/man9

2015-10-20 Thread John Baldwin
On Tuesday, October 20, 2015 11:48:14 PM Conrad E. Meyer wrote:
> Author: cem
> Date: Tue Oct 20 23:48:14 2015
> New Revision: 289667
> URL: https://svnweb.freebsd.org/changeset/base/289667
> 
> Log:
>   Document cpuset(9)
>   
>   A follow-up to r289467.
>   
>   Coerced by: jhb
>   Sponsored by:   EMC / Isilon Storage Division

Thank you!  Writing this has been on my todo list for years.

-- 
John Baldwin
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r289667 - head/share/man/man9

2015-10-20 Thread hiren panchasara
On 10/20/15 at 11:48P, Conrad E. Meyer wrote:
> Author: cem
> Date: Tue Oct 20 23:48:14 2015
> New Revision: 289667
> URL: https://svnweb.freebsd.org/changeset/base/289667
> 
> Log:
>   Document cpuset(9)
>   
>   A follow-up to r289467.
>   
>   Coerced by: jhb
>   Sponsored by:   EMC / Isilon Storage Division

Thanks a lot!

Cheers,
Hiren


pgpJH26jrEs4b.pgp
Description: PGP signature


Re: svn commit: r289667 - head/share/man/man9

2015-10-20 Thread Conrad Meyer
On Tue, Oct 20, 2015 at 5:09 PM, John Baldwin  wrote:
> On Tuesday, October 20, 2015 11:48:14 PM Conrad E. Meyer wrote:
>> Author: cem
>> Date: Tue Oct 20 23:48:14 2015
>> New Revision: 289667
>> URL: https://svnweb.freebsd.org/changeset/base/289667
>>
>> Log:
>>   Document cpuset(9)
>>
>>   A follow-up to r289467.
>>
>>   Coerced by: jhb
>>   Sponsored by:   EMC / Isilon Storage Division
>
> Thank you!  Writing this has been on my todo list for years.

You're welcome :).

I didn't proofread this especially thoroughly, so if you want to do a
pass for grammar, errors, or additions, please do!

Thanks,
Conrad
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289668 - in head: lib/libc/sys share/man/man9

2015-10-20 Thread Conrad E. Meyer
Author: cem
Date: Tue Oct 20 23:52:37 2015
New Revision: 289668
URL: https://svnweb.freebsd.org/changeset/base/289668

Log:
  cpuset.9: Link to/from the new page
  
  A follow-up to r289667.
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/lib/libc/sys/cpuset.2
  head/lib/libc/sys/cpuset_getaffinity.2
  head/share/man/man9/cpuset.9

Modified: head/lib/libc/sys/cpuset.2
==
--- head/lib/libc/sys/cpuset.2  Tue Oct 20 23:48:14 2015(r289667)
+++ head/lib/libc/sys/cpuset.2  Tue Oct 20 23:52:37 2015(r289668)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd January 8, 2015
+.Dd October 20, 2015
 .Dt CPUSET 2
 .Os
 .Sh NAME
@@ -219,7 +219,8 @@ for allocation.
 .Xr cpuset_getaffinity 2 ,
 .Xr cpuset_setaffinity 2 ,
 .Xr pthread_affinity_np 3 ,
-.Xr pthread_attr_affinity_np 3
+.Xr pthread_attr_affinity_np 3 ,
+.Xr cpuset 9
 .Sh HISTORY
 The
 .Nm

Modified: head/lib/libc/sys/cpuset_getaffinity.2
==
--- head/lib/libc/sys/cpuset_getaffinity.2  Tue Oct 20 23:48:14 2015
(r289667)
+++ head/lib/libc/sys/cpuset_getaffinity.2  Tue Oct 20 23:52:37 2015
(r289668)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 10, 2010
+.Dd October 20, 2015
 .Dt CPUSET_GETAFFINITY 2
 .Os
 .Sh NAME
@@ -153,7 +153,8 @@ operation.
 .Xr cpuset_getid 2 ,
 .Xr cpuset_setid 2 ,
 .Xr pthread_affinity_np 3 ,
-.Xr pthread_attr_affinity_np 3
+.Xr pthread_attr_affinity_np 3 ,
+.Xr cpuset 9
 .Sh HISTORY
 The
 .Nm

Modified: head/share/man/man9/cpuset.9
==
--- head/share/man/man9/cpuset.9Tue Oct 20 23:48:14 2015
(r289667)
+++ head/share/man/man9/cpuset.9Tue Oct 20 23:52:37 2015
(r289668)
@@ -325,6 +325,8 @@ myset = CPUSET_T_INITIALIZER(CPUSET_FSET
 myset = CPUSET_T_INITIALIZER(0x1);
 .Ed
 .Sh SEE ALSO
+.Xr cpuset 1 ,
+.Xr cpuset 2 ,
 .Xr bitset 9
 .Sh HISTORY
 .In sys/cpuset.h
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289670 - head/gnu/usr.bin/groff/src/devices/xditview

2015-10-20 Thread Bryan Drewery
Author: bdrewery
Date: Wed Oct 21 01:34:51 2015
New Revision: 289670
URL: https://svnweb.freebsd.org/changeset/base/289670

Log:
  Remove disconnected xditview.

Deleted:
  head/gnu/usr.bin/groff/src/devices/xditview/
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r289203 - head/usr.sbin/makefs

2015-10-20 Thread Ed Maste
On 20 October 2015 at 21:53, Adrian Chadd  wrote:
> please absolutely do reassign the option to something that doesn't clash ASAP.

It's important that we do it soon, but a few more days won't make a
difference. I've discussed syncing NetBSD's & FreeBSD's makefs on the
NetBSD tech-userlevel list with the hope that we can avoid any new
incompatibilities in option letters, and want to figure out how we can
sync ours and theirs.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289672 - stable/10/sys/compat/linux

2015-10-20 Thread Bryan Drewery
Author: bdrewery
Date: Wed Oct 21 01:41:22 2015
New Revision: 289672
URL: https://svnweb.freebsd.org/changeset/base/289672

Log:
  MFC r288994:
  
Remove redundant RFFPWAIT/vfork(2) handling in Linux fork(2) and clone(2)
wrappers.

Modified:
  stable/10/sys/compat/linux/linux_fork.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/compat/linux/linux_fork.c
==
--- stable/10/sys/compat/linux/linux_fork.c Wed Oct 21 01:41:18 2015
(r289671)
+++ stable/10/sys/compat/linux/linux_fork.c Wed Oct 21 01:41:22 2015
(r289672)
@@ -111,9 +111,8 @@ linux_vfork(struct thread *td, struct li
printf(ARGS(vfork, ""));
 #endif
 
-   /* Exclude RFPPWAIT */
-   if ((error = fork1(td, RFFDG | RFPROC | RFMEM | RFSTOPPED, 0, ,
-   NULL, 0)) != 0)
+   if ((error = fork1(td, RFFDG | RFPROC | RFMEM | RFPPWAIT | RFSTOPPED,
+   0, , NULL, 0)) != 0)
return (error);
 
td->td_retval[0] = p2->p_pid;
@@ -122,10 +121,6 @@ linux_vfork(struct thread *td, struct li
if (error)
return (error);
 
-   PROC_LOCK(p2);
-   p2->p_flag |= P_PPWAIT;
-   PROC_UNLOCK(p2);
-
td2 = FIRST_THREAD_IN_PROC(p2);
 
/*
@@ -136,12 +131,6 @@ linux_vfork(struct thread *td, struct li
sched_add(td2, SRQ_BORING);
thread_unlock(td2);
 
-   /* wait for the children to exit, ie. emulate vfork */
-   PROC_LOCK(p2);
-   while (p2->p_flag & P_PPWAIT)
-   cv_wait(>p_pwait, >p_mtx);
-   PROC_UNLOCK(p2);
-
return (0);
 }
 
@@ -203,6 +192,9 @@ linux_clone(struct thread *td, struct li
if (args->parent_tidptr == NULL)
return (EINVAL);
 
+   if (args->flags & LINUX_CLONE_VFORK)
+   ff |= RFPPWAIT;
+
error = fork1(td, ff, 0, , NULL, 0);
if (error)
return (error);
@@ -271,12 +263,6 @@ linux_clone(struct thread *td, struct li
"stack %p sig = %d"), (int)p2->p_pid, args->stack,
exit_signal);
 #endif
-   if (args->flags & LINUX_CLONE_VFORK) {
-   PROC_LOCK(p2);
-   p2->p_flag |= P_PPWAIT;
-   PROC_UNLOCK(p2);
-   }
-
/*
 * Make this runnable after we are finished with it.
 */
@@ -288,13 +274,5 @@ linux_clone(struct thread *td, struct li
td->td_retval[0] = p2->p_pid;
td->td_retval[1] = 0;
 
-   if (args->flags & LINUX_CLONE_VFORK) {
-   /* wait for the children to exit, ie. emulate vfork */
-   PROC_LOCK(p2);
-   while (p2->p_flag & P_PPWAIT)
-   cv_wait(>p_pwait, >p_mtx);
-   PROC_UNLOCK(p2);
-   }
-
return (0);
 }
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289671 - head/sys/mips/atheros

2015-10-20 Thread Adrian Chadd
Author: adrian
Date: Wed Oct 21 01:41:18 2015
New Revision: 289671
URL: https://svnweb.freebsd.org/changeset/base/289671

Log:
  arge: don't do the rx fixup copy and just offset the mbuf by 2 bytes
  
  The existing code meets the "alignment" requirement for the l3 payload
  by offsetting the mbuf by uint64_t and then calling an rx fixup routine
  to copy the frame backwards by 2 bytes.  This DWORD aligns the
  L3 payload so tcp, etc doesn't panic on unaligned access.
  
  This is .. slow.
  
  For arge MACs that support 1 byte TX/RX address alignment, we can do
  the "other" hack: offset the RX address of the mbuf so the L3 payload
  again is hopefully DWORD aligned.
  
  This is much cheaper - since TX/RX is both 1 byte align ready (thanks
  to the previous commit) there's no bounce buffering going on and there
  is no rx fixup copying.
  
  This gets bridging performance up from 180mbit/sec -> 410mbit/sec.
  There's around 10% of CPU cycles spent in _bus_dmamap_sync(); I'll
  investigate that later.
  
  Tested:
  
  * QCA955x SoC (AP135 reference board), bridging arge0/arge1
by programming the switch to have two vlangroups in dot1q mode:
  
  # ifconfig bridge0 inet 192.168.2.20/24
  # etherswitchcfg config vlan_mode dot1q
  # etherswitchcfg vlangroup0 members 0,1,2,3,4
  # etherswitchcfg vlangroup1 vlan 2 members 5,6
  # etherswitchcfg port5 pvid 2
  # etherswitchcfg port6 pvid 2
  # ifconfig arge1 up
  # ifconfig bridge0 addm arge1

Modified:
  head/sys/mips/atheros/if_arge.c

Modified: head/sys/mips/atheros/if_arge.c
==
--- head/sys/mips/atheros/if_arge.c Wed Oct 21 01:34:51 2015
(r289670)
+++ head/sys/mips/atheros/if_arge.c Wed Oct 21 01:41:18 2015
(r289671)
@@ -2165,6 +2165,7 @@ arge_newbuf(struct arge_softc *sc, int i
bus_dmamap_tmap;
int nsegs;
 
+   /* XXX TODO: should just allocate an explicit 2KiB buffer */
m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
if (m == NULL)
return (ENOBUFS);
@@ -2174,7 +2175,15 @@ arge_newbuf(struct arge_softc *sc, int i
 * Add extra space to "adjust" (copy) the packet back to be aligned
 * for purposes of IPv4/IPv6 header contents.
 */
-   m_adj(m, sizeof(uint64_t));
+   if (sc->arge_hw_flags & ARGE_HW_FLG_RX_DESC_ALIGN_4BYTE)
+   m_adj(m, sizeof(uint64_t));
+   /*
+* If it's a 1-byte aligned buffer, then just offset it two bytes
+* and that will give us a hopefully correctly DWORD aligned
+* L3 payload - and we won't have to undo it afterwards.
+*/
+   else if (sc->arge_hw_flags & ARGE_HW_FLG_RX_DESC_ALIGN_1BYTE)
+   m_adj(m, sizeof(uint16_t));
 
if (bus_dmamap_load_mbuf_sg(sc->arge_cdata.arge_rx_tag,
sc->arge_cdata.arge_rx_sparemap, m, segs, , 0) != 0) {
@@ -2186,6 +2195,11 @@ arge_newbuf(struct arge_softc *sc, int i
rxd = >arge_cdata.arge_rxdesc[idx];
if (rxd->rx_m != NULL) {
bus_dmamap_unload(sc->arge_cdata.arge_rx_tag, rxd->rx_dmamap);
+   /* XXX TODO: free rx_m? */
+   device_printf(sc->arge_dev,
+   "%s: ring[%d] rx_m wasn't free?\n",
+   __func__,
+   idx);
}
map = rxd->rx_dmamap;
rxd->rx_dmamap = sc->arge_cdata.arge_rx_sparemap;
@@ -2205,6 +2219,13 @@ arge_newbuf(struct arge_softc *sc, int i
return (0);
 }
 
+/*
+ * Move the data backwards 16 bits to (hopefully!) ensure the
+ * IPv4/IPv6 payload is aligned.
+ *
+ * This is required for earlier hardware where the RX path
+ * requires DWORD aligned buffers.
+ */
 static __inline void
 arge_fixup_rx(struct mbuf *m)
 {
@@ -2344,7 +2365,13 @@ arge_rx_locked(struct arge_softc *sc)
BUS_DMASYNC_POSTREAD);
m = rxd->rx_m;
 
-   arge_fixup_rx(m);
+   /*
+* If the MAC requires 4 byte alignment then the RX setup
+* routine will have pre-offset things; so un-offset it here.
+*/
+   if (sc->arge_hw_flags & ARGE_HW_FLG_RX_DESC_ALIGN_4BYTE)
+   arge_fixup_rx(m);
+
m->m_pkthdr.rcvif = ifp;
/* Skip 4 bytes of CRC */
m->m_pkthdr.len = m->m_len = packet_len - ETHER_CRC_LEN;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289673 - stable/9/sys/compat/linux

2015-10-20 Thread Bryan Drewery
Author: bdrewery
Date: Wed Oct 21 01:45:18 2015
New Revision: 289673
URL: https://svnweb.freebsd.org/changeset/base/289673

Log:
  MFC r288994:
  
Remove redundant RFFPWAIT/vfork(2) handling in Linux fork(2) and clone(2)
wrappers.

Modified:
  stable/9/sys/compat/linux/linux_fork.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/compat/linux/linux_fork.c
==
--- stable/9/sys/compat/linux/linux_fork.c  Wed Oct 21 01:41:22 2015
(r289672)
+++ stable/9/sys/compat/linux/linux_fork.c  Wed Oct 21 01:45:18 2015
(r289673)
@@ -110,9 +110,8 @@ linux_vfork(struct thread *td, struct li
printf(ARGS(vfork, ""));
 #endif
 
-   /* Exclude RFPPWAIT */
-   if ((error = fork1(td, RFFDG | RFPROC | RFMEM | RFSTOPPED, 0, ,
-   NULL, 0)) != 0)
+   if ((error = fork1(td, RFFDG | RFPROC | RFMEM | RFPPWAIT | RFSTOPPED,
+   0, , NULL, 0)) != 0)
return (error);
 
td->td_retval[0] = p2->p_pid;
@@ -121,10 +120,6 @@ linux_vfork(struct thread *td, struct li
if (error)
return (error);
 
-   PROC_LOCK(p2);
-   p2->p_flag |= P_PPWAIT;
-   PROC_UNLOCK(p2);
-
td2 = FIRST_THREAD_IN_PROC(p2);
 
/*
@@ -135,12 +130,6 @@ linux_vfork(struct thread *td, struct li
sched_add(td2, SRQ_BORING);
thread_unlock(td2);
 
-   /* wait for the children to exit, ie. emulate vfork */
-   PROC_LOCK(p2);
-   while (p2->p_flag & P_PPWAIT)
-   cv_wait(>p_pwait, >p_mtx);
-   PROC_UNLOCK(p2);
-
return (0);
 }
 
@@ -202,6 +191,9 @@ linux_clone(struct thread *td, struct li
if (args->parent_tidptr == NULL)
return (EINVAL);
 
+   if (args->flags & LINUX_CLONE_VFORK)
+   ff |= RFPPWAIT;
+
error = fork1(td, ff, 0, , NULL, 0);
if (error)
return (error);
@@ -270,12 +262,6 @@ linux_clone(struct thread *td, struct li
"stack %p sig = %d"), (int)p2->p_pid, args->stack,
exit_signal);
 #endif
-   if (args->flags & LINUX_CLONE_VFORK) {
-   PROC_LOCK(p2);
-   p2->p_flag |= P_PPWAIT;
-   PROC_UNLOCK(p2);
-   }
-
/*
 * Make this runnable after we are finished with it.
 */
@@ -287,13 +273,5 @@ linux_clone(struct thread *td, struct li
td->td_retval[0] = p2->p_pid;
td->td_retval[1] = 0;
 
-   if (args->flags & LINUX_CLONE_VFORK) {
-   /* wait for the children to exit, ie. emulate vfork */
-   PROC_LOCK(p2);
-   while (p2->p_flag & P_PPWAIT)
-   cv_wait(>p_pwait, >p_mtx);
-   PROC_UNLOCK(p2);
-   }
-
return (0);
 }
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289674 - head/sys/dev/iwn

2015-10-20 Thread Kevin Lo
Author: kevlo
Date: Wed Oct 21 02:50:22 2015
New Revision: 289674
URL: https://svnweb.freebsd.org/changeset/base/289674

Log:
  Switch PCI register reads from using magic numbers to using the names
  defined in pcireg.h

Modified:
  head/sys/dev/iwn/if_iwn.c

Modified: head/sys/dev/iwn/if_iwn.c
==
--- head/sys/dev/iwn/if_iwn.c   Wed Oct 21 01:45:18 2015(r289673)
+++ head/sys/dev/iwn/if_iwn.c   Wed Oct 21 02:50:22 2015(r289674)
@@ -6280,8 +6280,8 @@ iwn_set_pslevel(struct iwn_softc *sc, in
if (level == 5)
cmd.flags |= htole16(IWN_PS_FAST_PD);
/* Retrieve PCIe Active State Power Management (ASPM). */
-   reg = pci_read_config(sc->sc_dev, sc->sc_cap_off + 0x10, 1);
-   if (!(reg & 0x1))   /* L0s Entry disabled. */
+   reg = pci_read_config(sc->sc_dev, sc->sc_cap_off + PCIER_LINK_CTL, 4);
+   if (!(reg & PCIEM_LINK_CTL_ASPMC_L0S))  /* L0s Entry disabled. */
cmd.flags |= htole16(IWN_PS_PCI_PMGT);
cmd.rxtimeout = htole32(pmgt->rxtimeout * 1024);
cmd.txtimeout = htole32(pmgt->txtimeout * 1024);
@@ -8280,9 +8280,9 @@ iwn_apm_init(struct iwn_softc *sc)
IWN_SETBITS(sc, IWN_HW_IF_CONFIG, IWN_HW_IF_CONFIG_HAP_WAKE_L1A);
 
/* Retrieve PCIe Active State Power Management (ASPM). */
-   reg = pci_read_config(sc->sc_dev, sc->sc_cap_off + 0x10, 1);
+   reg = pci_read_config(sc->sc_dev, sc->sc_cap_off + PCIER_LINK_CTL, 4);
/* Workaround for HW instability in PCIe L0->L0s->L1 transition. */
-   if (reg & 0x02) /* L1 Entry enabled. */
+   if (reg & PCIEM_LINK_CTL_ASPMC_L1)  /* L1 Entry enabled. */
IWN_SETBITS(sc, IWN_GIO, IWN_GIO_L0S_ENA);
else
IWN_CLRBITS(sc, IWN_GIO, IWN_GIO_L0S_ENA);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289675 - head/sys/arm/arm

2015-10-20 Thread Jason A. Harmening
Author: jah
Date: Wed Oct 21 04:53:34 2015
New Revision: 289675
URL: https://svnweb.freebsd.org/changeset/base/289675

Log:
  Use pmap_quick* for out-of-context bounce buffers and (limited) cache 
maintenance of unmapped buffers in armv5 busdma.
  
  Tested by:Mattia Rossi 
  Differential Revision:https://reviews.freebsd.org/D3522

Modified:
  head/sys/arm/arm/busdma_machdep.c

Modified: head/sys/arm/arm/busdma_machdep.c
==
--- head/sys/arm/arm/busdma_machdep.c   Wed Oct 21 02:50:22 2015
(r289674)
+++ head/sys/arm/arm/busdma_machdep.c   Wed Oct 21 04:53:34 2015
(r289675)
@@ -124,14 +124,16 @@ 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;
 };
 
 struct sync_list {
-   vm_offset_t vaddr;  /* kva of bounce buffer */
-   bus_addr_t  busaddr;/* Physical address */
+   vm_offset_t vaddr;  /* kva of client data */
+   vm_page_t   pages;  /* starting page of client data */
+   vm_offset_t dataoffs;   /* page offset of client data */
bus_size_t  datacount;  /* client data count */
 };
 
@@ -197,6 +199,8 @@ static bus_addr_t add_bounce_page(bus_dm
  vm_offset_t vaddr, bus_addr_t addr,
  bus_size_t size);
 static void free_bounce_page(bus_dma_tag_t dmat, struct bounce_page *bpage);
+static void bus_dmamap_sync_sl(struct sync_list *sl, bus_dmasync_op_t op,
+  int bufaligned);
 
 /* Default tag, as most drivers provide no parent tag. */
 bus_dma_tag_t arm_root_dma_tag;
@@ -819,7 +823,8 @@ _bus_dmamap_count_phys(bus_dma_tag_t dma
while (buflen != 0) {
sgsize = MIN(buflen, dmat->maxsegsz);
if (run_filter(dmat, curaddr) != 0) {
-   sgsize = MIN(sgsize, PAGE_SIZE);
+   sgsize = MIN(sgsize,
+   PAGE_SIZE - (curaddr & PAGE_MASK));
map->pagesneeded++;
}
curaddr += sgsize;
@@ -949,8 +954,10 @@ int
 _bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dmamap_t map, vm_paddr_t buf,
 bus_size_t buflen, int flags, bus_dma_segment_t *segs, int *segp)
 {
+   struct sync_list *sl;
bus_size_t sgsize;
bus_addr_t curaddr;
+   bus_addr_t sl_end = 0;
int error;
 
if (segs == NULL)
@@ -965,14 +972,35 @@ _bus_dmamap_load_phys(bus_dma_tag_t dmat
}
}
 
+   sl = map->slist + map->sync_count - 1;
+
while (buflen > 0) {
curaddr = buf;
sgsize = MIN(buflen, dmat->maxsegsz);
if (((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0) &&
map->pagesneeded != 0 && run_filter(dmat, curaddr)) {
-   sgsize = MIN(sgsize, PAGE_SIZE);
+   sgsize = MIN(sgsize, PAGE_SIZE - (curaddr & PAGE_MASK));
curaddr = add_bounce_page(dmat, map, 0, curaddr,
sgsize);
+   } else {
+   if (map->sync_count > 0)
+   sl_end = VM_PAGE_TO_PHYS(sl->pages) +
+   sl->dataoffs + sl->datacount;
+
+   if (map->sync_count == 0 || curaddr != sl_end) {
+   if (++map->sync_count > dmat->nsegments)
+   break;
+   sl++;
+   sl->vaddr = 0;
+   sl->datacount = sgsize;
+   /*
+* PHYS_TO_VM_PAGE() will truncate
+* unaligned addresses.
+*/
+   sl->pages = PHYS_TO_VM_PAGE(curaddr);
+   sl->dataoffs = curaddr & PAGE_MASK;
+   } else
+   sl->datacount += sgsize;
}
sgsize = _bus_dmamap_addseg(dmat, map, curaddr, sgsize, segs,
segp);
@@ -1013,8 +1041,11 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm
 {
bus_size_t sgsize;
bus_addr_t curaddr;
+   bus_addr_t sl_pend = 0;
struct sync_list *sl;
+   

svn commit: r289676 - head

2015-10-20 Thread Bryan Drewery
Author: bdrewery
Date: Wed Oct 21 05:33:48 2015
New Revision: 289676
URL: https://svnweb.freebsd.org/changeset/base/289676

Log:
  Add some missing '+', .MAKE, and .PHONY modifiers.
  
  Some of these targets were lacking both .MAKE and a '+'.  Others were just
  inconsistent.
  
  MFC after:1 week
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Wed Oct 21 04:53:34 2015(r289675)
+++ head/Makefile.inc1  Wed Oct 21 05:33:48 2015(r289676)
@@ -513,7 +513,7 @@ KMAKE=  ${KMAKEENV} ${MAKE} ${.MAKEFLAGS
 # Attempt to rebuild the entire system, with reasonable chance of
 # success, regardless of how old your existing system is.
 #
-_worldtmp:
+_worldtmp: .PHONY
 .if ${.CURDIR:C/[^,]//g} != ""
 #  The m4 build of sendmail files doesn't like it if ',' is used
 #  anywhere in the path of it's files.
@@ -653,7 +653,7 @@ everything:
@echo "--"
${_+_}cd ${.CURDIR}; ${WMAKE} par-all
 .if defined(LIB32TMP)
-build32:
+build32: .PHONY
@echo
@echo "--"
@echo ">>> stage 5.1: building 32 bit shim libraries"
@@ -674,54 +674,55 @@ build32:
mkdir -p ${WORLDTMP}
ln -sf ${.CURDIR}/sys ${WORLDTMP}
 .for _t in obj includes
-   cd ${.CURDIR}/include; ${LIB32WMAKE} DIRPRFX=include/ ${_t}
-   cd ${.CURDIR}/lib; ${LIB32WMAKE} DIRPRFX=lib/ ${_t}
+   ${_+_}cd ${.CURDIR}/include; ${LIB32WMAKE} DIRPRFX=include/ ${_t}
+   ${_+_}cd ${.CURDIR}/lib; ${LIB32WMAKE} DIRPRFX=lib/ ${_t}
 .if ${MK_CDDL} != "no"
-   cd ${.CURDIR}/cddl/lib; ${LIB32WMAKE} DIRPRFX=cddl/lib/ ${_t}
+   ${_+_}cd ${.CURDIR}/cddl/lib; ${LIB32WMAKE} DIRPRFX=cddl/lib/ ${_t}
 .endif
-   cd ${.CURDIR}/gnu/lib; ${LIB32WMAKE} DIRPRFX=gnu/lib/ ${_t}
+   ${_+_}cd ${.CURDIR}/gnu/lib; ${LIB32WMAKE} DIRPRFX=gnu/lib/ ${_t}
 .if ${MK_CRYPT} != "no"
-   cd ${.CURDIR}/secure/lib; ${LIB32WMAKE} DIRPRFX=secure/lib/ ${_t}
+   ${_+_}cd ${.CURDIR}/secure/lib; ${LIB32WMAKE} DIRPRFX=secure/lib/ ${_t}
 .endif
 .if ${MK_KERBEROS} != "no"
-   cd ${.CURDIR}/kerberos5/lib; ${LIB32WMAKE} DIRPRFX=kerberos5/lib ${_t}
+   ${_+_}cd ${.CURDIR}/kerberos5/lib; ${LIB32WMAKE} DIRPRFX=kerberos5/lib 
${_t}
 .endif
 .endfor
 .for _dir in usr.bin/lex/lib
-   cd ${.CURDIR}/${_dir}; ${LIB32WMAKE} DIRPRFX=${_dir}/ obj
+   ${_+_}cd ${.CURDIR}/${_dir}; ${LIB32WMAKE} DIRPRFX=${_dir}/ obj
 .endfor
 .for _dir in lib/ncurses/ncurses lib/ncurses/ncursesw lib/libmagic
-   cd ${.CURDIR}/${_dir}; \
+   ${_+_}cd ${.CURDIR}/${_dir}; \
WORLDTMP=${WORLDTMP} \
MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" \
MAKEOBJDIRPREFIX=${LIB32_OBJTREE} ${MAKE} SSP_CFLAGS= DESTDIR= \
DIRPRFX=${_dir}/ -DNO_LINT -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \
build-tools
 .endfor
-   cd ${.CURDIR}; \
+   ${_+_}cd ${.CURDIR}; \
${LIB32WMAKE} -f Makefile.inc1 libraries
 .for _t in obj depend all
-   cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32WMAKE} \
+   ${_+_}cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32WMAKE} \
DIRPRFX=libexec/rtld-elf/ ${_t}
-   cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32WMAKE} \
+   ${_+_}cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32WMAKE} \
DIRPRFX=usr.bin/ldd ${_t}
 .endfor
 
-distribute32 install32:
-   cd ${.CURDIR}/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
+distribute32 install32: .MAKE .PHONY
+   ${_+_}cd ${.CURDIR}/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
 .if ${MK_CDDL} != "no"
-   cd ${.CURDIR}/cddl/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
+   ${_+_}cd ${.CURDIR}/cddl/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
 .endif
-   cd ${.CURDIR}/gnu/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
+   ${_+_}cd ${.CURDIR}/gnu/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
 .if ${MK_CRYPT} != "no"
-   cd ${.CURDIR}/secure/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
+   ${_+_}cd ${.CURDIR}/secure/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
 .endif
 .if ${MK_KERBEROS} != "no"
-   cd ${.CURDIR}/kerberos5/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
+   ${_+_}cd ${.CURDIR}/kerberos5/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
 .endif
-   cd ${.CURDIR}/libexec/rtld-elf; \
+   ${_+_}cd ${.CURDIR}/libexec/rtld-elf; \
PROG=ld-elf32.so.1 ${LIB32IMAKE} ${.TARGET:S/32$//}
-   cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32IMAKE} ${.TARGET:S/32$//}
+   ${_+_}cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32IMAKE} \
+   ${.TARGET:S/32$//}
 .endif
 
 WMAKE_TGTS=
@@ -946,7 +947,7 @@ distributeworld installworld: _installch
 .endif
 .endfor
-mkdir ${DESTDIR}/${DISTDIR}/base
-   cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \
+   

svn commit: r289677 - in head: bin/csh sbin/devd sbin/fsck_ffs sbin/ipfw sbin/natd sbin/newfs_nandfs sbin/rcorder usr.bin/calendar usr.bin/colldef usr.bin/dtc usr.bin/indent usr.bin/locale usr.bin/...

2015-10-20 Thread Eitan Adler
Author: eadler
Date: Wed Oct 21 05:37:09 2015
New Revision: 289677
URL: https://svnweb.freebsd.org/changeset/base/289677

Log:
  Fix a ton of speelling errors
  
  arc lint is helpful
  
  Reviewed By: allanjude, wblock, #manpages, ch...@bsdjunk.com
  Differential Revision: https://reviews.freebsd.org/D3337

Modified:
  head/bin/csh/config_p.h
  head/sbin/devd/devd.cc
  head/sbin/fsck_ffs/fsck.h
  head/sbin/fsck_ffs/globs.c
  head/sbin/ipfw/tables.c
  head/sbin/natd/natd.c
  head/sbin/newfs_nandfs/newfs_nandfs.c
  head/sbin/rcorder/rcorder.c
  head/usr.bin/calendar/parsedata.c
  head/usr.bin/colldef/parse.y
  head/usr.bin/dtc/dtb.hh
  head/usr.bin/indent/indent.1
  head/usr.bin/locale/locale.c
  head/usr.bin/look/look.1
  head/usr.bin/mkimg/mkimg.1
  head/usr.bin/mt/mt.c
  head/usr.bin/patch/pch.c
  head/usr.bin/pr/egetopt.c
  head/usr.bin/sed/compile.c
  head/usr.bin/sockstat/sockstat.c
  head/usr.bin/vgrind/regexp.c
  head/usr.sbin/bhyve/pci_emul.c
  head/usr.sbin/bsdconfig/bsdconfig
  head/usr.sbin/config/config.h
  head/usr.sbin/ctld/ctld.c
  head/usr.sbin/fwcontrol/fwmpegts.c
  head/usr.sbin/jail/command.c
  head/usr.sbin/jail/jailp.h
  head/usr.sbin/jail/jailparse.y
  head/usr.sbin/jls/jls.c
  head/usr.sbin/makefs/cd9660.c
  head/usr.sbin/mfiutil/mfiutil.8
  head/usr.sbin/nandsim/nandsim.8
  head/usr.sbin/nandsim/nandsim.c
  head/usr.sbin/nandsim/nandsim_cfgparse.c
  head/usr.sbin/ndp/ndp.c
  head/usr.sbin/newsyslog/newsyslog.c
  head/usr.sbin/pmcstudy/eval_expr.c
  head/usr.sbin/ppp/ip.c
  head/usr.sbin/ppp/ppp.8
  head/usr.sbin/rtsold/rtsold.h
  head/usr.sbin/uefisign/magic.h
  head/usr.sbin/uefisign/pe.c
  head/usr.sbin/ypbind/ypbind.c
  head/usr.sbin/ypserv/ypinit.sh

Modified: head/bin/csh/config_p.h
==
--- head/bin/csh/config_p.h Wed Oct 21 05:33:48 2015(r289676)
+++ head/bin/csh/config_p.h Wed Oct 21 05:37:09 2015(r289677)
@@ -9,7 +9,7 @@
 
 #ifndef _h_config
 #define _h_config
-/** System dependant compilation flags /
+/** System dependent compilation flags /
 /*
  * POSIX   This system supports IEEE Std 1003.1-1988 (POSIX).
  */

Modified: head/sbin/devd/devd.cc
==
--- head/sbin/devd/devd.cc  Wed Oct 21 05:33:48 2015(r289676)
+++ head/sbin/devd/devd.cc  Wed Oct 21 05:37:09 2015(r289677)
@@ -850,7 +850,7 @@ create_socket(const char *name, int sock
return (fd);
 }
 
-unsigned int max_clients = 10; /* Default, can be overriden on cmdline. */
+unsigned int max_clients = 10; /* Default, can be overridden on cmdline. */
 unsigned int num_clients;
 
 list clients;

Modified: head/sbin/fsck_ffs/fsck.h
==
--- head/sbin/fsck_ffs/fsck.h   Wed Oct 21 05:33:48 2015(r289676)
+++ head/sbin/fsck_ffs/fsck.h   Wed Oct 21 05:37:09 2015(r289677)
@@ -301,7 +301,7 @@ extern char snapname[BUFSIZ];   /* when do
 extern char*cdevname;  /* name of device being checked */
 extern longdev_bsize;  /* computed value of DEV_BSIZE */
 extern longsecsize;/* actual disk sector size */
-extern u_int   real_dev_bsize; /* actual disk sector size, not 
overriden */
+extern u_int   real_dev_bsize; /* actual disk sector size, not 
overridden */
 extern charnflag;  /* assume a no response */
 extern charyflag;  /* assume a yes response */
 extern int bkgrdflag;  /* use a snapshot to run on an active 
system */

Modified: head/sbin/fsck_ffs/globs.c
==
--- head/sbin/fsck_ffs/globs.c  Wed Oct 21 05:33:48 2015(r289676)
+++ head/sbin/fsck_ffs/globs.c  Wed Oct 21 05:37:09 2015(r289677)
@@ -73,7 +73,7 @@ char  snapname[BUFSIZ];   /* when doing sna
 char   *cdevname;  /* name of device being checked */
 long   dev_bsize;  /* computed value of DEV_BSIZE */
 long   secsize;/* actual disk sector size */
-u_int  real_dev_bsize; /* actual disk sector size, not overriden */
+u_int  real_dev_bsize; /* actual disk sector size, not overridden */
 char   nflag;  /* assume a no response */
 char   yflag;  /* assume a yes response */
 intbkgrdflag;  /* use a snapshot to run on an active system */

Modified: head/sbin/ipfw/tables.c
==
--- head/sbin/ipfw/tables.c Wed Oct 21 05:33:48 2015(r289676)
+++ head/sbin/ipfw/tables.c Wed Oct 21 05:37:09 2015(r289677)
@@ -450,7 +450,7 @@ table_create(ipfw_obj_header *oh, int ac
}
}
 
-   /* Set some 

svn commit: r289678 - head/sys/mips/atheros

2015-10-20 Thread Adrian Chadd
Author: adrian
Date: Wed Oct 21 05:52:04 2015
New Revision: 289678
URL: https://svnweb.freebsd.org/changeset/base/289678

Log:
  arge: Remove the debugging printf that snuck in.
  
  This was triggering when using it as an AP bridge rather than an ethernet
  bridge.
  
  The code is unclear but it works; I'll fix it to be clearer and test
  performance at a later stage.

Modified:
  head/sys/mips/atheros/if_arge.c

Modified: head/sys/mips/atheros/if_arge.c
==
--- head/sys/mips/atheros/if_arge.c Wed Oct 21 05:37:09 2015
(r289677)
+++ head/sys/mips/atheros/if_arge.c Wed Oct 21 05:52:04 2015
(r289678)
@@ -2195,11 +2195,6 @@ arge_newbuf(struct arge_softc *sc, int i
rxd = >arge_cdata.arge_rxdesc[idx];
if (rxd->rx_m != NULL) {
bus_dmamap_unload(sc->arge_cdata.arge_rx_tag, rxd->rx_dmamap);
-   /* XXX TODO: free rx_m? */
-   device_printf(sc->arge_dev,
-   "%s: ring[%d] rx_m wasn't free?\n",
-   __func__,
-   idx);
}
map = rxd->rx_dmamap;
rxd->rx_dmamap = sc->arge_cdata.arge_rx_sparemap;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289628 - stable/10/sys/contrib/ipfilter/netinet

2015-10-20 Thread Cy Schubert
Author: cy
Date: Tue Oct 20 13:20:29 2015
New Revision: 289628
URL: https://svnweb.freebsd.org/changeset/base/289628

Log:
  MFC r289480. Really fix ipfilter bug 3600459.
  
  Obtained from:ipfilter cvs repo r1.48.2.25, r1.72 and NetBSD repo r1.4

Modified:
  stable/10/sys/contrib/ipfilter/netinet/ip_state.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/contrib/ipfilter/netinet/ip_state.c
==
--- stable/10/sys/contrib/ipfilter/netinet/ip_state.c   Tue Oct 20 12:49:38 
2015(r289627)
+++ stable/10/sys/contrib/ipfilter/netinet/ip_state.c   Tue Oct 20 13:20:29 
2015(r289628)
@@ -3650,7 +3650,6 @@ ipf_state_del(softc, is, why)
if (is->is_ref > 0) {
int refs;
 
-   is->is_ref--;
refs = is->is_ref;
MUTEX_EXIT(>is_lock);
if (!orphan)
@@ -3667,7 +3666,7 @@ ipf_state_del(softc, is, why)
}
}
 
-   is->is_ref = 0;
+   ASSERT(is->is_ref == 0);
MUTEX_EXIT(>is_lock);
 
if (is->is_tqehead[0] != NULL) {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r289629 - head/sbin/newfs_msdos

2015-10-20 Thread Ed Maste
Author: emaste
Date: Tue Oct 20 13:32:09 2015
New Revision: 289629
URL: https://svnweb.freebsd.org/changeset/base/289629

Log:
  newfs_msdos: use NetBSD's mkfs_msdos.h verbatim for makefs compatibility
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sbin/newfs_msdos/mkfs_msdos.h

Modified: head/sbin/newfs_msdos/mkfs_msdos.h
==
--- head/sbin/newfs_msdos/mkfs_msdos.h  Tue Oct 20 13:20:29 2015
(r289628)
+++ head/sbin/newfs_msdos/mkfs_msdos.h  Tue Oct 20 13:32:09 2015
(r289629)
@@ -1,9 +1,12 @@
+/* $FreeBSD$   */
+/* $NetBSD: mkfs_msdos.h,v 1.2 2013/01/23 15:29:15 christos Exp $  */
+
 /*-
- * Copyright (c) 2015 The FreeBSD Foundation
+ * Copyright (c) 2013 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
- * This software was developed by Ed Maste under sponsorship from
- * the FreeBSD Foundation.
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -14,48 +17,53 @@
  *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 AUTHORS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * $FreeBSD$
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include 
+#include 
+#define ALLOPTS \
+AOPT('@', off_t, offset, 0, "Offset in device") \
+AOPT('B', const char *, bootstrap, -1, "Bootstrap file") \
+AOPT('C', off_t, create_size, 0, "Create file") \
+AOPT('F', uint8_t,  fat_type, 12, "FAT type (12, 16, or 32)") \
+AOPT('I', uint32_t, volume_id, 0, "Volume ID") \
+AOPT('L', const char *, volume_label, -1, "Volume Label") \
+AOPT('N', bool, no_create, -2, "Don't create filesystem, print params only") \
+AOPT('O', const char *, OEM_string, -1, "OEM string") \
+AOPT('S', uint16_t, bytes_per_sector, 1, "Bytes per sector") \
+AOPT('a', uint32_t, sectors_per_fat, 1, "Sectors per FAT") \
+AOPT('b', uint32_t, block_size, 1, "Block size") \
+AOPT('c', uint8_t, sectors_per_cluster, 1, "Sectors per cluster") \
+AOPT('e', uint16_t, directory_entries, 1, "Directory entries") \
+AOPT('f', const char *, floppy, -1, "Standard format floppies 
(160,180,320,360,640,720,1200,1232,1440,2880)") \
+AOPT('h', uint16_t, drive_heads, 1, "Drive heads") \
+AOPT('i', uint16_t, info_sector, 1, "Info sector") \
+AOPT('k', uint16_t, backup_sector, 1, "Backup sector") \
+AOPT('m', uint8_t, media_descriptor, 0, "Media descriptor") \
+AOPT('n', uint8_t, num_FAT, 1, "Number of FATs") \
+AOPT('o', uint32_t, hidden_sectors, 0, "Hidden sectors") \
+AOPT('r', uint16_t, reserved_sectors, 1, "Reserved sectors") \
+AOPT('s', uint32_t, size, 1, "File System size") \
+AOPT('u', uint16_t, sectors_per_track, 1, "Sectors per track")
+
 struct msdos_options {
-const char *bootstrap;
-const char *volume_label;
-const char *OEM_string;
-const char *floppy;
-u_int fat_type;
-u_int volume_id;
-u_int bytes_per_sector;
-u_int sectors_per_fat;
-u_int block_size;
-u_int sectors_per_cluster;
-u_int directory_entries;
-u_int drive_heads;
-u_int info_sector;
-u_int backup_sector;
-u_int media_descriptor;
-u_int num_FAT;
-u_int hidden_sectors;
-u_int reserved_sectors;
-u_int size;
-u_int sectors_per_track;
-int no_create;
- 

svn commit: r289630 - head/sys/arm/amlogic/aml8726

2015-10-20 Thread Ganbold Tsagaankhuu
Author: ganbold
Date: Tue Oct 20 13:47:36 2015
New Revision: 289630
URL: https://svnweb.freebsd.org/changeset/base/289630

Log:
  Include "opt_platform.h" to fix kernel build for amlogic devices.

Modified:
  head/sys/arm/amlogic/aml8726/aml8726_machdep.c

Modified: head/sys/arm/amlogic/aml8726/aml8726_machdep.c
==
--- head/sys/arm/amlogic/aml8726/aml8726_machdep.c  Tue Oct 20 13:32:09 
2015(r289629)
+++ head/sys/arm/amlogic/aml8726/aml8726_machdep.c  Tue Oct 20 13:47:36 
2015(r289630)
@@ -29,6 +29,8 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include "opt_platform.h"
+
 #define _ARM32_BUS_DMA_PRIVATE
 #include 
 #include 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"