Re: svn commit: r284345 - in head: . bin/cat bin/chflags bin/chio bin/chmod bin/cp bin/csh bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/expr bin/freebsd-version bin/getfacl bin/hostname b

2015-06-18 Thread Ian Lepore
On Sun, 2015-06-14 at 15:00 -0700, Simon J. Gerraty wrote:
 Garrett Cooper yaneurab...@gmail.com wrote:
 
  Breaking source upgrades to later versions is painful. We want to make
  sure fmake at least works with upgrade_checks so people can upgrade
  from earlier versions of 8/9/10 to 11 without having to deal with a
  lot of pain.
 
 I agree but 8 - 11 is a very big jump.
 

Not really.  We're in the midst of such a change at $work, but it will
be literally years before we're no longer doing anything with 8 and are
fully converted to 11.  We'll have completely skipped 9 and 10 in the
process.  That's the reality of being a company smaller than Yahoo or
Juniper -- we just don't have the resources to track -current.  We're
lucky if we can get enough resources to make a jump every 4 or 5 years.

In the meantime I've got to support building products on everything from
6.x through -current using basically the same source base and build
machinery.  The fmake-bmake change has been fairly painful; it's only
working at all for us because I've hacked fmake on 6.x and 8.x to
support a few crucial bmake features.

-- Ian


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


Re: svn commit: r284409 - in head/cddl/lib: libzfs libzfs_core

2015-06-18 Thread Andriy Gapon
On 15/06/2015 21:06, Warner Losh wrote:
 
 On Jun 15, 2015, at 8:37 AM, Matthew Ahrens m...@mahrens.org wrote:
 
 
 
 On Mon, Jun 15, 2015 at 7:53 AM, Andriy Gapon a...@freebsd.org wrote:
 
 P.S. My personal preference would be to drop that compat code and to 
 convince ZFS/FreeBSD users to always use boot environments, so that their
 kernel and userland never fall out of sync :)
 
 Me too :-)
 
 Sadly, there are a number of upgrade scenarios where this simply isn’t 
 possible.

Curious what are those...
The only scenario I can think of is one where there is not enough space to
hold the previous OS bits and the new ones.  But in such a constrained system
there is probably not much use for ZFS anyway.

 But looking at the file, it appears to be full of stuff to do the 8.x - 
 9.x upgrade of ZFS to format 28. Perhaps that can now be removed?

I would expect that every user of ZFS/FreeBSD has moved past that line by now,
but who knows...

 These libraries appear to be versioned, rather than symbol versioned 
 otherwise Baptiste’s commit would have been bad… but  I wonder if maybe a 
 version bump is in order…

I think we should be okay without a version bump, because the symbol is moved
from a library to its dependency.  So, libzfs_core interface is extended and
that should not be a problem for its users.  And libzfs users should not
notice that the symbol migrated from libzfs to libfzs_core because the users
have to link to both libraries (or load both of them).

-- 
Andriy Gapon
___
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: head/sys/boot: common uboot/common uboot/lib

2015-06-18 Thread Ian Lepore
On Sat, 2015-06-13 at 14:53 -0700, Maxim Sobolev wrote:
 Just in case, my debug code and proposed fix can be found here:
 
 https://github.com/sobomax/FreeBSD.arm/commit/48509790f82352cb455d0f5029291b917afb985b
 
 Unless I hear from you I am going to push it into the repository in the
 next few days (modulo printf() debug stuff).
 
 Thanks!
 
 On Thu, Jun 11, 2015 at 6:21 AM, Maxim Sobolev sobo...@freebsd.org wrote:
 
  Hi Ian, there is some issues with that commit that I've run into when
  trying to get FreeBSD booting on my Xilinx Zinq 7010-based board.
  Basically, the instructions we have on Wiki suggests that the ubldr loading
  address to be 0x10. That makes ubldr panic with not enough DRAM
  error. I've added some debug code into the for loop, you can find the
  output below. As you can see the code is not handling the case when ubldr
  is below 2MB and as such sblock == eubldr. On top of that, this_block and
  this_size may be left uninitialized causing loading at some random address
  and panicing then, instead of DRAM is too small panic.
 
  kernel_addr=0x10
  ubldr_addr=0x10
  dtb_addr=0x1000
  dtb_name=system.dtb
  uenvcmd=echo Booting FreeBSD from SD...; mmcinfo  fatload mmc 0
  ${ubldr_addr} ubldr  fatload mmc 0 ${dtb_addr} ${dtb_name}  fdt addr
  ${dtb_addr}  bootelf ${ubldr_addr}
 

I'm sorry for the long delay in responding to this, I'm enmeshed in a
crazy-deadline project at $work.

To tell you the truth, I had a feeling when I was working on that code
that it was too simple.  When I've solved the do these blocks
overlap problem before the code always ended up looking a lot more like
what you propose.  I think you should commit your changes, they look
more correct than my code.

-- Ian


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


svn commit: r284546 - head/contrib/gcc

2015-06-18 Thread Adrian Chadd
Author: adrian
Date: Thu Jun 18 13:40:08 2015
New Revision: 284546
URL: https://svnweb.freebsd.org/changeset/base/284546

Log:
  Fix compilation of this macro under gcc-4.9 for MIPS32.
  
  Some point after gcc-4.2 the MIPS inline assembly restrictions changed -
  =h (hi register) disappeared from the list of restrictions and can no
  longer be used.
  
  So, until someone requires an assembly version of this function,
  just use a non-assembly version and let the compiler sort it out.
  
  Suggested by: kan

Modified:
  head/contrib/gcc/longlong.h

Modified: head/contrib/gcc/longlong.h
==
--- head/contrib/gcc/longlong.h Thu Jun 18 13:23:52 2015(r284545)
+++ head/contrib/gcc/longlong.h Thu Jun 18 13:40:08 2015(r284546)
@@ -584,11 +584,11 @@ UDItype __umulsidi3 (USItype, USItype);
 
 #if defined (__mips__)  W_TYPE_SIZE == 32
 #define umul_ppmm(w1, w0, u, v) \
-  __asm__ (multu %2,%3   \
-  : =l ((USItype) (w0)), \
-=h ((USItype) (w1))  \
-  : d ((USItype) (u)),   \
-d ((USItype) (v)))
+   do {\
+   UDItype __x = (UDItype) (USItype) (u) * (USItype) (v);  \
+w1 = __x  32;\
+w0 = __x;  \
+   } while (0)
 #define UMUL_TIME 10
 #define UDIV_TIME 100
 #endif /* __mips__ */
___
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: r284547 - head/usr.bin/sockstat

2015-06-18 Thread Michael Tuexen
Author: tuexen
Date: Thu Jun 18 13:45:07 2015
New Revision: 284547
URL: https://svnweb.freebsd.org/changeset/base/284547

Log:
  Fix a bug reported by coverity. Since AF_UNIX sockets don't
  have multiple addresses, the problem didn't show up during testing.
  
  Reported by:  Coverity
  CID:  1306787

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

Modified: head/usr.bin/sockstat/sockstat.c
==
--- head/usr.bin/sockstat/sockstat.cThu Jun 18 13:40:08 2015
(r284546)
+++ head/usr.bin/sockstat/sockstat.cThu Jun 18 13:45:07 2015
(r284547)
@@ -865,6 +865,7 @@ displaysock(struct sock *s, int pos)
void *p;
int hash;
struct addr *laddr, *faddr;
+   struct sock *s_tmp;
 
while (pos  29)
pos += xprintf( );
@@ -908,18 +909,20 @@ displaysock(struct sock *s, int pos)
}
pos += xprintf(- );
for (hash = 0; hash  HASHSIZE; ++hash) {
-   for (s = sockhash[hash]; s != NULL; s = s-next)
-   if (s-pcb == p)
+   for (s_tmp = sockhash[hash];
+s_tmp != NULL;
+s_tmp = s_tmp-next)
+   if (s_tmp-pcb == p)
break;
-   if (s != NULL)
+   if (s_tmp != NULL)
break;
}
-   if (s == NULL ||
-   s-laddr == NULL ||
-   s-laddr-address.ss_len == 0)
+   if (s_tmp == NULL ||
+   s_tmp-laddr == NULL ||
+   s_tmp-laddr-address.ss_len == 0)
pos += xprintf(??);
else
-   pos += printaddr(s-laddr-address);
+   pos += printaddr(s_tmp-laddr-address);
break;
default:
abort();
___
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: r284551 - head/contrib/libcxxrt

2015-06-18 Thread Ed Maste
Author: emaste
Date: Thu Jun 18 14:12:08 2015
New Revision: 284551
URL: https://svnweb.freebsd.org/changeset/base/284551

Log:
  Import libcxxrt master e64e93fe5bba67a6d52cbe5a97f8770c054bfa65.
  
  This includes a number of demangler fixes obtained from upstream
  ELF Tool Chain.
  
  PR:   200913
  Sponsored by: The FreeBSD Foundation

Modified:
  head/contrib/libcxxrt/libelftc_dem_gnu3.c
Directory Properties:
  head/contrib/libcxxrt/   (props changed)

