svn commit: r245606 - in head: share/mk tools/build/mk tools/build/options usr.sbin

2013-01-18 Thread Eitan Adler
Author: eadler
Date: Fri Jan 18 15:57:09 2013
New Revision: 245606
URL: http://svnweb.freebsd.org/changeset/base/245606

Log:
  Add option to make pc-sysinstall optional
  
  Approved by:  cperciva

Added:
  head/tools/build/options/WITHOUT_PC_SYSINSTALL   (contents, props changed)
Modified:
  head/share/mk/bsd.own.mk
  head/tools/build/mk/OptionalObsoleteFiles.inc
  head/usr.sbin/Makefile

Modified: head/share/mk/bsd.own.mk
==
--- head/share/mk/bsd.own.mkFri Jan 18 14:36:23 2013(r245605)
+++ head/share/mk/bsd.own.mkFri Jan 18 15:57:09 2013(r245606)
@@ -309,6 +309,7 @@ __DEFAULT_YES_OPTIONS = \
 OPENSSH \
 OPENSSL \
 PAM \
+PC_SYSINSTALL \
 PF \
 PKGBOOTSTRAP \
 PKGTOOLS \

Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
==
--- head/tools/build/mk/OptionalObsoleteFiles.inc   Fri Jan 18 14:36:23 
2013(r245605)
+++ head/tools/build/mk/OptionalObsoleteFiles.inc   Fri Jan 18 15:57:09 
2013(r245606)
@@ -3654,6 +3654,95 @@ OLD_FILES+=usr/share/man/man8/ntptime.8.
 # to be filled in
 #.endif
 
+.if ${MK_PC_SYSINSTALL} == no
+# backend-partmanager
+OLD_FILES+=usr/share/pc-sysinstall/backend-partmanager/create-part.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend-partmanager/delete-part.sh
+# backend-query
+OLD_FILES+=usr/share/pc-sysinstall/backend-query/detect-emulation.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend-query/detect-laptop.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend-query/detect-nics.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend-query/disk-info.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend-query/disk-list.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend-query/disk-part.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend-query/enable-net.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend-query/get-packages.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend-query/list-components.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend-query/list-config.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend-query/list-mirrors.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend-query/list-packages.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend-query/list-rsync-backups.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend-query/list-tzones.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend-query/query-langs.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend-query/send-logs.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend-query/setup-ssh-keys.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend-query/set-mirror.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend-query/sys-mem.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend-query/test-live.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend-query/test-netup.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend-query/update-part-list.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend-query/xkeyboard-layouts.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend-query/xkeyboard-models.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend-query/xkeyboard-variants.sh
+# backend
+OLD_FILES+=usr/share/pc-sysinstall/backend/functions-bsdlabel.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend/functions-cleanup.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend/functions-disk.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend/functions-extractimage.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend/functions-ftp.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend/functions-installcomponents.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend/functions-installpackages.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend/functions-localize.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend/functions-mountdisk.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend/functions-mountoptical.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend/functions-networking.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend/functions-newfs.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend/functions-parse.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend/functions-packages.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend/functions-runcommands.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend/functions-unmount.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend/functions-upgrade.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend/functions-users.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend/functions.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend/installimage.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend/parseconfig.sh
+OLD_FILES+=usr/share/pc-sysinstall/backend/startautoinstall.sh
+# conf
+OLD_FILES+=usr/share/pc-sysinstall/conf/avail-langs
+OLD_FILES+=usr/share/pc-sysinstall/conf/exclude-from-upgrade
+OLD_FILES+=usr/share/pc-sysinstall/conf/license/bsd-en.txt
+OLD_FILES+=usr/share/pc-sysinstall/conf/license/intel-en.txt
+OLD_FILES+=usr/share/pc-sysinstall/conf/license/nvidia-en.txt
+OLD_FILES+=usr/share/pc-sysinstall/conf/pc-sysinstall.conf
+# doc
+OLD_FILES+=usr/share/pc-sysinstall/doc/help-disk-list
+OLD_FILES+=us

Re: svn commit: r245577 - in head/sys: amd64/amd64 i386/i386 x86/x86

2013-01-18 Thread John Baldwin
On Thursday, January 17, 2013 11:03:32 pm Konstantin Belousov wrote:
> On Thu, Jan 17, 2013 at 09:32:26PM +, John Baldwin wrote:
> > Author: jhb
> > Date: Thu Jan 17 21:32:25 2013
> > New Revision: 245577
> > URL: http://svnweb.freebsd.org/changeset/base/245577
> > 
> > Log:
> >   Don't attempt to use clflush on the local APIC register window.  Various
> >   CPUs exhibit bad behavior if this is done (Intel Errata AAJ3, hangs on
> >   Pentium-M, and trashing of the local APIC registers on a VIA C7).  The
> >   local APIC is implicitly mapped UC already via MTRRs, so the clflush isn't
> >   necessary anyway.
> >   
> >   MFC after:2 weeks
> I am curious, was there a case where the clflush was really executed
> on the LAPIC register window with the pristine HEAD code ? I think
> that there is no Intel processors which support clflush instruction
> and do not have self-snoop.

The VIA CPUs.  I had a submitter report that a clflush against the local APIC
range would sometimes cause the entire local APIC range to get overwritten with
a single cacheline (repeated throughout the window).  Also, in theory we could
perhaps stop masking CLFLUSH in VM's when SS is masked.

> On the other hand, please note that the same change could be due for the
> pmap_invalidate_cache_pages(). Unlike pmap_invalidate_cache_range(),
> _pages() uses clflush unconditionally on purpose, since it is intended
> for devices which do not snoop.

Hmm, maybe.  I'm not sure that call is ever used on the local APIC since the
relevant page should already be UC from the boot-time call?

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


svn commit: r245610 - head/bin/ps

2013-01-18 Thread John Baldwin
Author: jhb
Date: Fri Jan 18 18:24:40 2013
New Revision: 245610
URL: http://svnweb.freebsd.org/changeset/base/245610

Log:
  Include the thread name along with the command name when displaying the
  command name of a thread from a multi-threaded process that doesn't have
  an available argument list (such as kernel processes) and threads display
  is enabled via -H.
  
  Reviewed by:  alfred, delphij, e...@vangyzen.net
  MFC after:1 week

Modified:
  head/bin/ps/extern.h
  head/bin/ps/fmt.c
  head/bin/ps/ps.c

Modified: head/bin/ps/extern.h
==
--- head/bin/ps/extern.hFri Jan 18 17:49:00 2013(r245609)
+++ head/bin/ps/extern.hFri Jan 18 18:24:40 2013(r245610)
@@ -51,7 +51,7 @@ char   *elapsed(KINFO *, VARENT *);
 char*elapseds(KINFO *, VARENT *);
 char*emulname(KINFO *, VARENT *);
 VARENT *find_varentry(VAR *);
-const   char *fmt_argv(char **, char *, size_t);
+const   char *fmt_argv(char **, char *, char *, size_t);
 double  getpcpu(const KINFO *);
 char*kvar(KINFO *, VARENT *);
 char*label(KINFO *, VARENT *);

Modified: head/bin/ps/fmt.c
==
--- head/bin/ps/fmt.c   Fri Jan 18 17:49:00 2013(r245609)
+++ head/bin/ps/fmt.c   Fri Jan 18 18:24:40 2013(r245610)
@@ -105,7 +105,7 @@ cmdpart(char *arg0)
 }
 
 const char *
-fmt_argv(char **argv, char *cmd, size_t maxlen)
+fmt_argv(char **argv, char *cmd, char *thread, size_t maxlen)
 {
size_t len;
char *ap, *cp;
@@ -122,9 +122,14 @@ fmt_argv(char **argv, char *cmd, size_t 
cp = malloc(len);
if (cp == NULL)
errx(1, "malloc failed");
-   if (ap == NULL)
-   sprintf(cp, "[%.*s]", (int)maxlen, cmd);
-   else if (strncmp(cmdpart(argv[0]), cmd, maxlen) != 0)
+   if (ap == NULL) {
+   if (showthreads && thread != NULL) {
+   asprintf(&ap, "%s/%s", cmd, thread);
+   sprintf(cp, "[%.*s]", (int)maxlen, ap);
+   free(ap);
+   } else
+   sprintf(cp, "[%.*s]", (int)maxlen, cmd);
+   } else if (strncmp(cmdpart(argv[0]), cmd, maxlen) != 0)
sprintf(cp, "%s (%.*s)", ap, (int)maxlen, cmd);
else
strcpy(cp, ap);

Modified: head/bin/ps/ps.c
==
--- head/bin/ps/ps.cFri Jan 18 17:49:00 2013(r245609)
+++ head/bin/ps/ps.cFri Jan 18 18:24:40 2013(r245610)
@@ -141,7 +141,7 @@ static void  format_output(KINFO *);
 static void*expand_list(struct listinfo *);
 static const char *
 fmt(char **(*)(kvm_t *, const struct kinfo_proc *, int),
-   KINFO *, char *, int);
+   KINFO *, char *, char *, int);
 static void free_list(struct listinfo *);
 static void init_list(struct listinfo *, addelem_rtn, int, const char *);
 static char*kludge_oldps_options(const char *, char *, const char *);
@@ -1163,11 +1163,12 @@ sizevars(void)
 
 static const char *
 fmt(char **(*fn)(kvm_t *, const struct kinfo_proc *, int), KINFO *ki,
-char *comm, int maxlen)
+char *comm, char *thread, int maxlen)
 {
const char *s;
 
-   s = fmt_argv((*fn)(kd, ki->ki_p, termwidth), comm, maxlen);
+   s = fmt_argv((*fn)(kd, ki->ki_p, termwidth), comm,
+   ki->ki_p->ki_numthreads > 1 ? thread : NULL, maxlen);
return (s);
 }
 
@@ -1195,7 +1196,7 @@ saveuser(KINFO *ki)
ki->ki_args = strdup("");
else if (UREADOK(ki) || (ki->ki_p->ki_args != NULL))
ki->ki_args = strdup(fmt(kvm_getargv, ki,
-   ki->ki_p->ki_comm, MAXCOMLEN));
+   ki->ki_p->ki_comm, ki->ki_p->ki_tdname, MAXCOMLEN));
else
asprintf(&ki->ki_args, "(%s)", ki->ki_p->ki_comm);
if (ki->ki_args == NULL)
@@ -1206,7 +1207,7 @@ saveuser(KINFO *ki)
if (needenv) {
if (UREADOK(ki))
ki->ki_env = strdup(fmt(kvm_getenvv, ki,
-   (char *)NULL, 0));
+   (char *)NULL, (char *)NULL, 0));
else
ki->ki_env = strdup("()");
if (ki->ki_env == NULL)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r245611 - in head/sys: fs/nfsclient fs/nfsserver nfsclient nfsserver

2013-01-18 Thread John Baldwin
Author: jhb
Date: Fri Jan 18 18:43:38 2013
New Revision: 245611
URL: http://svnweb.freebsd.org/changeset/base/245611

Log:
  Use vfs_timestamp() to set file timestamps rather than invoking
  getmicrotime() or getnanotime() directly in NFS.
  
  Reviewed by:  rmacklem, bde
  MFC after:1 week

Modified:
  head/sys/fs/nfsclient/nfs_clvnops.c
  head/sys/fs/nfsserver/nfs_nfsdport.c
  head/sys/nfsclient/nfs_vnops.c
  head/sys/nfsserver/nfs_srvsubs.c

