svn commit: r248465 - head/crypto/openssh

2013-03-18 Thread Dag-Erling Smørgrav
Author: des
Date: Mon Mar 18 10:50:50 2013
New Revision: 248465
URL: http://svnweb.freebsd.org/changeset/base/248465

Log:
  Keep the default AuthorizedKeysFile setting.  Although authorized_keys2
  has been deprecated for a while, some people still use it and were
  unpleasantly surprised by this change.
  
  I may revert this commit at a later date if I can come up with a way
  to give users who still have authorized_keys2 files sufficient advance
  warning.
  
  MFC after:ASAP

Modified:
  head/crypto/openssh/sshd_config

Modified: head/crypto/openssh/sshd_config
==
--- head/crypto/openssh/sshd_config Mon Mar 18 09:52:17 2013
(r248464)
+++ head/crypto/openssh/sshd_config Mon Mar 18 10:50:50 2013
(r248465)
@@ -50,8 +50,7 @@
 #PubkeyAuthentication yes
 
 # The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
-# but this is overridden so installations will only check .ssh/authorized_keys
-AuthorizedKeysFile .ssh/authorized_keys
+#AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2
 
 #AuthorizedPrincipalsFile none
 
___
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: r248460 - head/contrib/binutils/gas/config

2013-03-18 Thread Andrew Turner
Author: andrew
Date: Mon Mar 18 08:22:35 2013
New Revision: 248460
URL: http://svnweb.freebsd.org/changeset/base/248460

Log:
  Add support for the vmsr and vmrs instructions. This supports the system
  level version of the instructions. When used in userland the hardware only
  allows us to read/write FPSCR.

Modified:
  head/contrib/binutils/gas/config/tc-arm.c

Modified: head/contrib/binutils/gas/config/tc-arm.c
==
--- head/contrib/binutils/gas/config/tc-arm.c   Mon Mar 18 07:41:08 2013
(r248459)
+++ head/contrib/binutils/gas/config/tc-arm.c   Mon Mar 18 08:22:35 2013
(r248460)
@@ -651,6 +651,7 @@ struct asm_opcode
 
 #define BAD_ARGS   _("bad arguments to instruction")
 #define BAD_PC _("r15 not allowed here")
+#define BAD_SP _("r13 not allowed here")
 #define BAD_COND   _("instruction cannot be conditional")
 #define BAD_OVERLAP_("registers may not be the same")
 #define BAD_HIREG  _("lo register required")
@@ -659,6 +660,7 @@ struct asm_opcode
 #define BAD_BRANCH _("branch must be last instruction in IT block")
 #define BAD_NOT_IT _("instruction not allowed in IT block")
 #define BAD_FPU_("selected FPU does not support instruction")
+#define BAD_VMRS   _("APSR_nzcv may only be used with fpscr")
 
 static struct hash_control *arm_ops_hsh;
 static struct hash_control *arm_cond_hsh;
@@ -7095,6 +7097,68 @@ do_vfp_nsyn_msr (void)
   return SUCCESS;
 }
 