Modified: head/contrib/libcxxrt/libelftc_dem_gnu3.c
==
--- head/contrib/libcxxrt/libelftc_dem_gnu3.c   Thu Jun 18 14:02:19 2015
(r284550)
+++ head/contrib/libcxxrt/libelftc_dem_gnu3.c   Thu Jun 18 14:12:08 2015
(r284551)
@@ -59,7 +59,7 @@ struct vector_str {
 
 enum type_qualifier {
TYPE_PTR, TYPE_REF, TYPE_CMX, TYPE_IMG, TYPE_EXT, TYPE_RST, TYPE_VAT,
-   TYPE_CST
+   TYPE_CST, TYPE_VEC
 };
 
 struct vector_type_qualifier {
@@ -397,6 +397,8 @@ static int  cpp_demangle_read_array(struc
 static int cpp_demangle_read_encoding(struct cpp_demangle_data *);
 static int cpp_demangle_read_expr_primary(struct cpp_demangle_data *);
 static int cpp_demangle_read_expression(struct cpp_demangle_data *);
+static int cpp_demangle_read_expression_flat(struct cpp_demangle_data *,
+   char **);
 static int cpp_demangle_read_expression_binary(struct cpp_demangle_data *,
const char *, size_t);
 static int cpp_demangle_read_expression_unary(struct cpp_demangle_data *,
@@ -408,8 +410,12 @@ static int cpp_demangle_read_function(st
 static int cpp_demangle_local_source_name(struct cpp_demangle_data *ddata);
 static int cpp_demangle_read_local_name(struct cpp_demangle_data *);
 static int cpp_demangle_read_name(struct cpp_demangle_data *);
+static int cpp_demangle_read_name_flat(struct cpp_demangle_data *,
+   char**);
 static int cpp_demangle_read_nested_name(struct cpp_demangle_data *);
 static int cpp_demangle_read_number(struct cpp_demangle_data *, long *);
+static int cpp_demangle_read_number_as_string(struct cpp_demangle_data *,
+   char **);
 static int cpp_demangle_read_nv_offset(struct cpp_demangle_data *);
 static int cpp_demangle_read_offset(struct cpp_demangle_data *);
 static int cpp_demangle_read_offset_number(struct cpp_demangle_data *);
@@ -423,6 +429,8 @@ static int  cpp_demangle_read_tmpl_arg(st
 static int cpp_demangle_read_tmpl_args(struct cpp_demangle_data *);
 static int cpp_demangle_read_tmpl_param(struct cpp_demangle_data *);
 static int cpp_demangle_read_type(struct cpp_demangle_data *, int);
+static int cpp_demangle_read_type_flat(struct cpp_demangle_data *,
+   char **);
 static int cpp_demangle_read_uqname(struct cpp_demangle_data *);
 static int cpp_demangle_read_v_offset(struct cpp_demangle_data *);
 static char*decode_fp_to_double(const char *, size_t);
@@ -601,17 +609,18 @@ cpp_demangle_push_fp(struct cpp_demangle
fp = ddata-cur;
while (*ddata-cur != 'E')
++ddata-cur;
-   ++ddata-cur;
 
if ((f = decoder(fp, ddata-cur - fp)) == NULL)
return (0);
 
rtn = 0;
if ((len = strlen(f))  0)
-   rtn = cpp_demangle_push_str(ddata, f, len); 
+   rtn = cpp_demangle_push_str(ddata, f, len);
 
free(f);
 
+   ++ddata-cur;
+
return (rtn);
 }
 
@@ -695,7 +704,8 @@ cpp_demangle_push_type_qualifier(struct 
if (type_str != NULL) {
if (!vector_str_push(subst_v, *, 1))
goto clean;
-   if (!cpp_demangle_push_subst_v(ddata, subst_v))
+   if (!cpp_demangle_push_subst_v(ddata,
+   subst_v))
goto clean;
}
break;
@@ -706,7 +716,8 @@ cpp_demangle_push_type_qualifier(struct 
if (type_str != NULL) {
if (!vector_str_push(subst_v, , 1))
goto clean;
-   if (!cpp_demangle_push_subst_v(ddata, subst_v))
+   if (!cpp_demangle_push_subst_v(ddata,
+   subst_v))
goto clean;
}
break;
@@ -717,7 +728,8 @@ cpp_demangle_push_type_qualifier(struct 
if (type_str != NULL) {
if (!vector_str_push(subst_v,  complex, 8))
goto clean;
-   if (!cpp_demangle_push_subst_v(ddata, subst_v))
+   if 

svn commit: r284552 - head/sys/dev/mii

2015-06-18 Thread Marius Strobl
Author: marius
Date: Thu Jun 18 14:13:16 2015
New Revision: 284552
URL: https://svnweb.freebsd.org/changeset/base/284552

Log:
  Fix yet another comment typo in NetBSD rev. 1.16, missed when merging
  it in r284447.
  
  Submitted by: yongari
  Sponsored by: genua mbh

Modified:
  head/sys/dev/mii/mii.h

Modified: head/sys/dev/mii/mii.h
==
--- head/sys/dev/mii/mii.h  Thu Jun 18 14:12:08 2015(r284551)
+++ head/sys/dev/mii/mii.h  Thu Jun 18 14:13:16 2015(r284552)
@@ -204,7 +204,7 @@
 #defineMII_PSESR   0x0c/* PSE status register */
 #definePSESR_PWRDENIED 0x1000  /* Power Denied */
 #definePSESR_VALSIG0x0800  /* Valid PD signature detected */
-#definePSESR_INVALSIG  0x0400  /* Inalid PD signature detected */
+#definePSESR_INVALSIG  0x0400  /* Invalid PD signature detected */
 #definePSESR_SHORTCIRC 0x0200  /* Short circuit condition detected */
 #definePSESR_OVERLOAD  0x0100  /* Overload condition detected */
 #definePSESR_MPSABSENT 0x0080  /* MPS absent condition detected */
___
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: r284535 - head/sys/kern

2015-06-18 Thread Konstantin Belousov
On Thu, Jun 18, 2015 at 07:59:43AM -0700, Sean Bruno wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA512
 
 On 06/17/15 20:07, Konstantin Belousov wrote:
  On Thu, Jun 18, 2015 at 02:04:21AM +, Sean Bruno wrote:
  Author: sbruno Date: Thu Jun 18 02:04:20 2015 New Revision:
  284535 URL: https://svnweb.freebsd.org/changeset/base/284535
  
  Log: This change replaces the mutex with a sx lock for the
  interpreter list to avoid the problem of holding a non-sleep lock
  during a page fault as reported by witness. It also uses atomics
  where possible to avoid having to acquire the exclusive lock. In
  addition, it consistently uses memset()/memcpy() instead of
  bzero()/bcopy().
  
  Differential Revision: https://reviews.freebsd.org/D1971 
  Submitted by:  sson Reviewed by:   jhb
  What are the page faults during image activator run ? Or, if the
  page faults are not during image activation, then where ?
  
 
 The original witness panic was one we discussed a while ago on current.
 https://lists.freebsd.org/pipermail/freebsd-current/2015-February/054698
 .html
 
 I wanted to resolve that witness issue before I tried to reproduce any
 other failure cases.
 
 Kernel page fault with the following non-sleepable locks held:
 exclusive sleep mutex imgact_binmisc (imgact_binmisc) r = 0
 (0x82012418) locked @
 /usr/src/sys/modules/imgact_binmisc/../../kern/imgact_binmisc.c:596
 KDB: stack backtrace:
 db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame
 0xfe046a236280
 witness_warn() at witness_warn+0x4ae/frame 0xfe046a236350
 trap_pfault() at trap_pfault+0x59/frame 0xfe046a2363f0
 trap() at trap+0x45e/frame 0xfe046a236600
 calltrap() at calltrap+0x8/frame 0xfe046a236600
 - - --- trap 0xc, rip = 0x80d21279, rsp = 0xfe046a2366c0, rbp
 = 0xfe046a2366d0 ---
 bcopy() at bcopy+0x39/frame 0xfe046a2366d0
 imgact_binmisc_exec() at imgact_binmisc_exec+0x23d/frame
 0xfe046a236720
 kern_execve() at kern_execve+0x4c6/frame 0xfe046a236a80
 sys_execve() at sys_execve+0x37/frame 0xfe046a236ae0
 amd64_syscall() at amd64_syscall+0x27f/frame 0xfe046a236bf0
 Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfe046a236bf0
 - - --- syscall (59, FreeBSD ELF64, sys_execve), rip = 0x4297ba, rsp =
 0x7fffdaf8, rbp = 0x7fffdb00 ---
 
What is the source line for imgact_binmisc_exec+0x23d ?
I see only one direct bcopy() call in the imgact_binmisc_exec(),
which is accessing the exec_map swappable memory, indeed.  There might
be compiler-generated bcopy() calls, and in this case the faulting access
probably indicates other bug.

BTW, why imgact_binmisc_exec() is not static ?

 
  
  @@ -404,12 +404,12 @@ imgact_binmisc_get_all_entries(struct sy 
  imgact_binmisc_entry_t *ibe; int error = 0, count;
  
  -  mtx_lock(interp_list_mtx); +   sx_slock(interp_list_sx); count
  = interp_list_entry_count; /* Don't block in malloc() while
  holding lock. */ xbe = malloc(sizeof(*xbe) * count, M_BINMISC,
  M_NOWAIT|M_ZERO);
  This is definitely no longer true statement. Even the original use
  of M_NOWAIT there is not warranted.
  
 
 Dead comment?  I should remove it then as it is
 invalid/inaccurate/never was true?
 
 I should remove M_NOWAIT as well?

Yes and yes.  Also, M_NOWAIT does not return 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: r284553 - head/contrib/libcxxrt

2015-06-18 Thread Ed Maste
Author: emaste
Date: Thu Jun 18 14:29:46 2015
New Revision: 284553
URL: https://svnweb.freebsd.org/changeset/base/284553

Log:
  Update libcxxrt upgrade instructions
  
  The typeinfo file no longer exists upstream.

Modified:
  head/contrib/libcxxrt/FREEBSD-upgrade

Modified: head/contrib/libcxxrt/FREEBSD-upgrade
==
--- head/contrib/libcxxrt/FREEBSD-upgrade   Thu Jun 18 14:13:16 2015
(r284552)
+++ head/contrib/libcxxrt/FREEBSD-upgrade   Thu Jun 18 14:29:46 2015
(r284553)
@@ -3,4 +3,4 @@ $FreeBSD$
 This is the FreeBSD copy of libcxxrt.  It contains the src directory from the 
 upstream repository.
 
-When updating, copy *.{c,cc,h} and typeinfo from the upstream src/.
+When updating, copy *.{c,cc,h} from the upstream src/.
___
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: r284535 - head/sys/kern

2015-06-18 Thread Sean Bruno
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

On 06/17/15 20:07, Konstantin Belousov wrote:
 On Thu, Jun 18, 2015 at 02:04:21AM +, Sean Bruno wrote:
 Author: sbruno Date: Thu Jun 18 02:04:20 2015 New Revision:
 284535 URL: https://svnweb.freebsd.org/changeset/base/284535
 
 Log: This change replaces the mutex with a sx lock for the
 interpreter list to avoid the problem of holding a non-sleep lock
 during a page fault as reported by witness. It also uses atomics
 where possible to avoid having to acquire the exclusive lock. In
 addition, it consistently uses memset()/memcpy() instead of
 bzero()/bcopy().
 
 Differential Revision:   https://reviews.freebsd.org/D1971 
 Submitted by:sson Reviewed by:   jhb
 What are the page faults during image activator run ? Or, if the
 page faults are not during image activation, then where ?
 

The original witness panic was one we discussed a while ago on current.
https://lists.freebsd.org/pipermail/freebsd-current/2015-February/054698
.html

I wanted to resolve that witness issue before I tried to reproduce any
other failure cases.

Kernel page fault with the following non-sleepable locks held:
exclusive sleep mutex imgact_binmisc (imgact_binmisc) r = 0
(0x82012418) locked @
/usr/src/sys/modules/imgact_binmisc/../../kern/imgact_binmisc.c:596
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame
0xfe046a236280
witness_warn() at witness_warn+0x4ae/frame 0xfe046a236350
trap_pfault() at trap_pfault+0x59/frame 0xfe046a2363f0
trap() at trap+0x45e/frame 0xfe046a236600
calltrap() at calltrap+0x8/frame 0xfe046a236600
- - --- trap 0xc, rip = 0x80d21279, rsp = 0xfe046a2366c0, rbp
= 0xfe046a2366d0 ---
bcopy() at bcopy+0x39/frame 0xfe046a2366d0
imgact_binmisc_exec() at imgact_binmisc_exec+0x23d/frame
0xfe046a236720
kern_execve() at kern_execve+0x4c6/frame 0xfe046a236a80
sys_execve() at sys_execve+0x37/frame 0xfe046a236ae0
amd64_syscall() at amd64_syscall+0x27f/frame 0xfe046a236bf0
Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfe046a236bf0
- - --- syscall (59, FreeBSD ELF64, sys_execve), rip = 0x4297ba, rsp =
0x7fffdaf8, rbp = 0x7fffdb00 ---


 
 @@ -404,12 +404,12 @@ imgact_binmisc_get_all_entries(struct sy 
 imgact_binmisc_entry_t *ibe; int error = 0, count;
 
 -mtx_lock(interp_list_mtx); +   sx_slock(interp_list_sx); count
 = interp_list_entry_count; /* Don't block in malloc() while
 holding lock. */ xbe = malloc(sizeof(*xbe) * count, M_BINMISC,
 M_NOWAIT|M_ZERO);
 This is definitely no longer true statement. Even the original use
 of M_NOWAIT there is not warranted.
 

Dead comment?  I should remove it then as it is
invalid/inaccurate/never was true?

I should remove M_NOWAIT as well?

Sean

trimmed CC list
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQF8BAEBCgBmBQJVgtzfXxSAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx
MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5kInoIAJ87XMcWE0p4ebkofYGlcdNP
wkDSUkICqBTTB/yV5O9aCcMd8umIVXrimIP8Xm4q/A9tt+CgB23DbmgHZsDOU2eE
OypHL2myI/SuEki6k4JtFItJg0JD6IuNi6gVG6Ps0ZKWm0SQHJ6vLSzEdBdY67EF
4cquOnnKiIMrn6qK9jCYzEm+6Nj3lf0roaE9DQLtZ58OfMSfHx2vDEBrlCzwRfEk
ih2oxAFnsM5LLoEXpfTaihyQRsTeLIVHAUIZ3Kw3G6021LbQhExUZPBp5uZOzzi7
Bl0wrBIJC/6O4uhY3TpnffpJuAnXf6IGzJ8u2jrz5wZ6tLScVVVdPaM6eAI33dQ=
=aN1P
-END PGP SIGNATURE-
___
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: r284557 - head/share/man/man9

2015-06-18 Thread Christian Brueffer
Author: brueffer
Date: Thu Jun 18 16:29:11 2015
New Revision: 284557
URL: https://svnweb.freebsd.org/changeset/base/284557

Log:
  Remove EOL whitespace.

Modified:
  head/share/man/man9/pci_iov_schema.9
  head/share/man/man9/sbuf.9
  head/share/man/man9/taskqueue.9

Modified: head/share/man/man9/pci_iov_schema.9
==
--- head/share/man/man9/pci_iov_schema.9Thu Jun 18 15:50:42 2015
(r284556)
+++ head/share/man/man9/pci_iov_schema.9Thu Jun 18 16:29:11 2015
(r284557)
@@ -67,7 +67,7 @@
 .Fn pci_iov_schema_add_unicast_mac nvlist_t *schema const char *name \
 uint32_t flags const uint8_t *defaultVal
 .Sh DESCRIPTION
-The PCI Single-Root I/O Virtualization 
+The PCI Single-Root I/O Virtualization
 .Pq SR-IOV
 configuration schema is a data
 structure that describes the device-specific configuration parameters that a PF
@@ -147,9 +147,9 @@ the VF was allowed to change its MAC add
 set this parameter as optional.
 The PF driver must either allow the MAC to change or not, so it would be more
 appropriate for the PF driver to document the default behaviour by specifying
-a default value in the schema 
+a default value in the schema
 .Po or potentially force the user to make the choice by setting the parameter
-to be required 
+to be required
 .Pc .
 .Pp
 Configuration parameters that have security implications must default to the
@@ -226,7 +226,7 @@ and having a
 type.
 Values of type
 .Vt uint32_t
-are unsigned integers in the range 0 to 
+are unsigned integers in the range 0 to
 .Po 2**32 - 1 Pc ,
 inclusive.
 .Pp
@@ -240,7 +240,7 @@ and having a
 type.
 Values of type
 .Vt uint64_t
-are unsigned integers in the range 0 to 
+are unsigned integers in the range 0 to
 .Po 2**64 - 1 Pc ,
 inclusive.
 .Pp

Modified: head/share/man/man9/sbuf.9
==
--- head/share/man/man9/sbuf.9  Thu Jun 18 15:50:42 2015(r284556)
+++ head/share/man/man9/sbuf.9  Thu Jun 18 16:29:11 2015(r284557)
@@ -117,7 +117,7 @@
 .Ft ssize_t
 .Fn sbuf_end_section struct sbuf *s ssize_t old_len size_t pad int c
 .Ft void
-.Fo sbuf_hexdump 
+.Fo sbuf_hexdump
 .Fa struct sbuf *sb
 .Fa void *ptr
 .Fa int length

Modified: head/share/man/man9/taskqueue.9
==
--- head/share/man/man9/taskqueue.9 Thu Jun 18 15:50:42 2015
(r284556)
+++ head/share/man/man9/taskqueue.9 Thu Jun 18 16:29:11 2015
(r284557)
@@ -288,11 +288,11 @@ are enqueued on the taskqueue to finish.
 Tasks posted to the taskqueue after
 .Fn taskqueue_drain_all
 begins processing,
-including pending enqueues scheduled by a previous call to 
+including pending enqueues scheduled by a previous call to
 .Fn taskqueue_enqueue_timeout ,
 do not extend the wait time of
 .Fn taskqueue_drain_all
-and may complete after 
+and may complete after
 .Fn taskqueue_drain_all
 returns.
 .Pp
___
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: r284562 - head/sys/arm/ti/am335x

2015-06-18 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Thu Jun 18 16:51:49 2015
New Revision: 284562
URL: https://svnweb.freebsd.org/changeset/base/284562

Log:
  Add missing driver for TDA19988 HDMI framer

Added:
  head/sys/arm/ti/am335x/tda19988.c   (contents, props changed)

Added: head/sys/arm/ti/am335x/tda19988.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/arm/ti/am335x/tda19988.c   Thu Jun 18 16:51:49 2015
(r284562)
@@ -0,0 +1,810 @@
+/*-
+ * Copyright (c) 2015 Oleksandr Tymoshenko go...@freebsd.org
+ * 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 sys/cdefs.h
+__FBSDID($FreeBSD$);
+/*
+* NXP TDA19988 HDMI encoder 
+*/
+#include sys/param.h
+#include sys/systm.h
+#include sys/kernel.h
+#include sys/module.h
+#include sys/clock.h
+#include sys/time.h
+#include sys/bus.h
+#include sys/resource.h
+#include sys/rman.h
+#include sys/types.h
+#include sys/systm.h
+
+#include dev/iicbus/iicbus.h
+#include dev/iicbus/iiconf.h
+
+#include dev/ofw/openfirm.h
+#include dev/ofw/ofw_bus.h
+#include dev/ofw/ofw_bus_subr.h
+
+#include dev/videomode/videomode.h
+#include dev/videomode/edidvar.h
+#include arm/ti/am335x/hdmi.h
+
+#include iicbus_if.h
+#include hdmi_if.h
+
+#defineMKREG(page, addr)   (((page)  8) | (addr))
+
+#defineREGPAGE(reg)(((reg)  8)  0xff)
+#defineREGADDR(reg)((reg)  0xff)
+
+#define TDA_VERSIONMKREG(0x00, 0x00)
+#define TDA_MAIN_CNTRL0MKREG(0x00, 0x01)
+#defineMAIN_CNTRL0_SR  (1  0)
+#define TDA_VERSION_MSBMKREG(0x00, 0x02)
+#defineTDA_SOFTRESET   MKREG(0x00, 0x0a)
+#defineSOFTRESET_I2C   (1  1)
+#defineSOFTRESET_AUDIO (1  0)
+#defineTDA_DDC_CTRLMKREG(0x00, 0x0b)
+#defineDDC_ENABLE  0
+#defineTDA_CCLKMKREG(0x00, 0x0c)
+#defineCCLK_ENABLE 1
+#defineTDA_INT_FLAGS_2 MKREG(0x00, 0x11)
+#defineINT_FLAGS_2_EDID_BLK_RD (1  1)
+
+#defineTDA_VIP_CNTRL_0 MKREG(0x00, 0x20)
+#defineTDA_VIP_CNTRL_1 MKREG(0x00, 0x21)
+#defineTDA_VIP_CNTRL_2 MKREG(0x00, 0x22)
+#defineTDA_VIP_CNTRL_3 MKREG(0x00, 0x23)
+#defineVIP_CNTRL_3_SYNC_HS (2  4)
+#defineVIP_CNTRL_3_V_TGL   (1  2)
+#defineVIP_CNTRL_3_H_TGL   (1  1)
+
+#defineTDA_VIP_CNTRL_4 MKREG(0x00, 0x24)
+#defineVIP_CNTRL_4_BLANKIT_NDE (0  2)
+#defineVIP_CNTRL_4_BLANKIT_HS_VS   (1  2)
+#defineVIP_CNTRL_4_BLANKIT_NHS_VS  (2  2)
+#defineVIP_CNTRL_4_BLANKIT_HE_VE   (3  2)
+#defineVIP_CNTRL_4_BLC_NONE(0  0)
+#defineVIP_CNTRL_4_BLC_RGB444  (1  0)
+#defineVIP_CNTRL_4_BLC_YUV444  (2  0)
+#defineVIP_CNTRL_4_BLC_YUV422  (3  0)
+#defineTDA_VIP_CNTRL_5 MKREG(0x00, 0x25)
+#defineVIP_CNTRL_5_SP_CNT(n)   (((n)  3)  1)
+#defineTDA_MUX_VP_VIP_OUT  MKREG(0x00, 0x27)
+#define TDA_MAT_CONTRL MKREG(0x00, 0x80)
+#defineMAT_CONTRL_MAT_BP   (1  2)
+#defineTDA_VIDFORMAT   MKREG(0x00, 0xa0)
+#defineTDA_REFPIX_MSB  MKREG(0x00, 0xa1)
+#defineTDA_REFPIX_LSB  MKREG(0x00, 0xa2)
+#defineTDA_REFLINE_MSB MKREG(0x00, 0xa3)
+#defineTDA_REFLINE_LSB MKREG(0x00, 0xa4)

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

2015-06-18 Thread Christian Brueffer
Author: brueffer
Date: Thu Jun 18 16:31:32 2015
New Revision: 284558
URL: https://svnweb.freebsd.org/changeset/base/284558

Log:
  Document title should be in CAPS.

Modified:
  head/share/man/man9/pci_iov_schema.9

Modified: head/share/man/man9/pci_iov_schema.9
==
--- head/share/man/man9/pci_iov_schema.9Thu Jun 18 16:29:11 2015
(r284557)
+++ head/share/man/man9/pci_iov_schema.9Thu Jun 18 16:31:32 2015
(r284558)
@@ -25,8 +25,8 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd May 28, 2015
-.Dt pci_iov_schema 9
+.Dd June 18, 2015
+.Dt PCI_IOV_SCHEMA 9
 .Os
 .Sh NAME
 .Nm pci_iov_schema ,
___
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: r284590 - in head/sys/boot: . common i386/loader

2015-06-18 Thread Baptiste Daroussin
Author: bapt
Date: Fri Jun 19 05:42:24 2015
New Revision: 284590
URL: https://svnweb.freebsd.org/changeset/base/284590

Log:
  Install loader(8) and zfsloader(8) only once
  
  Differential Revision:https://reviews.freebsd.org/D2841
  Reviewed by:  imp

Added:
  head/sys/boot/common/Makefile   (contents, props changed)
Modified:
  head/sys/boot/Makefile
  head/sys/boot/common/Makefile.inc
  head/sys/boot/i386/loader/Makefile

Modified: head/sys/boot/Makefile
==
--- head/sys/boot/Makefile  Fri Jun 19 05:09:02 2015(r284589)
+++ head/sys/boot/Makefile  Fri Jun 19 05:42:24 2015(r284590)
@@ -8,6 +8,8 @@ SUBDIR+=ficl
 SUBDIR+=   forth
 .endif
 
+SUBDIR+=   common
+
 .include bsd.arch.inc.mk
 
 # Pick the machine-dependent subdir based on the target architecture.

Added: head/sys/boot/common/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/boot/common/Makefile   Fri Jun 19 05:42:24 2015
(r284590)
@@ -0,0 +1,10 @@
+# $FreeBSD$
+
+.include src.opts.mk
+
+MAN+=  loader.8
+.if ${MK_ZFS} != no
+MAN+=  zfsloader.8
+.endif
+
+.include bsd.prog.mk

Modified: head/sys/boot/common/Makefile.inc
==
--- head/sys/boot/common/Makefile.inc   Fri Jun 19 05:09:02 2015
(r284589)
+++ head/sys/boot/common/Makefile.inc   Fri Jun 19 05:42:24 2015
(r284590)
@@ -68,8 +68,3 @@ CFLAGS+=  -DBOOT_PROMPT_123
 SRCS+= install.c
 CFLAGS+=-I${.CURDIR}/../../../../lib/libstand
 .endif
-
-MAN+=  loader.8
-.if ${MK_ZFS} != no
-MAN+=  zfsloader.8
-.endif

Modified: head/sys/boot/i386/loader/Makefile
==
--- head/sys/boot/i386/loader/Makefile  Fri Jun 19 05:09:02 2015
(r284589)
+++ head/sys/boot/i386/loader/Makefile  Fri Jun 19 05:42:24 2015
(r284590)
@@ -5,6 +5,7 @@ MK_SSP= no
 
 LOADER?=   loader
 PROG=  ${LOADER}.sym
+MAN=   
 INTERNALPROG=
 NEWVERSWHAT?=  bootstrap loader x86
 
___
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: r284588 - head/sys/dev/iwn

2015-06-18 Thread Adrian Chadd
Author: adrian
Date: Fri Jun 19 01:44:17 2015
New Revision: 284588
URL: https://svnweb.freebsd.org/changeset/base/284588

Log:
  First cut at attempting to buffer frames until we see a beacon.
  
  The iwn(4) firmware forgets most of its channel state after an RXON
  command.  This means that any beacons its seen on passive 5GHz channels
  are forgotten upon an association/authorisation request.
  This unfortuantely means that 5GHz association almost always fails -
  the assoc and/or auth frames are dropped with a status of passive
  channel, haven't seen a beacon yet. (0x90.)
  
  So:
  
  * add an xmit queue, global, to buffer frames
  * modify the xmit path to use the mbuf tag from net80211
to specify raw frame details
  * buffer xmit frames from both raw and non-raw paths
  * if a beacon is seen in the RX path, schedule a taskqueue to
send said frames and un-buffer things.
  * flush frames during state change back to INIT, or NIC
down/up/detach.
  
  This isn't the final shape I'd like this to be in but it certainly
  is better than 5GHz not working at all.
  
  Tested:
  
  * Intel 5100, STA mode (before spilling coffee)
  * Intel 5300, STA mode (after spilling coffee)
  
  Story:
  
  * This has been bugging me at work for months, which I just
worked around by throwing an ath(4) into my Lenovo T400 cardbus
slot.
  
  * Our ops director discovered indeed FreeBSD runs well on the
Lenovo T420p, except for that pesky 5GHz thing.  So now developers
also can have a T420p running FreeBSD to do work with.
Their #1 feedback to me - boy it'd be nice if 5GHz wifi worked.
  
  * .. then, I was at NANOG but stuck with 5GHz only wifi and no ath(4)
NIC to put in a laptop - and I snapped.
  
  Thus, the reason this is actually work related.
  
  MFC after:2 weeks
  Sponsored by: Norse Corp, Inc.

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

Modified: head/sys/dev/iwn/if_iwn.c
==
--- head/sys/dev/iwn/if_iwn.c   Fri Jun 19 01:21:10 2015(r284587)
+++ head/sys/dev/iwn/if_iwn.c   Fri Jun 19 01:44:17 2015(r284588)
@@ -232,6 +232,7 @@ static int  iwn_tx_data(struct iwn_softc 
 static int iwn_tx_data_raw(struct iwn_softc *, struct mbuf *,
struct ieee80211_node *,
const struct ieee80211_bpf_params *params);
+static voidiwn_xmit_task(void *arg0, int pending);
 static int iwn_raw_xmit(struct ieee80211_node *, struct mbuf *,
const struct ieee80211_bpf_params *);
 static voidiwn_start(struct ifnet *);
@@ -682,6 +683,9 @@ iwn_attach(device_t dev)
TASK_INIT(sc-sc_radioon_task, 0, iwn_radio_on, sc);
TASK_INIT(sc-sc_radiooff_task, 0, iwn_radio_off, sc);
TASK_INIT(sc-sc_panic_task, 0, iwn_panicked, sc);
+   TASK_INIT(sc-sc_xmit_task, 0, iwn_xmit_task, sc);
+
+   mbufq_init(sc-sc_xmit_queue, 1024);
 
sc-sc_tq = taskqueue_create(iwn_taskq, M_WAITOK,
taskqueue_thread_enqueue, sc-sc_tq);
@@ -1360,6 +1364,28 @@ iwn_vap_delete(struct ieee80211vap *vap)
free(ivp, M_80211_VAP);
 }
 
+static void
+iwn_xmit_queue_drain(struct iwn_softc *sc)
+{
+   struct mbuf *m;
+   struct ieee80211_node *ni;
+
+   IWN_LOCK_ASSERT(sc);
+   while ((m = mbufq_dequeue(sc-sc_xmit_queue)) != NULL) {
+   ni = (struct ieee80211_node *)m-m_pkthdr.rcvif;
+   ieee80211_free_node(ni);
+   m_freem(m);
+   }
+}
+
+static int
+iwn_xmit_queue_enqueue(struct iwn_softc *sc, struct mbuf *m)
+{
+
+   IWN_LOCK_ASSERT(sc);
+   return (mbufq_enqueue(sc-sc_xmit_queue, m));
+}
+
 static int
 iwn_detach(device_t dev)
 {
@@ -1373,6 +1399,11 @@ iwn_detach(device_t dev)
if (ifp != NULL) {
ic = ifp-if_l2com;
 
+   /* Free the mbuf queue and node references */
+   IWN_LOCK(sc);
+   iwn_xmit_queue_drain(sc);
+   IWN_UNLOCK(sc);
+
ieee80211_draintask(ic, sc-sc_reinit_task);
ieee80211_draintask(ic, sc-sc_radioon_task);
ieee80211_draintask(ic, sc-sc_radiooff_task);
@@ -2831,6 +2862,9 @@ iwn_newstate(struct ieee80211vap *vap, e
sc-rxon-filter = ~htole32(IWN_FILTER_BSS);
sc-calib.state = IWN_CALIB_STATE_INIT;
 
+   /* Wait until we hear a beacon before we transmit */
+   sc-sc_beacon_wait = 1;
+
if ((error = iwn_auth(sc, vap)) != 0) {
device_printf(sc-sc_dev,
%s: could not move to auth state\n, __func__);
@@ -2846,6 +2880,9 @@ iwn_newstate(struct ieee80211vap *vap, e
break;
}
 
+   /* Wait until we hear a beacon before we transmit */
+   sc-sc_beacon_wait = 1;
+
/*
 * !RUN - RUN requires setting the 

svn commit: r284589 - head/usr.sbin/fstyp

2015-06-18 Thread Allan Jude
Author: allanjude (doc committer)
Date: Fri Jun 19 05:09:02 2015
New Revision: 284589
URL: https://svnweb.freebsd.org/changeset/base/284589

Log:
  Add the ability to detect ZFS and GELI encrypted file systems to fstyp(8)
  
  Functionality is hidden behind the -u flag to avoid confusing automounters
  
  PR:   200823
  Reviewed by:  asomers, eadler, wblock (man page)
  Approved by:  trasz
  MFC after:10 days
  Relnotes: yes
  Sponsored by: ScaleEngine Inc.
  Differential Revision:https://reviews.freebsd.org/D2045

Added:
  head/usr.sbin/fstyp/geli.c   (contents, props changed)
  head/usr.sbin/fstyp/zfs.c   (contents, props changed)
Modified:
  head/usr.sbin/fstyp/Makefile
  head/usr.sbin/fstyp/fstyp.8
  head/usr.sbin/fstyp/fstyp.c
  head/usr.sbin/fstyp/fstyp.h

Modified: head/usr.sbin/fstyp/Makefile
==
--- head/usr.sbin/fstyp/MakefileFri Jun 19 01:44:17 2015
(r284588)
+++ head/usr.sbin/fstyp/MakefileFri Jun 19 05:09:02 2015
(r284589)
@@ -1,9 +1,41 @@
 # $FreeBSD$
 
+.include src.opts.mk
+
 PROG=  fstyp
-SRCS=  fstyp.c ext2fs.c cd9660.c msdosfs.c ntfs.c ufs.c
+SRCS=  cd9660.c ext2fs.c fstyp.c geli.c msdosfs.c ntfs.c ufs.c
+
+.if ${MK_CDDL} != no
+SRCS +=zfs.c
+.endif
+
 MAN=   fstyp.8
 
 WARNS= 6
 
+.if ${MK_CDDL} != no
+IGNORE_PRAGMA=  YES
+
+CFLAGS+= -DNEED_SOLARIS_BOOLEAN -DHAVE_CDDL
+CFLAGS+= -I${.CURDIR}/../../sys/cddl/compat/opensolaris
+CFLAGS+= -I${.CURDIR}/../../cddl/compat/opensolaris/include
+CFLAGS+= -I${.CURDIR}/../../cddl/compat/opensolaris/lib/libumem
+CFLAGS+= -I${.CURDIR}/../../cddl/contrib/opensolaris/lib/libnvpair
+CFLAGS+= -I${.CURDIR}/../../cddl/contrib/opensolaris/lib/libzpool/common
+CFLAGS+= -I${.CURDIR}/../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs
+CFLAGS+= -I${.CURDIR}/../../sys/cddl/contrib/opensolaris/uts/common
+CFLAGS+= -I${.CURDIR}/../../sys/cddl/contrib/opensolaris/uts/common/sys
+CFLAGS+= -I${.CURDIR}/../../cddl/contrib/opensolaris/head
+.endif
+
+CFLAGS+=-I${.CURDIR}/../../sys
+
+DPADD=   ${LIBGEOM} ${LIBMD}
+LDADD=   -lgeom -lmd
+
+.if ${MK_CDDL} != no
+DPADD += ${LIBNVPAIR} ${LIBZFS}
+LDADD += -lnvpair -lzfs
+.endif
+
 .include bsd.prog.mk

Modified: head/usr.sbin/fstyp/fstyp.8
==
--- head/usr.sbin/fstyp/fstyp.8 Fri Jun 19 01:44:17 2015(r284588)
+++ head/usr.sbin/fstyp/fstyp.8 Fri Jun 19 05:09:02 2015(r284589)
@@ -27,7 +27,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd January 14, 2015
+.Dd June 15, 2015
 .Dt FSTYP 8
 .Os
 .Sh NAME
@@ -37,20 +37,42 @@
 .Nm
 .Op Fl l
 .Op Fl s
+.Op Fl u
 .Ar special
 .Sh DESCRIPTION
 The
 .Nm
 utility is used to determine the filesystem type on a given device.
 It can recognize ISO-9660, Ext2, FAT, NTFS, and UFS filesystems.
+When the
+.Fl u
+flag is specified,
+.Nm
+also recognizes certain additional metadata formats that cannot be
+handled using
+.Xr mount 8 ,
+such as ZFS pools and
+.Xr geli 8
+providers.
+.Pp
 The filesystem name is printed to the standard output
-as, respectively,
-.Li cd9660 ,
-.Li ext2fs ,
-.Li msdosfs ,
-.Li ntfs ,
-or
-.Li ufs .
+as, respectively:
+.Bl -item -offset indent -compact
+.It
+cd9660
+.It
+ext2fs
+.It
+geli
+.It
+msdosfs
+.It
+ntfs
+.It
+ufs
+.It
+zfs
+.El
 .Pp
 Because
 .Nm
@@ -73,6 +95,9 @@ By default,
 only works on regular files and disk-like device nodes.
 Trying to read other file types might have unexpected consequences or hang
 indefinitely.
+.It Fl u
+Include filesystems and devices that cannot be mounted directly by
+.Xr mount 8 .
 .El
 .Sh EXIT STATUS
 The
@@ -82,8 +107,11 @@ type is not recognized.
 .Sh SEE ALSO
 .Xr file 1 ,
 .Xr capsicum 4 ,
+.Xr autofs 8 ,
+.Xr geli 8 ,
 .Xr glabel 8 ,
-.Xr mount 8
+.Xr mount 8 ,
+.Xr zpool 8
 .Sh HISTORY
 The
 .Nm
@@ -95,3 +123,5 @@ The
 utility was developed by
 .An Edward Tomasz Napierala Aq Mt tr...@freebsd.org
 under sponsorship from the FreeBSD Foundation.
+ZFS and GELI support was added by
+.An Allan Jude Aq Mt allanj...@freebsd.org

Modified: head/usr.sbin/fstyp/fstyp.c
==
--- head/usr.sbin/fstyp/fstyp.c Fri Jun 19 01:44:17 2015(r284588)
+++ head/usr.sbin/fstyp/fstyp.c Fri Jun 19 05:09:02 2015(r284589)
@@ -55,13 +55,18 @@ typedef int (*fstyp_function)(FILE *, ch
 static struct {
const char  *name;
fstyp_function  function;
+   boolunmountable;
 } fstypes[] = {
-   { cd9660, fstyp_cd9660 },
-   { ext2fs, fstyp_ext2fs },
-   { msdosfs, fstyp_msdosfs },
-   { ntfs, fstyp_ntfs },
-   { ufs, fstyp_ufs },
-   { NULL, NULL }
+   { cd9660, fstyp_cd9660, false },
+   { ext2fs, fstyp_ext2fs, false },
+   { geli, fstyp_geli, true },
+   { msdosfs, fstyp_msdosfs, false },
+   { ntfs, fstyp_ntfs, false },
+   { ufs, fstyp_ufs, false },
+#ifdef HAVE_CDDL
+   { 

svn commit: r284587 - head/sys/conf

2015-06-18 Thread Adrian Chadd
Author: adrian
Date: Fri Jun 19 01:21:10 2015
New Revision: 284587
URL: https://svnweb.freebsd.org/changeset/base/284587

Log:
  Add in library routines not supplied by gcc-4.9 but required by the kernel.
  
  Reviewed by:  imp

Modified:
  head/sys/conf/files.mips

Modified: head/sys/conf/files.mips
==
--- head/sys/conf/files.mipsFri Jun 19 00:53:15 2015(r284586)
+++ head/sys/conf/files.mipsFri Jun 19 01:21:10 2015(r284587)
@@ -61,6 +61,8 @@ libkern/flsll.c   standard
 libkern/memmove.c  standard
 libkern/cmpdi2.c   optionalmips | mipsel
 libkern/ucmpdi2.c  optionalmips | mipsel
+libkern/ashldi3.c  standard
+libkern/ashrdi3.c  standard
 
 # cfe support
 dev/cfe/cfe_api.c  optionalcfe
___
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: r284566 - head/sys/netinet

2015-06-18 Thread Andrey V. Elsukov
Author: ae
Date: Thu Jun 18 18:28:38 2015
New Revision: 284566
URL: https://svnweb.freebsd.org/changeset/base/284566

Log:
  Fix possible use after free in encap[46]_input().
  There is small window, when encap_detach() can free matched entry
  directly after we release encapmtx. Instead of use pointer to the
  matched entry, save pointers to needed variables from this entry
  and use them after release mutex.
  
  Pass argument stored in the encaptab entry to encap_fillarg(), instead
  of pointer to matched entry. Also do not allocate new mbuf tag, when
  argument that we plan to save in this tag is NULL.
  
  Also make encaptab variable static.
  
  Obtained from:Yandex LLC
  Sponsored by: Yandex LLC

Modified:
  head/sys/netinet/ip_encap.c

Modified: head/sys/netinet/ip_encap.c
==
--- head/sys/netinet/ip_encap.c Thu Jun 18 17:42:24 2015(r284565)
+++ head/sys/netinet/ip_encap.c Thu Jun 18 18:28:38 2015(r284566)
@@ -95,14 +95,14 @@ static MALLOC_DEFINE(M_NETADDR, encap_e
 static void encap_add(struct encaptab *);
 static int mask_match(const struct encaptab *, const struct sockaddr *,
const struct sockaddr *);
-static void encap_fillarg(struct mbuf *, const struct encaptab *);
+static void encap_fillarg(struct mbuf *, void *);
 
 /*
  * All global variables in ip_encap.c are locked using encapmtx.
  */
 static struct mtx encapmtx;
 MTX_SYSINIT(encapmtx, encapmtx, encapmtx, MTX_DEF);
-LIST_HEAD(, encaptab) encaptab = LIST_HEAD_INITIALIZER(encaptab);
+static LIST_HEAD(, encaptab) encaptab = LIST_HEAD_INITIALIZER(encaptab);
 
 /*
  * We currently keey encap_init() for source code compatibility reasons --
@@ -122,12 +122,12 @@ encap4_input(struct mbuf **mp, int *offp
struct sockaddr_in s, d;
const struct protosw *psw;
struct encaptab *ep, *match;
+   void *arg;
int matchprio, off, prio;
 
m = *mp;
off = *offp;
ip = mtod(m, struct ip *);
-   *mp = NULL;
 
bzero(s, sizeof(s));
s.sin_family = AF_INET;
@@ -138,6 +138,8 @@ encap4_input(struct mbuf **mp, int *offp
d.sin_len = sizeof(struct sockaddr_in);
d.sin_addr = ip-ip_dst;
 
+   arg = NULL;
+   psw = NULL;
match = NULL;
matchprio = 0;
mtx_lock(encapmtx);
@@ -182,14 +184,16 @@ encap4_input(struct mbuf **mp, int *offp
match = ep;
}
}
+   if (match != NULL) {
+   psw = match-psw;
+   arg = match-arg;
+   }
mtx_unlock(encapmtx);
 
-   if (match) {
+   if (match != NULL) {
/* found a match, match has the best one */
-   psw = match-psw;
-   if (psw  psw-pr_input) {
-   encap_fillarg(m, match);
-   *mp = m;
+   if (psw != NULL  psw-pr_input != NULL) {
+   encap_fillarg(m, arg);
(*psw-pr_input)(mp, offp, proto);
} else
m_freem(m);
@@ -197,7 +201,6 @@ encap4_input(struct mbuf **mp, int *offp
}
 
/* last resort: inject to raw socket */
-   *mp = m;
return (rip_input(mp, offp, proto));
 }
 #endif
@@ -211,6 +214,7 @@ encap6_input(struct mbuf **mp, int *offp
struct sockaddr_in6 s, d;
const struct protosw *psw;
struct encaptab *ep, *match;
+   void *arg;
int prio, matchprio;
 
ip6 = mtod(m, struct ip6_hdr *);
@@ -224,6 +228,8 @@ encap6_input(struct mbuf **mp, int *offp
d.sin6_len = sizeof(struct sockaddr_in6);
d.sin6_addr = ip6-ip6_dst;
 
+   arg = NULL;
+   psw = NULL;
match = NULL;
matchprio = 0;
mtx_lock(encapmtx);
@@ -251,17 +257,20 @@ encap6_input(struct mbuf **mp, int *offp
match = ep;
}
}
+   if (match != NULL) {
+   psw = match-psw;
+   arg = match-arg;
+   }
mtx_unlock(encapmtx);
 
-   if (match) {
+   if (match != NULL) {
/* found a match */
-   psw = match-psw;
-   if (psw  psw-pr_input) {
-   encap_fillarg(m, match);
+   if (psw != NULL  psw-pr_input != NULL) {
+   encap_fillarg(m, arg);
return (*psw-pr_input)(mp, offp, proto);
} else {
m_freem(m);
-   return IPPROTO_DONE;
+   return (IPPROTO_DONE);
}
}
 
@@ -440,14 +449,16 @@ mask_match(const struct encaptab *ep, co
 }
 
 static void
-encap_fillarg(struct mbuf *m, const struct encaptab *ep)
+encap_fillarg(struct mbuf *m, void *arg)
 {
struct m_tag *tag;
 
-   tag = m_tag_get(PACKET_TAG_ENCAP, sizeof (void*), M_NOWAIT);
-   if (tag) {
-   

Re: svn commit: r284345 - in head: . bin/cat bin/chflags bin/chio bin/chmod bin/cp bin/csh bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/expr bin/freebsd-version bin/getfacl bin/hostname b

2015-06-18 Thread Simon J. Gerraty
Ian Lepore i...@freebsd.org wrote:
  I agree but 8 - 11 is a very big jump.
 
 Not really.  We're in the midst of such a change at $work, but it will

Yes we still use 7.x on most machines - these can build head just fine,
but it is a reasonably controlled environment, with minimal
dependence on the host env.

I was speaking more in terms of the project's boundaries on what they
are willing to support.

 machinery.  The fmake-bmake change has been fairly painful; it's only
 working at all for us because I've hacked fmake on 6.x and 8.x to
 support a few crucial bmake features.

Yes, a common theme at most vendor summits is the ever increasing
maintenance cost of falling behind.

___
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: r284567 - head/release

2015-06-18 Thread Glen Barber
Author: gjb
Date: Thu Jun 18 19:20:00 2015
New Revision: 284567
URL: https://svnweb.freebsd.org/changeset/base/284567

Log:
  Add Makefile.azure, used to upload VHD images to the
  Microsoft Azure environment, similar to the EC2 AMIs.
  
  MFC after:3 days
  Tested with:  stable/10@r284517 (patched)
  Sponsored by: The FreeBSD Foundation

Added:
  head/release/Makefile.azure   (contents, props changed)
Modified:
  head/release/Makefile.vm

Added: head/release/Makefile.azure
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/release/Makefile.azure Thu Jun 18 19:20:00 2015(r284567)
@@ -0,0 +1,53 @@
+#
+# $FreeBSD$
+#
+#
+# Makefile for uploading Microsoft Azure disk images.
+#
+
+AZURE_IMG?=${.OBJDIR}/azure.vhdf
+AZURE_UPLOAD_TGTS= azure-check-depends \
+   azure-do-upload
+CLEANFILES+=   ${AZURE_UPLOAD_TGTS}
+
+.if defined(AZURE_UPLOAD_CONF)  !empty(AZURE_UPLOAD_CONF)
+. for VAR in _STORAGE _ACCOUNT _KEY
+AZURE${VAR}!=  grep -E ^AZURE${VAR} ${AZURE_UPLOAD_CONF} | awk -F' ' 
'{print $$2}'
+. endfor
+.endif
+
+.if ${BRANCH} == STABLE || ${BRANCH} == CURRENT
+SNAPSHOT_DATE!=date +-%Y-%m-%d
+.endif
+
+AZURE_TARGET:= ${OSRELEASE}${SNAPSHOT_DATE}.vhd
+
+azure-upload:  ${AZURE_UPLOAD_TGTS}
+
+azure-check-depends:
+.for VAR in _STORAGE _ACCOUNT _KEY
+. if !defined(AZURE${VAR}) || empty(AZURE${VAR})
+   @echo Variable AZURE${VAR} cannot be empty.
+   @false
+. endif
+.endfor
+.if !exists(/usr/local/bin/azure)
+. if !exists(/usr/local/bin/npm)
+.  if !exists(${PORTSDIR}/www/npm/Makefile)
+.   if !exists(/usr/local/sbin/pkg-static)
+   env ASSUME_ALWAYS_YES=yes pkg bootstrap -yf
+.   endif
+   env ASSUME_ALWAYS_YES=yes pkg install -y www/npm
+.  else
+   make -C ${PORTSDIR}/www/npm BATCH=1 all install clean
+.  endif
+. endif
+   npm install -g azure-cli
+.endif
+
+azure-do-upload:
+   /usr/local/bin/azure storage blob upload \
+   ${AZURE_IMG} ${AZURE_STORAGE} ${AZURE_TARGET} \
+   -t page -a ${AZURE_ACCOUNT} -k ${AZURE_KEY}
+   touch ${.OBJDIR}/${.TARGET}
+

Modified: head/release/Makefile.vm
==
--- head/release/Makefile.vmThu Jun 18 18:28:38 2015(r284566)
+++ head/release/Makefile.vmThu Jun 18 19:20:00 2015(r284567)
@@ -154,3 +154,4 @@ cloudware-install:
 .endif
 
 .include ${.CURDIR}/Makefile.ec2
+.include ${.CURDIR}/Makefile.azure
___
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: r284578 - head/kerberos5/lib/libhx509

2015-06-18 Thread Jung-uk Kim
Author: jkim
Date: Thu Jun 18 21:18:43 2015
New Revision: 284578
URL: https://svnweb.freebsd.org/changeset/base/284578

Log:
  Fix a typo introduced in r262209.
  
  MFC after:3 days

Modified:
  head/kerberos5/lib/libhx509/Makefile

Modified: head/kerberos5/lib/libhx509/Makefile
==
--- head/kerberos5/lib/libhx509/MakefileThu Jun 18 20:59:48 2015
(r284577)
+++ head/kerberos5/lib/libhx509/MakefileThu Jun 18 21:18:43 2015
(r284578)
@@ -268,7 +268,7 @@ CLEANFILES= ${GEN} ${GEN:S/.x$/.c/:S/.hx
 
 INCS+= ocsp_asn1.h pkcs10_asn1.h crmf_asn1.h
 
-.ORDER: ${GEN_OSCP}
+.ORDER: ${GEN_OCSP}
 ${GEN_OCSP}: ocsp.asn1 ocsp.opt
${ASN1_COMPILE} --option-file=${.ALLSRC:M*.opt} \
 ${.ALLSRC:M*.asn1} ocsp_asn1
___
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: r284582 - in head: sys/geom/label usr.sbin/fstyp

2015-06-18 Thread Edward Tomasz Napierala
Author: trasz
Date: Thu Jun 18 21:55:55 2015
New Revision: 284582
URL: https://svnweb.freebsd.org/changeset/base/284582

Log:
  Fix off-by-one error in fstyp(8) and geom_label(4) that made them use
  a single space ( ) as a CD9660 label name when no label was present.
  Similar problem was also present in msdosfs label recognition.
  
  PR:   200828
  Differential Revision:https://reviews.freebsd.org/D2830
  Reviewed by:  asomers@, emaste@
  MFC after:2 weeks
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/geom/label/g_label.c
  head/sys/geom/label/g_label.h
  head/sys/geom/label/g_label_iso9660.c
  head/sys/geom/label/g_label_msdosfs.c
  head/usr.sbin/fstyp/cd9660.c
  head/usr.sbin/fstyp/fstyp.c
  head/usr.sbin/fstyp/fstyp.h
  head/usr.sbin/fstyp/msdosfs.c

Modified: head/sys/geom/label/g_label.c
==
--- head/sys/geom/label/g_label.c   Thu Jun 18 21:25:07 2015
(r284581)
+++ head/sys/geom/label/g_label.c   Thu Jun 18 21:55:55 2015
(r284582)
@@ -40,6 +40,7 @@ __FBSDID($FreeBSD$);
 #include sys/malloc.h
 #include sys/libkern.h
 #include sys/sbuf.h
+#include sys/stddef.h
 #include sys/sysctl.h
 #include geom/geom.h
 #include geom/geom_slice.h
@@ -96,6 +97,20 @@ const struct g_label_desc *g_labels[] = 
NULL
 };
 
+void
+g_label_rtrim(char *label, size_t size)
+{
+   ptrdiff_t i;
+
+   for (i = size - 1; i = 0; i--) {
+   if (label[i] == '\0')
+   continue;
+   else if (label[i] == ' ')
+   label[i] = '\0';
+   else
+   break;
+   }
+}
 
 static int
 g_label_destroy_geom(struct gctl_req *req __unused, struct g_class *mp,

Modified: head/sys/geom/label/g_label.h
==
--- head/sys/geom/label/g_label.h   Thu Jun 18 21:25:07 2015
(r284581)
+++ head/sys/geom/label/g_label.h   Thu Jun 18 21:55:55 2015
(r284582)
@@ -86,6 +86,8 @@ extern struct g_label_desc g_label_ntfs;
 extern struct g_label_desc g_label_gpt;
 extern struct g_label_desc g_label_gpt_uuid;
 extern struct g_label_desc g_label_disk_ident;
+
+extern void g_label_rtrim(char *label, size_t size);
 #endif /* _KERNEL */
 
 struct g_label_metadata {

Modified: head/sys/geom/label/g_label_iso9660.c
==
--- head/sys/geom/label/g_label_iso9660.c   Thu Jun 18 21:25:07 2015
(r284581)
+++ head/sys/geom/label/g_label_iso9660.c   Thu Jun 18 21:55:55 2015
(r284582)
@@ -47,7 +47,6 @@ g_label_iso9660_taste(struct g_consumer 
 {
struct g_provider *pp;
char *sector, *volume;
-   int i;
 
g_topology_assert_not();
pp = cp-provider;
@@ -68,14 +67,7 @@ g_label_iso9660_taste(struct g_consumer 
bzero(label, size);
strlcpy(label, volume, MIN(size, VOLUME_LEN));
g_free(sector);
-   for (i = size - 1; i  0; i--) {
-   if (label[i] == '\0')
-   continue;
-   else if (label[i] == ' ')
-   label[i] = '\0';
-   else
-   break;
-   }
+   g_label_rtrim(label, size);
 }
 
 struct g_label_desc g_label_iso9660 = {

Modified: head/sys/geom/label/g_label_msdosfs.c
==
--- head/sys/geom/label/g_label_msdosfs.c   Thu Jun 18 21:25:07 2015
(r284581)
+++ head/sys/geom/label/g_label_msdosfs.c   Thu Jun 18 21:55:55 2015
(r284582)
@@ -48,7 +48,6 @@ g_label_msdosfs_taste(struct g_consumer 
FAT32_BSBPB *pfat32_bsbpb;
FAT_DES *pfat_entry;
uint8_t *sector0, *sector;
-   uint32_t i;
 
g_topology_assert_not();
pp = cp-provider;
@@ -200,14 +199,7 @@ g_label_msdosfs_taste(struct g_consumer 
}
 
 endofchecks:
-   for (i = size - 1; i  0; i--) {
-   if (label[i] == '\0')
-   continue;
-   else if (label[i] == ' ')
-   label[i] = '\0';
-   else
-   break;
-   }
+   g_label_rtrim(label, size);
 
 error:
if (sector0 != NULL)

Modified: head/usr.sbin/fstyp/cd9660.c
==
--- head/usr.sbin/fstyp/cd9660.cThu Jun 18 21:25:07 2015
(r284581)
+++ head/usr.sbin/fstyp/cd9660.cThu Jun 18 21:55:55 2015
(r284582)
@@ -45,7 +45,6 @@ int
 fstyp_cd9660(FILE *fp, char *label, size_t size)
 {
char *sector, *volume;
-   int i;
 
sector = read_buf(fp, ISO9660_OFFSET, 512);
if (sector == NULL)
@@ -58,13 +57,6 @@ fstyp_cd9660(FILE *fp, char *label, size
bzero(label, size);
strlcpy(label, volume, MIN(size, VOLUME_LEN));
  

svn commit: r284583 - in head/sys: contrib/dev/acpica contrib/dev/acpica/common contrib/dev/acpica/compiler contrib/dev/acpica/components/debugger contrib/dev/acpica/components/disassembler contrib...

2015-06-18 Thread Jung-uk Kim
Author: jkim
Date: Thu Jun 18 23:14:45 2015
New Revision: 284583
URL: https://svnweb.freebsd.org/changeset/base/284583

Log:
  Merge ACPICA 20150619.

Added:
  head/sys/contrib/dev/acpica/include/acclib.h
 - copied unchanged from r284563, 
vendor-sys/acpica/dist/source/include/acclib.h
Modified:
  head/sys/contrib/dev/acpica/acpica_prep.sh
  head/sys/contrib/dev/acpica/changes.txt
  head/sys/contrib/dev/acpica/common/adisasm.c
  head/sys/contrib/dev/acpica/common/ahids.c
  head/sys/contrib/dev/acpica/common/ahpredef.c
  head/sys/contrib/dev/acpica/common/ahuuids.c
  head/sys/contrib/dev/acpica/common/dmextern.c
  head/sys/contrib/dev/acpica/common/dmrestag.c
  head/sys/contrib/dev/acpica/common/dmtable.c
  head/sys/contrib/dev/acpica/common/dmtbdump.c
  head/sys/contrib/dev/acpica/common/dmtbinfo.c
  head/sys/contrib/dev/acpica/common/getopt.c
  head/sys/contrib/dev/acpica/compiler/aslanalyze.c
  head/sys/contrib/dev/acpica/compiler/aslascii.c
  head/sys/contrib/dev/acpica/compiler/aslcodegen.c
  head/sys/contrib/dev/acpica/compiler/aslcompile.c
  head/sys/contrib/dev/acpica/compiler/aslcompiler.h
  head/sys/contrib/dev/acpica/compiler/aslcompiler.l
  head/sys/contrib/dev/acpica/compiler/asldefine.h
  head/sys/contrib/dev/acpica/compiler/aslerror.c
  head/sys/contrib/dev/acpica/compiler/aslfileio.c
  head/sys/contrib/dev/acpica/compiler/aslfiles.c
  head/sys/contrib/dev/acpica/compiler/aslfold.c
  head/sys/contrib/dev/acpica/compiler/aslglobal.h
  head/sys/contrib/dev/acpica/compiler/aslmain.c
  head/sys/contrib/dev/acpica/compiler/aslmapenter.c
  head/sys/contrib/dev/acpica/compiler/aslmapoutput.c
  head/sys/contrib/dev/acpica/compiler/aslmethod.c
  head/sys/contrib/dev/acpica/compiler/aslopcodes.c
  head/sys/contrib/dev/acpica/compiler/asloperands.c
  head/sys/contrib/dev/acpica/compiler/aslopt.c
  head/sys/contrib/dev/acpica/compiler/asloptions.c
  head/sys/contrib/dev/acpica/compiler/aslprintf.c
  head/sys/contrib/dev/acpica/compiler/aslstartup.c
  head/sys/contrib/dev/acpica/compiler/aslsupport.l
  head/sys/contrib/dev/acpica/compiler/asltypes.h
  head/sys/contrib/dev/acpica/compiler/aslutils.c
  head/sys/contrib/dev/acpica/compiler/asluuid.c
  head/sys/contrib/dev/acpica/compiler/dtcompile.c
  head/sys/contrib/dev/acpica/compiler/dtcompiler.h
  head/sys/contrib/dev/acpica/compiler/dtexpress.c
  head/sys/contrib/dev/acpica/compiler/dtfield.c
  head/sys/contrib/dev/acpica/compiler/dtio.c
  head/sys/contrib/dev/acpica/compiler/dtparser.y
  head/sys/contrib/dev/acpica/compiler/dtsubtable.c
  head/sys/contrib/dev/acpica/compiler/dttable.c
  head/sys/contrib/dev/acpica/compiler/dttemplate.c
  head/sys/contrib/dev/acpica/compiler/dttemplate.h
  head/sys/contrib/dev/acpica/compiler/dtutils.c
  head/sys/contrib/dev/acpica/compiler/prparser.y
  head/sys/contrib/dev/acpica/compiler/prscan.c
  head/sys/contrib/dev/acpica/compiler/prutils.c
  head/sys/contrib/dev/acpica/components/debugger/dbcmds.c
  head/sys/contrib/dev/acpica/components/debugger/dbconvert.c
  head/sys/contrib/dev/acpica/components/debugger/dbdisply.c
  head/sys/contrib/dev/acpica/components/debugger/dbexec.c
  head/sys/contrib/dev/acpica/components/debugger/dbfileio.c
  head/sys/contrib/dev/acpica/components/debugger/dbhistry.c
  head/sys/contrib/dev/acpica/components/debugger/dbinput.c
  head/sys/contrib/dev/acpica/components/debugger/dbmethod.c
  head/sys/contrib/dev/acpica/components/debugger/dbnames.c
  head/sys/contrib/dev/acpica/components/debugger/dbtest.c
  head/sys/contrib/dev/acpica/components/debugger/dbutils.c
  head/sys/contrib/dev/acpica/components/debugger/dbxface.c
  head/sys/contrib/dev/acpica/components/disassembler/dmbuffer.c
  head/sys/contrib/dev/acpica/components/disassembler/dmcstyle.c
  head/sys/contrib/dev/acpica/components/disassembler/dmopcode.c
  head/sys/contrib/dev/acpica/components/dispatcher/dsfield.c
  head/sys/contrib/dev/acpica/components/dispatcher/dsinit.c
  head/sys/contrib/dev/acpica/components/dispatcher/dsobject.c
  head/sys/contrib/dev/acpica/components/dispatcher/dsutils.c
  head/sys/contrib/dev/acpica/components/dispatcher/dswload.c
  head/sys/contrib/dev/acpica/components/events/evgpe.c
  head/sys/contrib/dev/acpica/components/events/evgpeinit.c
  head/sys/contrib/dev/acpica/components/executer/exconfig.c
  head/sys/contrib/dev/acpica/components/executer/exconvrt.c
  head/sys/contrib/dev/acpica/components/executer/exdebug.c
  head/sys/contrib/dev/acpica/components/executer/exdump.c
  head/sys/contrib/dev/acpica/components/executer/exfield.c
  head/sys/contrib/dev/acpica/components/executer/exfldio.c
  head/sys/contrib/dev/acpica/components/executer/exmisc.c
  head/sys/contrib/dev/acpica/components/executer/exnames.c
  head/sys/contrib/dev/acpica/components/executer/exoparg2.c
  head/sys/contrib/dev/acpica/components/executer/exoparg3.c
  head/sys/contrib/dev/acpica/components/executer/exregion.c
  head/sys/contrib/dev/acpica/components/executer/exstorob.c
  

svn commit: r284585 - head/sys/dev/atkbdc

2015-06-18 Thread Rui Paulo
Author: rpaulo
Date: Fri Jun 19 00:10:30 2015
New Revision: 284585
URL: https://svnweb.freebsd.org/changeset/base/284585

Log:
  Synaptics: fix a problem with trackpoint passthrough.
  
  There was a inconsistency which led to enable passthrough commands
  being interpreted as actual touchpad commands.
  
  Submitted by: Jan Kokemüller jan.kokemueller at gmail.com
  MFC after:1 week

Modified:
  head/sys/dev/atkbdc/psm.c

Modified: head/sys/dev/atkbdc/psm.c
==
--- head/sys/dev/atkbdc/psm.c   Fri Jun 19 00:00:32 2015(r284584)
+++ head/sys/dev/atkbdc/psm.c   Fri Jun 19 00:10:30 2015(r284585)
@@ -4839,9 +4839,7 @@ enable_synaptics(struct psm_softc *sc, e
synaptics_set_mode(sc, synaptics_preferred_mode(sc));
 
if (trackpoint_support  synhw.capPassthrough) {
-   synaptics_passthrough_on(sc);
enable_trackpoint(sc, arg);
-   synaptics_passthrough_off(sc);
}
 
VLOG(3, (LOG_DEBUG, synaptics: END init (%d buttons)\n, buttons));
@@ -5096,16 +5094,29 @@ enable_trackpoint(struct psm_softc *sc, 
KBDC kbdc = sc-kbdc;
int id;
 
+   /*
+* If called from enable_synaptics(), make sure that passthrough
+* mode is enabled so we can reach the trackpoint.
+* However, passthrough mode must be disabled before setting the
+* trackpoint parameters, as rackpoint_command() enables and disables
+* passthrough mode on its own.
+*/
+   if (sc-synhw.capPassthrough)
+   synaptics_passthrough_on(sc);
+
if (send_aux_command(kbdc, 0xe1) != PSM_ACK ||
read_aux_data(kbdc) != 0x01)
-   return (FALSE);
+   goto no_trackpoint;
id = read_aux_data(kbdc);
if (id  0x01)
-   return (FALSE);
+   goto no_trackpoint;
if (arg == PROBE)
sc-tphw = id;
if (!trackpoint_support)
-   return (FALSE);
+   goto no_trackpoint;
+
+   if (sc-synhw.capPassthrough)
+   synaptics_passthrough_off(sc);
 
if (arg == PROBE) {
trackpoint_sysctl_create_tree(sc);
@@ -5122,6 +5133,12 @@ enable_trackpoint(struct psm_softc *sc, 
set_trackpoint_parameters(sc);
 
return (TRUE);
+
+no_trackpoint:
+   if (sc-synhw.capPassthrough)
+   synaptics_passthrough_off(sc);
+
+   return (FALSE);
 }
 
 /* Interlink electronics VersaPad */
___
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: r284539 - in head: lib/libvmmapi share/examples/bhyve sys/amd64/include sys/amd64/vmm sys/amd64/vmm/amd sys/amd64/vmm/intel sys/amd64/vmm/io usr.sbin/bhyve usr.sbin/bhyvectl usr.sbin/bh...

2015-06-18 Thread Neel Natu
Author: neel
Date: Thu Jun 18 06:00:17 2015
New Revision: 284539
URL: https://svnweb.freebsd.org/changeset/base/284539

Log:
  Restructure memory allocation in bhyve to support devmem.
  
  devmem is used to represent MMIO devices like the boot ROM or a VESA 
framebuffer
  where doing a trap-and-emulate for every access is impractical. devmem is a
  hybrid of system memory (sysmem) and emulated device models.
  
  devmem is mapped in the guest address space via nested page tables similar
  to sysmem. However the address range where devmem is mapped may be changed
  by the guest at runtime (e.g. by reprogramming a PCI BAR). Also devmem is
  usually mapped RO or RW as compared to RWX mappings for sysmem.
  
  Each devmem segment is named (e.g. bootrom) and this name is used to
  create a device node for the devmem segment (e.g. /dev/vmm/testvm.bootrom).
  The device node supports mmap(2) and this decouples the host mapping of
  devmem from its mapping in the guest address space (which can change).
  
  Reviewed by:  tychon
  Discussed with:   grehan
  Differential Revision:https://reviews.freebsd.org/D2762
  MFC after:4 weeks

Added:
  head/usr.sbin/bhyve/bootrom.c   (contents, props changed)
  head/usr.sbin/bhyve/bootrom.h   (contents, props changed)
Modified:
  head/lib/libvmmapi/vmmapi.c
  head/lib/libvmmapi/vmmapi.h
  head/share/examples/bhyve/vmrun.sh
  head/sys/amd64/include/vmm.h
  head/sys/amd64/include/vmm_dev.h
  head/sys/amd64/vmm/amd/svm.c
  head/sys/amd64/vmm/intel/vmx.c
  head/sys/amd64/vmm/io/ppt.c
  head/sys/amd64/vmm/vmm.c
  head/sys/amd64/vmm/vmm_dev.c
  head/sys/amd64/vmm/vmm_instruction_emul.c
  head/sys/amd64/vmm/vmm_mem.c
  head/sys/amd64/vmm/vmm_mem.h
  head/usr.sbin/bhyve/Makefile
  head/usr.sbin/bhyve/bhyve.8
  head/usr.sbin/bhyve/bhyverun.c
  head/usr.sbin/bhyve/pci_lpc.c
  head/usr.sbin/bhyve/pci_lpc.h
  head/usr.sbin/bhyve/pci_passthru.c
  head/usr.sbin/bhyvectl/Makefile
  head/usr.sbin/bhyvectl/bhyvectl.c
  head/usr.sbin/bhyveload/bhyveload.8
  head/usr.sbin/bhyveload/bhyveload.c

Modified: head/lib/libvmmapi/vmmapi.c
==
--- head/lib/libvmmapi/vmmapi.c Thu Jun 18 05:58:15 2015(r284538)
+++ head/lib/libvmmapi/vmmapi.c Thu Jun 18 06:00:17 2015(r284539)
@@ -58,15 +58,23 @@ __FBSDID($FreeBSD$);
 #defineMB  (1024 * 1024UL)
 #defineGB  (1024 * 1024 * 1024UL)
 
+/*
+ * Size of the guard region before and after the virtual address space
+ * mapping the guest physical memory. This must be a multiple of the
+ * superpage size for performance reasons.
+ */
+#defineVM_MMAP_GUARD_SIZE  (4 * MB)
+
+#definePROT_RW (PROT_READ | PROT_WRITE)
+#definePROT_ALL(PROT_READ | PROT_WRITE | PROT_EXEC)
+
 struct vmctx {
int fd;
uint32_t lowmem_limit;
-   enum vm_mmap_style vms;
int memflags;
size_t  lowmem;
-   char*lowmem_addr;
size_t  highmem;
-   char*highmem_addr;
+   char*baseaddr;
char*name;
 };
 
@@ -157,22 +165,6 @@ vm_parse_memsize(const char *optarg, siz
return (error);
 }
 
-int
-vm_get_memory_seg(struct vmctx *ctx, vm_paddr_t gpa, size_t *ret_len,
- int *wired)
-{
-   int error;
-   struct vm_memory_segment seg;
-
-   bzero(seg, sizeof(seg));
-   seg.gpa = gpa;
-   error = ioctl(ctx-fd, VM_GET_MEMORY_SEG, seg);
-   *ret_len = seg.len;
-   if (wired != NULL)
-   *wired = seg.wired;
-   return (error);
-}
-
 uint32_t
 vm_get_lowmem_limit(struct vmctx *ctx)
 {
@@ -194,39 +186,184 @@ vm_set_memflags(struct vmctx *ctx, int f
ctx-memflags = flags;
 }
 
+int
+vm_get_memflags(struct vmctx *ctx)
+{
+
+   return (ctx-memflags);
+}
+
+/*
+ * Map segment 'segid' starting at 'off' into guest address range 
[gpa,gpa+len).
+ */
+int
+vm_mmap_memseg(struct vmctx *ctx, vm_paddr_t gpa, int segid, vm_ooffset_t off,
+size_t len, int prot)
+{
+   struct vm_memmap memmap;
+   int error, flags;
+
+   memmap.gpa = gpa;
+   memmap.segid = segid;
+   memmap.segoff = off;
+   memmap.len = len;
+   memmap.prot = prot;
+   memmap.flags = 0;
+
+   if (ctx-memflags  VM_MEM_F_WIRED)
+   memmap.flags |= VM_MEMMAP_F_WIRED;
+
+   /*
+* If this mapping already exists then don't create it again. This
+* is the common case for SYSMEM mappings created by bhyveload(8).
+*/
+   error = vm_mmap_getnext(ctx, gpa, segid, off, len, prot, flags);
+   if (error == 0  gpa == memmap.gpa) {
+   if (segid != memmap.segid || off != memmap.segoff ||
+   prot != memmap.prot || flags != memmap.flags) {
+   errno = EEXIST;
+   return (-1);
+   } else {
+   return (0);
+   }
+   }
+
+   error = ioctl(ctx-fd, 

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

2015-06-18 Thread Edward Tomasz Napierala
Author: trasz
Date: Thu Jun 18 10:17:47 2015
New Revision: 284542
URL: https://svnweb.freebsd.org/changeset/base/284542

Log:
  Allow '@' in unquoted strings, such as with the path statement.  Note
  that one can use any character they like by using double quotes.
  
  PR:   200895
  MFC after:2 weeks
  Sponsored by: The FreeBSD Foundation

Modified:
  head/usr.sbin/ctld/token.l

Modified: head/usr.sbin/ctld/token.l
==
--- head/usr.sbin/ctld/token.l  Thu Jun 18 09:39:51 2015(r284541)
+++ head/usr.sbin/ctld/token.l  Thu Jun 18 10:17:47 2015(r284542)
@@ -80,7 +80,7 @@ target{ return TARGET; }
 timeout{ return TIMEOUT; }
 \[^]+\  { yylval.str = strndup(yytext + 1,
strlen(yytext) - 2); return STR; }
-[a-zA-Z0-9\.\-_/\:\[\]]+ { yylval.str = strdup(yytext); return STR; }
+[a-zA-Z0-9\.\-@_/\:\[\]]+ { yylval.str = strdup(yytext); return STR; }
 \{ { return OPENING_BRACKET; }
 \} { return CLOSING_BRACKET; }
 #.*$   /* ignore comments */;
___
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: r284543 - head/release/arm

2015-06-18 Thread Glen Barber
Author: gjb
Date: Thu Jun 18 10:26:27 2015
New Revision: 284543
URL: https://svnweb.freebsd.org/changeset/base/284543

Log:
  Increase the FreeBSD/arm image sizes back to 1G for 11-CURRENT.
  While 480M is sufficient for 10-STABLE, 11-CURRENT images at
  this size fail due to insufficient space.
  
  This commit is solely for the sake of getting updated snapshot
  builds out, after which I'll analyze the resulting images to
  figure out what a more sane value is, even if the image size
  for 11-CURRENT needs to differ from 10-STABLE.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/release/arm/BEAGLEBONE.conf
  head/release/arm/CUBOX-HUMMINGBOARD.conf
  head/release/arm/GUMSTIX.conf
  head/release/arm/PANDABOARD.conf
  head/release/arm/RPI-B.conf
  head/release/arm/RPI2.conf
  head/release/arm/WANDBOARD.conf

Modified: head/release/arm/BEAGLEBONE.conf
==
--- head/release/arm/BEAGLEBONE.confThu Jun 18 10:17:47 2015
(r284542)
+++ head/release/arm/BEAGLEBONE.confThu Jun 18 10:26:27 2015
(r284543)
@@ -9,7 +9,7 @@ EMBEDDED_TARGET_ARCH=armv6
 EMBEDDEDPORTS=sysutils/u-boot-beaglebone
 KERNEL=BEAGLEBONE
 WORLD_FLAGS=${WORLD_FLAGS} UBLDR_LOADADDR=0x8800
-IMAGE_SIZE=480M
+IMAGE_SIZE=1G
 PART_SCHEME=MBR
 FAT_SIZE=2m
 FAT_TYPE=12

Modified: head/release/arm/CUBOX-HUMMINGBOARD.conf
==
--- head/release/arm/CUBOX-HUMMINGBOARD.confThu Jun 18 10:17:47 2015
(r284542)
+++ head/release/arm/CUBOX-HUMMINGBOARD.confThu Jun 18 10:26:27 2015
(r284543)
@@ -9,7 +9,7 @@ EMBEDDED_TARGET_ARCH=armv6
 EMBEDDEDPORTS=sysutils/u-boot-cubox-hummingboard
 KERNEL=IMX6
 WORLD_FLAGS=${WORLD_FLAGS} UBLDR_LOADADDR=0x1200
-IMAGE_SIZE=480M
+IMAGE_SIZE=1G
 PART_SCHEME=MBR
 FAT_SIZE=50m -b 16384
 FAT_TYPE=16

Modified: head/release/arm/GUMSTIX.conf
==
--- head/release/arm/GUMSTIX.conf   Thu Jun 18 10:17:47 2015
(r284542)
+++ head/release/arm/GUMSTIX.conf   Thu Jun 18 10:26:27 2015
(r284543)
@@ -9,7 +9,7 @@ EMBEDDED_TARGET_ARCH=armv6
 EMBEDDEDPORTS=sysutils/u-boot-duovero
 KERNEL=GUMSTIX
 WORLD_FLAGS=${WORLD_FLAGS} UBLDR_LOADADDR=0x8800
-IMAGE_SIZE=480M
+IMAGE_SIZE=1G
 PART_SCHEME=MBR
 FAT_SIZE=2m
 FAT_TYPE=12

Modified: head/release/arm/PANDABOARD.conf
==
--- head/release/arm/PANDABOARD.confThu Jun 18 10:17:47 2015
(r284542)
+++ head/release/arm/PANDABOARD.confThu Jun 18 10:26:27 2015
(r284543)
@@ -9,7 +9,7 @@ EMBEDDED_TARGET_ARCH=armv6
 EMBEDDEDPORTS=sysutils/u-boot-pandaboard
 KERNEL=PANDABOARD
 WORLD_FLAGS=${WORLD_FLAGS} UBLDR_LOADADDR=0x8800
-IMAGE_SIZE=480M
+IMAGE_SIZE=1G
 PART_SCHEME=MBR
 FAT_SIZE=2m
 FAT_TYPE=12

Modified: head/release/arm/RPI-B.conf
==
--- head/release/arm/RPI-B.conf Thu Jun 18 10:17:47 2015(r284542)
+++ head/release/arm/RPI-B.conf Thu Jun 18 10:26:27 2015(r284543)
@@ -9,7 +9,7 @@ EMBEDDED_TARGET_ARCH=armv6
 EMBEDDEDPORTS=sysutils/u-boot-rpi
 KERNEL=RPI-B
 WORLD_FLAGS=${WORLD_FLAGS} UBLDR_LOADADDR=0x200
-IMAGE_SIZE=480M
+IMAGE_SIZE=1G
 PART_SCHEME=MBR
 FAT_SIZE=17m
 FAT_TYPE=16

Modified: head/release/arm/RPI2.conf
==
--- head/release/arm/RPI2.conf  Thu Jun 18 10:17:47 2015(r284542)
+++ head/release/arm/RPI2.conf  Thu Jun 18 10:26:27 2015(r284543)
@@ -9,7 +9,7 @@ EMBEDDED_TARGET_ARCH=armv6
 EMBEDDEDPORTS=sysutils/u-boot-rpi2
 KERNEL=RPI2
 WORLD_FLAGS=${WORLD_FLAGS} UBLDR_LOADADDR=0x200
-IMAGE_SIZE=480M
+IMAGE_SIZE=1G
 PART_SCHEME=MBR
 FAT_SIZE=50m
 FAT_TYPE=16

Modified: head/release/arm/WANDBOARD.conf
==
--- head/release/arm/WANDBOARD.conf Thu Jun 18 10:17:47 2015
(r284542)
+++ head/release/arm/WANDBOARD.conf Thu Jun 18 10:26:27 2015
(r284543)
@@ -9,7 +9,7 @@ EMBEDDED_TARGET_ARCH=armv6
 EMBEDDEDPORTS=sysutils/u-boot-wandboard
 KERNEL=IMX6
 WORLD_FLAGS=${WORLD_FLAGS} UBLDR_LOADADDR=0x1200
-IMAGE_SIZE=480M
+IMAGE_SIZE=1G
 PART_SCHEME=MBR
 FAT_SIZE=50m -b 16384
 FAT_TYPE=16
___
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: r284540 - head/sys/dev/isp

2015-06-18 Thread Alexander Motin
Author: mav
Date: Thu Jun 18 07:50:27 2015
New Revision: 284540
URL: https://svnweb.freebsd.org/changeset/base/284540

Log:
  In case of target mode disable at least ISP2532 return invalid zero
  ct_rxid value on CTIO completion.  Try to workaround that using tag_id
  from the CCB, pointed by still valid ct_syshandle.
  
  I don't know whether this is valid fix or dirty hack, but considering that
  alternative is indefinitely stuck command -- it worth trying.
  
  MFC after:1 week

Modified:
  head/sys/dev/isp/isp_freebsd.c

Modified: head/sys/dev/isp/isp_freebsd.c
==
--- head/sys/dev/isp/isp_freebsd.c  Thu Jun 18 06:00:17 2015
(r284539)
+++ head/sys/dev/isp/isp_freebsd.c  Thu Jun 18 07:50:27 2015
(r284540)
@@ -2931,6 +2931,14 @@ isp_handle_platform_ctio(ispsoftc_t *isp
atp = isp_find_atpd(isp, tptr, ((ct_entry_t 
*)arg)-ct_fwhandle);
}
if (atp == NULL) {
+   /*
+* In case of target mode disable at least ISP2532 return
+* invalid zero ct_rxid value.  Try to workaround that using
+* tag_id from the CCB, pointed by valid ct_syshandle.
+*/
+   atp = isp_find_atpd(isp, tptr, ccb-csio.tag_id);
+   }
+   if (atp == NULL) {
rls_lun_statep(isp, tptr);
isp_prt(isp, ISP_LOGERR, %s: cannot find adjunct for %x after 
I/O, __func__, ccb-csio.tag_id);
return;
___
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: r284541 - head/sys/cam/ctl

2015-06-18 Thread Alexander Motin
Author: mav
Date: Thu Jun 18 09:39:51 2015
New Revision: 284541
URL: https://svnweb.freebsd.org/changeset/base/284541

Log:
  Change ATIO/INOT counting to prevent periph destruction while requests
  are still running inside CTL.
  
  MFC after:1 week

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

Modified: head/sys/cam/ctl/scsi_ctl.c
==
--- head/sys/cam/ctl/scsi_ctl.c Thu Jun 18 07:50:27 2015(r284540)
+++ head/sys/cam/ctl/scsi_ctl.c Thu Jun 18 09:39:51 2015(r284541)
@@ -104,10 +104,10 @@ struct ctlfe_lun_softc {
uint64_t ccbs_freed;
uint64_t ctios_sent;
uint64_t ctios_returned;
-   uint64_t atios_sent;
-   uint64_t atios_returned;
-   uint64_t inots_sent;
-   uint64_t inots_returned;
+   uint64_t atios_alloced;
+   uint64_t atios_freed;
+   uint64_t inots_alloced;
+   uint64_t inots_freed;
/* bus_dma_tag_t dma_tag; */
TAILQ_HEAD(, ccb_hdr) work_queue;
STAILQ_ENTRY(ctlfe_lun_softc) links;
@@ -546,6 +546,7 @@ ctlferegister(struct cam_periph *periph,
status = CAM_RESRC_UNAVAIL;
break;
}
+   softc-atios_alloced++;
new_ccb-ccb_h.io_ptr = new_io;
 
xpt_setup_ccb(new_ccb-ccb_h, periph-path, /*priority*/ 1);
@@ -553,7 +554,6 @@ ctlferegister(struct cam_periph *periph,
new_ccb-ccb_h.cbfcnp = ctlfedone;
new_ccb-ccb_h.flags |= CAM_UNLOCKED;
xpt_action(new_ccb);
-   softc-atios_sent++;
status = new_ccb-ccb_h.status;
if ((status  CAM_STATUS_MASK) != CAM_REQ_INPROG) {
ctl_free_io(new_io);
@@ -591,6 +591,7 @@ ctlferegister(struct cam_periph *periph,
status = CAM_RESRC_UNAVAIL;
break;
}
+   softc-inots_alloced++;
new_ccb-ccb_h.io_ptr = new_io;
 
xpt_setup_ccb(new_ccb-ccb_h, periph-path, /*priority*/ 1);
@@ -598,7 +599,6 @@ ctlferegister(struct cam_periph *periph,
new_ccb-ccb_h.cbfcnp = ctlfedone;
new_ccb-ccb_h.flags |= CAM_UNLOCKED;
xpt_action(new_ccb);
-   softc-inots_sent++;
status = new_ccb-ccb_h.status;
if ((status  CAM_STATUS_MASK) != CAM_REQ_INPROG) {
/*
@@ -650,10 +650,6 @@ ctlfeoninvalidate(struct cam_periph *per
 * XXX KDM what do we do now?
 */
}
-   xpt_print(periph-path, LUN removed, %ju ATIOs outstanding, %ju 
- INOTs outstanding, %d refs\n, softc-atios_sent -
- softc-atios_returned, softc-inots_sent -
- softc-inots_returned, periph-refcount);
 
bus_softc = softc-parent_softc;
mtx_lock(bus_softc-lun_softc_mtx);
@@ -666,13 +662,20 @@ ctlfecleanup(struct cam_periph *periph)
 {
struct ctlfe_lun_softc *softc;
 
-   xpt_print(periph-path, %s: Called\n, __func__);
-
softc = (struct ctlfe_lun_softc *)periph-softc;
 
-   /*
-* XXX KDM is there anything else that needs to be done here?
-*/
+   KASSERT(softc-ccbs_freed == softc-ccbs_alloced, (%s: 
+   ccbs_freed %ju != ccbs_alloced %ju, __func__,
+   softc-ccbs_freed, softc-ccbs_alloced));
+   KASSERT(softc-ctios_returned == softc-ctios_sent, (%s: 
+   ctios_returned %ju != ctios_sent %ju, __func__,
+   softc-ctios_returned, softc-ctios_sent));
+   KASSERT(softc-atios_freed == softc-atios_alloced, (%s: 
+   atios_freed %ju != atios_alloced %ju, __func__,
+   softc-atios_freed, softc-atios_alloced));
+   KASSERT(softc-inots_freed == softc-inots_alloced, (%s: 
+   inots_freed %ju != inots_alloced %ju, __func__,
+   softc-inots_freed, softc-inots_alloced));
 
free(softc, M_CTLFE);
 }
@@ -871,7 +874,6 @@ ctlfestart(struct cam_periph *periph, un
 * Send the ATIO back down to the SIM.
 */
xpt_action((union ccb *)atio);
-   softc-atios_sent++;
 
/*
 * If we still have work to do, ask for
@@ -989,11 +991,11 @@ ctlfe_free_ccb(struct cam_periph *periph
 
switch (ccb-ccb_h.func_code) {
case XPT_ACCEPT_TARGET_IO:
-   softc-atios_returned++;
+   softc-atios_freed++;
break;
case XPT_IMMEDIATE_NOTIFY:
case XPT_NOTIFY_ACKNOWLEDGE:
-   softc-inots_returned++;
+   softc-inots_freed++;
break;
default:
break;
@@ -1002,20 +1004,20 @@ ctlfe_free_ccb(struct cam_periph *periph
ctl_free_io(ccb-ccb_h.io_ptr);
free(ccb, M_CTLFE);
 
-  

svn commit: r284544 - head/sys/dev/virtio/mmio

2015-06-18 Thread Ruslan Bukin
Author: br
Date: Thu Jun 18 10:33:04 2015
New Revision: 284544
URL: https://svnweb.freebsd.org/changeset/base/284544

Log:
  Remove duplicate defines.
  
  Sponsored by: HEIF5

Modified:
  head/sys/dev/virtio/mmio/virtio_mmio.h

Modified: head/sys/dev/virtio/mmio/virtio_mmio.h
==
--- head/sys/dev/virtio/mmio/virtio_mmio.h  Thu Jun 18 10:26:27 2015
(r284543)
+++ head/sys/dev/virtio/mmio/virtio_mmio.h  Thu Jun 18 10:33:04 2015
(r284544)
@@ -36,10 +36,6 @@
 #defineVIRTIO_MMIO_MAGIC_VALUE 0x000
 #defineVIRTIO_MMIO_VERSION 0x004
 #defineVIRTIO_MMIO_DEVICE_ID   0x008
-
-#defineVIRTIO_MMIO_MAGIC_VALUE 0x000
-#defineVIRTIO_MMIO_VERSION 0x004
-#defineVIRTIO_MMIO_DEVICE_ID   0x008
 #defineVIRTIO_MMIO_VENDOR_ID   0x00c
 #defineVIRTIO_MMIO_HOST_FEATURES   0x010
 #defineVIRTIO_MMIO_HOST_FEATURES_SEL   0x014
___
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