Modified: head/sys/fs/nfsclient/nfs_clvnops.c
==
--- head/sys/fs/nfsclient/nfs_clvnops.c Fri Jan 18 18:24:40 2013
(r245610)
+++ head/sys/fs/nfsclient/nfs_clvnops.c Fri Jan 18 18:43:38 2013
(r245611)
@@ -3247,7 +3247,7 @@ nfsfifo_read(struct vop_read_args *ap)
 */
mtx_lock(&np->n_mtx);
np->n_flag |= NACC;
-   getnanotime(&np->n_atim);
+   vfs_timestamp(&np->n_atim);
mtx_unlock(&np->n_mtx);
error = fifo_specops.vop_read(ap);
return error;   
@@ -3266,7 +3266,7 @@ nfsfifo_write(struct vop_write_args *ap)
 */
mtx_lock(&np->n_mtx);
np->n_flag |= NUPD;
-   getnanotime(&np->n_mtim);
+   vfs_timestamp(&np->n_mtim);
mtx_unlock(&np->n_mtx);
return(fifo_specops.vop_write(ap));
 }
@@ -3286,7 +3286,7 @@ nfsfifo_close(struct vop_close_args *ap)
 
mtx_lock(&np->n_mtx);
if (np->n_flag & (NACC | NUPD)) {
-   getnanotime(&ts);
+   vfs_timestamp(&ts);
if (np->n_flag & NACC)
np->n_atim = ts;
if (np->n_flag & NUPD)

Modified: head/sys/fs/nfsserver/nfs_nfsdport.c
==
--- head/sys/fs/nfsserver/nfs_nfsdport.cFri Jan 18 18:24:40 2013
(r245610)
+++ head/sys/fs/nfsserver/nfs_nfsdport.cFri Jan 18 18:43:38 2013
(r245611)
@@ -1476,7 +1476,7 @@ nfsvno_updfilerev(struct vnode *vp, stru
struct vattr va;
 
VATTR_NULL(&va);
-   getnanotime(&va.va_mtime);
+   vfs_timestamp(&va.va_mtime);
(void) VOP_SETATTR(vp, &va, cred);
(void) nfsvno_getattr(vp, nvap, cred, p, 1);
 }
@@ -2248,7 +2248,6 @@ nfsrv_sattr(struct nfsrv_descript *nd, s
 {
u_int32_t *tl;
struct nfsv2_sattr *sp;
-   struct timeval curtime;
int error = 0, toclient = 0;
 
switch (nd->nd_flag & (ND_NFSV2 | ND_NFSV3 | ND_NFSV4)) {
@@ -2307,9 +2306,7 @@ nfsrv_sattr(struct nfsrv_descript *nd, s
toclient = 1;
break;
case NFSV3SATTRTIME_TOSERVER:
-   NFSGETTIME(&curtime);
-   nvap->na_atime.tv_sec = curtime.tv_sec;
-   nvap->na_atime.tv_nsec = curtime.tv_usec * 1000;
+   vfs_timestamp(&nvap->na_atime);
nvap->na_vaflags |= VA_UTIMES_NULL;
break;
};
@@ -2321,9 +2318,7 @@ nfsrv_sattr(struct nfsrv_descript *nd, s
nvap->na_vaflags &= ~VA_UTIMES_NULL;
break;
case NFSV3SATTRTIME_TOSERVER:
-   NFSGETTIME(&curtime);
-   nvap->na_mtime.tv_sec = curtime.tv_sec;
-   nvap->na_mtime.tv_nsec = curtime.tv_usec * 1000;
+   vfs_timestamp(&nvap->na_mtime);
if (!toclient)
nvap->na_vaflags |= VA_UTIMES_NULL;
break;
@@ -2353,7 +2348,6 @@ nfsv4_sattr(struct nfsrv_descript *nd, s
u_char *cp, namestr[NFSV4_SMALLSTR + 1];
uid_t uid;
gid_t gid;
-   struct timeval curtime;
 
error = nfsrv_getattrbits(nd, attrbitp, NULL, &retnotsup);
if (error)
@@ -2488,9 +2482,7 @@ nfsv4_sattr(struct nfsrv_descript *nd, s
toclient = 1;
attrsum += NFSX_V4TIME;
} else {
-   NFSGETTIME(&curtime);
-   nvap->na_atime.tv_sec = curtime.tv_sec;
-   nvap->na_atime.tv_nsec = curtime.tv_usec * 1000;
+   vfs_timestamp(&nvap->na_atime);
nvap->na_vaflags |= VA_UTIMES_NULL;
}
break;
@@ -2515,9 +2507,7 @@ nfsv4_sattr(struct nfsrv_descript *nd, s
nvap->na_vaflags &= ~VA_UTIMES_NULL;
attrsum += NFSX_V4TIME;
} else {
-   NFSGETTIME(&curtime);
-   nvap->na_mtime.tv_sec = curtime.tv_sec;
-   nvap->na_mtime.tv_nsec = curtime.tv_usec * 1000;
+   vfs_timestamp(&nvap->na_mtime);
if (!toclient)
nvap->na_

svn commit: r245612 - head/sys/fs/ext2fs

2013-01-18 Thread Pedro F. Giffuni
Author: pfg
Date: Fri Jan 18 19:11:17 2013
New Revision: 245612
URL: http://svnweb.freebsd.org/changeset/base/245612

Log:
  ext2fs: Add some DOINGASYNC check to match ffs.
  
  This is mostly cosmetical.
  
  Reviewed by:  bde
  MFC after:3 days

Modified:
  head/sys/fs/ext2fs/ext2_inode.c

Modified: head/sys/fs/ext2fs/ext2_inode.c
==
--- head/sys/fs/ext2fs/ext2_inode.c Fri Jan 18 18:43:38 2013
(r245611)
+++ head/sys/fs/ext2fs/ext2_inode.c Fri Jan 18 19:11:17 2013
(r245612)
@@ -180,7 +180,7 @@ ext2_truncate(vp, length, flags, cred, t
else
bawrite(bp);
oip->i_flag |= IN_CHANGE | IN_UPDATE;
-   return (ext2_update(ovp, 1));
+   return (ext2_update(ovp, !DOINGASYNC(ovp)));
}
/*
 * Shorten the size of the file. If the file is not being
@@ -238,7 +238,7 @@ ext2_truncate(vp, length, flags, cred, t
for (i = NDADDR - 1; i > lastblock; i--)
oip->i_db[i] = 0;
oip->i_flag |= IN_CHANGE | IN_UPDATE;
-   allerror = ext2_update(ovp, 1);
+   allerror = ext2_update(ovp, !DOINGASYNC(ovp));
 
/*
 * Having written the new inode to disk, save its new configuration
@@ -420,9 +420,13 @@ ext2_indirtrunc(ip, lbn, dbn, lastbn, le
  (u_int)(NINDIR(fs) - (last + 1)) * sizeof(int32_t));
if (last == -1)
bp->b_flags |= B_INVAL;
-   error = bwrite(bp);
-   if (error)
-   allerror = error;
+   if (DOINGASYNC(vp)) {
+   bdwrite(bp);
+   } else {
+   error = bwrite(bp);
+   if (error)
+   allerror = error;
+   }
bap = copy;
 
/*
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r245613 - head/sys/fs/nfsserver

2013-01-18 Thread Xin LI
Author: delphij
Date: Fri Jan 18 19:42:08 2013
New Revision: 245613
URL: http://svnweb.freebsd.org/changeset/base/245613

Log:
  Make it possible to force async at server side on new NFS server, similar
  to the old one's nfs.nfsrv.async.
  
  Please note that by enabling this option (default is disabled), the system
  could potentionally have silent data corruption if the server crashes
  before write is committed to non-volatile storage, as the client side have
  no way to tell if the data is already written.
  
  Submitted by: rmacklem
  MFC after:2 weeks

Modified:
  head/sys/fs/nfsserver/nfs_nfsdserv.c

Modified: head/sys/fs/nfsserver/nfs_nfsdserv.c
==
--- head/sys/fs/nfsserver/nfs_nfsdserv.cFri Jan 18 19:11:17 2013
(r245612)
+++ head/sys/fs/nfsserver/nfs_nfsdserv.cFri Jan 18 19:42:08 2013
(r245613)
@@ -55,6 +55,11 @@ extern int nfs_rootfhset;
 extern int nfsrv_enable_crossmntpt;
 #endif /* !APPLEKEXT */
 
+static int nfs_async = 0;
+SYSCTL_DECL(_vfs_nfsd);
+SYSCTL_INT(_vfs_nfsd, OID_AUTO, async, CTLFLAG_RW, &nfs_async, 0,
+"Tell client that writes were synced even though they were not");
+
 /*
  * This list defines the GSS mechanisms supported.
  * (Don't ask me how you get these strings from the RFC stuff like
@@ -912,7 +917,13 @@ nfsrvd_write(struct nfsrv_descript *nd, 
goto out;
NFSM_BUILD(tl, u_int32_t *, 4 * NFSX_UNSIGNED);
*tl++ = txdr_unsigned(retlen);
-   if (stable == NFSWRITE_UNSTABLE)
+   /*
+* If nfs_async is set, then pretend the write was FILESYNC.
+* Warning: Doing this violates RFC1813 and runs a risk
+* of data written by a client being lost when the server
+* crashes/reboots.
+*/
+   if (stable == NFSWRITE_UNSTABLE && nfs_async == 0)
*tl++ = txdr_unsigned(stable);
else
*tl++ = txdr_unsigned(NFSWRITE_FILESYNC);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r243631 - in head/sys: kern sys

2013-01-18 Thread Andre Oppermann

On 14.01.2013 16:00, Andre Oppermann wrote:

On 13.01.2013 11:10, Alan Cox wrote:

3. The function vm_ksubmap_init() has a dependency on the global
variable maxpipekva.  vm_ksubmap_init() is executed under SI_SUB_CPU,
which comes after SI_SUB_KMEM.

Am I missing anything?

I'm attaching a patch that defers the calculation of maxpipekva until we
actually need it in vm_ksubmap_init().  Any comments on this patch are
welcome.


Looks good to me.  Perhaps the whole calculation and setup of the pipe_map
could be moved to kern/sys_pipe.c:pipeinit() to have it all together.


Attached is a patch moving the whole calculation and pipe_map creation
to kern/sys_pipe.c.

--
Andre

Index: vm/vm_kern.c
===
--- vm/vm_kern.c(revision 245601)
+++ vm/vm_kern.c(working copy)
@@ -88,7 +88,6 @@
 vm_map_t kernel_map=0;
 vm_map_t kmem_map=0;
 vm_map_t exec_map=0;
-vm_map_t pipe_map;
 vm_map_t buffer_map=0;

 const void *zero_region;
Index: vm/vm_kern.h
===
--- vm/vm_kern.h(revision 245601)
+++ vm/vm_kern.h(working copy)
@@ -68,7 +68,6 @@
 extern vm_map_t kernel_map;
 extern vm_map_t kmem_map;
 extern vm_map_t exec_map;
-extern vm_map_t pipe_map;
 extern u_long vm_kmem_size;

 #endif /* _VM_VM_KERN_H_ */
Index: vm/vm_init.c
===
--- vm/vm_init.c(revision 245601)
+++ vm/vm_init.c(working copy)
@@ -73,7 +73,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 

@@ -195,8 +194,6 @@
pager_map->system_map = 1;
exec_map = kmem_suballoc(kernel_map, &minaddr, &maxaddr,
exec_map_entries * round_page(PATH_MAX + ARG_MAX), FALSE);
-   pipe_map = kmem_suballoc(kernel_map, &minaddr, &maxaddr, maxpipekva,
-   FALSE);

/*
 * XXX: Mbuf system machine-specific initializations should
Index: sys/pipe.h
===
--- sys/pipe.h  (revision 245601)
+++ sys/pipe.h  (working copy)
@@ -53,10 +53,6 @@

 #define PIPENPAGES (BIG_PIPE_SIZE / PAGE_SIZE + 1)

-/*
- * See sys_pipe.c for info on what these limits mean.
- */
-extern longmaxpipekva;
 extern struct  fileops pipeops;

 /*
Index: kern/subr_param.c
===
--- kern/subr_param.c   (revision 245601)
+++ kern/subr_param.c   (working copy)
@@ -96,7 +96,6 @@
 pid_t  pid_max = PID_MAX;
 long   maxswzone;  /* max swmeta KVA storage */
 long   maxbcache;  /* max buffer cache KVA storage */
-long   maxpipekva; /* Limit on pipe KVA */
 intvm_guest;   /* Running as virtual machine guest? */
 u_long maxtsiz;/* max text size */
 u_long dfldsiz;/* initial data size limit */
@@ -330,18 +329,6 @@
 */
ncallout = imin(16 + maxproc + maxfiles, 18508);
TUNABLE_INT_FETCH("kern.ncallout", &ncallout);
-
-   /*
-* The default for maxpipekva is min(1/64 of the kernel address space,
-* max(1/64 of main memory, 512KB)).  See sys_pipe.c for more details.
-*/
-   maxpipekva = (physpages / 64) * PAGE_SIZE;
-   TUNABLE_LONG_FETCH("kern.ipc.maxpipekva", &maxpipekva);
-   if (maxpipekva < 512 * 1024)
-   maxpipekva = 512 * 1024;
-   if (maxpipekva > (VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS) / 64)
-   maxpipekva = (VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS) /
-   64;
 }

 /*
Index: kern/sys_pipe.c
===
--- kern/sys_pipe.c (revision 245601)
+++ kern/sys_pipe.c (working copy)
@@ -202,6 +202,7 @@
 #define MAXPIPESIZE (2*PIPE_SIZE/3)

 static long amountpipekva;
+static long maxpipekva;
 static int pipefragretry;
 static int pipeallocfail;
 static int piperesizefail;
@@ -220,7 +221,6 @@
 SYSCTL_INT(_kern_ipc, OID_AUTO, piperesizeallowed, CTLFLAG_RW,
  &piperesizeallowed, 0, "Pipe resizing allowed");

-static void pipeinit(void *dummy __unused);
 static void pipeclose(struct pipe *cpipe);
 static void pipe_free_kmem(struct pipe *cpipe);
 static int pipe_create(struct pipe *pipe, int backing);
@@ -244,12 +244,29 @@
 static struct unrhdr *pipeino_unr;
 static dev_t pipedev_ino;

-SYSINIT(vfs, SI_SUB_VFS, SI_ORDER_ANY, pipeinit, NULL);
+static vm_map_tpipe_map;

+/*
+ * Set up the kmem suballocation and UMA zone for the pipe memory.
+ */
 static void
 pipeinit(void *dummy __unused)
 {
+   quad_t realkmem;
+   vm_offset_t minaddr, maxaddr;

+   realkmem = qmin((quad_t)physmem * PAGE_SIZE,
+   vm_map_max(kernel_map) - vm_map_min(kernel_map));
+
+   maxpipekva = realkmem / 64;
+   TUNABLE_LONG_FETCH("kern.ipc.maxpipekva", &maxpipekva)

svn commit: r245617 - in head: . usr.bin/xinstall

2013-01-18 Thread Brooks Davis
Author: brooks
Date: Fri Jan 18 20:57:50 2013
New Revision: 245617
URL: http://svnweb.freebsd.org/changeset/base/245617

Log:
  Introduce six new options from NetBSD:
   * -MLog metadata in mtree format.
   * -DLog paths relative to .
   * -h   Log digest of type .
   * -T   Specify which mtree tags to log.
   * -l   Create hard or symbolic links (allows logging).
   * -U Install without root privileges (owner, group, mode,
and flags can be logged via -M
  
  NOTE: In the interest of compatibility with NetBSD and because it is the
  obvious letter, the nearly useless -M option (disable mmap) has been
  repurposed.
  
  Sponsored by: DARPA, AFRL
  Obtained from:NetBSD
  Reviewed by:  bz

Modified:
  head/UPDATING
  head/usr.bin/xinstall/Makefile
  head/usr.bin/xinstall/install.1
  head/usr.bin/xinstall/xinstall.c

Modified: head/UPDATING
==
--- head/UPDATING   Fri Jan 18 20:30:15 2013(r245616)
+++ head/UPDATING   Fri Jan 18 20:57:50 2013(r245617)
@@ -26,6 +26,15 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10
disable the most expensive debugging functionality run
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
 
+20130118:
+   The install(1) option -M has changed meaning and now takes an
+   argument that is a file or path to append logs to.  In the
+   unlikely event that -M was the last option on the command line
+   and the command line contained at least two files and a target
+   directory the first file will have logs appended to it.  The -M
+   option served little practical purpose in the last decade so it's
+   used expected to be extremely rare.
+
 20121223:
After switching to Clang as the default compiler some users of ZFS
on i386 systems started to experience stack overflow kernel panics.

Modified: head/usr.bin/xinstall/Makefile
==
--- head/usr.bin/xinstall/Makefile  Fri Jan 18 20:30:15 2013
(r245616)
+++ head/usr.bin/xinstall/Makefile  Fri Jan 18 20:57:50 2013
(r245617)
@@ -10,7 +10,7 @@ MAN=  install.1
 CFLAGS+=   -I${.CURDIR}/../../contrib/mtree
 CFLAGS+=   -I${.CURDIR}/../../lib/libnetbsd
 
-DPADD+=${LIBUTIL}
-LDADD+=-lutil
+DPADD+=${LIBUTIL} ${LIBMD}
+LDADD+=-lutil -lmd
 
 .include 

Modified: head/usr.bin/xinstall/install.1
==
--- head/usr.bin/xinstall/install.1 Fri Jan 18 20:30:15 2013
(r245616)
+++ head/usr.bin/xinstall/install.1 Fri Jan 18 20:57:50 2013
(r245617)
@@ -28,7 +28,7 @@
 .\"From: @(#)install.1 8.1 (Berkeley) 6/6/93
 .\" $FreeBSD$
 .\"
-.Dd March 6, 2006
+.Dd January 18, 2013
 .Dt INSTALL 1
 .Os
 .Sh NAME
@@ -36,34 +36,50 @@
 .Nd install binaries
 .Sh SYNOPSIS
 .Nm
-.Op Fl bCcMpSsv
+.Op Fl bCcMpSsUv
 .Op Fl B Ar suffix
+.Op Fl D Ar destdir
 .Op Fl f Ar flags
 .Op Fl g Ar group
+.Op Fl h Ar hash
+.Op Fl l Ar linkflags
+.Op Fl M Ar metalog
 .Op Fl m Ar mode
 .Op Fl N Ar dbdir
 .Op Fl o Ar owner
+.Op Fl T Ar tags
 .Ar file1 file2
 .Nm
-.Op Fl bCcMpSsv
+.Op Fl bCcMpSsUv
 .Op Fl B Ar suffix
+.Op Fl D Ar destdir
 .Op Fl f Ar flags
 .Op Fl g Ar group
+.Op Fl h Ar hash
+.Op Fl l Ar linkflags
+.Op Fl M Ar metalog
 .Op Fl m Ar mode
 .Op Fl N Ar dbdir
 .Op Fl o Ar owner
+.Op Fl T Ar tags
 .Ar file1 ... fileN directory
 .Nm
 .Fl d
-.Op Fl v
+.Op Fl Uv
+.Op Fl D Ar destdir
 .Op Fl g Ar group
+.Op Fl h Ar hash
+.Op Fl M Ar metalog
 .Op Fl m Ar mode
 .Op Fl N Ar dbdir
 .Op Fl o Ar owner
+.Op Fl T Ar tags
 .Ar directory ...
 .Sh DESCRIPTION
 The file(s) are copied
-to the target file or directory.
+(or linked if the
+.Fl l
+option is specified) to the target file or directory.
 If the destination is a directory, then the
 .Ar file
 is copied into
@@ -108,6 +124,17 @@ This is actually the default.
 The
 .Fl c
 option is only included for backwards compatibility.
+.It Fl D Ar destdir
+Specify the
+.Ev DESTDIR
+(top of the file hierarchy) that the items are installed in to.
+If
+.Fl M Ar metalog
+is in use, a leading string of
+.Dq Ar destdir
+will be removed from the file names logged to the
+.Ar metalog .
+This option does not affect where the actual files are installed.
 .It Fl d
 Create directories.
 Missing parent directories are created as required.
@@ -118,9 +145,67 @@ for a list of possible flags and their m
 .It Fl g
 Specify a group.
 A numeric GID is allowed.
+.It Fl h Ar hash 
+When copying, calculate the digest of the files with
+.Ar hash
+to store in the
+.Fl M Ar metalog .
+When
+.Fl d
+is given no hash is emitted.
+Supported digests:
+.Bl -tag -width rmd160 -offset indent
+.It Sy none
+No hash.
+This is the default.
+.It Sy md5
+The MD5 cryp

svn commit: r245622 - head

2013-01-18 Thread Brooks Davis
Author: brooks
Date: Fri Jan 18 22:17:21 2013
New Revision: 245622
URL: http://svnweb.freebsd.org/changeset/base/245622

Log:
  Remove a harmless (somewhat to my surprise) bogon that crept into r245440.

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Fri Jan 18 22:11:17 2013(r245621)
+++ head/Makefile.inc1  Fri Jan 18 22:17:21 2013(r245622)
@@ -704,7 +704,6 @@ distributeworld installworld: installche
done); \
cp $$libs $$progs ${INSTALLTMP}
cp -R $${PATH_LOCALE:-"/usr/share/locale"} ${INSTALLTMP}/locale
-   rm -f ${METALOG}
 .if make(distributeworld)
 .for dist in ${EXTRA_DISTRIBUTIONS}
-mkdir ${DESTDIR}/${DISTDIR}/${dist}
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r245610 - head/bin/ps

2013-01-18 Thread Andrew Turner
On Fri, 18 Jan 2013 18:24:41 + (UTC)
John Baldwin  wrote:

> Author: jhb
> Date: Fri Jan 18 18:24:40 2013
> New Revision: 245610
> URL: http://svnweb.freebsd.org/changeset/base/245610
> 
> Log:
>   Include the thread name along with the command name when displaying
> the command name of a thread from a multi-threaded process that
> doesn't have an available argument list (such as kernel processes)
> and threads display is enabled via -H.
>   
>   Reviewed by:alfred, delphij, e...@vangyzen.net
>   MFC after:  1 week

This breaks usr.bin/w as it includes bin/ps/fmt.c in it's build but
doesn't have the showthreads variable defined.

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


svn commit: r245628 - in head/contrib/compiler-rt: . lib lib/arm

2013-01-18 Thread Andrew Turner
Author: andrew
Date: Fri Jan 18 22:52:59 2013
New Revision: 245628
URL: http://svnweb.freebsd.org/changeset/base/245628

Log:
  Import compiler-rt r172839.
  
  This brings in __aeabi_lcmp and __aeabi_ulcmp. It also fixes the spelling
  of __aeabi_f2lz. Both changes originated on the arm_eabi project branch.

Modified:
  head/contrib/compiler-rt/LICENSE.TXT
  head/contrib/compiler-rt/lib/arm/divsi3.S
  head/contrib/compiler-rt/lib/arm/udivsi3.S
  head/contrib/compiler-rt/lib/cmpdi2.c
  head/contrib/compiler-rt/lib/fixsfdi.c
  head/contrib/compiler-rt/lib/int_endianness.h
  head/contrib/compiler-rt/lib/ucmpdi2.c
Directory Properties:
  head/contrib/compiler-rt/   (props changed)

Modified: head/contrib/compiler-rt/LICENSE.TXT
==
--- head/contrib/compiler-rt/LICENSE.TXTFri Jan 18 22:50:29 2013
(r245627)
+++ head/contrib/compiler-rt/LICENSE.TXTFri Jan 18 22:52:59 2013
(r245628)
@@ -14,7 +14,7 @@ Full text of the relevant licenses is in
 University of Illinois/NCSA
 Open Source License
 
-Copyright (c) 2009-2012 by the contributors listed in CREDITS.TXT
+Copyright (c) 2009-2013 by the contributors listed in CREDITS.TXT
 
 All rights reserved.
 
@@ -55,7 +55,7 @@ SOFTWARE.
 
 ==
 
-Copyright (c) 2009-2012 by the contributors listed in CREDITS.TXT
+Copyright (c) 2009-2013 by the contributors listed in CREDITS.TXT
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal

Modified: head/contrib/compiler-rt/lib/arm/divsi3.S
==
--- head/contrib/compiler-rt/lib/arm/divsi3.S   Fri Jan 18 22:50:29 2013
(r245627)
+++ head/contrib/compiler-rt/lib/arm/divsi3.S   Fri Jan 18 22:52:59 2013
(r245628)
@@ -25,7 +25,16 @@
 // Ok, APCS and AAPCS agree on 32 bit args, so it's safe to use the same 
routine.
 DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_idiv, __divsi3)
 DEFINE_COMPILERRT_FUNCTION(__divsi3)
-ESTABLISH_FRAME
+#if __ARM_ARCH_7S__
+   tst r1,r1
+   beq LOCAL_LABEL(divzero)
+   sdivr0, r0, r1
+   bx  lr
+LOCAL_LABEL(divzero):
+   mov r0,#0
+   bx  lr
+#else
+ESTABLISH_FRAME
 //  Set aside the sign of the quotient.
 eor r4, r0, r1
 //  Take absolute value of a and b via abs(x) = (x^(x >> 31)) - (x >> 31).
@@ -39,3 +48,4 @@ DEFINE_COMPILERRT_FUNCTION(__divsi3)
 eor r0, r0, r4, asr #31
 sub r0, r0, r4, asr #31
 CLEAR_FRAME_AND_RETURN
+#endif

Modified: head/contrib/compiler-rt/lib/arm/udivsi3.S
==
--- head/contrib/compiler-rt/lib/arm/udivsi3.S  Fri Jan 18 22:50:29 2013
(r245627)
+++ head/contrib/compiler-rt/lib/arm/udivsi3.S  Fri Jan 18 22:52:59 2013
(r245628)
@@ -33,6 +33,15 @@
 // Ok, APCS and AAPCS agree on 32 bit args, so it's safe to use the same 
routine.
 DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_uidiv, __udivsi3)
 DEFINE_COMPILERRT_FUNCTION(__udivsi3)
+#if __ARM_ARCH_7S__
+   tst r1,r1
+   beq LOCAL_LABEL(divzero)
+   udivr0, r0, r1
+   bx  lr
+   LOCAL_LABEL(divzero):
+   mov r0,#0
+   bx  lr
+#else
 //  We use a simple digit by digit algorithm; before we get into the actual 
 //  divide loop, we must calculate the left-shift amount necessary to align
 //  the MSB of the divisor with that of the dividend (If this shift is
@@ -78,3 +87,4 @@ LOCAL_LABEL(return):
 //  Move the quotient to r0 and return.
 mov r0, q
 CLEAR_FRAME_AND_RETURN
+#endif

Modified: head/contrib/compiler-rt/lib/cmpdi2.c
==
--- head/contrib/compiler-rt/lib/cmpdi2.c   Fri Jan 18 22:50:29 2013
(r245627)
+++ head/contrib/compiler-rt/lib/cmpdi2.c   Fri Jan 18 22:52:59 2013
(r245628)
@@ -36,3 +36,16 @@ __cmpdi2(di_int a, di_int b)
 return 2;
 return 1;
 }
+
+#ifdef __ARM_EABI__
+/* Returns: if (a <  b) returns -1
+*   if (a == b) returns  0
+*   if (a >  b) returns  1
+*/
+COMPILER_RT_ABI si_int
+__aeabi_lcmp(di_int a, di_int b)
+{
+   return __cmpdi2(a, b) - 1;
+}
+#endif
+

Modified: head/contrib/compiler-rt/lib/fixsfdi.c
==
--- head/contrib/compiler-rt/lib/fixsfdi.c  Fri Jan 18 22:50:29 2013
(r245627)
+++ head/contrib/compiler-rt/lib/fixsfdi.c  Fri Jan 18 22:52:59 2013
(r245628)
@@ -23,7 +23,7 @@
 
 /* seee  emmm      */
 
-ARM_EABI_FNALIAS(d2lz, fixsfdi)
+ARM_EABI_FNALIAS(f2lz, fixsfdi)
 
 COMPILER_RT_ABI di_int
 __fixsfdi(float a)

Modified: head/contrib/compiler-rt/lib/int_endianness.h

svn commit: r245630 - head/lib/libthr/thread

2013-01-18 Thread Jilles Tjoelker
Author: jilles
Date: Fri Jan 18 23:08:40 2013
New Revision: 245630
URL: http://svnweb.freebsd.org/changeset/base/245630

Log:
  libthr: Always use the threaded rtld lock implementation.
  
  The threaded rtld lock implementation is faster even in the single-threaded
  case because it postpones signal handlers via THR_CRITICAL_ENTER and
  THR_CRITICAL_LEAVE instead of calling sigprocmask(2).
  
  As a result, exception handling becomes faster in single-threaded
  applications linked with libthr.
  
  Reviewed by:  kib

Modified:
  head/lib/libthr/thread/thr_init.c
  head/lib/libthr/thread/thr_kern.c

Modified: head/lib/libthr/thread/thr_init.c
==
--- head/lib/libthr/thread/thr_init.c   Fri Jan 18 23:04:05 2013
(r245629)
+++ head/lib/libthr/thread/thr_init.c   Fri Jan 18 23:08:40 2013
(r245630)
@@ -363,6 +363,12 @@ _libpthread_init(struct pthread *curthre
_thr_signal_init();
if (_thread_event_mask & TD_CREATE)
_thr_report_creation(curthread, curthread);
+   /*
+* Always use our rtld lock implementation.
+* It is faster because it postpones signal handlers
+* instead of calling sigprocmask(2).
+*/
+   _thr_rtld_init();
}
 }
 

Modified: head/lib/libthr/thread/thr_kern.c
==
--- head/lib/libthr/thread/thr_kern.c   Fri Jan 18 23:04:05 2013
(r245629)
+++ head/lib/libthr/thread/thr_kern.c   Fri Jan 18 23:08:40 2013
(r245630)
@@ -57,11 +57,6 @@ _thr_setthreaded(int threaded)
return (0);
 
__isthreaded = threaded;
-   if (threaded != 0) {
-   _thr_rtld_init();
-   } else {
-   _thr_rtld_fini();
-   }
return (0);
 }
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r245633 - head/usr.bin/w

2013-01-18 Thread Xin LI
Author: delphij
Date: Fri Jan 18 23:54:27 2013
New Revision: 245633
URL: http://svnweb.freebsd.org/changeset/base/245633

Log:
  Set showthread = 0 for w(1).
  
  X-MFC:together with r245610

Modified:
  head/usr.bin/w/w.c

Modified: head/usr.bin/w/w.c
==
--- head/usr.bin/w/w.c  Fri Jan 18 23:24:00 2013(r245632)
+++ head/usr.bin/w/w.c  Fri Jan 18 23:54:27 2013(r245633)
@@ -96,6 +96,7 @@ static intnflag;  /* true if -n flag: d
 static int dflag;  /* true if -d flag: output debug info */
 static int sortidle;   /* sort by idle time */
 intuse_ampm;   /* use AM/PM time */
+intshowthreads = 0;/* will threads be shown? */
 static int use_comma;  /* use comma as floats separator */
 static char   **sel_users; /* login array of particular users selected */
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r245610 - head/bin/ps

2013-01-18 Thread John Baldwin
On 1/18/13 5:29 PM, Andrew Turner wrote:
> On Fri, 18 Jan 2013 18:24:41 + (UTC)
> John Baldwin  wrote:
> 
>> Author: jhb
>> Date: Fri Jan 18 18:24:40 2013
>> New Revision: 245610
>> URL: http://svnweb.freebsd.org/changeset/base/245610
>>
>> Log:
>>   Include the thread name along with the command name when displaying
>> the command name of a thread from a multi-threaded process that
>> doesn't have an available argument list (such as kernel processes)
>> and threads display is enabled via -H.
>>   
>>   Reviewed by:   alfred, delphij, e...@vangyzen.net
>>   MFC after: 1 week
> 
> This breaks usr.bin/w as it includes bin/ps/fmt.c in it's build but
> doesn't have the showthreads variable defined.

Ugh.  It requires a bit more fixing than that even since w uses
fmt_argv() directly (and it had a stale prototype to boot).  I have
a fix to get both ps and w to build but am waiting for a full world
to finish first in case some other place (ab)uses this.

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


Re: svn commit: r245633 - head/usr.bin/w

2013-01-18 Thread John Baldwin
On 1/18/13 6:54 PM, Xin LI wrote:
> Author: delphij
> Date: Fri Jan 18 23:54:27 2013
> New Revision: 245633
> URL: http://svnweb.freebsd.org/changeset/base/245633
> 
> Log:
>   Set showthread = 0 for w(1).
>   
>   X-MFC:  together with r245610

Please no, this is not the correct fix.  Note that w is now using the
wrong function signature for fmt_argv() entirely.  I will revert this
with the correct fix.

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


svn commit: r245635 - in head: bin/ps usr.bin/w

2013-01-18 Thread John Baldwin
Author: jhb
Date: Sat Jan 19 00:21:55 2013
New Revision: 245635
URL: http://svnweb.freebsd.org/changeset/base/245635

Log:
  - Move 'showthreads' check out of fmt.c.
  - Update shadow copy of fmt_argv() prototype in w.c and fix calls for
additional parameter.

Modified:
  head/bin/ps/fmt.c
  head/bin/ps/ps.c
  head/usr.bin/w/w.c

Modified: head/bin/ps/fmt.c
==
--- head/bin/ps/fmt.c   Fri Jan 18 23:59:22 2013(r245634)
+++ head/bin/ps/fmt.c   Sat Jan 19 00:21:55 2013(r245635)
@@ -123,7 +123,7 @@ fmt_argv(char **argv, char *cmd, char *t
if (cp == NULL)
errx(1, "malloc failed");
if (ap == NULL) {
-   if (showthreads && thread != NULL) {
+   if (thread != NULL) {
asprintf(&ap, "%s/%s", cmd, thread);
sprintf(cp, "[%.*s]", (int)maxlen, ap);
free(ap);

Modified: head/bin/ps/ps.c
==
--- head/bin/ps/ps.cFri Jan 18 23:59:22 2013(r245634)
+++ head/bin/ps/ps.cSat Jan 19 00:21:55 2013(r245635)
@@ -1168,7 +1168,7 @@ fmt(char **(*fn)(kvm_t *, const struct k
const char *s;
 
s = fmt_argv((*fn)(kd, ki->ki_p, termwidth), comm,
-   ki->ki_p->ki_numthreads > 1 ? thread : NULL, maxlen);
+   showthreads && ki->ki_p->ki_numthreads > 1 ? thread : NULL, maxlen);
return (s);
 }
 

Modified: head/usr.bin/w/w.c
==
--- head/usr.bin/w/w.c  Fri Jan 18 23:59:22 2013(r245634)
+++ head/usr.bin/w/w.c  Sat Jan 19 00:21:55 2013(r245635)
@@ -96,7 +96,6 @@ static intnflag;  /* true if -n flag: d
 static int dflag;  /* true if -d flag: output debug info */
 static int sortidle;   /* sort by idle time */
 intuse_ampm;   /* use AM/PM time */
-intshowthreads = 0;/* will threads be shown? */
 static int use_comma;  /* use comma as floats separator */
 static char   **sel_users; /* login array of particular users selected */
 
@@ -124,7 +123,7 @@ static struct stat  *ttystat(char *);
 static void usage(int);
 static int  this_is_uptime(const char *s);
 
-char *fmt_argv(char **, char *, int);  /* ../../bin/ps/fmt.c */
+char *fmt_argv(char **, char *, char *, size_t);   /* ../../bin/ps/fmt.c */
 
 int
 main(int argc, char *argv[])
@@ -321,7 +320,7 @@ main(int argc, char *argv[])
continue;
}
ep->args = fmt_argv(kvm_getargv(kd, ep->kp, argwidth),
-   ep->kp->ki_comm, MAXCOMLEN);
+   ep->kp->ki_comm, NULL, MAXCOMLEN);
if (ep->args == NULL)
err(1, NULL);
}
@@ -405,7 +404,7 @@ main(int argc, char *argv[])
const char *ptr;
 
ptr = fmt_argv(kvm_getargv(kd, dkp, argwidth),
-   dkp->ki_comm, MAXCOMLEN);
+   dkp->ki_comm, NULL, MAXCOMLEN);
if (ptr == NULL)
ptr = "-";
(void)printf("\t\t%-9d %s\n",
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r245636 - head/sys/contrib/dev/acpica/components/disassembler

2013-01-18 Thread Jung-uk Kim
Author: jkim
Date: Sat Jan 19 00:37:17 2013
New Revision: 245636
URL: http://svnweb.freebsd.org/changeset/base/245636

Log:
  Work around build breakage with GCC 4.2.

Modified:
  head/sys/contrib/dev/acpica/components/disassembler/dmresrc.c

Modified: head/sys/contrib/dev/acpica/components/disassembler/dmresrc.c
==
--- head/sys/contrib/dev/acpica/components/disassembler/dmresrc.c   Sat Jan 
19 00:21:55 2013(r245635)
+++ head/sys/contrib/dev/acpica/components/disassembler/dmresrc.c   Sat Jan 
19 00:37:17 2013(r245636)
@@ -416,7 +416,7 @@ AcpiDmIsResourceTemplate (
 /* Walk the byte list, abort on any invalid descriptor type or length */
 
 Status = AcpiUtWalkAmlResources (WalkState, Aml, Length,
-NULL, (void **) &EndAml);
+NULL, ACPI_CAST_INDIRECT_PTR (void, &EndAml));
 if (ACPI_FAILURE (Status))
 {
 return (AE_TYPE);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


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

2013-01-18 Thread Ian Lepore
Author: ian
Date: Sat Jan 19 00:50:12 2013
New Revision: 245637
URL: http://svnweb.freebsd.org/changeset/base/245637

Log:
  Eliminate the need for an intermediate array of indices into the arrays of
  interrupt counts and names, by making the names into an array of fixed-length
  strings that can be directly indexed.  This eliminates extra memory accesses
  on every interrupt to increment the counts.
  
  As a side effect, it also fixes a bug that would corrupt the names data
  if a name was longer than MAXCOMLEN, which led to incorrect vmstat -i output.
  
  Approved by:  cognet (mentor)

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

Modified: head/sys/arm/arm/intr.c
==
--- head/sys/arm/arm/intr.c Sat Jan 19 00:37:17 2013(r245636)
+++ head/sys/arm/arm/intr.c Sat Jan 19 00:50:12 2013(r245637)
@@ -50,23 +50,40 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#defineINTRNAME_LEN(MAXCOMLEN + 1)
+
 typedef void (*mask_fn)(void *);
 
 static struct intr_event *intr_events[NIRQ];
-static int intrcnt_tab[NIRQ];
-static int intrcnt_index = 0;
-static int last_printed = 0;
 
 void   arm_handler_execute(struct trapframe *, int);
 
 void (*arm_post_filter)(void *) = NULL;
 
+/*
+ * Pre-format intrnames into an array of fixed-size strings containing spaces.
+ * This allows us to avoid the need for an intermediate table of indices into
+ * the names and counts arrays, while still meeting the requirements and
+ * assumptions of vmstat(8) and the kdb "show intrcnt" command, the two
+ * consumers of this data.
+ */
+void
+arm_intrnames_init()
+{
+   int i;
+
+   memset(intrnames, ' ', NIRQ * INTRNAME_LEN);
+   for (i = 0; i < NIRQ; ++i)
+   intrnames[i * INTRNAME_LEN - 1] = 0;
+}
+
 void
 arm_setup_irqhandler(const char *name, driver_filter_t *filt,
 void (*hand)(void*), void *arg, int irq, int flags, void **cookiep)
 {
struct intr_event *event;
int error;
+   char namebuf[INTRNAME_LEN];
 
if (irq < 0 || irq >= NIRQ)
return;
@@ -78,14 +95,9 @@ arm_setup_irqhandler(const char *name, d
if (error)
return;
intr_events[irq] = event;
-   last_printed +=
-   snprintf(intrnames + last_printed,
-   MAXCOMLEN + 1,
-   "irq%d: %s", irq, name);
-   last_printed++;
-   intrcnt_tab[irq] = intrcnt_index;
-   intrcnt_index++;
-   
+   snprintf(namebuf, sizeof(namebuf), "irq%d: %s", irq, name);
+   sprintf(intrnames + INTRNAME_LEN * irq, "%-*s", 
+   INTRNAME_LEN - 1, namebuf);
}
intr_event_add_handler(event, name, filt, hand, arg,
intr_priority(flags), flags, cookiep);
@@ -122,7 +134,7 @@ arm_handler_execute(struct trapframe *fr
PCPU_INC(cnt.v_intr);
i = -1;
while ((i = arm_get_next_irq(i)) != -1) {
-   intrcnt[intrcnt_tab[i]]++;
+   intrcnt[i]++;
event = intr_events[i];
if (intr_event_handle(event, frame) != 0) {
/* XXX: Log stray IRQs */

Modified: head/sys/arm/arm/machdep.c
==
--- head/sys/arm/arm/machdep.c  Sat Jan 19 00:37:17 2013(r245636)
+++ head/sys/arm/arm/machdep.c  Sat Jan 19 00:50:12 2013(r245637)
@@ -1474,6 +1474,7 @@ initarm(struct arm_boot_params *abp)
 
init_proc0(kernelstack.pv_va);
 
+   arm_intrnames_init();
arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL);
arm_dump_avail_init(memsize, sizeof(dump_avail) / 
sizeof(dump_avail[0]));
pmap_bootstrap(freemempos, pmap_bootstrap_lastaddr, &kernel_l1pt);

Modified: head/sys/arm/include/intr.h
==
--- head/sys/arm/include/intr.h Sat Jan 19 00:37:17 2013(r245636)
+++ head/sys/arm/include/intr.h Sat Jan 19 00:50:12 2013(r245637)
@@ -70,6 +70,7 @@
 int arm_get_next_irq(int);
 void arm_mask_irq(uintptr_t);
 void arm_unmask_irq(uintptr_t);
+void arm_intrnames_init(void);
 void arm_setup_irqhandler(const char *, int (*)(void*), void (*)(void*),
 void *, int, int, void **);
 int arm_remove_irqhandler(int, void *);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r245640 - in head/sys: amd64/amd64 i386/i386

2013-01-18 Thread John Baldwin
Author: jhb
Date: Sat Jan 19 01:18:22 2013
New Revision: 245640
URL: http://svnweb.freebsd.org/changeset/base/245640

Log:
  Fix build with SMP disabled.`
  
  Reported by:  bf

Modified:
  head/sys/amd64/amd64/pmap.c
  head/sys/i386/i386/pmap.c

Modified: head/sys/amd64/amd64/pmap.c
==
--- head/sys/amd64/amd64/pmap.c Sat Jan 19 00:53:36 2013(r245639)
+++ head/sys/amd64/amd64/pmap.c Sat Jan 19 01:18:22 2013(r245640)
@@ -102,6 +102,7 @@ __FBSDID("$FreeBSD$");
 #include "opt_vm.h"
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -133,6 +134,8 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#include 
+#include 
 #include 
 #include 
 #include 

Modified: head/sys/i386/i386/pmap.c
==
--- head/sys/i386/i386/pmap.c   Sat Jan 19 00:53:36 2013(r245639)
+++ head/sys/i386/i386/pmap.c   Sat Jan 19 01:18:22 2013(r245640)
@@ -136,6 +136,11 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#ifdef DEV_APIC
+#include 
+#include 
+#include 
+#endif
 #include 
 #include 
 #include 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r245610 - head/bin/ps

2013-01-18 Thread John Baldwin
On 1/18/13 7:05 PM, John Baldwin wrote:
> On 1/18/13 5:29 PM, Andrew Turner wrote:
>> On Fri, 18 Jan 2013 18:24:41 + (UTC)
>> John Baldwin  wrote:
>>
>>> Author: jhb
>>> Date: Fri Jan 18 18:24:40 2013
>>> New Revision: 245610
>>> URL: http://svnweb.freebsd.org/changeset/base/245610
>>>
>>> Log:
>>>   Include the thread name along with the command name when displaying
>>> the command name of a thread from a multi-threaded process that
>>> doesn't have an available argument list (such as kernel processes)
>>> and threads display is enabled via -H.
>>>   
>>>   Reviewed by:  alfred, delphij, e...@vangyzen.net
>>>   MFC after:1 week
>>
>> This breaks usr.bin/w as it includes bin/ps/fmt.c in it's build but
>> doesn't have the showthreads variable defined.
> 
> Ugh.  It requires a bit more fixing than that even since w uses
> fmt_argv() directly (and it had a stale prototype to boot).  I have
> a fix to get both ps and w to build but am waiting for a full world
> to finish first in case some other place (ab)uses this.

This should be fixed, sorry for the breakage. :(

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


svn commit: r245641 - head/contrib/compiler-rt/lib/arm

2013-01-18 Thread Andrew Turner
Author: andrew
Date: Sat Jan 19 02:22:01 2013
New Revision: 245641
URL: http://svnweb.freebsd.org/changeset/base/245641

Log:
  Add a newline at the end of the file to stop gcc from complaining

Modified:
  head/contrib/compiler-rt/lib/arm/aeabi_uldivmod.S

Modified: head/contrib/compiler-rt/lib/arm/aeabi_uldivmod.S
==
--- head/contrib/compiler-rt/lib/arm/aeabi_uldivmod.S   Sat Jan 19 01:18:22 
2013(r245640)
+++ head/contrib/compiler-rt/lib/arm/aeabi_uldivmod.S   Sat Jan 19 02:22:01 
2013(r245641)
@@ -27,4 +27,5 @@ DEFINE_COMPILERRT_FUNCTION(__aeabi_uldiv
 ldrr2, [sp, #8]
 ldrr3, [sp, #12]
 addsp, sp, #16
-pop{r11, pc}
\ No newline at end of file
+pop{r11, pc}
+
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r245642 - head/contrib/compiler-rt/lib

2013-01-18 Thread Andrew Turner
Author: andrew
Date: Sat Jan 19 02:24:14 2013
New Revision: 245642
URL: http://svnweb.freebsd.org/changeset/base/245642

Log:
  Don't use the pcs attribute on compilers that don't support it. We can
  revert this when we stop supporting old versions of gcc.

Modified:
  head/contrib/compiler-rt/lib/int_lib.h

Modified: head/contrib/compiler-rt/lib/int_lib.h
==
--- head/contrib/compiler-rt/lib/int_lib.h  Sat Jan 19 02:22:01 2013
(r245641)
+++ head/contrib/compiler-rt/lib/int_lib.h  Sat Jan 19 02:24:14 2013
(r245642)
@@ -25,7 +25,15 @@
 #if __ARM_EABI__
 # define ARM_EABI_FNALIAS(aeabi_name, name) \
   void __aeabi_##aeabi_name() __attribute__((alias("__" #name)));
-# define COMPILER_RT_ABI __attribute__((pcs("aapcs")))
+
+# if !defined(__clang__) && defined(__GNUC__) && \
+ (__GNUC__ < 4 || __GNUC__ == 4 && __GNUC_MINOR__ < 5)
+/* The pcs attribute was introduced in GCC 4.5.0 */
+#  define COMPILER_RT_ABI
+# else
+#  define COMPILER_RT_ABI __attribute__((pcs("aapcs")))
+# endif
+
 #else
 # define ARM_EABI_FNALIAS(aeabi_name, name)
 # define COMPILER_RT_ABI
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r245643 - head/lib/libcompiler_rt

2013-01-18 Thread Andrew Turner
Author: andrew
Date: Sat Jan 19 02:28:44 2013
New Revision: 245643
URL: http://svnweb.freebsd.org/changeset/base/245643

Log:
  Add the __aeabi_*divmod functions to the compiler-rt build

Modified:
  head/lib/libcompiler_rt/Makefile

Modified: head/lib/libcompiler_rt/Makefile
==
--- head/lib/libcompiler_rt/MakefileSat Jan 19 02:24:14 2013
(r245642)
+++ head/lib/libcompiler_rt/MakefileSat Jan 19 02:28:44 2013
(r245643)
@@ -181,6 +181,13 @@ SRCS+= ${file}.c
 . endif
 .endfor
 
+.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no"
+SRCS+= aeabi_idivmod.S \
+   aeabi_ldivmod.S \
+   aeabi_uidivmod.S \
+   aeabi_uldivmod.S
+.endif
+
 .if ${MACHINE_CPUARCH} != "mips"
 . if ${MK_INSTALLLIB} != "no"
 SYMLINKS+=libcompiler_rt.a ${LIBDIR}/libgcc.a
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r245644 - head/lib/libc/quad

2013-01-18 Thread Andrew Turner
Author: andrew
Date: Sat Jan 19 02:33:57 2013
New Revision: 245644
URL: http://svnweb.freebsd.org/changeset/base/245644

Log:
  For ARM EABI we only need a subset of the quad functions, the rest are
  provided by libgcc.

Modified:
  head/lib/libc/quad/Makefile.inc

Modified: head/lib/libc/quad/Makefile.inc
==
--- head/lib/libc/quad/Makefile.inc Sat Jan 19 02:28:44 2013
(r245643)
+++ head/lib/libc/quad/Makefile.inc Sat Jan 19 02:33:57 2013
(r245644)
@@ -8,6 +8,10 @@
 
 SRCS+= cmpdi2.c divdi3.c moddi3.c qdivrem.c ucmpdi2.c udivdi3.c umoddi3.c
 
+.elif ${LIBC_ARCH} == "arm" && ${MK_ARM_EABI} != "no"
+
+SRCS+= adddi3.c anddi3.c floatunsdidf.c iordi3.c lshldi3.c notdi2.c \
+   qdivrem.c subdi3.c xordi3.c
 .else
 
 SRCS+= adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c fixdfdi.c \
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r245647 - in head/sys: cam/scsi dev/usb/storage

2013-01-18 Thread Alexander Kabaev
Author: kan
Date: Sat Jan 19 03:19:39 2013
New Revision: 245647
URL: http://svnweb.freebsd.org/changeset/base/245647

Log:
  Do not pretend to have autosense data when no such data is available.
  
  Make umass return an error code if SCSI sense retrieval request
  has failed. Make sure scsi_error_action honors SF_NO_RETRY and
  SF_NO_RECOVERY in all cases, even if it cannot parse sense bytes.
  
  Reviewed by: hselasky (umass), scottl (cam)

Modified:
  head/sys/cam/scsi/scsi_all.c
  head/sys/dev/usb/storage/umass.c

Modified: head/sys/cam/scsi/scsi_all.c
==
--- head/sys/cam/scsi/scsi_all.cSat Jan 19 03:13:04 2013
(r245646)
+++ head/sys/cam/scsi/scsi_all.cSat Jan 19 03:19:39 2013
(r245647)
@@ -3071,16 +3071,15 @@ scsi_error_action(struct ccb_scsiio *csi
  SSQ_PRINT_SENSE;
}
}
-   if ((action & SS_MASK) >= SS_START &&
-   (sense_flags & SF_NO_RECOVERY)) {
-   action &= ~SS_MASK;
-   action |= SS_FAIL;
-   } else if ((action & SS_MASK) == SS_RETRY &&
-   (sense_flags & SF_NO_RETRY)) {
-   action &= ~SS_MASK;
-   action |= SS_FAIL;
-   }
-
+   }
+   if ((action & SS_MASK) >= SS_START &&
+   (sense_flags & SF_NO_RECOVERY)) {
+   action &= ~SS_MASK;
+   action |= SS_FAIL;
+   } else if ((action & SS_MASK) == SS_RETRY &&
+   (sense_flags & SF_NO_RETRY)) {
+   action &= ~SS_MASK;
+   action |= SS_FAIL;
}
if ((sense_flags & SF_PRINT_ALWAYS) != 0)
action |= SSQ_PRINT_SENSE;

Modified: head/sys/dev/usb/storage/umass.c
==
--- head/sys/dev/usb/storage/umass.cSat Jan 19 03:13:04 2013
(r245646)
+++ head/sys/dev/usb/storage/umass.cSat Jan 19 03:19:39 2013
(r245647)
@@ -2602,9 +2602,13 @@ umass_cam_sense_cb(struct umass_softc *s
}
} else {
xpt_freeze_devq(ccb->ccb_h.path, 1);
-   ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR
-   | CAM_AUTOSNS_VALID | CAM_DEV_QFRZN;
-   ccb->csio.scsi_status = SCSI_STATUS_CHECK_COND;
+   if (key >= 0) {
+   ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR
+   | CAM_AUTOSNS_VALID | CAM_DEV_QFRZN;
+   ccb->csio.scsi_status = SCSI_STATUS_CHECK_COND;
+   } else
+   ccb->ccb_h.status = CAM_AUTOSENSE_FAIL
+   | CAM_DEV_QFRZN;
}
xpt_done(ccb);
break;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r245648 - head/sbin/newfs_msdos

2013-01-18 Thread Pedro F. Giffuni
Author: pfg
Date: Sat Jan 19 03:34:02 2013
New Revision: 245648
URL: http://svnweb.freebsd.org/changeset/base/245648

Log:
  newfs_msdos: cosmetical cleanups
  
  - Simplify diagnostic messages.
  - Adopt lowercase first letters to make the messages
more canonical.
  
  PR:   bin/175404
  Submitted by: Christoph Mallon
  Reviewed by:  bde
  MFC after:3 days

Modified:
  head/sbin/newfs_msdos/newfs_msdos.c

Modified: head/sbin/newfs_msdos/newfs_msdos.c
==
--- head/sbin/newfs_msdos/newfs_msdos.c Sat Jan 19 03:19:39 2013
(r245647)
+++ head/sbin/newfs_msdos/newfs_msdos.c Sat Jan 19 03:34:02 2013
(r245648)
@@ -808,7 +808,7 @@ getdiskinfo(int fd, const char *fname, c
struct stat st;
 
if (fstat(fd, &st))
-   err(1, "Cannot get disk size");
+   err(1, "cannot get disk size");
/* create a fake geometry for a file image */
ms = st.st_size;
dlp.d_secsize = 512;
@@ -832,18 +832,18 @@ getdiskinfo(int fd, const char *fname, c
if (ioctl(fd, DIOCGDINFO, &dlp) == -1) {
if (bpb->bpbBytesPerSec == 0 && ioctl(fd, DIOCGSECTORSIZE,
  &dlp.d_secsize) == -1)
-   errx(1, "Cannot get sector size, %s", strerror(errno));
+   err(1, "cannot get sector size");
 
dlp.d_secperunit = ms / dlp.d_secsize;
 
if (bpb->bpbSecPerTrack == 0 && ioctl(fd, DIOCGFWSECTORS,
  &dlp.d_nsectors) == -1) {
-   warnx("Cannot get number of sectors per track, %s", 
strerror(errno));
+   warn("cannot get number of sectors per track");
dlp.d_nsectors = 63;
}
if (bpb->bpbHeads == 0 &&
ioctl(fd, DIOCGFWHEADS, &dlp.d_ntracks) == -1) {
-   warnx("Cannot get number of heads, %s", strerror(errno));
+   warn("cannot get number of heads");
if (dlp.d_secperunit <= 63*1*1024)
dlp.d_ntracks = 1;
else if (dlp.d_secperunit <= 63*16*1024)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r245649 - head/lib/libcompiler_rt

2013-01-18 Thread Andrew Turner
Author: andrew
Date: Sat Jan 19 03:47:18 2013
New Revision: 245649
URL: http://svnweb.freebsd.org/changeset/base/245649

Log:
  There should have been a tab after SRCS+=

Modified:
  head/lib/libcompiler_rt/Makefile

Modified: head/lib/libcompiler_rt/Makefile
==
--- head/lib/libcompiler_rt/MakefileSat Jan 19 03:34:02 2013
(r245648)
+++ head/lib/libcompiler_rt/MakefileSat Jan 19 03:47:18 2013
(r245649)
@@ -182,7 +182,7 @@ SRCS+=  ${file}.c
 .endfor
 
 .if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no"
-SRCS+= aeabi_idivmod.S \
+SRCS+= aeabi_idivmod.S \
aeabi_ldivmod.S \
aeabi_uidivmod.S \
aeabi_uldivmod.S
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r245650 - head/lib/libc/arm

2013-01-18 Thread Andrew Turner
Author: andrew
Date: Sat Jan 19 04:03:18 2013
New Revision: 245650
URL: http://svnweb.freebsd.org/changeset/base/245650

Log:
  Update the syscall calling convention for ARM EABI. We store the syscall
  in r7 and use ip to store the old version of r7 as it is not guaranteed to
  be kept when calling a subroutine. The kernel will preserve the register
  across system calls.

Modified:
  head/lib/libc/arm/SYS.h

Modified: head/lib/libc/arm/SYS.h
==
--- head/lib/libc/arm/SYS.h Sat Jan 19 03:47:18 2013(r245649)
+++ head/lib/libc/arm/SYS.h Sat Jan 19 04:03:18 2013(r245650)
@@ -39,7 +39,15 @@
 #include 
 #include 
 
+#ifdef __ARM_EABI__
+#define SYSTRAP(x) \
+   mov ip, r7; \
+   ldr r7, =SYS_ ## x; \
+   swi 0;  \
+   mov r7, ip
+#else
 #define SYSTRAP(x) swi 0 | SYS_ ## x
+#endif
 
 #defineCERROR  _C_LABEL(cerror)
 #defineCURBRK  _C_LABEL(curbrk)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r245651 - in head/lib: libc/arm libc/arm/gen libcompiler_rt

2013-01-18 Thread Andrew Turner
Author: andrew
Date: Sat Jan 19 04:11:45 2013
New Revision: 245651
URL: http://svnweb.freebsd.org/changeset/base/245651

Log:
  Use the compiler-rt version __{u,}divsi3 and __{u,}modsi3 on ARM EABI

Added:
  head/lib/libc/arm/Symbol_oabi.map   (contents, props changed)
Modified:
  head/lib/libc/arm/Makefile.inc
  head/lib/libc/arm/Symbol.map
  head/lib/libc/arm/gen/Makefile.inc
  head/lib/libcompiler_rt/Makefile

Modified: head/lib/libc/arm/Makefile.inc
==
--- head/lib/libc/arm/Makefile.inc  Sat Jan 19 04:03:18 2013
(r245650)
+++ head/lib/libc/arm/Makefile.inc  Sat Jan 19 04:11:45 2013
(r245651)
@@ -8,3 +8,9 @@ SOFTFLOAT_BITS=32
 # Long double is just double precision.
 MDSRCS+=machdep_ldisd.c
 SYM_MAPS+=${.CURDIR}/arm/Symbol.map
+
+.if ${MK_ARM_EABI} == "no"
+# This contains the symbols that were removed when moving to the ARM EABI
+SYM_MAPS+=${.CURDIR}/arm/Symbol_oabi.map
+.endif
+

Modified: head/lib/libc/arm/Symbol.map
==
--- head/lib/libc/arm/Symbol.mapSat Jan 19 04:03:18 2013
(r245650)
+++ head/lib/libc/arm/Symbol.mapSat Jan 19 04:11:45 2013
(r245651)
@@ -46,10 +46,6 @@ FBSDprivate_1.0 {
_set_tp;
__aeabi_read_tp;
___longjmp;
-   __umodsi3;
-   __modsi3;
-   __udivsi3;
-   __divsi3;
__makecontext;
__longjmp;
signalcontext;

Added: head/lib/libc/arm/Symbol_oabi.map
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/libc/arm/Symbol_oabi.map   Sat Jan 19 04:11:45 2013
(r245651)
@@ -0,0 +1,16 @@
+/*
+ * $FreeBSD$
+ */
+
+/*
+ * This only needs to contain symbols that are not listed in
+ * symbol maps from other parts of libc (i.e., not found in
+ * stdlib/Symbol.map, string/Symbol.map, sys/Symbol.map, ...)
+ * and are not used in the ARM EABI.
+ */
+FBSDprivate_1.0 {
+   __umodsi3;
+   __modsi3;
+   __udivsi3;
+   __divsi3;
+};

Modified: head/lib/libc/arm/gen/Makefile.inc
==
--- head/lib/libc/arm/gen/Makefile.inc  Sat Jan 19 04:03:18 2013
(r245650)
+++ head/lib/libc/arm/gen/Makefile.inc  Sat Jan 19 04:11:45 2013
(r245651)
@@ -3,4 +3,8 @@
 
 SRCS+= _ctx_start.S _setjmp.S _set_tp.c alloca.S fabs.c \
getcontextx.c infinity.c ldexp.c makecontext.c \
-   __aeabi_read_tp.S setjmp.S signalcontext.c sigsetjmp.S divsi3.S 
flt_rounds.c
+   __aeabi_read_tp.S setjmp.S signalcontext.c sigsetjmp.S flt_rounds.c
+
+.if ${MK_ARM_EABI} == "no"
+SRCS+= divsi3.S
+.endif

Modified: head/lib/libcompiler_rt/Makefile
==
--- head/lib/libcompiler_rt/MakefileSat Jan 19 04:03:18 2013
(r245650)
+++ head/lib/libcompiler_rt/MakefileSat Jan 19 04:11:45 2013
(r245651)
@@ -136,18 +136,22 @@ SRCF+=adddf3 \
addsf3 \
divdf3 \
divsf3 \
-   divsi3 \
extendsfdf2 \
fixdfsi \
fixsfsi \
floatsidf \
floatsisf \
-   modsi3 \
muldf3 \
mulsf3 \
subdf3 \
subsf3 \
-   truncdfsf2 \
+   truncdfsf2
+.endif
+
+.if ${MACHINE_CPUARCH} != "mips" && \
+(${MACHINE_CPUARCH} != "arm" || ${MK_ARM_EABI} != "no")
+SRCF+= divsi3 \
+   modsi3 \
udivsi3 \
umodsi3
 .endif
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r245652 - in head: lib share/man/man4 share/mk sys/amd64/include sys/conf sys/modules usr.sbin

2013-01-18 Thread Neel Natu
Author: neel
Date: Sat Jan 19 04:18:52 2013
New Revision: 245652
URL: http://svnweb.freebsd.org/changeset/base/245652

Log:
  Merge projects/bhyve to head.
  
  'bhyve' was developed by grehan@ and myself at NetApp (thanks!).
  
  Special thanks to Peter Snyder, Joe Caradonna and Michael Dexter for their
  support and encouragement.
  
  Obtained from:NetApp

Added:
 - copied from r245640, projects/bhyve/lib/libvmmapi/
 - copied unchanged from r245640, projects/bhyve/share/man/man4/bhyve.4
 - copied unchanged from r245640, projects/bhyve/sys/amd64/include/vmm.h
 - copied unchanged from r245640, projects/bhyve/sys/amd64/include/vmm_dev.h
 - copied unchanged from r245640, 
projects/bhyve/sys/amd64/include/vmm_instruction_emul.h
 - copied from r245640, projects/bhyve/sys/amd64/vmm/
 - copied from r245640, projects/bhyve/sys/dev/blackhole/
 - copied from r245640, projects/bhyve/sys/dev/bvm/
 - copied from r245640, projects/bhyve/sys/modules/blackhole/
 - copied from r245640, projects/bhyve/sys/modules/vmm/
 - copied from r245640, projects/bhyve/usr.sbin/bhyve/
 - copied from r245640, projects/bhyve/usr.sbin/bhyvectl/
 - copied from r245640, projects/bhyve/usr.sbin/bhyveload/
Directory Properties:
  head/lib/libvmmapi/   (props changed)
  head/share/man/man4/bhyve.4   (props changed)
  head/sys/amd64/include/vmm.h   (props changed)
  head/sys/amd64/include/vmm_dev.h   (props changed)
  head/sys/amd64/include/vmm_instruction_emul.h   (props changed)
  head/sys/amd64/vmm/   (props changed)
  head/sys/dev/blackhole/   (props changed)
  head/sys/dev/bvm/   (props changed)
  head/sys/modules/blackhole/   (props changed)
  head/sys/modules/vmm/   (props changed)
  head/usr.sbin/bhyve/   (props changed)
  head/usr.sbin/bhyvectl/   (props changed)
  head/usr.sbin/bhyveload/   (props changed)
Modified:
  head/lib/Makefile
  head/share/mk/bsd.libnames.mk
  head/sys/conf/files.amd64
  head/sys/modules/Makefile
  head/usr.sbin/Makefile.amd64

Modified: head/lib/Makefile
==
--- head/lib/Makefile   Sat Jan 19 04:11:45 2013(r245651)
+++ head/lib/Makefile   Sat Jan 19 04:18:52 2013(r245652)
@@ -115,6 +115,7 @@ SUBDIR= ${SUBDIR_ORDERED} \
${_libusbhid} \
${_libusb} \
${_libvgl} \
+   ${_libvmmapi} \
libwrap \
liby \
libz \
@@ -198,6 +199,10 @@ _libproc=  libproc
 _librtld_db=   librtld_db
 .endif
 
+.if ${MACHINE_CPUARCH} == "amd64"
+_libvmmapi=libvmmapi
+.endif
+
 .if ${MACHINE_CPUARCH} == "ia64"
 _libefi=   libefi
 .endif

Copied: head/share/man/man4/bhyve.4 (from r245640, 
projects/bhyve/share/man/man4/bhyve.4)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/man/man4/bhyve.4 Sat Jan 19 04:18:52 2013(r245652, copy 
of r245640, projects/bhyve/share/man/man4/bhyve.4)
@@ -0,0 +1,68 @@
+.\"
+.\" Copyright (c) 2012 NetApp Inc
+.\" 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 January 5, 2013
+.Dt BHYVE 4
+.Os
+.Sh NAME
+.Nm bhyve
+.Nd virtual machine monitor
+.Sh SYNOPSIS
+.Cd "/usr/sbin/bhyve"
+.Cd "/usr/sbin/bhyveload"
+.Cd "/usr/sbin/bhyvectl"
+.Cd "/boot/kernel/vmm.ko"
+.Sh DESCRIPTION
+.Nm
+is a virtual machine monitor that is hosted by FreeBSD. It is used to host
+unmodified guest operating systems on top of FreeBSD.
+.Pp
+.Nm
+relies heavily on hardware assist provided by the CPU and chipset to virtualize
+processor and memory resources.
+.Sh SEE ALSO
+.Xr bhyve 8 ,
+.Xr bhyveload 8 

svn commit: r245653 - head/libexec/rtld-elf

2013-01-18 Thread Andrew Turner
Author: andrew
Date: Sat Jan 19 04:34:33 2013
New Revision: 245653
URL: http://svnweb.freebsd.org/changeset/base/245653

Log:
  When building for ARM EABI link against libgcc for the __aeabi_* functions.

Modified:
  head/libexec/rtld-elf/Makefile

Modified: head/libexec/rtld-elf/Makefile
==
--- head/libexec/rtld-elf/Makefile  Sat Jan 19 04:18:52 2013
(r245652)
+++ head/libexec/rtld-elf/Makefile  Sat Jan 19 04:34:33 2013
(r245653)
@@ -42,6 +42,16 @@ LDFLAGS+=-shared -Wl,-Bsymbolic
 DPADD= ${LIBC_PIC}
 LDADD= -lc_pic
 
+.if ${MACHINE_CPUARCH} == "arm" && ${MK_ARM_EABI} != "no"
+# Some of the required math functions (div & mod) are implemented in libgcc
+# on ARM. The library also needs to be placed first to be correctly linked.
+# As some of the functions are used before we have shared libraries.
+DPADD+=${LIBGCC}
+LDADD+=-lgcc
+.endif
+
+
+
 .if ${MK_SYMVER} == "yes"
 LIBCDIR=   ${TOPSRCDIR}/lib/libc
 VERSION_DEF=   ${LIBCDIR}/Versions.def
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r245655 - in head/lib/libc/arm: . aeabi

2013-01-18 Thread Andrew Turner
Author: andrew
Date: Sat Jan 19 05:33:55 2013
New Revision: 245655
URL: http://svnweb.freebsd.org/changeset/base/245655

Log:
  Add the required __aeabi_* functions to libc.
  
  The floating point functions are here rather than compiler-rt because the
  libc softfloat code allows us to set the rounding mode.

Added:
  head/lib/libc/arm/aeabi/
  head/lib/libc/arm/aeabi/Makefile.inc   (contents, props changed)
  head/lib/libc/arm/aeabi/Symbol.map   (contents, props changed)
  head/lib/libc/arm/aeabi/aeabi_atexit.c   (contents, props changed)
  head/lib/libc/arm/aeabi/aeabi_double.c   (contents, props changed)
  head/lib/libc/arm/aeabi/aeabi_float.c   (contents, props changed)
  head/lib/libc/arm/aeabi/aeabi_unwind_cpp.c   (contents, props changed)
Modified:
  head/lib/libc/arm/Makefile.inc

Modified: head/lib/libc/arm/Makefile.inc
==
--- head/lib/libc/arm/Makefile.inc  Sat Jan 19 04:46:18 2013
(r245654)
+++ head/lib/libc/arm/Makefile.inc  Sat Jan 19 05:33:55 2013
(r245655)
@@ -12,5 +12,7 @@ SYM_MAPS+=${.CURDIR}/arm/Symbol.map
 .if ${MK_ARM_EABI} == "no"
 # This contains the symbols that were removed when moving to the ARM EABI
 SYM_MAPS+=${.CURDIR}/arm/Symbol_oabi.map
+.else
+.include "${.CURDIR}/arm/aeabi/Makefile.inc"
 .endif
 

Added: head/lib/libc/arm/aeabi/Makefile.inc
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/libc/arm/aeabi/Makefile.incSat Jan 19 05:33:55 2013
(r245655)
@@ -0,0 +1,11 @@
+# $FreeBSD$
+
+.PATH: ${.CURDIR}/arm/aeabi
+
+SRCS+= aeabi_atexit.c  \
+   aeabi_double.c  \
+   aeabi_float.c   \
+   aeabi_unwind_cpp.c
+
+SYM_MAPS+=${.CURDIR}/arm/aeabi/Symbol.map
+

Added: head/lib/libc/arm/aeabi/Symbol.map
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/libc/arm/aeabi/Symbol.map  Sat Jan 19 05:33:55 2013
(r245655)
@@ -0,0 +1,47 @@
+/*
+ * $FreeBSD$
+ */
+
+/*
+ * This only needs to contain AEABI symbols that are not listed in
+ * symbol maps from other parts of libc (i.e., not found in
+ * stdlib/Symbol.map, string/Symbol.map, sys/Symbol.map, ...).
+ */
+FBSDprivate_1.0 {
+   __aeabi_atexit;
+
+   __aeabi_dcmpeq;
+   __aeabi_dcmplt;
+   __aeabi_dcmple;
+   __aeabi_dcmpge;
+   __aeabi_dcmpgt;
+   __aeabi_dcmpun;
+
+   __aeabi_d2iz;
+   __aeabi_d2f;
+
+   __aeabi_dadd;
+   __aeabi_ddiv;
+   __aeabi_dmul;
+   __aeabi_dsub;
+
+
+   __aeabi_fcmpeq;
+   __aeabi_fcmplt;
+   __aeabi_fcmple;
+   __aeabi_fcmpge;
+   __aeabi_fcmpgt;
+   __aeabi_fcmpun;
+
+   __aeabi_f2iz;
+   __aeabi_f2d;
+
+   __aeabi_fadd;
+   __aeabi_fdiv;
+   __aeabi_fmul;
+   __aeabi_fsub;
+
+
+   __aeabi_i2d;
+   __aeabi_i2f;
+};

Added: head/lib/libc/arm/aeabi/aeabi_atexit.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/libc/arm/aeabi/aeabi_atexit.c  Sat Jan 19 05:33:55 2013
(r245655)
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2012 Andrew Turner
+ * 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.
+ *
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+int __cxa_atexit(void (*)(void *), void *, void *);
+
+int
+__aeabi_atexit(void *object, void (*func)(void*), void *dso)
+{
+   return __cxa_atexit(func, object, dso);
+}
+

Added: head/lib/libc/arm/aeabi/aeabi_double.c
==

Re: svn commit: r245577 - in head/sys: amd64/amd64 i386/i386 x86/x86

2013-01-18 Thread Konstantin Belousov
On Fri, Jan 18, 2013 at 10:52:54AM -0500, John Baldwin wrote:
> On Thursday, January 17, 2013 11:03:32 pm Konstantin Belousov wrote:
> > On Thu, Jan 17, 2013 at 09:32:26PM +, John Baldwin wrote:
> > > Author: jhb
> > > Date: Thu Jan 17 21:32:25 2013
> > > New Revision: 245577
> > > URL: http://svnweb.freebsd.org/changeset/base/245577
> > > 
> > > Log:
> > >   Don't attempt to use clflush on the local APIC register window.  Various
> > >   CPUs exhibit bad behavior if this is done (Intel Errata AAJ3, hangs on
> > >   Pentium-M, and trashing of the local APIC registers on a VIA C7).  The
> > >   local APIC is implicitly mapped UC already via MTRRs, so the clflush 
> > > isn't
> > >   necessary anyway.
> > >   
> > >   MFC after:  2 weeks
> > I am curious, was there a case where the clflush was really executed
> > on the LAPIC register window with the pristine HEAD code ? I think
> > that there is no Intel processors which support clflush instruction
> > and do not have self-snoop.
> 
> The VIA CPUs.  I had a submitter report that a clflush against the local APIC
> range would sometimes cause the entire local APIC range to get overwritten 
> with
> a single cacheline (repeated throughout the window).  Also, in theory we could
> perhaps stop masking CLFLUSH in VM's when SS is masked.
So VIAs are bug-to-bug compatible with Intels ? Weird.

Regarding reverting of the VM workaround, I am not sure. It could
be tried, but as I remember, the cause of the workaround were AMD
processors and some hypervisors. It was long time ago, it might indeed
be that it worth a try.

> 
> > On the other hand, please note that the same change could be due for the
> > pmap_invalidate_cache_pages(). Unlike pmap_invalidate_cache_range(),
> > _pages() uses clflush unconditionally on purpose, since it is intended
> > for devices which do not snoop.
> 
> Hmm, maybe.  I'm not sure that call is ever used on the local APIC since the
> relevant page should already be UC from the boot-time call?
I noted this for completeness. You did the change in the
pmap_invalidate_cache_range(), and not in the pmap_mapdev*. The KPI
becomes somewhat rough due to inequality of the two cache flush methods
now.

But I definitely do not insist, since the ony real user of _pages() right
now is GEM, which only calls it on the real physical memory.


pgpN84s262L3O.pgp
Description: PGP signature


svn commit: r245666 - head/usr.sbin/bhyveload

2013-01-18 Thread Joel Dahl
Author: joel (doc committer)
Date: Sat Jan 19 07:04:30 2013
New Revision: 245666
URL: http://svnweb.freebsd.org/changeset/base/245666

Log:
  Minor mdoc fixes.

Modified:
  head/usr.sbin/bhyveload/bhyveload.8

Modified: head/usr.sbin/bhyveload/bhyveload.8
==
--- head/usr.sbin/bhyveload/bhyveload.8 Sat Jan 19 06:39:49 2013
(r245665)
+++ head/usr.sbin/bhyveload/bhyveload.8 Sat Jan 19 07:04:30 2013
(r245666)
@@ -51,7 +51,7 @@ virtual machine.
 .Nm
 is based on
 .Xr loader 8
-and will present an interface identical to
+and will present an interface identical to the
 .Fx
 loader on the user's terminal.
 .Pp
@@ -85,36 +85,34 @@ is the pathname of the guest's boot disk
 The
 .Ar host-path
 is the directory at the top of the guest's boot filesystem.
-
+.El
 .Sh EXAMPLES
 To create a virtual machine named
 .Ar freebsd-vm 
 that boots off the ISO image
 .Pa /freebsd/release.iso 
 and has 1GB memory allocated to it:
-
-.Dl "bhyveload -m 256 -M 768 -d /freebsd/release.iso freebsd-vm
-
+.Pp
+.Dl "bhyveload -m 256 -M 768 -d /freebsd/release.iso freebsd-vm"
+.Pp
 In the example above the 1GB allocation is split in two segments:
+.Pp
 .Bl -dash -compact
 .It
 256MB below the 4GB boundary (0MB - 256MB)
 .It
 768MB above the 4GB boundary (4096MB - 4864MB)
 .El
-
 .Sh SEE ALSO
 .Xr bhyve 4 ,
 .Xr bhyve 8 ,
 .Xr loader 8 ,
 .Xr vmm 4
-
 .Sh HISTORY
 .Nm
 first appeared in
 .Fx 10.0 ,
 and was developed at NetApp Inc.
-
 .Sh AUTHORS
 .Nm
 was developed by
@@ -122,9 +120,8 @@ was developed by
 .An "Neel Natu" Aq n...@freebsd.org
 at NetApp Inc with a lot of help from
 .An Doug Rabson Aq d...@freebsd.org
-
 .Sh BUGS
 .Nm
-can load only
+can only load
 .Fx
 as a guest.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r245667 - in head: usr.bin/xinstall usr.sbin/bhyveload

2013-01-18 Thread Joel Dahl
Author: joel (doc committer)
Date: Sat Jan 19 07:07:05 2013
New Revision: 245667
URL: http://svnweb.freebsd.org/changeset/base/245667

Log:
  Remove EOL whitespace.

Modified:
  head/usr.bin/xinstall/install.1
  head/usr.sbin/bhyveload/bhyveload.8

Modified: head/usr.bin/xinstall/install.1
==
--- head/usr.bin/xinstall/install.1 Sat Jan 19 07:04:30 2013
(r245666)
+++ head/usr.bin/xinstall/install.1 Sat Jan 19 07:07:05 2013
(r245667)
@@ -145,7 +145,7 @@ for a list of possible flags and their m
 .It Fl g
 Specify a group.
 A numeric GID is allowed.
-.It Fl h Ar hash 
+.It Fl h Ar hash
 When copying, calculate the digest of the files with
 .Ar hash
 to store in the
@@ -199,7 +199,7 @@ Disable all use of
 .Xr mmap 2 .
 .It Fl M Ar metalog
 Write the metadata associated with each item installed to
-.Ar metalog  
+.Ar metalog
 in an
 .Xr mtree 8
 .Dq full path

Modified: head/usr.sbin/bhyveload/bhyveload.8
==
--- head/usr.sbin/bhyveload/bhyveload.8 Sat Jan 19 07:04:30 2013
(r245666)
+++ head/usr.sbin/bhyveload/bhyveload.8 Sat Jan 19 07:07:05 2013
(r245667)
@@ -88,9 +88,9 @@ is the directory at the top of the guest
 .El
 .Sh EXAMPLES
 To create a virtual machine named
-.Ar freebsd-vm 
+.Ar freebsd-vm
 that boots off the ISO image
-.Pa /freebsd/release.iso 
+.Pa /freebsd/release.iso
 and has 1GB memory allocated to it:
 .Pp
 .Dl "bhyveload -m 256 -M 768 -d /freebsd/release.iso freebsd-vm"
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"