+static int
+do_vfp_vmrs (void)
+{
+  int rt;
+
+  /* The destination register can be r0-r14 or APSR_nzcv */
+  if (inst.operands[0].reg > 14)
+{
+  inst.error = BAD_PC;
+  return FAIL;
+}
+
+  /* If the destination is r13 and not in ARM mode then unprefictable */
+  if (thumb_mode && inst.operands[0].reg == REG_SP)
+{
+  inst.error = BAD_SP;
+  return FAIL;
+}
+
+  /* If the destination is APSR_nzcv */
+  if (inst.operands[0].isvec && inst.operands[1].reg != 1)
+{
+  inst.error = BAD_VMRS;
+  return FAIL;
+}
+
+  if (inst.operands[0].isvec)
+rt = 15;
+  else
+rt = inst.operands[0].reg;
+
+  /* Or in the registers to use */
+  inst.instruction |= rt << 12;
+  inst.instruction |= inst.operands[1].reg << 16;
+
+  return SUCCESS;
+}
+
+static int
+do_vfp_vmsr (void)
+{
+  /* The destination register can be r0-r14 or APSR_nzcv */
+  if (inst.operands[1].reg > 14)
+{
+  inst.error = BAD_PC;
+  return FAIL;
+}
+
+  /* If the destination is r13 and not in ARM mode then unprefictable */
+  if (thumb_mode && inst.operands[0].reg == REG_SP)
+{
+  inst.error = BAD_SP;
+  return FAIL;
+}
+
+  /* Or in the registers to use */
+  inst.instruction |= inst.operands[1].reg << 12;
+  inst.instruction |= inst.operands[0].reg << 16;
+
+  return SUCCESS;
+}
+
 static void
 do_mrs (void)
 {
@@ -15726,6 +15790,8 @@ static const struct asm_opcode insns[] =
  cCE(ftouizs,  ebc0ac0, 2, (RVS, RVS),   vfp_sp_monadic),
  cCE(fmrx, ef00a10, 2, (RR, RVC),rd_rn),
  cCE(fmxr, ee00a10, 2, (RVC, RR),rn_rd),
+ cCE(vmrs, ef00a10, 2, (APSR_RR, RVC),   vfp_vmrs),
+ cCE(vmsr, ee00a10, 2, (RVC, RR),vfp_vmsr),
 
   /* Memory operations. */
  cCE(flds, d100a00, 2, (RVS, ADDRGLDC),  vfp_sp_ldst),
___
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: r248459 - head/contrib/binutils/gas/config

2013-03-18 Thread Andrew Turner
Author: andrew
Date: Mon Mar 18 07:41:08 2013
New Revision: 248459
URL: http://svnweb.freebsd.org/changeset/base/248459

Log:
  Some ARM vmov similar to 'vmov.f32 s1, s2' will incorrectly have the second
  register added to the symbol table by the assembler. On further
  investigation it was found the problem was with the my_get_expression
  function. This is called by parse_big_immediate.
  
  Fix this by moving the call to parse_big_immediate to the end of the if,
  else if, ..., else block.

Modified:
  head/contrib/binutils/gas/config/tc-arm.c

Modified: head/contrib/binutils/gas/config/tc-arm.c
==
--- head/contrib/binutils/gas/config/tc-arm.c   Mon Mar 18 07:02:58 2013
(r248458)
+++ head/contrib/binutils/gas/config/tc-arm.c   Mon Mar 18 07:41:08 2013
(r248459)
@@ -5164,10 +5164,6 @@ parse_neon_mov (char **str, int *which_o
  Case 10: VMOV.F32 , #
  Case 11: VMOV.F64 , #  */
 inst.operands[i].immisfloat = 1;
-  else if (parse_big_immediate (&ptr, i) == SUCCESS)
-  /* Case 2: VMOV. , #
- Case 3: VMOV. , #  */
-;
   else if ((val = arm_typed_reg_parse (&ptr, REG_TYPE_NSDQ, &rtype,
&optype)) != FAIL)
 {
@@ -5207,6 +5203,10 @@ parse_neon_mov (char **str, int *which_o
   inst.operands[i++].present = 1;
 }
 }
+  else if (parse_big_immediate (&ptr, i) == SUCCESS)
+  /* Case 2: VMOV. , #
+ Case 3: VMOV. , #  */
+;
   else
 {
   first_error (_("expected  or  or  operand"));
___
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: r248458 - in head/sys/dev/usb: . wlan

2013-03-18 Thread Hans Petter Selasky
Author: hselasky
Date: Mon Mar 18 07:02:58 2013
New Revision: 248458
URL: http://svnweb.freebsd.org/changeset/base/248458

Log:
  Add new USB ID.
  
  PR:   usb/177013
  MFC after:1 week

Modified:
  head/sys/dev/usb/usbdevs
  head/sys/dev/usb/wlan/if_run.c

Modified: head/sys/dev/usb/usbdevs
==
--- head/sys/dev/usb/usbdevsMon Mar 18 05:30:18 2013(r248457)
+++ head/sys/dev/usb/usbdevsMon Mar 18 07:02:58 2013(r248458)
@@ -2499,6 +2499,7 @@ product LOGITEC RT2870_2  0x0163  RT2870
 product LOGITEC RT2870_3   0x0164  RT2870
 product LOGITEC LANW300NU2 0x0166  LAN-W300N/U2
 product LOGITEC LANW150NU2 0x0168  LAN-W150N/U2
+product LOGITEC LANW300NU2S0x0169  LAN-W300N/U2S
 
 /* Longcheer Holdings, Ltd. products */
 product LONGCHEER WM66 0x6061  Longcheer WM66 HSDPA

Modified: head/sys/dev/usb/wlan/if_run.c
==
--- head/sys/dev/usb/wlan/if_run.c  Mon Mar 18 05:30:18 2013
(r248457)
+++ head/sys/dev/usb/wlan/if_run.c  Mon Mar 18 07:02:58 2013
(r248458)
@@ -211,6 +211,7 @@ static const STRUCT_USB_HOST_ID run_devs
 RUN_DEV(LOGITEC,   RT2870_3),
 RUN_DEV(LOGITEC,   LANW300NU2),
 RUN_DEV(LOGITEC,   LANW150NU2),
+RUN_DEV(LOGITEC,   LANW300NU2S),
 RUN_DEV(MELCO, RT2870_1),
 RUN_DEV(MELCO, RT2870_2),
 RUN_DEV(MELCO, WLIUCAG300N),
___
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: r248446 - head/usr.bin/find

2013-03-18 Thread John Baldwin
On Sunday, March 17, 2013 6:51:58 pm Jilles Tjoelker wrote:
> Author: jilles
> Date: Sun Mar 17 22:51:58 2013
> New Revision: 248446
> URL: http://svnweb.freebsd.org/changeset/base/248446
> 
> Log:
>   find: Include nanoseconds when comparing timestamps of files.
>   
>   When comparing to the timestamp of a given file using -newer, -Xnewer and
>   -newerXY (where X and Y are one of m, c, a, B), include nanoseconds in the
>   comparison.
>   
>   The primaries that compare a timestamp of a file to a given value (-Xmin,
>   -Xtime, -newerXt) continue to compare times in whole seconds.
>   
>   Note that the default value 0 of vfs.timestamp_precision almost always
>   causes the nanoseconds part to be 0. However, touch -d can set a timestamp
>   to the microsecond regardless of that sysctl.

There are also several NFS servers that use sub-second timestamps by default.

-- 
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: r247814 - in head: . sys/amd64/conf sys/cam/ctl sys/conf sys/i386/conf

2013-03-18 Thread John Baldwin
On Saturday, March 16, 2013 12:54:01 pm Rui Paulo wrote:
> On 2013/03/13, at 8:08, John Baldwin  wrote:
> 
> > On Tuesday, March 12, 2013 5:09:21 pm Pawel Jakub Dawidek wrote:
> >> On Mon, Mar 04, 2013 at 09:18:45PM +, Kenneth D. Merry wrote:
> >>> Author: ken
> >>> Date: Mon Mar  4 21:18:45 2013
> >>> New Revision: 247814
> >>> URL: http://svnweb.freebsd.org/changeset/base/247814
> >>> 
> >>> Log:
> >>>  Re-enable CTL in GENERIC on i386 and amd64, but turn on the CTL disable
> >>>  tunable by default.
> >>> 
> >>>  This will allow GENERIC configurations to boot on small memory boxes, but
> >>>  not require end users who want to use CTL to recompile their kernel.  
> >>> They
> >>>  can simply set kern.cam.ctl.disable=0 in loader.conf.
> >> 
> >> Could you rename it to kern.cam.ctl.enable(d)? There was discussion at
> >> some point about sysctl/tunable names and the consensus was, AFAIR, to
> >> use positive(?) names as they are more obvious.
> > 
> > Except that all the hints we use for devices are hint.foo.X.disable=1 :)
> 
> 
> I think this is not correct. The `disabled' hint comes from
> resource_disabled(), which checks for
> "resource_int_value(name, unit, "disabled", &value);"

Yes, it probably is disabled rather than disable, but the point about it being
a negative "disable" hint vs a positive "enable" hint still stands.

-- 
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: r248466 - head/contrib/binutils/gas/config

2013-03-18 Thread Andrew Turner
Author: andrew
Date: Mon Mar 18 15:14:36 2013
New Revision: 248466
URL: http://svnweb.freebsd.org/changeset/base/248466

Log:
  do_vfp_vmrs and do_vfp_vmsr should not return anything.

Modified:
  head/contrib/binutils/gas/config/tc-arm.c

Modified: head/contrib/binutils/gas/config/tc-arm.c
==
--- head/contrib/binutils/gas/config/tc-arm.c   Mon Mar 18 10:50:50 2013
(r248465)
+++ head/contrib/binutils/gas/config/tc-arm.c   Mon Mar 18 15:14:36 2013
(r248466)
@@ -7097,7 +7097,7 @@ do_vfp_nsyn_msr (void)
   return SUCCESS;
 }
 
-static int
+static void
 do_vfp_vmrs (void)
 {
   int rt;
@@ -7106,21 +7106,21 @@ do_vfp_vmrs (void)
   if (inst.operands[0].reg > 14)
 {
   inst.error = BAD_PC;
-  return FAIL;
+  return;
 }
 
   /* If the destination is r13 and not in ARM mode then unprefictable */
   if (thumb_mode && inst.operands[0].reg == REG_SP)
 {
   inst.error = BAD_SP;
-  return FAIL;
+  return;
 }
 
   /* If the destination is APSR_nzcv */
   if (inst.operands[0].isvec && inst.operands[1].reg != 1)
 {
   inst.error = BAD_VMRS;
-  return FAIL;
+  return;
 }
 
   if (inst.operands[0].isvec)
@@ -7131,32 +7131,28 @@ do_vfp_vmrs (void)
   /* Or in the registers to use */
   inst.instruction |= rt << 12;
   inst.instruction |= inst.operands[1].reg << 16;
-
-  return SUCCESS;
 }
 
-static int
+static void
 do_vfp_vmsr (void)
 {
   /* The destination register can be r0-r14 or APSR_nzcv */
   if (inst.operands[1].reg > 14)
 {
   inst.error = BAD_PC;
-  return FAIL;
+  return;
 }
 
   /* If the destination is r13 and not in ARM mode then unprefictable */
   if (thumb_mode && inst.operands[0].reg == REG_SP)
 {
   inst.error = BAD_SP;
-  return FAIL;
+  return;
 }
 
   /* Or in the registers to use */
   inst.instruction |= inst.operands[1].reg << 12;
   inst.instruction |= inst.operands[0].reg << 16;
-
-  return SUCCESS;
 }
 
 static 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: r248467 - in head/sys: arm/include dev/fdt

2013-03-18 Thread Aleksandr Rybalko
Author: ray
Date: Mon Mar 18 15:18:55 2013
New Revision: 248467
URL: http://svnweb.freebsd.org/changeset/base/248467

Log:
  o Switch to use physical addresses in rman for FDT.
  o Remove vtophys used to translate virtual address to physical in case rman 
carry virtual.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/arm/include/bus.h
  head/sys/dev/fdt/fdt_common.c
  head/sys/dev/fdt/fdtbus.c
  head/sys/dev/fdt/simplebus.c

Modified: head/sys/arm/include/bus.h
==
--- head/sys/arm/include/bus.h  Mon Mar 18 15:14:36 2013(r248466)
+++ head/sys/arm/include/bus.h  Mon Mar 18 15:18:55 2013(r248467)
@@ -731,6 +731,6 @@ bs_c_8_proto(f);
  * designed.  It also serves to mark the locations needing that fix.
  */
 #define BUS_SPACE_PHYSADDR(res, offs) \
-   (vtophys(rman_get_start(res)+(offs)))
+   ((u_int)(rman_get_start(res)+(offs)))
 
 #endif /* _MACHINE_BUS_H_ */

Modified: head/sys/dev/fdt/fdt_common.c
==
--- head/sys/dev/fdt/fdt_common.c   Mon Mar 18 15:14:36 2013
(r248466)
+++ head/sys/dev/fdt/fdt_common.c   Mon Mar 18 15:18:55 2013
(r248467)
@@ -421,12 +421,12 @@ fdt_regsize(phandle_t node, u_long *base
 int
 fdt_reg_to_rl(phandle_t node, struct resource_list *rl)
 {
-   u_long start, end, count;
+   u_long count;
pcell_t *reg, *regptr;
pcell_t addr_cells, size_cells;
int tuple_size, tuples;
int i, rv;
-   bus_space_handle_t vaddr;
+   bus_space_handle_t start, end;
long busaddr, bussize;
 
if (fdt_addrsize_cells(OF_parent(node), &addr_cells, &size_cells) != 0)
@@ -457,14 +457,12 @@ fdt_reg_to_rl(phandle_t node, struct res
 
/* Calculate address range relative to base. */
start += busaddr;
-   if (bus_space_map(fdtbus_bs_tag, start, count, 0, &vaddr) != 0)
-   panic("Couldn't map the device memory");
-   end = vaddr + count - 1;
+   end = start + count - 1;
 
-   debugf("reg addr start = %lx, end = %lx, count = %lx\n", vaddr,
+   debugf("reg addr start = %lx, end = %lx, count = %lx\n", start,
end, count);
 
-   resource_list_add(rl, SYS_RES_MEMORY, i, vaddr, end,
+   resource_list_add(rl, SYS_RES_MEMORY, i, start, end,
count);
}
rv = 0;

Modified: head/sys/dev/fdt/fdtbus.c
==
--- head/sys/dev/fdt/fdtbus.c   Mon Mar 18 15:14:36 2013(r248466)
+++ head/sys/dev/fdt/fdtbus.c   Mon Mar 18 15:18:55 2013(r248467)
@@ -617,6 +617,16 @@ static int
 fdtbus_activate_resource(device_t bus, device_t child, int type, int rid,
 struct resource *res)
 {
+   bus_space_handle_t p;
+   int error;
+
+   if (type == SYS_RES_MEMORY || type == SYS_RES_IOPORT) {
+   error = bus_space_map(rman_get_bustag(res),
+   rman_get_bushandle(res), rman_get_size(res), 0, &p);
+   if (error)
+   return (error);
+   rman_set_bushandle(res, p);
+   }
 
return (rman_activate_resource(res));
 }

Modified: head/sys/dev/fdt/simplebus.c
==
--- head/sys/dev/fdt/simplebus.cMon Mar 18 15:14:36 2013
(r248466)
+++ head/sys/dev/fdt/simplebus.cMon Mar 18 15:18:55 2013
(r248467)
@@ -179,7 +179,6 @@ simplebus_attach(device_t dev)
device_printf(dev,
"%s: could not process 'reg' "
"property\n", di->di_ofw.obd_name);
-   /* XXX should unmap */
ofw_bus_gen_destroy_devinfo(&di->di_ofw);
free(di, M_SIMPLEBUS);
continue;
@@ -189,7 +188,6 @@ simplebus_attach(device_t dev)
device_printf(dev, "%s: could not process "
"'interrupts' property\n", di->di_ofw.obd_name);
resource_list_free(&di->di_res);
-   /* XXX should unmap */
ofw_bus_gen_destroy_devinfo(&di->di_ofw);
free(di, M_SIMPLEBUS);
continue;
@@ -201,7 +199,6 @@ simplebus_attach(device_t dev)
device_printf(dev, "could not add child: %s\n",
di->di_ofw.obd_name);
resource_list_free(&di->di_res);
-   /* XXX should unmap */
ofw_bus_gen_destroy_devinfo(&di->di_ofw);
free(di, M_SIMPLEBUS);
continue;
___
svn-src-head@freebsd

svn commit: r248470 - in head/sys: cddl/compat/opensolaris/sys kern sys

2013-03-18 Thread John Baldwin
Author: jhb
Date: Mon Mar 18 17:23:58 2013
New Revision: 248470
URL: http://svnweb.freebsd.org/changeset/base/248470

Log:
  Partially revert r195702.  Deferring stops is now implemented via a set of
  calls to toggle TDF_SBDRY rather than passing PBDRY to individual sleep
  calls.
  - Remove the stop_allowed parameters from cursig() and issignal().
issignal() checks TDF_SBDRY directly.
  - Remove the PBDRY and SLEEPQ_STOP_ON_BDRY flags.

Modified:
  head/sys/cddl/compat/opensolaris/sys/sig.h
  head/sys/kern/kern_sig.c
  head/sys/kern/kern_synch.c
  head/sys/kern/subr_sleepqueue.c
  head/sys/kern/subr_trap.c
  head/sys/sys/param.h
  head/sys/sys/signalvar.h
  head/sys/sys/sleepqueue.h

Modified: head/sys/cddl/compat/opensolaris/sys/sig.h
==
--- head/sys/cddl/compat/opensolaris/sys/sig.h  Mon Mar 18 15:38:15 2013
(r248469)
+++ head/sys/cddl/compat/opensolaris/sys/sig.h  Mon Mar 18 17:23:58 2013
(r248470)
@@ -55,7 +55,7 @@ issig(int why)
p = td->td_proc;
PROC_LOCK(p);
mtx_lock(&p->p_sigacts->ps_mtx);
-   sig = cursig(td, SIG_STOP_ALLOWED);
+   sig = cursig(td);
mtx_unlock(&p->p_sigacts->ps_mtx);
PROC_UNLOCK(p);
if (sig != 0)

Modified: head/sys/kern/kern_sig.c
==
--- head/sys/kern/kern_sig.cMon Mar 18 15:38:15 2013(r248469)
+++ head/sys/kern/kern_sig.cMon Mar 18 17:23:58 2013(r248470)
@@ -108,7 +108,7 @@ SDT_PROBE_ARGTYPE(proc, kernel, , signal
 static int coredump(struct thread *);
 static int killpg1(struct thread *td, int sig, int pgid, int all,
ksiginfo_t *ksi);
-static int issignal(struct thread *td, int stop_allowed);
+static int issignal(struct thread *td);
 static int sigprop(int sig);
 static voidtdsigwakeup(struct thread *, int, sig_t, int);
 static voidsig_suspend_threads(struct thread *, struct proc *, int);
@@ -565,14 +565,12 @@ sigqueue_delete_stopmask_proc(struct pro
  * action, the process stops in issignal().
  */
 int
-cursig(struct thread *td, int stop_allowed)
+cursig(struct thread *td)
 {
PROC_LOCK_ASSERT(td->td_proc, MA_OWNED);
-   KASSERT(stop_allowed == SIG_STOP_ALLOWED ||
-   stop_allowed == SIG_STOP_NOT_ALLOWED, ("cursig: stop_allowed"));
mtx_assert(&td->td_proc->p_sigacts->ps_mtx, MA_OWNED);
THREAD_LOCK_ASSERT(td, MA_NOTOWNED);
-   return (SIGPENDING(td) ? issignal(td, stop_allowed) : 0);
+   return (SIGPENDING(td) ? issignal(td) : 0);
 }
 
 /*
@@ -1202,7 +1200,7 @@ kern_sigtimedwait(struct thread *td, sig
SIGSETNAND(td->td_sigmask, waitset);
for (;;) {
mtx_lock(&ps->ps_mtx);
-   sig = cursig(td, SIG_STOP_ALLOWED);
+   sig = cursig(td);
mtx_unlock(&ps->ps_mtx);
if (sig != 0 && SIGISMEMBER(waitset, sig)) {
if (sigqueue_get(&td->td_sigqueue, sig, ksi) != 0 ||
@@ -1465,7 +1463,7 @@ kern_sigsuspend(struct thread *td, sigse
/* void */;
thread_suspend_check(0);
mtx_lock(&p->p_sigacts->ps_mtx);
-   while ((sig = cursig(td, SIG_STOP_ALLOWED)) != 0)
+   while ((sig = cursig(td)) != 0)
has_sig += postsig(sig);
mtx_unlock(&p->p_sigacts->ps_mtx);
}
@@ -2399,12 +2397,10 @@ static void
 sig_suspend_threads(struct thread *td, struct proc *p, int sending)
 {
struct thread *td2;
-   int wakeup_swapper;
 
PROC_LOCK_ASSERT(p, MA_OWNED);
PROC_SLOCK_ASSERT(p, MA_OWNED);
 
-   wakeup_swapper = 0;
FOREACH_THREAD_IN_PROC(p, td2) {
thread_lock(td2);
td2->td_flags |= TDF_ASTPENDING | TDF_NEEDSUSPCHK;
@@ -2431,8 +2427,6 @@ sig_suspend_threads(struct thread *td, s
}
thread_unlock(td2);
}
-   if (wakeup_swapper)
-   kick_proc0();
 }
 
 int
@@ -2584,7 +2578,7 @@ sigallowstop()
  * postsig(sig);
  */
 static int
-issignal(struct thread *td, int stop_allowed)
+issignal(struct thread *td)
 {
struct proc *p;
struct sigacts *ps;

Modified: head/sys/kern/kern_synch.c
==
--- head/sys/kern/kern_synch.c  Mon Mar 18 15:38:15 2013(r248469)
+++ head/sys/kern/kern_synch.c  Mon Mar 18 17:23:58 2013(r248470)
@@ -205,8 +205,6 @@ _sleep(void *ident, struct lock_object *
sleepq_flags = SLEEPQ_SLEEP;
if (catch)
sleepq_flags |= SLEEPQ_INTERRUPTIBLE;
-   if (priority & PBDRY)
-   sleepq_flags |= SLEEPQ_STOP_ON_BDRY;
 
sleepq_lock(ident);
CTR5(KTR_PROC, "sleep: thread %ld (pid %ld, %

svn commit: r248471 - head/sys/kern

2013-03-18 Thread John Baldwin
Author: jhb
Date: Mon Mar 18 18:04:09 2013
New Revision: 248471
URL: http://svnweb.freebsd.org/changeset/base/248471

Log:
  Tweak some comments.

Modified:
  head/sys/kern/kern_sig.c

Modified: head/sys/kern/kern_sig.c
==
--- head/sys/kern/kern_sig.cMon Mar 18 17:23:58 2013(r248470)
+++ head/sys/kern/kern_sig.cMon Mar 18 18:04:09 2013(r248471)
@@ -560,8 +560,8 @@ sigqueue_delete_stopmask_proc(struct pro
 }
 
 /*
- * Determine signal that should be delivered to process p, the current
- * process, 0 if none.  If there is a pending stop signal with default
+ * Determine signal that should be delivered to thread td, the current
+ * thread, 0 if none.  If there is a pending stop signal with default
  * action, the process stops in issignal().
  */
 int
@@ -2148,9 +2148,9 @@ tdsendsignal(struct proc *p, struct thre
 * Some signals have a process-wide effect and a per-thread
 * component.  Most processing occurs when the process next
 * tries to cross the user boundary, however there are some
-* times when processing needs to be done immediatly, such as
+* times when processing needs to be done immediately, such as
 * waking up threads so that they can cross the user boundary.
-* We try do the per-process part here.
+* We try to do the per-process part here.
 */
if (P_SHOULDSTOP(p)) {
KASSERT(!(p->p_flag & P_WEXIT),
___
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: r248472 - head/sys/dev/puc

2013-03-18 Thread Ryan Stone
Author: rstone
Date: Mon Mar 18 19:22:51 2013
New Revision: 248472
URL: http://svnweb.freebsd.org/changeset/base/248472

Log:
  Correct the definition for Exar XR17V258IV: we must use a config_function
  to specify the offset into the PCI memory spare at which each serial port
  will find its registers.  This was already done for other Exar PCI serial
  devices; it was accidentally omitted for this specific device.
  
  Sponsored by: Sandvine Incorporated
  MFC after:1 week

Modified:
  head/sys/dev/puc/pucdata.c

Modified: head/sys/dev/puc/pucdata.c
==
--- head/sys/dev/puc/pucdata.c  Mon Mar 18 18:04:09 2013(r248471)
+++ head/sys/dev/puc/pucdata.c  Mon Mar 18 19:22:51 2013(r248472)
@@ -629,6 +629,7 @@ const struct puc_cfg puc_pci_devices[] =
"Exar XR17V258IV",
DEFAULT_RCLK * 8,
PUC_PORT_8S, 0x10, 0, -1,
+   .config_function = puc_config_exar
},
 
/* The XR17V358 uses the 125MHz PCIe clock as its reference clock. */
___
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: r248475 - head/sbin/geom/class/eli

2013-03-18 Thread Pawel Jakub Dawidek
Author: pjd
Date: Mon Mar 18 21:11:31 2013
New Revision: 248475
URL: http://svnweb.freebsd.org/changeset/base/248475

Log:
  Reduce stack usage.

Modified:
  head/sbin/geom/class/eli/geom_eli.c

Modified: head/sbin/geom/class/eli/geom_eli.c
==
--- head/sbin/geom/class/eli/geom_eli.c Mon Mar 18 20:36:25 2013
(r248474)
+++ head/sbin/geom/class/eli/geom_eli.c Mon Mar 18 21:11:31 2013
(r248475)
@@ -259,6 +259,8 @@ struct g_command class_commands[] = {
 
 static int verbose = 0;
 
+#defineBUFSIZE 1024
+
 static int
 eli_protect(struct gctl_req *req)
 {
@@ -344,7 +346,7 @@ static int
 eli_genkey_files(struct gctl_req *req, bool new, const char *type,
 struct hmac_ctx *ctxp, char *passbuf, size_t passbufsize)
 {
-   char *p, buf[MAXPHYS], argname[16];
+   char *p, buf[BUFSIZE], argname[16];
const char *file;
int error, fd, i;
ssize_t done;
@@ -431,7 +433,7 @@ eli_genkey_passphrase_prompt(struct gctl
}
 
if (new) {
-   char tmpbuf[BUFSIZ];
+   char tmpbuf[BUFSIZE];
 
p = readpassphrase("Reenter new passphrase: ",
tmpbuf, sizeof(tmpbuf),
@@ -460,7 +462,7 @@ static int
 eli_genkey_passphrase(struct gctl_req *req, struct g_eli_metadata *md, bool 
new,
 struct hmac_ctx *ctxp)
 {
-   char passbuf[MAXPHYS];
+   char passbuf[BUFSIZE];
bool nopassphrase;
int nfiles;
 
___
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: r248477 - in head: lib/libvmmapi usr.sbin/bhyve usr.sbin/bhyvectl usr.sbin/bhyveload

2013-03-18 Thread Neel Natu
Author: neel
Date: Mon Mar 18 22:38:30 2013
New Revision: 248477
URL: http://svnweb.freebsd.org/changeset/base/248477

Log:
  Simplify the assignment of memory to virtual machines by requiring a single
  command line option "-m " to specify the memory size.
  
  Prior to this change the user needed to explicitly specify the amount of
  memory allocated below 4G (-m ) and the amount above 4G (-M 
).
  
  The "-M" option is no longer supported by 'bhyveload' and 'bhyve'.
  
  The start of the PCI hole is fixed at 3GB and cannot be directly changed
  using command line options. However it is still possible to change this in
  special circumstances via the 'vm_set_lowmem_limit()' API provided by
  libvmmapi.
  
  Submitted by: Dinakar Medavaram (initial version)
  Reviewed by:  grehan
  Obtained from:NetApp

Modified:
  head/lib/libvmmapi/vmmapi.c
  head/lib/libvmmapi/vmmapi.h
  head/usr.sbin/bhyve/acpi.c
  head/usr.sbin/bhyve/bhyverun.c
  head/usr.sbin/bhyve/bhyverun.h
  head/usr.sbin/bhyve/mptbl.c
  head/usr.sbin/bhyve/pci_emul.c
  head/usr.sbin/bhyve/pci_virtio_block.c
  head/usr.sbin/bhyve/pci_virtio_net.c
  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 Mon Mar 18 21:29:31 2013(r248476)
+++ head/lib/libvmmapi/vmmapi.c Mon Mar 18 22:38:30 2013(r248477)
@@ -48,8 +48,16 @@ __FBSDID("$FreeBSD$");
 
 #include "vmmapi.h"
 
+#defineGB  (1024 * 1024 * 1024UL)
+
 struct vmctx {
int fd;
+   uint32_t lowmem_limit;
+   enum vm_mmap_style vms;
+   size_t  lowmem;
+   char*lowmem_addr;
+   size_t  highmem;
+   char*highmem_addr;
char*name;
 };
 
@@ -90,6 +98,7 @@ vm_open(const char *name)
assert(vm != NULL);
 
vm->fd = -1;
+   vm->lowmem_limit = 3 * GB;
vm->name = (char *)(vm + 1);
strcpy(vm->name, name);
 
@@ -151,8 +160,22 @@ vm_get_memory_seg(struct vmctx *ctx, vm_
return (error);
 }
 
-int
-vm_setup_memory(struct vmctx *ctx, vm_paddr_t gpa, size_t len, char **mapaddr)
+uint32_t
+vm_get_lowmem_limit(struct vmctx *ctx)
+{
+
+   return (ctx->lowmem_limit);
+}
+
+void
+vm_set_lowmem_limit(struct vmctx *ctx, uint32_t limit)
+{
+
+   ctx->lowmem_limit = limit;
+}
+
+static int
+setup_memory_segment(struct vmctx *ctx, vm_paddr_t gpa, size_t len, char 
**addr)
 {
int error;
struct vm_memory_segment seg;
@@ -165,20 +188,69 @@ vm_setup_memory(struct vmctx *ctx, vm_pa
seg.gpa = gpa;
seg.len = len;
error = ioctl(ctx->fd, VM_MAP_MEMORY, &seg);
-   if (error == 0 && mapaddr != NULL) {
-   *mapaddr = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED,
+   if (error == 0 && addr != NULL) {
+   *addr = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED,
ctx->fd, gpa);
}
return (error);
 }
 
-char *
-vm_map_memory(struct vmctx *ctx, vm_paddr_t gpa, size_t len)
+int
+vm_setup_memory(struct vmctx *ctx, size_t memsize, enum vm_mmap_style vms)
+{
+   char **addr;
+   int error;
+
+   /* XXX VM_MMAP_SPARSE not implemented yet */
+   assert(vms == VM_MMAP_NONE || vms == VM_MMAP_ALL);
+   ctx->vms = vms;
+
+   /*
+* If 'memsize' cannot fit entirely in the 'lowmem' segment then
+* create another 'highmem' segment above 4GB for the remainder.
+*/
+   if (memsize > ctx->lowmem_limit) {
+   ctx->lowmem = ctx->lowmem_limit;
+   ctx->highmem = memsize - ctx->lowmem;
+   } else {
+   ctx->lowmem = memsize;
+   ctx->highmem = 0;
+   }
+
+   if (ctx->lowmem > 0) {
+   addr = (vms == VM_MMAP_ALL) ? &ctx->lowmem_addr : NULL;
+   error = setup_memory_segment(ctx, 0, ctx->lowmem, addr);
+   if (error)
+   return (error);
+   }
+
+   if (ctx->highmem > 0) {
+   addr = (vms == VM_MMAP_ALL) ? &ctx->highmem_addr : NULL;
+   error = setup_memory_segment(ctx, 4*GB, ctx->highmem, addr);
+   if (error)
+   return (error);
+   }
+
+   return (0);
+}
+
+void *
+vm_map_gpa(struct vmctx *ctx, vm_paddr_t gaddr, size_t len)
 {
 
-   /* Map 'len' bytes of memory at guest physical address 'gpa' */
-   return ((char *)mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED,
-ctx->fd, gpa));
+   /* XXX VM_MMAP_SPARSE not implemented yet */
+   assert(ctx->vms == VM_MMAP_ALL);
+
+   if (gaddr < ctx->lowmem && gaddr + len <= ctx->lowmem)
+   return ((void *)(ctx->lowmem_addr + gaddr));
+
+   if (gaddr >= 4*GB) {
+   gaddr -= 4*GB;
+   if (gaddr < ctx->highmem && gaddr + len <= ctx->highmem)
+   

svn commit: r248478 - in head: share/man/man4 sys/dev/atkbdc sys/sys usr.sbin/moused

2013-03-18 Thread Jung-uk Kim
Author: jkim
Date: Mon Mar 18 23:22:47 2013
New Revision: 248478
URL: http://svnweb.freebsd.org/changeset/base/248478

Log:
  Add preliminary support for IBM/Lenovo TrackPoint.
  
  PR:   kern/147237 (based on the initial patch for 8.x)
  Tested by:glebius (device detection and suspend/resume)
  MFC after:1 month

Modified:
  head/share/man/man4/psm.4
  head/sys/dev/atkbdc/psm.c
  head/sys/sys/mouse.h
  head/usr.sbin/moused/moused.c

Modified: head/share/man/man4/psm.4
==
--- head/share/man/man4/psm.4   Mon Mar 18 22:38:30 2013(r248477)
+++ head/share/man/man4/psm.4   Mon Mar 18 23:22:47 2013(r248478)
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 27, 2012
+.Dd March 18, 2013
 .Dt PSM 4
 .Os
 .Sh NAME
@@ -339,6 +339,12 @@ at boot-time.
 This will enable
 .Nm
 to handle packets from guest devices (sticks) and extra buttons.
+Similarly, extended support for IBM/Lenovo TrackPoint can be enabled
+by setting
+.Va hw.psm.trackpoint_support
+to
+.Em 1
+at boot-time.
 .Pp
 Tap and drag gestures can be disabled by setting
 .Va hw.psm.tap_enabled
@@ -832,8 +838,8 @@ In contrast, some pad products, e.g.\& s
 and Interlink VersaPad, treat the tapping action
 as fourth button events.
 .Pp
-It is reported that ALPS GlidePoint, Synaptics Touchpad, and
-Interlink VersaPad require
+It is reported that ALPS GlidePoint, Synaptics Touchpad, IBM/Lenovo
+TrackPoint, and Interlink VersaPad require
 .Em INITAFTERSUSPEND
 flag in order to recover from suspended state.
 This flag is automatically set when one of these devices is detected by the

Modified: head/sys/dev/atkbdc/psm.c
==
--- head/sys/dev/atkbdc/psm.c   Mon Mar 18 22:38:30 2013(r248477)
+++ head/sys/dev/atkbdc/psm.c   Mon Mar 18 23:22:47 2013(r248478)
@@ -260,6 +260,38 @@ typedef struct synapticsaction {
int in_vscroll;
 } synapticsaction_t;
 
+enum {
+   TRACKPOINT_SYSCTL_SENSITIVITY,
+   TRACKPOINT_SYSCTL_NEGATIVE_INERTIA,
+   TRACKPOINT_SYSCTL_UPPER_PLATEAU,
+   TRACKPOINT_SYSCTL_BACKUP_RANGE,
+   TRACKPOINT_SYSCTL_DRAG_HYSTERESIS,
+   TRACKPOINT_SYSCTL_MINIMUM_DRAG,
+   TRACKPOINT_SYSCTL_UP_THRESHOLD,
+   TRACKPOINT_SYSCTL_THRESHOLD,
+   TRACKPOINT_SYSCTL_JENKS_CURVATURE,
+   TRACKPOINT_SYSCTL_Z_TIME,
+   TRACKPOINT_SYSCTL_PRESS_TO_SELECT,
+   TRACKPOINT_SYSCTL_SKIP_BACKUPS
+};
+
+typedef struct trackpointinfo {
+   struct sysctl_ctx_list sysctl_ctx;
+   struct sysctl_oid *sysctl_tree;
+   int sensitivity;
+   int inertia;
+   int uplateau;
+   int reach;
+   int draghys;
+   int mindrag;
+   int upthresh;
+   int threshold;
+   int jenks;
+   int ztime;
+   int pts;
+   int skipback;
+} trackpointinfo_t;
+
 /* driver control block */
 struct psm_softc { /* Driver status information */
int unit;
@@ -274,6 +306,8 @@ struct psm_softc {  /* Driver status inf
synapticshw_t   synhw;  /* Synaptics hardware information */
synapticsinfo_t syninfo;/* Synaptics configuration */
synapticsaction_t synaction;/* Synaptics action context */
+   int tphw;   /* TrackPoint hardware information */
+   trackpointinfo_t tpinfo;/* TrackPoint configuration */
mousemode_t mode;   /* operation mode */
mousemode_t dflt_mode;  /* default operation mode */
mousestatus_t   status; /* accumulated mouse movement */
@@ -344,6 +378,9 @@ TUNABLE_INT("hw.psm.tap_enabled", &tap_e
 static int synaptics_support = 0;
 TUNABLE_INT("hw.psm.synaptics_support", &synaptics_support);
 
+static int trackpoint_support = 0;
+TUNABLE_INT("hw.psm.trackpoint_support", &trackpoint_support);
+
 static int verbose = PSM_DEBUG;
 TUNABLE_INT("debug.psm.loglevel", &verbose);
 
@@ -432,6 +469,7 @@ static probefunc_t  enable_4dmouse;
 static probefunc_t enable_4dplus;
 static probefunc_t enable_mmanplus;
 static probefunc_t enable_synaptics;
+static probefunc_t enable_trackpoint;
 static probefunc_t enable_versapad;
 
 static struct {
@@ -466,6 +504,8 @@ static struct {
  0x80, MOUSE_PS2_PACKETSIZE, enable_kmouse },
{ MOUSE_MODEL_VERSAPAD, /* Interlink electronics VersaPad */
  0xe8, MOUSE_PS2VERSA_PACKETSIZE, enable_versapad },
+   { MOUSE_MODEL_TRACKPOINT,   /* IBM/Lenovo TrackPoint */
+ 0xc0, MOUSE_PS2_PACKETSIZE, enable_trackpoint },
{ MOUSE_MODEL_GENERIC,
  0xc0, MOUSE_PS2_PACKETSIZE, NULL },
 };
@@ -708,6 +748,7 @@ model_name(int model)
{ MOUSE_MODEL_4DPLUS,   "4D+ Mouse" },
{ MOUSE_MODEL_SYNAPTICS,"Synaptics Touchpad" },
{ 

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

2013-03-18 Thread Jung-uk Kim
Author: jkim
Date: Mon Mar 18 23:31:22 2013
New Revision: 248479
URL: http://svnweb.freebsd.org/changeset/base/248479

Log:
  List TrackPoint device before generic model.

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

Modified: head/sys/dev/atkbdc/psm.c
==
--- head/sys/dev/atkbdc/psm.c   Mon Mar 18 23:22:47 2013(r248478)
+++ head/sys/dev/atkbdc/psm.c   Mon Mar 18 23:31:22 2013(r248479)
@@ -747,8 +747,8 @@ model_name(int model)
{ MOUSE_MODEL_4D,   "4D Mouse" },
{ MOUSE_MODEL_4DPLUS,   "4D+ Mouse" },
{ MOUSE_MODEL_SYNAPTICS,"Synaptics Touchpad" },
-   { MOUSE_MODEL_GENERIC,  "Generic PS/2 mouse" },
{ MOUSE_MODEL_TRACKPOINT,   "IBM/Lenovo TrackPoint" },
+   { MOUSE_MODEL_GENERIC,  "Generic PS/2 mouse" },
{ MOUSE_MODEL_UNKNOWN,  "Unknown" },
};
int i;
___
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: r248480 - head/sys/dev/fdt

2013-03-18 Thread Aleksandr Rybalko
Author: ray
Date: Mon Mar 18 23:35:01 2013
New Revision: 248480
URL: http://svnweb.freebsd.org/changeset/base/248480

Log:
  Allow simplebus to attach in less strict way, when "simple-bus" listed on not
  first position of compatible property, so simplebus driver can be generic
  driver for any bus listed as compatible with "simple-bus".
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/dev/fdt/simplebus.c

Modified: head/sys/dev/fdt/simplebus.c
==
--- head/sys/dev/fdt/simplebus.cMon Mar 18 23:31:22 2013
(r248479)
+++ head/sys/dev/fdt/simplebus.cMon Mar 18 23:35:01 2013
(r248480)
@@ -134,12 +134,12 @@ static int
 simplebus_probe(device_t dev)
 {
 
-   if (!ofw_bus_is_compatible_strict(dev, "simple-bus"))
+   if (!ofw_bus_is_compatible(dev, "simple-bus"))
return (ENXIO);
 
device_set_desc(dev, "Flattened device tree simple bus");
 
-   return (BUS_PROBE_DEFAULT);
+   return (BUS_PROBE_GENERIC);
 }
 
 static int
___
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: r248481 - head/sys/dev/fdt

2013-03-18 Thread Aleksandr Rybalko
Author: ray
Date: Mon Mar 18 23:38:15 2013
New Revision: 248481
URL: http://svnweb.freebsd.org/changeset/base/248481

Log:
  Hide "no default resources for" warning under bootverbose. It's ok to use
  optional resources.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/dev/fdt/simplebus.c

Modified: head/sys/dev/fdt/simplebus.c
==
--- head/sys/dev/fdt/simplebus.cMon Mar 18 23:35:01 2013
(r248480)
+++ head/sys/dev/fdt/simplebus.cMon Mar 18 23:38:15 2013
(r248481)
@@ -251,8 +251,9 @@ simplebus_alloc_resource(device_t bus, d
 
rle = resource_list_find(&di->di_res, type, *rid);
if (rle == NULL) {
-   device_printf(bus, "no default resources for "
-   "rid = %d, type = %d\n", *rid, type);
+   if (bootverbose)
+   device_printf(bus, "no default resources for "
+   "rid = %d, type = %d\n", *rid, type);
return (NULL);
}
start = rle->start;
___
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: r248482 - head/sys/dev/fdt

2013-03-18 Thread Aleksandr Rybalko
Author: ray
Date: Mon Mar 18 23:41:19 2013
New Revision: 248482
URL: http://svnweb.freebsd.org/changeset/base/248482

Log:
  Allow simplebus to attach to another simplebus.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/dev/fdt/simplebus.c

Modified: head/sys/dev/fdt/simplebus.c
==
--- head/sys/dev/fdt/simplebus.cMon Mar 18 23:38:15 2013
(r248481)
+++ head/sys/dev/fdt/simplebus.cMon Mar 18 23:41:19 2013
(r248482)
@@ -129,6 +129,8 @@ static driver_t simplebus_driver = {
 devclass_t simplebus_devclass;
 
 DRIVER_MODULE(simplebus, fdtbus, simplebus_driver, simplebus_devclass, 0, 0);
+DRIVER_MODULE(simplebus, simplebus, simplebus_driver, simplebus_devclass, 0,
+0);
 
 static int
 simplebus_probe(device_t dev)
___
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: r248484 - in head: etc/mtree share/examples share/examples/bhyve

2013-03-18 Thread Neel Natu
Author: neel
Date: Mon Mar 18 23:46:14 2013
New Revision: 248484
URL: http://svnweb.freebsd.org/changeset/base/248484

Log:
  Add bhyve to examples.
  
  Requested by: alfred, julian
  Obtained from:NetApp

Added:
  head/share/examples/bhyve/
  head/share/examples/bhyve/vmrun.sh   (contents, props changed)
Modified:
  head/etc/mtree/BSD.usr.dist
  head/share/examples/Makefile

Modified: head/etc/mtree/BSD.usr.dist
==
--- head/etc/mtree/BSD.usr.dist Mon Mar 18 23:46:02 2013(r248483)
+++ head/etc/mtree/BSD.usr.dist Mon Mar 18 23:46:14 2013(r248484)
@@ -217,6 +217,8 @@
 ..
 atf
 ..
+bhyve
+..
 bootforth
 ..
 csh

Modified: head/share/examples/Makefile
==
--- head/share/examples/MakefileMon Mar 18 23:46:02 2013
(r248483)
+++ head/share/examples/MakefileMon Mar 18 23:46:14 2013
(r248484)
@@ -7,6 +7,7 @@
 LDIRS= BSD_daemon \
FreeBSD_version \
IPv6 \
+   bhyve \
bootforth \
csh \
cvsup \
@@ -42,6 +43,7 @@ XFILES=   BSD_daemon/FreeBSD.pfa \
FreeBSD_version/Makefile \
FreeBSD_version/README \
IPv6/USAGE \
+   bhyve/vmrun.sh \
bootforth/README \
bootforth/boot.4th \
bootforth/frames.4th \

Added: head/share/examples/bhyve/vmrun.sh
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/examples/bhyve/vmrun.sh  Mon Mar 18 23:46:14 2013
(r248484)
@@ -0,0 +1,179 @@
+#!/bin/sh
+#
+# Copyright (c) 2013 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$
+#
+
+LOADER=/usr/sbin/bhyveload
+BHYVECTL=/usr/sbin/bhyvectl
+FBSDRUN=/usr/sbin/bhyve
+
+DEFAULT_MEMSIZE=512
+DEFAULT_CPUS=2
+DEFAULT_TAPDEV=tap0
+
+DEFAULT_VIRTIO_DISK="./diskdev"
+DEFAULT_ISOFILE="./release.iso"
+
+usage() {
+   echo "Usage: vmrun.sh [-hai][-m ][-d ][-I ][-t ] "
+   echo "   -h: display this help message"
+   echo "   -a: force memory mapped local apic access"
+   echo "   -c: number of virtual cpus (default is ${DEFAULT_CPUS})"
+   echo "   -d: virtio diskdev file (default is 
${DEFAULT_VIRTIO_DISK})"
+   echo "   -i: force boot of the Installation CDROM image"
+   echo "   -I: Installation CDROM image location (default is 
${DEFAULT_ISOFILE})"
+   echo "   -m: memory size in MB (default is ${DEFAULT_MEMSIZE}MB)"
+   echo "   -t: tap device for virtio-net (default is $DEFAULT_TAPDEV)"
+   echo ""
+   echo "   This script needs to be executed with superuser privileges"
+   echo ""
+   exit 1
+}
+
+if [ `id -u` -ne 0 ]; then
+   usage
+fi
+
+kldstat -n vmm > /dev/null 2>&1 
+if [ $? -ne 0 ]; then
+   echo "vmm.ko is not loaded!"
+   exit 1
+fi
+
+force_install=0
+isofile=${DEFAULT_ISOFILE}
+memsize=${DEFAULT_MEMSIZE}
+cpus=${DEFAULT_CPUS}
+virtio_diskdev=${DEFAULT_VIRTIO_DISK}
+tapdev=${DEFAULT_TAPDEV}
+apic_opt=""
+
+while getopts haic:I:m:d:t: c ; do
+   case $c in
+   h)
+   usage
+   ;;
+   a)
+   apic_opt="-a"
+   ;;
+   d)
+   virtio_diskdev=${OPTARG}
+   ;;
+   i)
+   force_install=1
+   ;;
+   I)
+   isofile=${OPTARG}
+   ;;
+   c)
+   cpus=${OPTARG}
+   ;;
+   m)
+   memsize=${OPTARG}
+

svn commit: r248485 - head/sys/dev/fdt

2013-03-18 Thread Aleksandr Rybalko
Author: ray
Date: Mon Mar 18 23:51:39 2013
New Revision: 248485
URL: http://svnweb.freebsd.org/changeset/base/248485

Log:
  Don't hesitate to ask parent to setup IRQ finally.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/dev/fdt/simplebus.c

Modified: head/sys/dev/fdt/simplebus.c
==
--- head/sys/dev/fdt/simplebus.cMon Mar 18 23:46:14 2013
(r248484)
+++ head/sys/dev/fdt/simplebus.cMon Mar 18 23:51:39 2013
(r248485)
@@ -286,9 +286,6 @@ simplebus_setup_intr(device_t bus, devic
enum intr_polarity pol;
int error, rid;
 
-   if (device_get_parent(child) != bus)
-   return (ECHILD);
-
di = device_get_ivars(child);
if (di == NULL)
return (ENXIO);
___
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: r248486 - head/sys/modules/dtrace/fbt

2013-03-18 Thread Justin Hibbits
Author: jhibbits
Date: Tue Mar 19 00:39:02 2013
New Revision: 248486
URL: http://svnweb.freebsd.org/changeset/base/248486

Log:
  Fix the powerpc64 build.  MACHINE_CPUARCH is common for powerpc/powerpc64,
  not MACHINE_ARCH.

Modified:
  head/sys/modules/dtrace/fbt/Makefile

Modified: head/sys/modules/dtrace/fbt/Makefile
==
--- head/sys/modules/dtrace/fbt/MakefileMon Mar 18 23:51:39 2013
(r248485)
+++ head/sys/modules/dtrace/fbt/MakefileTue Mar 19 00:39:02 2013
(r248486)
@@ -3,7 +3,7 @@
 .PATH: ${.CURDIR}/../../../cddl/dev/fbt
 
 KMOD=  fbt
-.if ${MACHINE_ARCH} == "powerpc"
+.if ${MACHINE_CPUARCH} == "powerpc"
 SRCS=  fbt_powerpc.c
 .else
 SRCS=  fbt.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: r248487 - head/etc/rc.d

2013-03-18 Thread Colin Percival
Author: cperciva
Date: Tue Mar 19 04:42:04 2013
New Revision: 248487
URL: http://svnweb.freebsd.org/changeset/base/248487

Log:
  If dumpdev is AUTO but no dump device has been set -- i.e., there is no swap
  space configured for rc.d/dumpon to designate for dumping -- then exit
  silently rather than with a
  > realpath: /dev/dumpdev: No such file or directory
  error message.
  
  An argument could be made that we should print a (more informative) warning
  message; but given that under the same conditions the rc.d/dumpon script will
  already print a
  > No suitable dump device was found
  warning, it seems that printing an additional
  > Dump device does not exist.  Savecore not run.
  warning would be superfluous.

Modified:
  head/etc/rc.d/savecore

Modified: head/etc/rc.d/savecore
==
--- head/etc/rc.d/savecore  Tue Mar 19 00:39:02 2013(r248486)
+++ head/etc/rc.d/savecore  Tue Mar 19 04:42:04 2013(r248487)
@@ -23,6 +23,9 @@ savecore_prestart()
return 1
;;
[Aa][Uu][Tt][Oo])
+   if [ ! -L /bin/realpath ]; then
+   return 1
+   fi
dumpdev=`/bin/realpath /dev/dumpdev`
;;
esac
___
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: r248488 - head/etc/rc.d

2013-03-18 Thread Colin Percival
Author: cperciva
Date: Tue Mar 19 05:08:25 2013
New Revision: 248488
URL: http://svnweb.freebsd.org/changeset/base/248488

Log:
  Fix typo in previous commit: Exit if */dev/dumpdev* does not exist, not if
  */bin/realpath* does not exist...
  
  Submitted by: markj
  Pointy hat to:cperciva

Modified:
  head/etc/rc.d/savecore

Modified: head/etc/rc.d/savecore
==
--- head/etc/rc.d/savecore  Tue Mar 19 04:42:04 2013(r248487)
+++ head/etc/rc.d/savecore  Tue Mar 19 05:08:25 2013(r248488)
@@ -23,7 +23,7 @@ savecore_prestart()
return 1
;;
[Aa][Uu][Tt][Oo])
-   if [ ! -L /bin/realpath ]; then
+   if [ ! -L /dev/dumpdev ]; then
return 1
fi
dumpdev=`/bin/realpath /dev/dumpdev`
___
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: r248489 - head/lib/libc/sys

2013-03-18 Thread Gleb Smirnoff
Author: glebius
Date: Tue Mar 19 05:44:25 2013
New Revision: 248489
URL: http://svnweb.freebsd.org/changeset/base/248489

Log:
  There are actually two different cases when mlock(2) returns
  ENOMEM. Clarify this, taking text from SUS.
  
  Reviewed by:  kib

Modified:
  head/lib/libc/sys/mlock.2

Modified: head/lib/libc/sys/mlock.2
==
--- head/lib/libc/sys/mlock.2   Tue Mar 19 05:08:25 2013(r248488)
+++ head/lib/libc/sys/mlock.2   Tue Mar 19 05:44:25 2013(r248489)
@@ -28,7 +28,7 @@
 .\"@(#)mlock.2 8.2 (Berkeley) 12/11/93
 .\" $FreeBSD$
 .\"
-.Dd December 25, 2012
+.Dd March 18, 2013
 .Dt MLOCK 2
 .Os
 .Sh NAME
@@ -138,7 +138,12 @@ is set to 0 and the caller is not the su
 .It Bq Er EINVAL
 The address given is not page aligned or the length is negative.
 .It Bq Er ENOMEM
-Some portion of the indicated address range is not allocated.
+Some or all of the address range specified by the addr and len
+arguments does not correspond to valid mapped pages in the address space
+of the process.
+.It Bq Er ENOMEM
+Locking the pages mapped by the specified range would exceed a limit on
+the amount of memory that the process may lock.
 .El
 .Sh "SEE ALSO"
 .Xr fork 2 ,
___
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: r248490 - head/sys/net

2013-03-18 Thread Andrey V. Elsukov
Author: ae
Date: Tue Mar 19 05:51:47 2013
New Revision: 248490
URL: http://svnweb.freebsd.org/changeset/base/248490

Log:
  Fix style and comments.

Modified:
  head/sys/net/pfil.c
  head/sys/net/pfil.h

Modified: head/sys/net/pfil.c
==
--- head/sys/net/pfil.c Tue Mar 19 05:44:25 2013(r248489)
+++ head/sys/net/pfil.c Tue Mar 19 05:51:47 2013(r248490)
@@ -94,12 +94,13 @@ pfil_run_hooks(struct pfil_head *ph, str
 
 /*
  * pfil_try_rlock() acquires rm reader lock for specified head
- * if this is immediately possible,
+ * if this is immediately possible.
  */
 int
 pfil_try_rlock(struct pfil_head *ph, struct rm_priotracker *tracker)
 {
-   return PFIL_TRY_RLOCK(ph, tracker);
+
+   return (PFIL_TRY_RLOCK(ph, tracker));
 }
 
 /*
@@ -108,6 +109,7 @@ pfil_try_rlock(struct pfil_head *ph, str
 void
 pfil_rlock(struct pfil_head *ph, struct rm_priotracker *tracker)
 {
+
PFIL_RLOCK(ph, tracker);
 }
 
@@ -117,6 +119,7 @@ pfil_rlock(struct pfil_head *ph, struct 
 void
 pfil_runlock(struct pfil_head *ph, struct rm_priotracker *tracker)
 {
+
PFIL_RUNLOCK(ph, tracker);
 }
 
@@ -126,6 +129,7 @@ pfil_runlock(struct pfil_head *ph, struc
 void
 pfil_wlock(struct pfil_head *ph)
 {
+
PFIL_WLOCK(ph);
 }
 
@@ -135,16 +139,19 @@ pfil_wlock(struct pfil_head *ph)
 void
 pfil_wunlock(struct pfil_head *ph)
 {
+
PFIL_WUNLOCK(ph);
 }
 
 /*
- * pfil_wowned() releases writer lock for specified head.
+ * pfil_wowned() returns a non-zero value if the current thread owns
+ * an exclusive lock.
  */
 int
 pfil_wowned(struct pfil_head *ph)
 {
-   return PFIL_WOWNED(ph);
+
+   return (PFIL_WOWNED(ph));
 }
 /*
  * pfil_head_register() registers a pfil_head with the packet filter hook

Modified: head/sys/net/pfil.h
==
--- head/sys/net/pfil.h Tue Mar 19 05:44:25 2013(r248489)
+++ head/sys/net/pfil.h Tue Mar 19 05:51:47 2013(r248490)
@@ -123,14 +123,14 @@ struct pfil_head *pfil_head_get(int, u_l
if ((p)->flags & PFIL_FLAG_PRIVATE_LOCK)\
PFIL_LOCK_DESTROY_REAL((p)->ph_plock);  \
 } while (0)
-#define PFIL_TRY_RLOCK(p, t)   rm_try_rlock((p)->ph_plock, (t))
-#define PFIL_RLOCK(p, t)   rm_rlock((p)->ph_plock, (t))
-#define PFIL_WLOCK(p)  rm_wlock((p)->ph_plock)
-#define PFIL_RUNLOCK(p, t) rm_runlock((p)->ph_plock, (t))
-#define PFIL_WUNLOCK(p)rm_wunlock((p)->ph_plock)
-#define PFIL_WOWNED(p) rm_wowned((p)->ph_plock)
-#define PFIL_LIST_LOCK()   mtx_lock(&pfil_global_lock)
-#define PFIL_LIST_UNLOCK() mtx_unlock(&pfil_global_lock)
+#definePFIL_TRY_RLOCK(p, t)rm_try_rlock((p)->ph_plock, (t))
+#definePFIL_RLOCK(p, t)rm_rlock((p)->ph_plock, (t))
+#definePFIL_WLOCK(p)   rm_wlock((p)->ph_plock)
+#definePFIL_RUNLOCK(p, t)  rm_runlock((p)->ph_plock, (t))
+#definePFIL_WUNLOCK(p) rm_wunlock((p)->ph_plock)
+#definePFIL_WOWNED(p)  rm_wowned((p)->ph_plock)
+#definePFIL_LIST_LOCK()mtx_lock(&pfil_global_lock)
+#definePFIL_LIST_UNLOCK()  mtx_unlock(&pfil_global_lock)
 
 static __inline struct packet_filter_hook *
 pfil_hook_get(int dir, struct pfil_head *ph)
___
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: r248491 - head/sys/netpfil/ipfw

2013-03-18 Thread Andrey V. Elsukov
Author: ae
Date: Tue Mar 19 06:04:17 2013
New Revision: 248491
URL: http://svnweb.freebsd.org/changeset/base/248491

Log:
  Separate the locking macros that are used in the packet flow path
  from others. This helps easy switch to use pfil(4) lock.

Modified:
  head/sys/netpfil/ipfw/ip_fw2.c
  head/sys/netpfil/ipfw/ip_fw_private.h

Modified: head/sys/netpfil/ipfw/ip_fw2.c
==
--- head/sys/netpfil/ipfw/ip_fw2.c  Tue Mar 19 05:51:47 2013
(r248490)
+++ head/sys/netpfil/ipfw/ip_fw2.c  Tue Mar 19 06:04:17 2013
(r248491)
@@ -1203,9 +1203,9 @@ do {  
\
args->f_id.dst_port = dst_port = ntohs(dst_port);
}
 
-   IPFW_RLOCK(chain);
+   IPFW_PF_RLOCK(chain);
if (! V_ipfw_vnet_ready) { /* shutting down, leave NOW. */
-   IPFW_RUNLOCK(chain);
+   IPFW_PF_RUNLOCK(chain);
return (IP_FW_PASS);/* accept */
}
if (args->rule.slot) {
@@ -2459,7 +2459,7 @@ do {  
\
retval = IP_FW_DENY;
printf("ipfw: ouch!, skip past end of rules, denying packet\n");
}
-   IPFW_RUNLOCK(chain);
+   IPFW_PF_RUNLOCK(chain);
 #ifdef __FreeBSD__
if (ucred_cache != NULL)
crfree(ucred_cache);

Modified: head/sys/netpfil/ipfw/ip_fw_private.h
==
--- head/sys/netpfil/ipfw/ip_fw_private.h   Tue Mar 19 05:51:47 2013
(r248490)
+++ head/sys/netpfil/ipfw/ip_fw_private.h   Tue Mar 19 06:04:17 2013
(r248491)
@@ -278,10 +278,12 @@ struct sockopt;   /* used by tcp_var.h */
 #defineIPFW_RLOCK_ASSERT(_chain)   rw_assert(&(_chain)->rwmtx, 
RA_RLOCKED)
 #defineIPFW_WLOCK_ASSERT(_chain)   rw_assert(&(_chain)->rwmtx, 
RA_WLOCKED)
 
-#define IPFW_RLOCK(p) rw_rlock(&(p)->rwmtx)
-#define IPFW_RUNLOCK(p) rw_runlock(&(p)->rwmtx)
-#define IPFW_WLOCK(p) rw_wlock(&(p)->rwmtx)
-#define IPFW_WUNLOCK(p) rw_wunlock(&(p)->rwmtx)
+#defineIPFW_RLOCK(p)   rw_rlock(&(p)->rwmtx)
+#defineIPFW_RUNLOCK(p) rw_runlock(&(p)->rwmtx)
+#defineIPFW_WLOCK(p)   rw_wlock(&(p)->rwmtx)
+#defineIPFW_WUNLOCK(p) rw_wunlock(&(p)->rwmtx)
+#defineIPFW_PF_RLOCK(p)IPFW_RLOCK(p)
+#defineIPFW_PF_RUNLOCK(p)  IPFW_RUNLOCK(p)
 
 #defineIPFW_UH_RLOCK_ASSERT(_chain)rw_assert(&(_chain)->uh_lock, 
RA_RLOCKED)
 #defineIPFW_UH_WLOCK_ASSERT(_chain)rw_assert(&(_chain)->uh_lock, 
RA_WLOCKED)
___
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"