Re: svn commit: r271256 - head/lib/libpam/modules/pam_login_access

2014-09-14 Thread Andriy Gapon
On 08/09/2014 12:19, Dag-Erling Smørgrav wrote:
 Author: des
 Date: Mon Sep  8 09:19:01 2014
 New Revision: 271256
 URL: http://svnweb.freebsd.org/changeset/base/271256
 
 Log:
   Fail rather than segfault if neither PAM_TTY nor PAM_RHOST is set.
   
   PR: 83099
   MFC after:  3 days

Thanks! But please see a line comment below.

 Modified:
   head/lib/libpam/modules/pam_login_access/pam_login_access.c
 
 Modified: head/lib/libpam/modules/pam_login_access/pam_login_access.c
 ==
 --- head/lib/libpam/modules/pam_login_access/pam_login_access.c   Mon Sep 
  8 09:16:07 2014(r271255)
 +++ head/lib/libpam/modules/pam_login_access/pam_login_access.c   Mon Sep 
  8 09:19:01 2014(r271256)
 @@ -79,7 +79,14 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int
  
   gethostname(hostname, sizeof hostname);
  
 - if (rhost == NULL || *(const char *)rhost == '\0') {
 + if (rhost != NULL  *(const char *)rhost != '\0') {
 + PAM_LOG(Checking login.access for user %s from host %s,
 + (const char *)user, (const char *)rhost);
 + if (login_access(user, rhost) != 0)
 + return (PAM_SUCCESS);
 + PAM_VERBOSE_ERROR(%s is not allowed to log in from %s,
 + user, rhost);
 + } else if (tty != NULL || *(const char *)tty != '\0') {


I think that the operator should be  here as well.


   PAM_LOG(Checking login.access for user %s on tty %s,
   (const char *)user, (const char *)tty);
   if (login_access(user, tty) != 0)
 @@ -87,12 +94,8 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int
   PAM_VERBOSE_ERROR(%s is not allowed to log in on %s,
   user, tty);
   } else {
 - PAM_LOG(Checking login.access for user %s from host %s,
 - (const char *)user, (const char *)rhost);
 - if (login_access(user, rhost) != 0)
 - return (PAM_SUCCESS);
 - PAM_VERBOSE_ERROR(%s is not allowed to log in from %s,
 - user, rhost);
 + PAM_VERBOSE_ERROR(PAM_RHOST or PAM_TTY required);
 + return (PAM_AUTHINFO_UNAVAIL);
   }
  
   return (PAM_AUTH_ERR);
 


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

svn commit: r271571 - head/usr.sbin/ctld

2014-09-14 Thread Edward Tomasz Napierala
Author: trasz
Date: Sun Sep 14 08:35:44 2014
New Revision: 271571
URL: http://svnweb.freebsd.org/changeset/base/271571

Log:
  Fix two small nits in ctl.conf(5).
  
  MFC after:3 days
  Sponsored by: The FreeBSD Foundation

Modified:
  head/usr.sbin/ctld/ctl.conf.5

Modified: head/usr.sbin/ctld/ctl.conf.5
==
--- head/usr.sbin/ctld/ctl.conf.5   Sun Sep 14 04:39:04 2014
(r271570)
+++ head/usr.sbin/ctld/ctl.conf.5   Sun Sep 14 08:35:44 2014
(r271571)
@@ -27,7 +27,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd September 11, 2014
+.Dd September 14, 2014
 .Dt CTL.CONF 5
 .Os
 .Sh NAME
@@ -93,6 +93,7 @@ The default is
 Create a
 .Sy portal-group
 configuration context,
+defining a new portal-group,
 which can then be assigned to any number of targets.
 .It Ic target Ar name
 Create a
@@ -282,7 +283,7 @@ The CTL-specific options passed to the k
 All CTL-specific options are documented in the
 .Sx OPTIONS
 section of
-.Xr ctladm 8
+.Xr ctladm 8 .
 .It Ic path Ar path
 The path to the file or device node used to back the LUN.
 .It Ic serial Ar string
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r271504 - in head/sys: dev/oce dev/vmware/vmxnet3 dev/xen/netfront net netinet ofed/drivers/net/mlx4

2014-09-14 Thread Hans Petter Selasky

On 09/13/14 23:45, Rick Macklem wrote:

Hans Petter Selasky wrote:

On 09/13/14 18:54, Adrian Chadd wrote:

Hi,

Just for the record:

* I'm glad you're tackling the TSO config stuff;
* I'm not glad you're trying to pack it into a u_int rather than
creating a new structure and adding fields for it.

I appreciate that you're trying to rush this in before 10.1, but
this
is exactly why things shouldn't be rushed in before release
deadlines.
:)

I'd really like to see this be broken out as a structure and the
bit
shifting games for what really shouldn't be packed into a u_int
fixed.
Otherwise this is going to be deadweight that has to persist past
11.0.



Hi Adrian,

I can make that change for -current, making the new structure and
such.
This change was intended for 10 where there is only one u_int for
this
information. Or do you want me to change that in 10 too?

--HPS




Btw, your patch calls sbsndptr() in tcp_output(), which advances
sb_sndptroff and sb_sndptr by the length.
Then it loops around and reduces the length for the case where
there are too many mbufs in the chain.



Right, though this patch would need to understand segment lengths too 
and not only count them.


--HPS

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


svn commit: r271577 - head/contrib/openbsm/bin/auditdistd

2014-09-14 Thread Pawel Jakub Dawidek
Author: pjd
Date: Sun Sep 14 09:26:33 2014
New Revision: 271577
URL: http://svnweb.freebsd.org/changeset/base/271577

Log:
  Fix descriptors leak.
  
  PR:   bin/191002
  Reported by:  Ryan Steinmetz
  Submitted by: mjg

Modified:
  head/contrib/openbsm/bin/auditdistd/subr.c

Modified: head/contrib/openbsm/bin/auditdistd/subr.c
==
--- head/contrib/openbsm/bin/auditdistd/subr.c  Sun Sep 14 09:20:01 2014
(r271576)
+++ head/contrib/openbsm/bin/auditdistd/subr.c  Sun Sep 14 09:26:33 2014
(r271577)
@@ -228,6 +228,11 @@ wait_for_file_init(int fd)
PJDLOG_ASSERT(fd != -1);
 
 #ifdef HAVE_KQUEUE
+   if (wait_for_file_kq != -1) {
+   close(wait_for_file_kq);
+   wait_for_file_kq = -1;
+   }
+
kq = kqueue();
if (kq == -1) {
pjdlog_errno(LOG_WARNING, kqueue() failed);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r271578 - head/lib/libnv

2014-09-14 Thread Pawel Jakub Dawidek
Author: pjd
Date: Sun Sep 14 09:27:12 2014
New Revision: 271578
URL: http://svnweb.freebsd.org/changeset/base/271578

Log:
  Remove the limit on descriptors that can be send in one nvlist.
  
  Submitted by: Mariusz Zaborski

Modified:
  head/lib/libnv/msgio.c

Modified: head/lib/libnv/msgio.c
==
--- head/lib/libnv/msgio.c  Sun Sep 14 09:26:33 2014(r271577)
+++ head/lib/libnv/msgio.c  Sun Sep 14 09:27:12 2014(r271578)
@@ -31,7 +31,7 @@
 #include sys/cdefs.h
 __FBSDID($FreeBSD$);
 
-#include sys/types.h
+#include sys/param.h
 #include sys/socket.h
 
 #include errno.h
@@ -56,6 +56,8 @@ __FBSDID($FreeBSD$);
 #definePJDLOG_ABORT(...)   abort()
 #endif
 
+#definePKG_MAX_SIZE(MCLBYTES / CMSG_SPACE(sizeof(int)) - 1)
+
 static int
 msghdr_add_fd(struct cmsghdr *cmsg, int fd)
 {
@@ -234,22 +236,31 @@ cred_recv(int sock, struct cmsgcred *cre
return (0);
 }
 
-int
-fd_send(int sock, const int *fds, size_t nfds)
+static int
+fd_package_send(int sock, const int *fds, size_t nfds)
 {
struct msghdr msg;
struct cmsghdr *cmsg;
+   struct iovec iov;
unsigned int i;
int serrno, ret;
+   uint8_t dummy;
 
-   if (nfds == 0 || fds == NULL) {
-   errno = EINVAL;
-   return (-1);
-   }
+   PJDLOG_ASSERT(sock = 0);
+   PJDLOG_ASSERT(fds != NULL);
+   PJDLOG_ASSERT(nfds  0);
 
bzero(msg, sizeof(msg));
-   msg.msg_iov = NULL;
-   msg.msg_iovlen = 0;
+
+   /*
+* XXX: Look into cred_send function for more details.
+*/
+   dummy = 0;
+   iov.iov_base = dummy;
+   iov.iov_len = sizeof(dummy);
+
+   msg.msg_iov = iov;
+   msg.msg_iovlen = 1;
msg.msg_controllen = nfds * CMSG_SPACE(sizeof(int));
msg.msg_control = calloc(1, msg.msg_controllen);
if (msg.msg_control == NULL)
@@ -274,22 +285,32 @@ end:
return (ret);
 }
 
-int
-fd_recv(int sock, int *fds, size_t nfds)
+static int
+fd_package_recv(int sock, int *fds, size_t nfds)
 {
struct msghdr msg;
struct cmsghdr *cmsg;
unsigned int i;
int serrno, ret;
+   struct iovec iov;
+   uint8_t dummy;
 
-   if (nfds == 0 || fds == NULL) {
-   errno = EINVAL;
-   return (-1);
-   }
+   PJDLOG_ASSERT(sock = 0);
+   PJDLOG_ASSERT(nfds  0);
+   PJDLOG_ASSERT(fds != NULL);
 
+   i = 0;
bzero(msg, sizeof(msg));
-   msg.msg_iov = NULL;
-   msg.msg_iovlen = 0;
+   bzero(iov, sizeof(iov));
+
+   /*
+* XXX: Look into cred_send function for more details.
+*/
+   iov.iov_base = dummy;
+   iov.iov_len = sizeof(dummy);
+
+   msg.msg_iov = iov;
+   msg.msg_iovlen = 1;
msg.msg_controllen = nfds * CMSG_SPACE(sizeof(int));
msg.msg_control = calloc(1, msg.msg_controllen);
if (msg.msg_control == NULL)
@@ -333,6 +354,64 @@ end:
 }
 
 int
+fd_recv(int sock, int *fds, size_t nfds)
+{
+   unsigned int i, step, j;
+   int ret, serrno;
+
+   if (nfds == 0 || fds == NULL) {
+   errno = EINVAL;
+   return (-1);
+   }
+
+   ret = i = step = 0;
+   while (i  nfds) {
+   if (PKG_MAX_SIZE  nfds - i)
+   step = PKG_MAX_SIZE;
+   else
+   step = nfds - i;
+   ret = fd_package_recv(sock, fds + i, step);
+   if (ret != 0) {
+   /* Close all received descriptors. */
+   serrno = errno;
+   for (j = 0; j  i; j++)
+   close(fds[j]);
+   errno = serrno;
+   break;
+   }
+   i += step;
+   }
+
+   return (ret);
+}
+
+int
+fd_send(int sock, const int *fds, size_t nfds)
+{
+   unsigned int i, step;
+   int ret;
+
+   if (nfds == 0 || fds == NULL) {
+   errno = EINVAL;
+   return (-1);
+   }
+
+   ret = i = step = 0;
+   while (i  nfds) {
+   if (PKG_MAX_SIZE  nfds - i)
+   step = PKG_MAX_SIZE;
+   else
+   step = nfds - i;
+   ret = fd_package_send(sock, fds + i, step);
+   if (ret != 0)
+   break;
+   i += step;
+   }
+
+   return (ret);
+}
+
+int
 buf_send(int sock, void *buf, size_t size)
 {
ssize_t done;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r271579 - head/lib/libnv

2014-09-14 Thread Pawel Jakub Dawidek
Author: pjd
Date: Sun Sep 14 09:30:09 2014
New Revision: 271579
URL: http://svnweb.freebsd.org/changeset/base/271579

Log:
  Use non-recursive algorithm for traversing nvlists. This also removes
  the limit on number of nested nvlists.
  
  Submitted by: Mariusz Zaborski

Modified:
  head/lib/libnv/nv.h
  head/lib/libnv/nv_impl.h
  head/lib/libnv/nvlist.c
  head/lib/libnv/nvlist_impl.h
  head/lib/libnv/nvpair.c
  head/lib/libnv/nvpair_impl.h

Modified: head/lib/libnv/nv.h
==
--- head/lib/libnv/nv.h Sun Sep 14 09:27:12 2014(r271578)
+++ head/lib/libnv/nv.h Sun Sep 14 09:30:09 2014(r271579)
@@ -83,6 +83,8 @@ nvlist_t *nvlist_xfer(int sock, nvlist_t
 
 const char *nvlist_next(const nvlist_t *nvl, int *typep, void **cookiep);
 
+const nvlist_t *nvlist_get_parent(const nvlist_t *nvl);
+
 /*
  * The nvlist_exists functions check if the given name (optionally of the given
  * type) exists on nvlist.

Modified: head/lib/libnv/nv_impl.h
==
--- head/lib/libnv/nv_impl.hSun Sep 14 09:27:12 2014(r271578)
+++ head/lib/libnv/nv_impl.hSun Sep 14 09:30:09 2014(r271579)
@@ -39,6 +39,8 @@ struct nvpair;
 typedef struct nvpair nvpair_t;
 #endif
 
+#defineNV_TYPE_NVLIST_UP   255
+
 #defineNV_TYPE_FIRST   NV_TYPE_NULL
 #defineNV_TYPE_LASTNV_TYPE_BINARY
 
@@ -55,6 +57,8 @@ void nvlist_add_nvpair(nvlist_t *nvl, co
 
 void nvlist_move_nvpair(nvlist_t *nvl, nvpair_t *nvp);
 
+void nvlist_set_parent(nvlist_t *nvl, nvpair_t *parent);
+
 const nvpair_t *nvlist_get_nvpair(const nvlist_t *nvl, const char *name);
 
 nvpair_t *nvlist_take_nvpair(nvlist_t *nvl, const char *name);

Modified: head/lib/libnv/nvlist.c
==
--- head/lib/libnv/nvlist.c Sun Sep 14 09:27:12 2014(r271578)
+++ head/lib/libnv/nvlist.c Sun Sep 14 09:30:09 2014(r271579)
@@ -73,10 +73,11 @@ __FBSDID($FreeBSD$);
 
 #defineNVLIST_MAGIC0x6e766c/* nvl */
 struct nvlist {
-   int nvl_magic;
-   int nvl_error;
-   int nvl_flags;
-   struct nvl_head nvl_head;
+   int  nvl_magic;
+   int  nvl_error;
+   int  nvl_flags;
+   nvpair_t*nvl_parent;
+   struct nvl_head  nvl_head;
 };
 
 #defineNVLIST_ASSERT(nvl)  do {
\
@@ -106,6 +107,7 @@ nvlist_create(int flags)
nvl = malloc(sizeof(*nvl));
nvl-nvl_error = 0;
nvl-nvl_flags = flags;
+   nvl-nvl_parent = NULL;
TAILQ_INIT(nvl-nvl_head);
nvl-nvl_magic = NVLIST_MAGIC;
 
@@ -147,6 +149,36 @@ nvlist_error(const nvlist_t *nvl)
return (nvl-nvl_error);
 }
 
+nvpair_t *
+nvlist_get_nvpair_parent(const nvlist_t *nvl)
+{
+
+   NVLIST_ASSERT(nvl);
+
+   return (nvl-nvl_parent);
+}
+
+const nvlist_t *
+nvlist_get_parent(const nvlist_t *nvl)
+{
+
+   NVLIST_ASSERT(nvl);
+
+   if (nvl-nvl_parent == NULL)
+   return (NULL);
+
+   return (nvpair_nvlist(nvl-nvl_parent));
+}
+
+void
+nvlist_set_parent(nvlist_t *nvl, nvpair_t *parent)
+{
+
+   NVLIST_ASSERT(nvl);
+
+   nvl-nvl_parent = parent;
+}
+
 bool
 nvlist_empty(const nvlist_t *nvl)
 {
@@ -301,24 +333,34 @@ nvlist_clone(const nvlist_t *nvl)
return (newnvl);
 }
 
+static bool
+nvlist_dump_error_check(const nvlist_t *nvl, int fd, int level)
+{
+
+   if (nvlist_error(nvl) != 0) {
+   dprintf(fd, %*serror: %d\n, level * 4, ,
+   nvlist_error(nvl));
+   return (true);
+   }
+
+   return (false);
+}
+
 /*
  * Dump content of nvlist.
  */
-static void
-nvlist_xdump(const nvlist_t *nvl, int fd, int level)
+void
+nvlist_dump(const nvlist_t *nvl, int fd)
 {
nvpair_t *nvp;
+   int level;
 
-   PJDLOG_ASSERT(level  3);
-
-   if (nvlist_error(nvl) != 0) {
-   dprintf(fd, %*serror: %d\n, level * 4, ,
-   nvlist_error(nvl));
+   level = 0;
+   if (nvlist_dump_error_check(nvl, fd, level))
return;
-   }
 
-   for (nvp = nvlist_first_nvpair(nvl); nvp != NULL;
-   nvp = nvlist_next_nvpair(nvl, nvp)) {
+   nvp = nvlist_first_nvpair(nvl);
+   while (nvp != NULL) {
dprintf(fd, %*s%s (%s):, level * 4, , nvpair_name(nvp),
nvpair_type_string(nvpair_type(nvp)));
switch (nvpair_type(nvp)) {
@@ -340,8 +382,14 @@ nvlist_xdump(const nvlist_t *nvl, int fd
break;
case NV_TYPE_NVLIST:
dprintf(fd, \n);
-   nvlist_xdump(nvpair_get_nvlist(nvp), fd, level + 1);
-   break;
+   nvl = 

svn commit: r271586 - head/sys/vm

2014-09-14 Thread Konstantin Belousov
Author: kib
Date: Sun Sep 14 10:27:36 2014
New Revision: 271586
URL: http://svnweb.freebsd.org/changeset/base/271586

Log:
  Fix mis-spelling of bits and types names in the vnode_pager_putpages().
  The changes should not modify the generated code.
  
  The pager-pgo_putpages() method takes int flags as its fourth
  argument, while vnode_pager_putpages() used boolean_t (which is
  typedef'ed to int).  The flags are from VM_PAGER_* namespace, while
  vnode_pager_putpages() passed TRUE and OBJPC_SYNC to VOP_PUTPAGES(),
  which both are numerically equal to VM_PAGER_PUT_SYNC.
  
  Noted and reviewed by:alc (previous version)
  Sponsored by: The FreeBSD Foundation
  MFC after:1 week

Modified:
  head/sys/vm/vnode_pager.c

Modified: head/sys/vm/vnode_pager.c
==
--- head/sys/vm/vnode_pager.c   Sun Sep 14 10:07:12 2014(r271585)
+++ head/sys/vm/vnode_pager.c   Sun Sep 14 10:27:36 2014(r271586)
@@ -83,7 +83,7 @@ static int vnode_pager_input_smlfs(vm_ob
 static int vnode_pager_input_old(vm_object_t object, vm_page_t m);
 static void vnode_pager_dealloc(vm_object_t);
 static int vnode_pager_getpages(vm_object_t, vm_page_t *, int, int);
-static void vnode_pager_putpages(vm_object_t, vm_page_t *, int, boolean_t, int 
*);
+static void vnode_pager_putpages(vm_object_t, vm_page_t *, int, int, int *);
 static boolean_t vnode_pager_haspage(vm_object_t, vm_pindex_t, int *, int *);
 static vm_object_t vnode_pager_alloc(void *, vm_ooffset_t, vm_prot_t,
 vm_ooffset_t, struct ucred *cred);
@@ -1008,7 +1008,7 @@ vnode_pager_generic_getpages(struct vnod
  */
 static void
 vnode_pager_putpages(vm_object_t object, vm_page_t *m, int count,
-boolean_t sync, int *rtvals)
+int flags, int *rtvals)
 {
int rtval;
struct vnode *vp;
@@ -1026,16 +1026,16 @@ vnode_pager_putpages(vm_object_t object,
 * daemon up.  This should be probably be addressed XXX.
 */
 
-   if ((vm_cnt.v_free_count + vm_cnt.v_cache_count) 
+   if (vm_cnt.v_free_count + vm_cnt.v_cache_count 
vm_cnt.v_pageout_free_min)
-   sync |= OBJPC_SYNC;
+   flags |= VM_PAGER_PUT_SYNC;
 
/*
 * Call device-specific putpages function
 */
vp = object-handle;
VM_OBJECT_WUNLOCK(object);
-   rtval = VOP_PUTPAGES(vp, m, bytes, sync, rtvals);
+   rtval = VOP_PUTPAGES(vp, m, bytes, flags, rtvals);
KASSERT(rtval != EOPNOTSUPP, 
(vnode_pager: stale FS putpages\n));
VM_OBJECT_WLOCK(object);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r271588 - in head: sbin/camcontrol sys/cam

2014-09-14 Thread Alexander Motin
Author: mav
Date: Sun Sep 14 11:59:49 2014
New Revision: 271588
URL: http://svnweb.freebsd.org/changeset/base/271588

Log:
  Update CAM CCB accounting for the new status quo.
  
  devq_openings counter lost its meaning after allocation queues has gone.
  held counter is still meaningful, but problematic to update due to separate
  locking of CCB allocation and queuing.
  
  To fix that replace devq_openings counter with allocated counter.  held is
  now calculated on request as difference between number of allocated, queued
  and active CCBs.
  
  MFC after:1 month

Modified:
  head/sbin/camcontrol/camcontrol.c
  head/sys/cam/cam_ccb.h
  head/sys/cam/cam_queue.c
  head/sys/cam/cam_queue.h
  head/sys/cam/cam_xpt.c

Modified: head/sbin/camcontrol/camcontrol.c
==
--- head/sbin/camcontrol/camcontrol.c   Sun Sep 14 11:00:44 2014
(r271587)
+++ head/sbin/camcontrol/camcontrol.c   Sun Sep 14 11:59:49 2014
(r271588)
@@ -4469,9 +4469,9 @@ tagcontrol(struct cam_device *device, in
fprintf(stdout, %s, pathstr);
fprintf(stdout, dev_active%d\n, ccb-cgds.dev_active);
fprintf(stdout, %s, pathstr);
-   fprintf(stdout, devq_openings %d\n, ccb-cgds.devq_openings);
+   fprintf(stdout, allocated %d\n, ccb-cgds.allocated);
fprintf(stdout, %s, pathstr);
-   fprintf(stdout, devq_queued   %d\n, ccb-cgds.devq_queued);
+   fprintf(stdout, queued%d\n, ccb-cgds.queued);
fprintf(stdout, %s, pathstr);
fprintf(stdout, held  %d\n, ccb-cgds.held);
fprintf(stdout, %s, pathstr);

Modified: head/sys/cam/cam_ccb.h
==
--- head/sys/cam/cam_ccb.h  Sun Sep 14 11:00:44 2014(r271587)
+++ head/sys/cam/cam_ccb.h  Sun Sep 14 11:59:49 2014(r271588)
@@ -347,8 +347,8 @@ struct ccb_getdevstats {
struct  ccb_hdr ccb_h;
int dev_openings;   /* Space left for more work on device*/ 
int dev_active; /* Transactions running on the device */
-   int devq_openings;  /* Space left for more queued work */
-   int devq_queued;/* Transactions queued to be sent */
+   int allocated;  /* CCBs allocated for the device */
+   int queued; /* CCBs queued to be sent to the device */
int held;   /*
 * CCBs held by peripheral drivers
 * for this device

Modified: head/sys/cam/cam_queue.c
==
--- head/sys/cam/cam_queue.cSun Sep 14 11:00:44 2014(r271587)
+++ head/sys/cam/cam_queue.cSun Sep 14 11:59:49 2014(r271588)
@@ -290,7 +290,6 @@ cam_ccbq_resize(struct cam_ccbq *ccbq, i
 
delta = new_size - (ccbq-dev_active + ccbq-dev_openings);
ccbq-total_openings += delta;
-   ccbq-devq_openings += delta;
ccbq-dev_openings += delta;
 
new_size = imax(64, 1  fls(new_size + new_size / 2));
@@ -308,7 +307,6 @@ cam_ccbq_init(struct cam_ccbq *ccbq, int
imax(64, 1  fls(openings + openings / 2))) != 0)
return (1);
ccbq-total_openings = openings;
-   ccbq-devq_openings = openings;
ccbq-dev_openings = openings;
return (0);
 }

Modified: head/sys/cam/cam_queue.h
==
--- head/sys/cam/cam_queue.hSun Sep 14 11:00:44 2014(r271587)
+++ head/sys/cam/cam_queue.hSun Sep 14 11:59:49 2014(r271588)
@@ -62,10 +62,9 @@ struct cam_ccbq {
struct ccb_hdr_tailqqueue_extra_head;
int queue_extra_entries;
int total_openings;
-   int devq_openings;
+   int allocated;
int dev_openings;
int dev_active;
-   int held;
 };
 
 struct cam_ed;
@@ -188,8 +187,8 @@ cam_ccbq_pending_ccb_count(struct cam_cc
 static __inline void
 cam_ccbq_take_opening(struct cam_ccbq *ccbq)
 {
-   ccbq-devq_openings--;
-   ccbq-held++;
+
+   ccbq-allocated++;
 }
 
 static __inline void
@@ -198,8 +197,6 @@ cam_ccbq_insert_ccb(struct cam_ccbq *ccb
struct ccb_hdr *old_ccb;
struct camq *queue = ccbq-queue;
 
-   ccbq-held--;
-
/*
 * If queue is already full, try to resize.
 * If resize fail, push CCB with lowest priority out to the TAILQ.
@@ -264,7 +261,7 @@ cam_ccbq_send_ccb(struct cam_ccbq *ccbq,
 
send_ccb-ccb_h.pinfo.index = CAM_ACTIVE_INDEX;
ccbq-dev_active++;
-   ccbq-dev_openings--;   
+   ccbq-dev_openings--;
 }
 
 static __inline void
@@ -272,15 +269,14 @@ cam_ccbq_ccb_done(struct cam_ccbq *ccbq,
 {
 
ccbq-dev_active--;
-   

svn commit: r271589 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2014-09-14 Thread Steven Hartland
Author: smh
Date: Sun Sep 14 12:23:00 2014
New Revision: 271589
URL: http://svnweb.freebsd.org/changeset/base/271589

Log:
  Added missing ZFS sysctls
  * vfs.zfs.vdev.async_write_active_min_dirty_percent
  * vfs.zfs.vdev.async_write_active_max_dirty_percent
  
  Added validation of min / max for ZFS sysctl
  * vfs.zfs.dirty_data_max_percent
  
  MFC after:3 days

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c  Sun Sep 
14 11:59:49 2014(r271588)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c  Sun Sep 
14 12:23:00 2014(r271589)
@@ -145,8 +145,10 @@ SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, dirty_d
 zfs_dirty_data_max_max, 0,
 The absolute cap on dirty_data_max when auto calculating);
 
-SYSCTL_INT(_vfs_zfs, OID_AUTO, dirty_data_max_percent, CTLFLAG_RDTUN,
-zfs_dirty_data_max_percent, 0,
+static int sysctl_zfs_dirty_data_max_percent(SYSCTL_HANDLER_ARGS);
+SYSCTL_PROC(_vfs_zfs, OID_AUTO, dirty_data_max_percent,
+CTLTYPE_INT | CTLFLAG_MPSAFE | CTLFLAG_RWTUN, 0, sizeof(int),
+sysctl_zfs_dirty_data_max_percent, I,
 The percent of physical memory used to auto calculate dirty_data_max);
 
 SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, dirty_data_sync, CTLFLAG_RWTUN,
@@ -168,6 +170,24 @@ SYSCTL_PROC(_vfs_zfs, OID_AUTO, delay_sc
 Controls how quickly the delay approaches infinity);
 
 static int
+sysctl_zfs_dirty_data_max_percent(SYSCTL_HANDLER_ARGS)
+{
+   int val, err;
+
+   val = zfs_dirty_data_max_percent;
+   err = sysctl_handle_int(oidp, val, 0, req);
+   if (err != 0 || req-newptr == NULL)
+   return (err);
+
+   if (val  0 || val  100)
+   return (EINVAL);
+
+   zfs_dirty_data_max_percent = val;
+
+   return (0);
+}
+
+static int
 sysctl_zfs_delay_min_dirty_percent(SYSCTL_HANDLER_ARGS)
 {
int val, err;

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.cSun Sep 
14 11:59:49 2014(r271588)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.cSun Sep 
14 12:23:00 2014(r271589)
@@ -176,6 +176,21 @@ int zfs_vdev_write_gap_limit = 4  10;
 
 #ifdef __FreeBSD__
 SYSCTL_DECL(_vfs_zfs_vdev);
+
+static int 
sysctl_zfs_async_write_active_min_dirty_percent(SYSCTL_HANDLER_ARGS);
+SYSCTL_PROC(_vfs_zfs_vdev, OID_AUTO, async_write_active_min_dirty_percent,
+CTLTYPE_UINT | CTLFLAG_MPSAFE | CTLFLAG_RWTUN, 0, sizeof(int),
+sysctl_zfs_async_write_active_min_dirty_percent, I,
+Percentage of async write dirty data below which 
+async_write_min_active is used.);
+
+static int 
sysctl_zfs_async_write_active_max_dirty_percent(SYSCTL_HANDLER_ARGS);
+SYSCTL_PROC(_vfs_zfs_vdev, OID_AUTO, async_write_active_max_dirty_percent,
+CTLTYPE_UINT | CTLFLAG_MPSAFE | CTLFLAG_RWTUN, 0, sizeof(int),
+sysctl_zfs_async_write_active_max_dirty_percent, I,
+Percentage of async write dirty data above which 
+async_write_max_active is used.);
+
 SYSCTL_UINT(_vfs_zfs_vdev, OID_AUTO, max_active, CTLFLAG_RWTUN,
 zfs_vdev_max_active, 0,
 The maximum number of I/Os of all types active for each device.);
@@ -216,6 +231,44 @@ SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, read
 SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, write_gap_limit, CTLFLAG_RWTUN,
 zfs_vdev_write_gap_limit, 0,
 Acceptable gap between two writes being aggregated);
+
+static int
+sysctl_zfs_async_write_active_min_dirty_percent(SYSCTL_HANDLER_ARGS)
+{
+   int val, err;
+
+   val = zfs_vdev_async_write_active_min_dirty_percent;
+   err = sysctl_handle_int(oidp, val, 0, req);
+   if (err != 0 || req-newptr == NULL)
+   return (err);
+   
+   if (val  0 || val  100 ||
+   val = zfs_vdev_async_write_active_max_dirty_percent)
+   return (EINVAL);
+
+   zfs_vdev_async_write_active_min_dirty_percent = val;
+
+   return (0);
+}
+
+static int
+sysctl_zfs_async_write_active_max_dirty_percent(SYSCTL_HANDLER_ARGS)
+{
+   int val, err;
+
+   val = zfs_vdev_async_write_active_max_dirty_percent;
+   err = sysctl_handle_int(oidp, val, 0, req);
+   if (err != 0 || req-newptr == NULL)
+   return (err);
+
+   if (val  0 || val  100 ||
+   val = zfs_vdev_async_write_active_min_dirty_percent)
+   return (EINVAL);
+
+   zfs_vdev_async_write_active_max_dirty_percent = val;
+
+   return (0);
+}
 #endif
 
 int
___
svn-src-all@freebsd.org mailing list

svn commit: r271590 - head/bin/sh

2014-09-14 Thread Jilles Tjoelker
Author: jilles
Date: Sun Sep 14 15:59:15 2014
New Revision: 271590
URL: http://svnweb.freebsd.org/changeset/base/271590

Log:
  sh: Add some const keywords.

Modified:
  head/bin/sh/input.c
  head/bin/sh/input.h
  head/bin/sh/parser.c

Modified: head/bin/sh/input.c
==
--- head/bin/sh/input.c Sun Sep 14 12:23:00 2014(r271589)
+++ head/bin/sh/input.c Sun Sep 14 15:59:15 2014(r271590)
@@ -338,7 +338,7 @@ pungetc(void)
  * We handle aliases this way.
  */
 void
-pushstring(char *s, int len, struct alias *ap)
+pushstring(const char *s, int len, struct alias *ap)
 {
struct strpush *sp;
 

Modified: head/bin/sh/input.h
==
--- head/bin/sh/input.h Sun Sep 14 12:23:00 2014(r271589)
+++ head/bin/sh/input.h Sun Sep 14 15:59:15 2014(r271590)
@@ -53,7 +53,7 @@ int pgetc(void);
 int preadbuffer(void);
 int preadateof(void);
 void pungetc(void);
-void pushstring(char *, int, struct alias *);
+void pushstring(const char *, int, struct alias *);
 void setinputfile(const char *, int);
 void setinputfd(int, int);
 void setinputstring(const char *, int);

Modified: head/bin/sh/parser.c
==
--- head/bin/sh/parser.cSun Sep 14 12:23:00 2014(r271589)
+++ head/bin/sh/parser.cSun Sep 14 15:59:15 2014(r271590)
@@ -1915,7 +1915,7 @@ char *
 getprompt(void *unused __unused)
 {
static char ps[PROMPTLEN];
-   char *fmt;
+   const char *fmt;
const char *pwd;
int i, trim;
static char internal_error[] = ??;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r271591 - head/sys/arm/freescale/imx

2014-09-14 Thread Ian Lepore
Author: ian
Date: Sun Sep 14 16:12:43 2014
New Revision: 271591
URL: http://svnweb.freebsd.org/changeset/base/271591

Log:
  Add a comment giving an overview of the driver.  Remove leftover debugging.

Modified:
  head/sys/arm/freescale/imx/imx_iomux.c

Modified: head/sys/arm/freescale/imx/imx_iomux.c
==
--- head/sys/arm/freescale/imx/imx_iomux.c  Sun Sep 14 15:59:15 2014
(r271590)
+++ head/sys/arm/freescale/imx/imx_iomux.c  Sun Sep 14 16:12:43 2014
(r271591)
@@ -26,6 +26,29 @@
  * $FreeBSD$
  */
 
+/*
+ * Pin mux and pad control driver for imx5 and imx6.
+ *
+ * This driver implements the fdt_pinctrl interface for configuring the gpio 
and
+ * peripheral pins based on fdt configuration data.
+ *
+ * When the driver attaches, it walks the entire fdt tree and automatically
+ * configures the pins for each device which has a pinctrl-0 property and whose
+ * status is okay.  In addition it implements the fdt_pinctrl_configure()
+ * method which any other driver can call at any time to reconfigure its pins.
+ *
+ * The nature of the fsl,pins property in fdt data makes this driver's job very
+ * easy.  Instead of representing each pin and pad configuration using symbolic
+ * properties such as pullup-enable=true and so on, the data simply contains
+ * the addresses of the registers that control the pins, and the raw values to
+ * store in those registers.
+ *
+ * The imx5 and imx6 SoCs also have a small number of general purpose
+ * registers in the iomuxc device which are used to control an assortment
+ * of completely unrelated aspects of SoC behavior.  This driver provides other
+ * drivers with direct access to those registers via simple accessor functions.
+ */
+
 #include sys/param.h
 #include sys/systm.h
 #include sys/bus.h
@@ -102,13 +125,6 @@ iomux_configure_pins(device_t dev, phand
cfgnode = OF_node_from_xref(cfgxref);
ntuples = OF_getencprop_alloc(cfgnode, fsl,pins, sizeof(*cfgtuples),
(void **)cfgtuples);
-#ifdef DEBUG
-   {
-   char name[32];
-   OF_getprop(cfgnode, name, name, sizeof(name));
-   printf(found %d tuples in fsl,pins for %s\n, ntuples, name);
-   }
-#endif
if (ntuples  0)
return (ENOENT);
if (ntuples == 0)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r271592 - head/bin/sh

2014-09-14 Thread Jilles Tjoelker
Author: jilles
Date: Sun Sep 14 16:27:49 2014
New Revision: 271592
URL: http://svnweb.freebsd.org/changeset/base/271592

Log:
  sh: Make checkend() a real function instead of an emulated nested function.
  
  No functional change is intended, but the generated code is slightly
  different.

Modified:
  head/bin/sh/parser.c

Modified: head/bin/sh/parser.c
==
--- head/bin/sh/parser.cSun Sep 14 16:12:43 2014(r271591)
+++ head/bin/sh/parser.cSun Sep 14 16:27:49 2014(r271592)
@@ -946,6 +946,42 @@ struct tokenstate
 
 
 /*
+ * Check to see whether we are at the end of the here document.  When this
+ * is called, c is set to the first character of the next input line.  If
+ * we are at the end of the here document, this routine sets the c to PEOF.
+ * The new value of c is returned.
+ */
+
+static int
+checkend(int c, const char *eofmark, char *line, size_t sizeof_line,
+int striptabs)
+{
+   if (striptabs) {
+   while (c == '\t')
+   c = pgetc();
+   }
+   if (c == *eofmark) {
+   if (pfgets(line, sizeof_line) != NULL) {
+   const char *p, *q;
+
+   p = line;
+   for (q = eofmark + 1 ; *q  *p == *q ; p++, q++);
+   if ((*p == '\0' || *p == '\n')  *q == '\0') {
+   c = PEOF;
+   if (*p == '\n') {
+   plinno++;
+   needprompt = doprompt;
+   }
+   } else {
+   pushstring(line, strlen(line), NULL);
+   }
+   }
+   }
+   return (c);
+}
+
+
+/*
  * Called to parse command substitutions.
  */
 
@@ -1269,7 +1305,6 @@ readcstyleesc(char *out)
  * will run code that appears at the end of readtoken1.
  */
 
-#define CHECKEND() {goto checkend; checkend_return:;}
 #define PARSEREDIR()   {goto parseredir; parseredir_return:;}
 #define PARSESUB() {goto parsesub; parsesub_return:;}
 #definePARSEARITH(){goto parsearith; parsearith_return:;}
@@ -1303,7 +1338,9 @@ readtoken1(int firstc, char const *initi
 
STARTSTACKSTR(out);
loop: { /* for each line, until end of word */
-   CHECKEND(); /* set c to PEOF if at end of here document */
+   if (eofmark)
+   /* set c to PEOF if at end of here document */
+   c = checkend(c, eofmark, line, sizeof(line), striptabs);
for (;;) {  /* until end of line or end of word */
CHECKSTRSPACE(4, out);  /* permit 4 calls to USTPUTC */
 
@@ -1484,40 +1521,6 @@ endword:
 
 
 /*
- * Check to see whether we are at the end of the here document.  When this
- * is called, c is set to the first character of the next input line.  If
- * we are at the end of the here document, this routine sets the c to PEOF.
- */
-
-checkend: {
-   if (eofmark) {
-   if (striptabs) {
-   while (c == '\t')
-   c = pgetc();
-   }
-   if (c == *eofmark) {
-   if (pfgets(line, sizeof line) != NULL) {
-   const char *p, *q;
-
-   p = line;
-   for (q = eofmark + 1 ; *q  *p == *q ; p++, 
q++);
-   if ((*p == '\0' || *p == '\n')  *q == '\0') {
-   c = PEOF;
-   if (*p == '\n') {
-   plinno++;
-   needprompt = doprompt;
-   }
-   } else {
-   pushstring(line, strlen(line), NULL);
-   }
-   }
-   }
-   }
-   goto checkend_return;
-}
-
-
-/*
  * Parse a redirection operator.  The variable out points to a string
  * specifying the fd to be redirected.  The variable c contains the
  * first character of the redirection operator.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r271593 - in head/bin/sh: . tests/parser

2014-09-14 Thread Jilles Tjoelker
Author: jilles
Date: Sun Sep 14 16:46:30 2014
New Revision: 271593
URL: http://svnweb.freebsd.org/changeset/base/271593

Log:
  sh: Remove arbitrary length limit on  EOF markers.
  
  This also simplifies the code.

Added:
  head/bin/sh/tests/parser/heredoc12.0   (contents, props changed)
Modified:
  head/bin/sh/input.c
  head/bin/sh/input.h
  head/bin/sh/parser.c
  head/bin/sh/tests/parser/Makefile

Modified: head/bin/sh/input.c
==
--- head/bin/sh/input.c Sun Sep 14 16:27:49 2014(r271592)
+++ head/bin/sh/input.c Sun Sep 14 16:46:30 2014(r271593)
@@ -116,33 +116,6 @@ resetinput(void)
 }
 
 
-/*
- * Read a line from the script.
- */
-
-char *
-pfgets(char *line, int len)
-{
-   char *p = line;
-   int nleft = len;
-   int c;
-
-   while (--nleft  0) {
-   c = pgetc_macro();
-   if (c == PEOF) {
-   if (p == line)
-   return NULL;
-   break;
-   }
-   *p++ = c;
-   if (c == '\n')
-   break;
-   }
-   *p = '\0';
-   return line;
-}
-
-
 
 /*
  * Read a character from the script, returning PEOF on end of file.

Modified: head/bin/sh/input.h
==
--- head/bin/sh/input.h Sun Sep 14 16:27:49 2014(r271592)
+++ head/bin/sh/input.h Sun Sep 14 16:46:30 2014(r271593)
@@ -48,7 +48,6 @@ struct alias;
 struct parsefile;
 
 void resetinput(void);
-char *pfgets(char *, int);
 int pgetc(void);
 int preadbuffer(void);
 int preadateof(void);

Modified: head/bin/sh/parser.c
==
--- head/bin/sh/parser.cSun Sep 14 16:27:49 2014(r271592)
+++ head/bin/sh/parser.cSun Sep 14 16:46:30 2014(r271593)
@@ -66,7 +66,6 @@ __FBSDID($FreeBSD$);
  * Shell command parser.
  */
 
-#defineEOFMARKLEN  79
 #definePROMPTLEN   128
 
 /* values of checkkwd variable */
@@ -718,7 +717,6 @@ parsefname(void)
if (n-type == NHERE) {
struct heredoc *here = heredoc;
struct heredoc *p;
-   int i;
 
if (quoteflag == 0)
n-type = NXHERE;
@@ -727,7 +725,7 @@ parsefname(void)
while (*wordtext == '\t')
wordtext++;
}
-   if (! noexpand(wordtext) || (i = strlen(wordtext)) == 0 || i  
EOFMARKLEN)
+   if (! noexpand(wordtext))
synerror(Illegal eof marker for  redirection);
rmescapes(wordtext);
here-eofmark = wordtext;
@@ -953,28 +951,27 @@ struct tokenstate
  */
 
 static int
-checkend(int c, const char *eofmark, char *line, size_t sizeof_line,
-int striptabs)
+checkend(int c, const char *eofmark, int striptabs)
 {
if (striptabs) {
while (c == '\t')
c = pgetc();
}
if (c == *eofmark) {
-   if (pfgets(line, sizeof_line) != NULL) {
-   const char *p, *q;
+   int c2;
+   const char *q;
 
-   p = line;
-   for (q = eofmark + 1 ; *q  *p == *q ; p++, q++);
-   if ((*p == '\0' || *p == '\n')  *q == '\0') {
-   c = PEOF;
-   if (*p == '\n') {
-   plinno++;
-   needprompt = doprompt;
-   }
-   } else {
-   pushstring(line, strlen(line), NULL);
+   for (q = eofmark + 1; c2 = pgetc(), *q != '\0'  c2 == *q; q++)
+   ;
+   if ((c2 == PEOF || c2 == '\n')  *q == '\0') {
+   c = PEOF;
+   if (c2 == '\n') {
+   plinno++;
+   needprompt = doprompt;
}
+   } else {
+   pungetc();
+   pushstring(eofmark + 1, q - (eofmark + 1), NULL);
}
}
return (c);
@@ -1316,7 +1313,6 @@ readtoken1(int firstc, char const *initi
int c = firstc;
char *out;
int len;
-   char line[EOFMARKLEN + 1];
struct nodelist *bqlist;
int quotef;
int newvarnest;
@@ -1340,7 +1336,7 @@ readtoken1(int firstc, char const *initi
loop: { /* for each line, until end of word */
if (eofmark)
/* set c to PEOF if at end of here document */
-   c = checkend(c, eofmark, line, sizeof(line), striptabs);
+   c = checkend(c, eofmark, striptabs);
   

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

2014-09-14 Thread Ian Lepore
Author: ian
Date: Sun Sep 14 17:36:57 2014
New Revision: 271594
URL: http://svnweb.freebsd.org/changeset/base/271594

Log:
  Fix an undefined variable that was accidentally not causing an error.
  
  The code had references to both intr_offset and intr_parent variable names
  as referring to the parent interrupt node.  The intr_parent variable
  wasn't actually defined anywhere, but the only references to it were as
  an argument to a macro that didn't use that argument in expansion, so
  the undefined variable accidentally didn't cause an error.
  
  The intr_parent name makes more sense in context, so change all occurrances
  of intr_offset to intr_parent.

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

Modified: head/sys/arm/arm/nexus.c
==
--- head/sys/arm/arm/nexus.cSun Sep 14 16:46:30 2014(r271593)
+++ head/sys/arm/arm/nexus.cSun Sep 14 17:36:57 2014(r271594)
@@ -356,16 +356,16 @@ nexus_ofw_map_intr(device_t dev, device_
 pcell_t *intr)
 {
fdt_pic_decode_t intr_decode;
-   phandle_t intr_offset;
+   phandle_t intr_parent;
int i, rv, interrupt, trig, pol;
 
-   intr_offset = OF_node_from_xref(iparent);
+   intr_parent = OF_node_from_xref(iparent);
for (i = 0; i  icells; i++)
intr[i] = cpu_to_fdt32(intr[i]);
 
for (i = 0; fdt_pic_table[i] != NULL; i++) {
intr_decode = fdt_pic_table[i];
-   rv = intr_decode(intr_offset, intr, interrupt, trig, pol);
+   rv = intr_decode(intr_parent, intr, interrupt, trig, pol);
 
if (rv == 0) {
/* This was recognized as our PIC and decoded. */
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


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

2014-09-14 Thread Ian Lepore
Author: ian
Date: Sun Sep 14 17:47:04 2014
New Revision: 271595
URL: http://svnweb.freebsd.org/changeset/base/271595

Log:
  Add compat strings for all the flavors of GIC this driver should support.
  Also allow the driver to attach to ofwbus as well as simplebus, some FDT
  data puts the root interrupt controller on the root bus.

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

Modified: head/sys/arm/arm/gic.c
==
--- head/sys/arm/arm/gic.c  Sun Sep 14 17:36:57 2014(r271594)
+++ head/sys/arm/arm/gic.c  Sun Sep 14 17:47:04 2014(r271595)
@@ -127,6 +127,17 @@ static int gic_config_irq(int irq, enum 
 enum intr_polarity pol);
 static void gic_post_filter(void *);
 
+static struct ofw_compat_data compat_data[] = {
+   {arm,gic, true},  /* Non-standard, used in FreeBSD dts. */
+   {arm,gic-400, true},
+   {arm,cortex-a15-gic,  true},
+   {arm,cortex-a9-gic,   true},
+   {arm,cortex-a7-gic,   true},
+   {arm,arm11mp-gic, true},
+   {brcm,brahma-b15-gic, true},
+   {NULL,  false}
+};
+
 static int
 arm_gic_probe(device_t dev)
 {
@@ -134,7 +145,7 @@ arm_gic_probe(device_t dev)
if (!ofw_bus_status_okay(dev))
return (ENXIO);
 
-   if (!ofw_bus_is_compatible(dev, arm,gic))
+   if (!ofw_bus_search_compatible(dev, compat_data)-ocd_data)
return (ENXIO);
device_set_desc(dev, ARM Generic Interrupt Controller);
return (BUS_PROBE_DEFAULT);
@@ -269,6 +280,8 @@ static devclass_t arm_gic_devclass;
 
 EARLY_DRIVER_MODULE(gic, simplebus, arm_gic_driver, arm_gic_devclass, 0, 0,
 BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE);
+EARLY_DRIVER_MODULE(gic, ofwbus, arm_gic_driver, arm_gic_devclass, 0, 0,
+BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE);
 
 static void
 gic_post_filter(void *arg)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r271596 - in head/sys: fs/nfsclient nfsclient vm

2014-09-14 Thread Alan Cox
Author: alc
Date: Sun Sep 14 18:07:55 2014
New Revision: 271596
URL: http://svnweb.freebsd.org/changeset/base/271596

Log:
  Avoid an exclusive acquisition of the object lock on the expected execution
  path through the NFS clients' getpages functions.
  
  Introduce vm_pager_free_nonreq().  This function can be used to eliminate
  code that is duplicated in many getpages functions.  Also, in contrast to
  the code that currently appears in those getpages functions,
  vm_pager_free_nonreq() avoids acquiring an exclusive object lock in one
  case.
  
  Reviewed by:  kib
  MFC after:6 weeks
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/fs/nfsclient/nfs_clbio.c
  head/sys/nfsclient/nfs_bio.c
  head/sys/vm/vm_pager.c
  head/sys/vm/vm_pager.h
  head/sys/vm/vnode_pager.c

Modified: head/sys/fs/nfsclient/nfs_clbio.c
==
--- head/sys/fs/nfsclient/nfs_clbio.c   Sun Sep 14 17:47:04 2014
(r271595)
+++ head/sys/fs/nfsclient/nfs_clbio.c   Sun Sep 14 18:07:55 2014
(r271596)
@@ -129,23 +129,20 @@ ncl_getpages(struct vop_getpages_args *a
npages = btoc(count);
 
/*
+* Since the caller has busied the requested page, that page's valid
+* field will not be changed by other threads.
+*/
+   vm_page_assert_xbusied(pages[ap-a_reqpage]);
+
+   /*
 * If the requested page is partially valid, just return it and
 * allow the pager to zero-out the blanks.  Partially valid pages
 * can only occur at the file EOF.
 */
-   VM_OBJECT_WLOCK(object);
if (pages[ap-a_reqpage]-valid != 0) {
-   for (i = 0; i  npages; ++i) {
-   if (i != ap-a_reqpage) {
-   vm_page_lock(pages[i]);
-   vm_page_free(pages[i]);
-   vm_page_unlock(pages[i]);
-   }
-   }
-   VM_OBJECT_WUNLOCK(object);
-   return (0);
+   vm_pager_free_nonreq(object, pages, ap-a_reqpage, npages);
+   return (VM_PAGER_OK);
}
-   VM_OBJECT_WUNLOCK(object);
 
/*
 * We use only the kva address for the buffer, but this is extremely
@@ -175,15 +172,7 @@ ncl_getpages(struct vop_getpages_args *a
 
if (error  (uio.uio_resid == count)) {
ncl_printf(nfs_getpages: error %d\n, error);
-   VM_OBJECT_WLOCK(object);
-   for (i = 0; i  npages; ++i) {
-   if (i != ap-a_reqpage) {
-   vm_page_lock(pages[i]);
-   vm_page_free(pages[i]);
-   vm_page_unlock(pages[i]);
-   }
-   }
-   VM_OBJECT_WUNLOCK(object);
+   vm_pager_free_nonreq(object, pages, ap-a_reqpage, npages);
return (VM_PAGER_ERROR);
}
 

Modified: head/sys/nfsclient/nfs_bio.c
==
--- head/sys/nfsclient/nfs_bio.cSun Sep 14 17:47:04 2014
(r271595)
+++ head/sys/nfsclient/nfs_bio.cSun Sep 14 18:07:55 2014
(r271596)
@@ -123,23 +123,20 @@ nfs_getpages(struct vop_getpages_args *a
npages = btoc(count);
 
/*
+* Since the caller has busied the requested page, that page's valid
+* field will not be changed by other threads.
+*/
+   vm_page_assert_xbusied(pages[ap-a_reqpage]);
+
+   /*
 * If the requested page is partially valid, just return it and
 * allow the pager to zero-out the blanks.  Partially valid pages
 * can only occur at the file EOF.
 */
-   VM_OBJECT_WLOCK(object);
if (pages[ap-a_reqpage]-valid != 0) {
-   for (i = 0; i  npages; ++i) {
-   if (i != ap-a_reqpage) {
-   vm_page_lock(pages[i]);
-   vm_page_free(pages[i]);
-   vm_page_unlock(pages[i]);
-   }
-   }
-   VM_OBJECT_WUNLOCK(object);
-   return (0);
+   vm_pager_free_nonreq(object, pages, ap-a_reqpage, npages);
+   return (VM_PAGER_OK);
}
-   VM_OBJECT_WUNLOCK(object);
 
/*
 * We use only the kva address for the buffer, but this is extremely
@@ -169,15 +166,7 @@ nfs_getpages(struct vop_getpages_args *a
 
if (error  (uio.uio_resid == count)) {
nfs_printf(nfs_getpages: error %d\n, error);
-   VM_OBJECT_WLOCK(object);
-   for (i = 0; i  npages; ++i) {
-   if (i != ap-a_reqpage) {
-   vm_page_lock(pages[i]);
-   vm_page_free(pages[i]);
-   vm_page_unlock(pages[i]);
-  

svn commit: r271597 - head/contrib/llvm/lib/Target/X86

2014-09-14 Thread Dimitry Andric
Author: dim
Date: Sun Sep 14 18:50:38 2014
New Revision: 271597
URL: http://svnweb.freebsd.org/changeset/base/271597

Log:
  Pull in r217410 from upstream llvm trunk (by Bob Wilson):
  
Set trunc store action to Expand for all X86 targets.
  
When compiling without SSE2, isTruncStoreLegal(F64, F32) would return
Legal, whereas with SSE2 it would return Expand. And since the Target
doesn't seem to actually handle a truncstore for double - float, it
would just output a store of a full double in the space for a float
hence overwriting other bits on the stack.
  
Patch by Luqman Aden!
  
  This should fix clang -O0 on i386 assigning garbage to floats, in
  certain scenarios.
  
  PR:   187437
  Submitted by: c...@gmail.com
  Obtained from:http://llvm.org/viewvc/llvm-project?rev=217410view=rev
  MFC after:3 days

Modified:
  head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp

Modified: head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp
==
--- head/contrib/llvm/lib/Target/X86/X86ISelLowering.cppSun Sep 14 
18:07:55 2014(r271596)
+++ head/contrib/llvm/lib/Target/X86/X86ISelLowering.cppSun Sep 14 
18:50:38 2014(r271597)
@@ -300,6 +300,8 @@ void X86TargetLowering::resetOperationAc
   setTruncStoreAction(MVT::i32, MVT::i8 , Expand);
   setTruncStoreAction(MVT::i16, MVT::i8,  Expand);
 
+  setTruncStoreAction(MVT::f64, MVT::f32, Expand);
+
   // SETOEQ and SETUNE require checking two conditions.
   setCondCodeAction(ISD::SETOEQ, MVT::f32, Expand);
   setCondCodeAction(ISD::SETOEQ, MVT::f64, Expand);
@@ -1011,8 +1013,6 @@ void X86TargetLowering::resetOperationAc
   AddPromotedToType (ISD::SELECT, VT, MVT::v2i64);
 }
 
-setTruncStoreAction(MVT::f64, MVT::f32, Expand);
-
 // Custom lower v2i64 and v2f64 selects.
 setOperationAction(ISD::LOAD,   MVT::v2f64, Legal);
 setOperationAction(ISD::LOAD,   MVT::v2i64, Legal);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r271601 - in head/sys/arm: arm include

2014-09-14 Thread Ian Lepore
Author: ian
Date: Sun Sep 14 21:21:03 2014
New Revision: 271601
URL: http://svnweb.freebsd.org/changeset/base/271601

Log:
  Add a common routine for parsing FDT data describing an ARM GIC interrupt.
  
  In the fdt data we've written for ourselves, the interrupt properties
  for GIC interrupts have just been a bare interrupt number.  In standard
  data that conforms to the published bindings, GIC interrupt properties
  contain 3-tuples that describe the interrupt as shared vs private, the
  interrupt number within the shared/private address space, and configuration
  info such as level vs edge triggered.
  
  The new gic_decode_fdt() function parses both types of data, based on the
  #interrupt-cells property.  Previously, each platform implemented a decode
  routine and put a pointer to it into fdt_pic_table.  Now they can just
  list this function in their table instead if they use arm/gic.c.

Modified:
  head/sys/arm/arm/gic.c
  head/sys/arm/include/intr.h

Modified: head/sys/arm/arm/gic.c
==
--- head/sys/arm/arm/gic.c  Sun Sep 14 20:13:07 2014(r271600)
+++ head/sys/arm/arm/gic.c  Sun Sep 14 21:21:03 2014(r271601)
@@ -185,6 +185,51 @@ gic_init_secondary(void)
gic_d_write_4(GICD_ISENABLER(30  5), (1UL  (30  0x1F)));
 }
 
+int
+gic_decode_fdt(uint32_t iparent, uint32_t *intr, int *interrupt,
+int *trig, int *pol)
+{
+   static u_int num_intr_cells;
+
+   if (num_intr_cells == 0) {
+   if (OF_searchencprop(OF_node_from_xref(iparent), 
+   #interrupt-cells, num_intr_cells, 
+   sizeof(num_intr_cells)) == -1) {
+   num_intr_cells = 1;
+   }
+   }
+
+   if (num_intr_cells == 1) {
+   *interrupt = fdt32_to_cpu(intr[0]);
+   *trig = INTR_TRIGGER_CONFORM;
+   *pol = INTR_POLARITY_CONFORM;
+   } else {
+   if (intr[0] == 0)
+   *interrupt = fdt32_to_cpu(intr[1]) + 32;
+   else
+   *interrupt = fdt32_to_cpu(intr[1]);
+   /*
+* In intr[2], bits[3:0] are trigger type and level flags.
+*   1 = low-to-high edge triggered
+*   2 = high-to-low edge triggered
+*   4 = active high level-sensitive
+*   8 = active low level-sensitive
+* The hardware only supports active-high-level or rising-edge.
+*/
+   if (intr[2]  0x0a) {
+   printf(unsupported trigger/polarity configuration 
+   0x%2x\n, intr[2]  0x0f);
+   return (ENOTSUP);
+   }
+   *pol  = INTR_POLARITY_CONFORM;
+   if (intr[2]  0x01)
+   *trig = INTR_TRIGGER_EDGE;
+   else
+   *trig = INTR_TRIGGER_LEVEL;
+   }
+   return (0);
+}
+
 static int
 arm_gic_attach(device_t dev)
 {

Modified: head/sys/arm/include/intr.h
==
--- head/sys/arm/include/intr.h Sun Sep 14 20:13:07 2014(r271600)
+++ head/sys/arm/include/intr.h Sun Sep 14 21:21:03 2014(r271601)
@@ -82,5 +82,7 @@ extern int (*arm_config_irq)(int irq, en
 void arm_irq_memory_barrier(uintptr_t);
 
 void gic_init_secondary(void);
+int  gic_decode_fdt(uint32_t iparentnode, uint32_t *intrcells, int *interrupt,
+int *trig, int *pol);
 
 #endif /* _MACHINE_INTR_H */
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r271602 - head/sys/dev/hwpmc

2014-09-14 Thread Justin Hibbits
Author: jhibbits
Date: Sun Sep 14 22:03:41 2014
New Revision: 271602
URL: http://svnweb.freebsd.org/changeset/base/271602

Log:
  Fix PowerPC backtraces.  Since kernel and user have completely separate 
address
  spaces, rather than a split address, we actually can't check for being within
  the kernel's address range.  Instead, do what other backtraces do, and use
  trapexit()/asttrapexit() as the stack sentinel.
  
  MFC after:3 weeks

Modified:
  head/sys/dev/hwpmc/hwpmc_powerpc.c

Modified: head/sys/dev/hwpmc/hwpmc_powerpc.c
==
--- head/sys/dev/hwpmc/hwpmc_powerpc.c  Sun Sep 14 21:21:03 2014
(r271601)
+++ head/sys/dev/hwpmc/hwpmc_powerpc.c  Sun Sep 14 22:03:41 2014
(r271602)
@@ -40,14 +40,15 @@ __FBSDID($FreeBSD$);
 #include machine/pte.h
 #include machine/sr.h
 #include machine/cpu.h
-#include machine/vmparam.h /* For 
VM_MIN_KERNEL_ADDRESS/VM_MAX_KERNEL_ADDRESS */
+#include machine/stack.h
 
 #include hwpmc_powerpc.h
 
-#define INKERNEL(x)(((vm_offset_t)(x)) = VM_MAX_KERNEL_ADDRESS  \
-   ((vm_offset_t)(x)) = VM_MIN_KERNEL_ADDRESS)
-#define INUSER(x)  (((vm_offset_t)(x)) = VM_MAXUSER_ADDRESS  \
-   ((vm_offset_t)(x)) = VM_MIN_ADDRESS)
+#ifdef __powerpc64__
+#define OFFSET 4 /* Account for the TOC reload slot */
+#else
+#define OFFSET 0
+#endif
 
 struct powerpc_cpu **powerpc_pcpu;
 
@@ -56,20 +57,33 @@ pmc_save_kernel_callchain(uintptr_t *cc,
 struct trapframe *tf)
 {
uintptr_t *osp, *sp;
+   uintptr_t pc;
int frames = 0;
 
cc[frames++] = PMC_TRAPFRAME_TO_PC(tf);
sp = (uintptr_t *)PMC_TRAPFRAME_TO_FP(tf);
-   osp = NULL;
+   osp = (uintptr_t *)PAGE_SIZE;
 
for (; frames  maxsamples; frames++) {
-   if (!INKERNEL(sp) || sp = osp)
+   if (sp = osp)
break;
-#ifdef __powerpc64__
-   cc[frames] = sp[2];
-#else
-   cc[frames] = sp[1];
-#endif
+   #ifdef __powerpc64__
+   pc = sp[2];
+   #else
+   pc = sp[1];
+   #endif
+   if ((pc  3) || (pc  0x100))
+   break;
+
+   /*
+* trapexit() and asttrapexit() are sentinels
+* for kernel stack tracing.
+* */
+   if (pc + OFFSET == (uintptr_t) trapexit ||
+   pc + OFFSET == (uintptr_t) asttrapexit)
+   break;
+
+   cc[frames] = pc;
osp = sp;
sp = (uintptr_t *)*sp;
}
@@ -194,7 +208,7 @@ pmc_save_user_callchain(uintptr_t *cc, i
osp = NULL;
 
for (; frames  maxsamples; frames++) {
-   if (!INUSER(sp) || sp = osp)
+   if (sp = osp)
break;
osp = sp;
 #ifdef __powerpc64__
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r271603 - head/sbin/ifconfig

2014-09-14 Thread Bryan Venteicher
Author: bryanv
Date: Sun Sep 14 22:10:35 2014
New Revision: 271603
URL: http://svnweb.freebsd.org/changeset/base/271603

Log:
  Add DEF_CLONE_CMD_ARG2
  
  This will be used in the forthcoming vxlan import.
  
  Reviewed by:  gnn
  Phabric:  https://reviews.freebsd.org/D382

Modified:
  head/sbin/ifconfig/ifconfig.h

Modified: head/sbin/ifconfig/ifconfig.h
==
--- head/sbin/ifconfig/ifconfig.h   Sun Sep 14 22:03:41 2014
(r271602)
+++ head/sbin/ifconfig/ifconfig.h   Sun Sep 14 22:10:35 2014
(r271603)
@@ -74,6 +74,7 @@ void  callback_register(callback_func *, 
 #defineDEF_CMD_ARG2(name, func){ name, NEXTARG2, { .c_func2 = 
func }, 0, NULL }
 #defineDEF_CLONE_CMD(name, param, func) { name, param, { .c_func = 
func }, 1, NULL }
 #defineDEF_CLONE_CMD_ARG(name, func)   { name, NEXTARG, { .c_func = 
func }, 1, NULL }
+#defineDEF_CLONE_CMD_ARG2(name, func)  { name, NEXTARG2, { .c_func2 = 
func }, 1, NULL }
 
 struct ifaddrs;
 struct addrinfo;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r271604 - head/sys/kern

2014-09-14 Thread Alexander Motin
Author: mav
Date: Sun Sep 14 22:13:19 2014
New Revision: 271604
URL: http://svnweb.freebsd.org/changeset/base/271604

Log:
  Add couple memory barries to serialize tdq_cpu_idle and tdq_load accesses.
  
  This change fixes transient performance drops in some of my benchmarks,
  vanishing as soon as I am trying to collect any stats from the scheduler.
  It looks like reordered access to those variables sometimes caused loss of
  IPI_PREEMPT, that delayed thread execution until some later interrupt.
  
  MFC after:3 days

Modified:
  head/sys/kern/sched_ule.c

Modified: head/sys/kern/sched_ule.c
==
--- head/sys/kern/sched_ule.c   Sun Sep 14 22:10:35 2014(r271603)
+++ head/sys/kern/sched_ule.c   Sun Sep 14 22:13:19 2014(r271604)
@@ -1037,6 +1037,7 @@ tdq_notify(struct tdq *tdq, struct threa
ctd = pcpu_find(cpu)-pc_curthread;
if (!sched_shouldpreempt(pri, ctd-td_priority, 1))
return;
+   mb();
if (TD_IS_IDLETHREAD(ctd)) {
/*
 * If the MD code has an idle wakeup routine try that before
@@ -2640,6 +2641,7 @@ sched_idletd(void *dummy)
 
/* Run main MD idle handler. */
tdq-tdq_cpu_idle = 1;
+   mb();
cpu_idle(switchcnt * 4  sched_idlespinthresh);
tdq-tdq_cpu_idle = 0;
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r271605 - stable/10/etc

2014-09-14 Thread Glen Barber
Author: gjb
Date: Sun Sep 14 23:25:10 2014
New Revision: 271605
URL: http://svnweb.freebsd.org/changeset/base/271605

Log:
  Define NO_TESTS instead of WITHOUT_TESTS for the etc/
  'distribute' target to fix the WITH_TESTS=1 build.
  
  This is a direct commit to stable/10.
  
  Submitted by: ngie
  Approved by:  re (rodrigc)
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/10/etc/Makefile

Modified: stable/10/etc/Makefile
==
--- stable/10/etc/Makefile  Sun Sep 14 22:13:19 2014(r271604)
+++ stable/10/etc/Makefile  Sun Sep 14 23:25:10 2014(r271605)
@@ -177,7 +177,7 @@ afterinstall:
 distribute:
# Avoid installing tests here; make distribution will do this and
# correctly place them in the right location.
-   ${_+_}cd ${.CURDIR} ; ${MAKE} WITHOUT_TESTS=1 install \
+   ${_+_}cd ${.CURDIR} ; ${MAKE} -DNO_TESTS install \
DESTDIR=${DISTDIR}/${DISTRIBUTION}
${_+_}cd ${.CURDIR} ; ${MAKE} distribution 
DESTDIR=${DISTDIR}/${DISTRIBUTION}
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r271606 - head/sys/cam/ctl

2014-09-14 Thread Alexander Motin
Author: mav
Date: Sun Sep 14 23:39:13 2014
New Revision: 271606
URL: http://svnweb.freebsd.org/changeset/base/271606

Log:
  Always report that we support REPORT TARGET PORT GROUPS command.
  
  Without clustering support we any way have only one group of permanently
  active ports, but that gives us one more supported VMWare feature. ;)
  
  Solaris' Comstar also reports it even when only one port is present.

Modified:
  head/sys/cam/ctl/ctl.c

Modified: head/sys/cam/ctl/ctl.c
==
--- head/sys/cam/ctl/ctl.c  Sun Sep 14 23:25:10 2014(r271605)
+++ head/sys/cam/ctl/ctl.c  Sun Sep 14 23:39:13 2014(r271606)
@@ -10584,9 +10584,7 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio
CTL_DEBUG_PRINT((additional_length = %d\n,
 inq_ptr-additional_length));
 
-   inq_ptr-spc3_flags = SPC3_SID_3PC;
-   if (!ctl_is_single)
-   inq_ptr-spc3_flags |= SPC3_SID_TPGS_IMPLICIT;
+   inq_ptr-spc3_flags = SPC3_SID_3PC | SPC3_SID_TPGS_IMPLICIT;
/* 16 bit addressing */
if (port_type == CTL_PORT_SCSI)
inq_ptr-spc2_flags = SPC2_SID_ADDR16;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r271607 - head/sys/arm/freescale/imx

2014-09-14 Thread Ian Lepore
Author: ian
Date: Sun Sep 14 23:48:18 2014
New Revision: 271607
URL: http://svnweb.freebsd.org/changeset/base/271607

Log:
  Use gic_decode_fdt() rather than a local routine to parse fdt interrupt
  properties.  Move fdt_pic_table and fdt_fixup_table into imx6_machdep.c,
  which means imx6 doesn't need imx_common.c anymore.

Modified:
  head/sys/arm/freescale/imx/files.imx6
  head/sys/arm/freescale/imx/imx6_machdep.c

Modified: head/sys/arm/freescale/imx/files.imx6
==
--- head/sys/arm/freescale/imx/files.imx6   Sun Sep 14 23:39:13 2014
(r271606)
+++ head/sys/arm/freescale/imx/files.imx6   Sun Sep 14 23:48:18 2014
(r271607)
@@ -23,7 +23,6 @@ arm/freescale/imx/imx6_ccm.c  standard
 arm/freescale/imx/imx6_machdep.c   standard
 arm/freescale/imx/imx6_mp.coptional smp
 arm/freescale/imx/imx6_pl310.c standard
-arm/freescale/imx/imx_common.c standard
 arm/freescale/imx/imx_iomux.c  standard
 arm/freescale/imx/imx_machdep.cstandard
 arm/freescale/imx/imx_gpt.cstandard

Modified: head/sys/arm/freescale/imx/imx6_machdep.c
==
--- head/sys/arm/freescale/imx/imx6_machdep.c   Sun Sep 14 23:39:13 2014
(r271606)
+++ head/sys/arm/freescale/imx/imx6_machdep.c   Sun Sep 14 23:48:18 2014
(r271607)
@@ -38,6 +38,7 @@ __FBSDID($FreeBSD$);
 
 #include machine/bus.h
 #include machine/devmap.h
+#include machine/intr.h
 #include machine/machdep.h
 #include machine/platform.h 
 
@@ -46,6 +47,18 @@ __FBSDID($FreeBSD$);
 #include arm/freescale/imx/imx6_anatopvar.h
 #include arm/freescale/imx/imx_machdep.h
 
+#include dev/fdt/fdt_common.h
+#include dev/ofw/openfirm.h
+
+struct fdt_fixup_entry fdt_fixup_table[] = {
+   { NULL, NULL }
+};
+
+fdt_pic_decode_t fdt_pic_table[] = {
+   gic_decode_fdt,
+   NULL
+};
+
 vm_offset_t
 platform_lastaddr(void)
 {
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


svn commit: r271608 - stable/10/release/scripts

2014-09-14 Thread Glen Barber
Author: gjb
Date: Mon Sep 15 02:21:34 2014
New Revision: 271608
URL: http://svnweb.freebsd.org/changeset/base/271608

Log:
  MFC r271480, r271483, r271491:
  
  r271480:
Set PKG_CACHEDIR to an 'All/' directory one level lower
to fix 'pkg repo' generating repository metadata for the
on-disc packages.
  
  r271483:
Fix duplicate PKG_ABI in the PKG_CACHEDIR path.
  
  r271491:
Simplify dvd package population with pkg-1.3.
  
  Approved by:  re (rodrigc)
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/10/release/scripts/pkg-stage.sh
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/release/scripts/pkg-stage.sh
==
--- stable/10/release/scripts/pkg-stage.sh  Sun Sep 14 23:48:18 2014
(r271607)
+++ stable/10/release/scripts/pkg-stage.sh  Mon Sep 15 02:21:34 2014
(r271608)
@@ -40,20 +40,17 @@ if [ ! -x /usr/local/sbin/pkg ]; then
/usr/bin/make -C /usr/ports/ports-mgmt/pkg install clean
 fi
 
-PKG_ABI=$(pkg -vv | grep ^ABI | awk '{print $3}')
-PKG_ABI=${PKG_ABI%\;}
-PKG_ABI=${PKG_ABI#\}
-export PKG_ABI
-export PKG_CACHEDIR=dvd/packages/${PKG_ABI}
+export PKG_ABI=$(pkg config ABI)
+export PKG_REPODIR=dvd/packages/${PKG_ABI}
 
-/bin/mkdir -p ${PKG_CACHEDIR}
+/bin/mkdir -p ${PKG_REPODIR}
 
 # Print pkg(8) information to make debugging easier.
 ${PKGCMD} -vv
 ${PKGCMD} update -f
-${PKGCMD} fetch -d ${DVD_PACKAGES}
+${PKGCMD} fetch -o ${PKG_REPODIR} -d ${DVD_PACKAGES}
 
-${PKGCMD} repo ${PKG_CACHEDIR}
+${PKGCMD} repo ${PKG_REPODIR}
 
 # Always exit '0', even if pkg(8) complains about conflicts.
 exit 0
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r271514 - stable/8/sys/dev/sound/pcm

2014-09-14 Thread Alexey Dokuchaev
On Sat, Sep 13, 2014 at 03:22:09PM +, Alexander Motin wrote:
 New Revision: 271514
 URL: http://svnweb.freebsd.org/changeset/base/271514
 
 Log:
   MFC r269228:
   Add support for SOUND_MIXER_INFO IOCTL, used by gstreamer.

Thank you!

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


Re: svn commit: r265703 - in head: share/man/man4 sys/dev/bce sys/dev/bxe sys/modules/bce

2014-09-14 Thread Andrey V. Elsukov
On 08.05.2014 23:40, David C Somayajulu wrote:
 Author: davidcs
 Date: Thu May  8 19:40:37 2014
 New Revision: 265703
 URL: http://svnweb.freebsd.org/changeset/base/265703

 Modified: head/sys/modules/bce/Makefile
 ==
 --- head/sys/modules/bce/Makefile Thu May  8 19:35:29 2014
 (r265702)
 +++ head/sys/modules/bce/Makefile Thu May  8 19:40:37 2014
 (r265703)
 @@ -5,4 +5,9 @@ SRCS= opt_bce.h if_bce.c miibus_if.h mii
  
  #CFLAGS += -DBCE_DEBUG=0
  
 +clean:
 + rm -f opt_bdg.h device_if.h bus_if.h pci_if.h export_syms
 + rm -f *.o *.kld *.ko
 + rm -f @ machine x86 miibus_if.h miidevs.h opt_bce.h
 +
  .include bsd.kmod.mk

Hi,

why did you override 'clean' target?
It works well by default, but now some files don't deleted, e.g. when
you build modules with DEBUG_FLAGS. Also the same problem with if_bxe(4)
module.

-- 
WBR, Andrey V. Elsukov
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org