svn commit: r227417 - head/share/misc

2011-11-10 Thread Ruslan Mahmatkhanov
Author: rm (ports committer)
Date: Thu Nov 10 08:03:31 2011
New Revision: 227417
URL: http://svn.freebsd.org/changeset/base/227417

Log:
  Fix date of commit bit proposing (s/2010/2011/)
  
  Spotted by:pluknet
  Approved by:   novel (mentor)

Modified:
  head/share/misc/committers-ports.dot

Modified: head/share/misc/committers-ports.dot
==
--- head/share/misc/committers-ports.dotThu Nov 10 06:20:18 2011
(r227416)
+++ head/share/misc/committers-ports.dotThu Nov 10 08:03:31 2011
(r227417)
@@ -156,7 +156,7 @@ pgollucci [label="Philip M. Gollucci\npg
 rafan [label="Rong-En Fan\nra...@freebsd.org\n2006/06/23"]
 rakuco [label="Raphael Kubo da Costa\nrak...@freebsd.org\n2011/08/22"]
 rene [label="Rene Ladan\nr...@freebsd.org\n2010/04/11"]
-rm [label="Ruslan Mahmatkhanov\n...@freebsd.org\n2010/11/06"]
+rm [label="Ruslan Mahmatkhanov\n...@freebsd.org\n2011/11/06"]
 rnoland [label="Robert Noland\nrnol...@freebsd.org\n2008/07/21"]
 romain [label="Romain Tartiere\nrom...@freebsd.org\n2010/01/24"]
 sahil [label="Sahil Tandon\nsa...@freebsd.org\n2010/04/11"]
___
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: r227394 - in head/sys: amd64/amd64 i386/i386

2011-11-10 Thread Kostik Belousov
On Thu, Nov 10, 2011 at 07:23:23AM +0100, Pawel Jakub Dawidek wrote:
> On Wed, Nov 09, 2011 at 07:31:28PM +0200, Kostik Belousov wrote:
> > On Wed, Nov 09, 2011 at 05:25:43PM +, Konstantin Belousov wrote:
> > > Author: kib
> > > Date: Wed Nov  9 17:25:43 2011
> > > New Revision: 227394
> > > URL: http://svn.freebsd.org/changeset/base/227394
> > > 
> > > Log:
> > >   Stopped process may legitimately have some threads sleeping and not
> > >   suspended, if the sleep is uninterruptible.
> > Even more, stopped process might have some threads still running in the
> > kernel mode, or inhibited due to wait on blockable locks. I was unable
> > to design an expression that would assert that such thread will be stopped
> > at the kernel->user boundary.
> > 
> > The assertion itself is useful and catched several bugs, but theoretically
> > can cause false positives. If any report of the fired assert for kernel-mode
> > thread is provided, I will remove the assertions.
> 
> If in five years some change will make it to fire and you won't be
> around, nobody will remember this e-mail of yours and someone will spend
> time on looking for a bug that doesn't exist.
> 
> If we know it can cause false positives, I'd be in favour of removing it
> or changing it into a warning or at the very least moving this
> information into commit log.
Yes, I do agree that removing the assertion is the most straightforward
solution, but on the assertion already catched more real bugs then
caused headaches (my headache, BTW). Either I change the third or condition
to plain P_SHOULDSTOP(), or create a way to assert exactly what I need.


pgpoaQTWT4FUl.pgp
Description: PGP signature


svn commit: r227418 - head/share/man/man4

2011-11-10 Thread Sergey Kandaurov
Author: pluknet
Date: Thu Nov 10 11:17:40 2011
New Revision: 227418
URL: http://svn.freebsd.org/changeset/base/227418

Log:
  Sync definitions with  header.

Modified:
  head/share/man/man4/mtio.4

Modified: head/share/man/man4/mtio.4
==
--- head/share/man/man4/mtio.4  Thu Nov 10 08:03:31 2011(r227417)
+++ head/share/man/man4/mtio.4  Thu Nov 10 11:17:40 2011(r227418)
@@ -35,7 +35,7 @@
 .\" @(#)mtio.4 8.1 (Berkeley) 6/5/93
 .\" $FreeBSD$
 .\"
-.Dd February 11, 1996
+.Dd November 11, 2011
 .Dt MTIO 4
 .Os
 .Sh NAME
@@ -97,7 +97,7 @@ The following definitions are from
 /* structure for MTIOCTOP - mag tape op command */
 struct mtop {
short   mt_op;  /* operations defined below */
-   daddr_t mt_count;   /* how many of them */
+   int32_t mt_count;   /* how many of them */
 };
 
 /* operations */
@@ -165,19 +165,25 @@ struct mtget {
short   mt_dsreg;   /* ``drive status'' register */
short   mt_erreg;   /* ``error'' register */
 /* end device-dependent registers */
+   /*
+* Note that the residual count, while maintained, may be
+* be nonsense because the size of the residual may (greatly)
+* exceed 32 K-bytes. Use the MTIOCERRSTAT ioctl to get a
+* more accurate count.
+*/
short   mt_resid;   /* residual count */
 #if defined (__FreeBSD__)
-   daddr_t mt_blksiz;  /* presently operating blocksize */
-   daddr_t mt_density; /* presently operating density */
+   int32_t mt_blksiz;  /* presently operating blocksize */
+   int32_t mt_density; /* presently operating density */
u_int32_t mt_comp;  /* presently operating compression */
-   daddr_t mt_blksiz0; /* blocksize for mode 0 */
-   daddr_t mt_blksiz1; /* blocksize for mode 1 */
-   daddr_t mt_blksiz2; /* blocksize for mode 2 */
-   daddr_t mt_blksiz3; /* blocksize for mode 3 */
-   daddr_t mt_density0;/* density for mode 0 */
-   daddr_t mt_density1;/* density for mode 1 */
-   daddr_t mt_density2;/* density for mode 2 */
-   daddr_t mt_density3;/* density for mode 3 */
+   int32_t mt_blksiz0; /* blocksize for mode 0 */
+   int32_t mt_blksiz1; /* blocksize for mode 1 */
+   int32_t mt_blksiz2; /* blocksize for mode 2 */
+   int32_t mt_blksiz3; /* blocksize for mode 3 */
+   int32_t mt_density0;/* density for mode 0 */
+   int32_t mt_density1;/* density for mode 1 */
+   int32_t mt_density2;/* density for mode 2 */
+   int32_t mt_density3;/* density for mode 3 */
 /* the following are not yet implemented */
u_int32_t mt_comp0; /* compression type for mode 0 */
u_int32_t mt_comp1; /* compression type for mode 1 */
@@ -185,8 +191,8 @@ struct mtget {
u_int32_t mt_comp3; /* compression type for mode 3 */
 /* end not yet implemented */
 #endif
-   daddr_t mt_fileno;  /* relative file number of current position */
-   daddr_t mt_blkno;   /* relative block number of current position */
+   int32_t mt_fileno;  /* relative file number of current position */
+   int32_t mt_blkno;   /* relative block number of current position */
 };
 
 /* structure for MTIOCERRSTAT - tape get error status command */
@@ -198,10 +204,10 @@ struct scsi_tape_errors {
 * of issuing an MTIOCERRSTAT unlatches and clears them.
 */
u_int8_t io_sense[32];  /* Last Sense Data For Data I/O */
-   u_int32_t io_resid; /* residual count from last Data I/O */
+   int32_t io_resid;   /* residual count from last Data I/O */
u_int8_t io_cdb[16];/* Command that Caused the Last Data Sense */
u_int8_t ctl_sense[32]; /* Last Sense Data For Control I/O */
-   u_int32_t ctl_resid;/* residual count from last Control I/O */
+   int32_t ctl_resid;  /* residual count from last Control I/O */
u_int8_t ctl_cdb[16];   /* Command that Caused the Last Control Sense */
/*
 * These are the read and write cumulative error counters.
@@ -276,20 +282,6 @@ union mterrstat {
 #defineDEFTAPE "/dev/nsa0"
 #endif
 
-#ifdef _KERNEL
-/*
- * minor device number
- */
-
-#defineT_UNIT  003 /* unit selection */
-#defineT_NOREWIND  004 /* no rewind on close */
-#defineT_DENSEL030 /* density select */
-#defineT_800BPI000 /* select  800 bpi */
-#defineT_1600BPI   010 /* select 1600 bpi */
-#defineT_6250BPI   020 /* select 6250 bpi */
-#defineT_BADBPI030 /* undefined selection */
-#endif
-
 #endif /* !_SYS_MTIO_H_ */
 .Ed
 .Sh FILES
___
svn-src-head@freebsd.org mailin

svn commit: r227419 - head/sbin/ipfw

2011-11-10 Thread Gleb Smirnoff
Author: glebius
Date: Thu Nov 10 12:05:26 2011
New Revision: 227419
URL: http://svn.freebsd.org/changeset/base/227419

Log:
  Note that NAT instance argument can be tablearg.
  
  PR:   misc/162265
  Submitted by: Paul Procacci 

Modified:
  head/sbin/ipfw/ipfw.8

Modified: head/sbin/ipfw/ipfw.8
==
--- head/sbin/ipfw/ipfw.8   Thu Nov 10 11:17:40 2011(r227418)
+++ head/sbin/ipfw/ipfw.8   Thu Nov 10 12:05:26 2011(r227419)
@@ -1,7 +1,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 20, 2011
+.Dd November 10, 2011
 .Dt IPFW 8
 .Os
 .Sh NAME
@@ -769,7 +769,7 @@ To enable
 .Cm fwd
 a custom kernel needs to be compiled with the option
 .Cd "options IPFIREWALL_FORWARD" .
-.It Cm nat Ar nat_nr
+.It Cm nat Ar nat_nr | tablearg
 Pass packet to a
 nat instance
 (for network address translation, address redirect, etc.):
___
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: r227394 - in head/sys: amd64/amd64 i386/i386

2011-11-10 Thread Pawel Jakub Dawidek
On Thu, Nov 10, 2011 at 12:08:39PM +0200, Kostik Belousov wrote:
> On Thu, Nov 10, 2011 at 07:23:23AM +0100, Pawel Jakub Dawidek wrote:
> > On Wed, Nov 09, 2011 at 07:31:28PM +0200, Kostik Belousov wrote:
> > > On Wed, Nov 09, 2011 at 05:25:43PM +, Konstantin Belousov wrote:
> > > > Author: kib
> > > > Date: Wed Nov  9 17:25:43 2011
> > > > New Revision: 227394
> > > > URL: http://svn.freebsd.org/changeset/base/227394
> > > > 
> > > > Log:
> > > >   Stopped process may legitimately have some threads sleeping and not
> > > >   suspended, if the sleep is uninterruptible.
> > > Even more, stopped process might have some threads still running in the
> > > kernel mode, or inhibited due to wait on blockable locks. I was unable
> > > to design an expression that would assert that such thread will be stopped
> > > at the kernel->user boundary.
> > > 
> > > The assertion itself is useful and catched several bugs, but theoretically
> > > can cause false positives. If any report of the fired assert for 
> > > kernel-mode
> > > thread is provided, I will remove the assertions.
> > 
> > If in five years some change will make it to fire and you won't be
> > around, nobody will remember this e-mail of yours and someone will spend
> > time on looking for a bug that doesn't exist.
> > 
> > If we know it can cause false positives, I'd be in favour of removing it
> > or changing it into a warning or at the very least moving this
> > information into commit log.
> Yes, I do agree that removing the assertion is the most straightforward
> solution, but on the assertion already catched more real bugs then
> caused headaches (my headache, BTW). Either I change the third or condition
> to plain P_SHOULDSTOP(), or create a way to assert exactly what I need.

Maybe it would be easier to implement entire check in a function where
you have more flexibility and just use function's result in assertion?

-- 
Pawel Jakub Dawidek   http://www.wheelsystems.com
FreeBSD committer http://www.FreeBSD.org
Am I Evil? Yes, I Am! http://yomoli.com


pgpxsshfBUvqN.pgp
Description: PGP signature


svn commit: r227421 - head/sys/modules/ath

2011-11-10 Thread Adrian Chadd
Author: adrian
Date: Thu Nov 10 17:01:34 2011
New Revision: 227421
URL: http://svn.freebsd.org/changeset/base/227421

Log:
  Add a missing reference to AR9287.
  
  Sponsored by: Hobnob, Inc.

Modified:
  head/sys/modules/ath/Makefile

Modified: head/sys/modules/ath/Makefile
==
--- head/sys/modules/ath/Makefile   Thu Nov 10 16:50:36 2011
(r227420)
+++ head/sys/modules/ath/Makefile   Thu Nov 10 17:01:34 2011
(r227421)
@@ -75,7 +75,7 @@ SRCS+=ar2425.c
 SRCS+= ar5413.c
 
 #
-# AR5416, AR9130, AR9160, AR9220, AR9280, AR9285 support.
+# AR5416, AR9130, AR9160, AR9220, AR9280, AR9285, AR9287 support.
 
 # Note enabling this support requires defining AH_SUPPORT_AR5416
 # in opt_ah.h so the 11n tx/rx descriptor format is handled.
___
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: r227427 - head

2011-11-10 Thread Dimitry Andric
Author: dim
Date: Thu Nov 10 20:15:35 2011
New Revision: 227427
URL: http://svn.freebsd.org/changeset/base/227427

Log:
  Revert r227403 for now.  Since the cross-tools stage purposefully
  doesn't have ${WORLDTMP}/usr/bin in its PATH, if you build world with
  CC=clang, tblgen tools from /usr/bin will be used instead of the ones
  built under ${WORLDTMP}.  This can lead to various errors, especially if
  you upgrade from an older clang.
  
  Note that building world with gcc would not experience these problems,
  because it only uses the tblgen tools in the world stage, where PATH
  does contain ${WORLDTMP}/usr/bin.
  
  Pointy hat to:dim

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Thu Nov 10 19:54:00 2011(r227426)
+++ head/Makefile.inc1  Thu Nov 10 20:15:35 2011(r227427)
@@ -1029,6 +1029,14 @@ _gensnmptree=usr.sbin/bsnmpd/gensnmptre
 _crunchgen=usr.sbin/crunch/crunchgen
 .endif
 
+.if ${MK_CLANG} != "no"
+_clang_tblgen= \
+   lib/clang/libllvmsupport \
+   lib/clang/libllvmtablegen \
+   usr.bin/clang/tblgen \
+   usr.bin/clang/clang-tblgen
+.endif
+
 .if ${MK_CDDL} != "no" && \
 ${BOOTSTRAPPING} < 800038 && \
 !(${BOOTSTRAPPING} >= 700112 && ${BOOTSTRAPPING} < 79)
@@ -1045,6 +1053,7 @@ _dtc= gnu/usr.bin/dtc
 #  FreeBSD versions that need the tool built at this stage of the build.
 bootstrap-tools:
 .for _tool in \
+${_clang_tblgen} \
 ${_dtrace_tools} \
 ${_strfile} \
 ${_gperf} \
@@ -1140,13 +1149,9 @@ _binutils=   gnu/usr.bin/binutils
 .endif
 
 .if ${MK_CLANG} != "no"
-_clang_tblgen= lib/clang/libllvmsupport \
-   lib/clang/libllvmtablegen \
-   usr.bin/clang/tblgen \
-   usr.bin/clang/clang-tblgen
 .if ${CC:T:Mclang} == "clang"
-_clang_libs=   lib/clang
 _clang=usr.bin/clang
+_clang_libs=   lib/clang
 .endif
 .endif
 
@@ -1156,7 +1161,6 @@ _cc=  gnu/usr.bin/cc
 
 cross-tools:
 .for _tool in \
-${_clang_tblgen} \
 ${_clang_libs} \
 ${_clang} \
 ${_binutils} \
___
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: r227429 - head/usr.sbin/config

2011-11-10 Thread Ryan Stone
Author: rstone
Date: Thu Nov 10 21:07:14 2011
New Revision: 227429
URL: http://svn.freebsd.org/changeset/base/227429

Log:
  The generated Makefile for the kernel was not running ctfconvert on
  object files corresponding to source files that had the compile-with
  option set in conf/files.  This means that any fbt probes for functions
  in that object file would not have correct argument types.
  
  The fix is to run ctfconvert on any target file that does not have the
  no-obj option set in files.
  
  PR:   bin/160275
  Reported by:  Paul Ambrose (ambrosehua AT gmail DOT com)
  MFC after:1 week

Modified:
  head/usr.sbin/config/mkmakefile.c

Modified: head/usr.sbin/config/mkmakefile.c
==
--- head/usr.sbin/config/mkmakefile.c   Thu Nov 10 20:28:30 2011
(r227428)
+++ head/usr.sbin/config/mkmakefile.c   Thu Nov 10 21:07:14 2011
(r227429)
@@ -762,16 +762,21 @@ do_rules(FILE *f)
break;
}
snprintf(cmd, sizeof(cmd),
-   "${%s_%c%s}\n\t@${NORMAL_CTFCONVERT}", ftype,
+   "${%s_%c%s}\n", ftype,
toupper(och),
ftp->f_flags & NOWERROR ? "_NOWERROR" : "");
compilewith = cmd;
}
*cp = och;
if (strlen(ftp->f_objprefix))
-   fprintf(f, "\t%s $S/%s\n\n", compilewith, np);
+   fprintf(f, "\t%s $S/%s\n", compilewith, np);
else
-   fprintf(f, "\t%s\n\n", compilewith);
+   fprintf(f, "\t%s\n", compilewith);
+
+   if (!(ftp->f_flags & NO_OBJ))
+   fprintf(f, "\t@${NORMAL_CTFCONVERT}\n\n");
+   else
+   fprintf(f, "\n");
}
 }
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r227430 - head/sys/cddl/dev/dtrace/i386

2011-11-10 Thread Ryan Stone
Author: rstone
Date: Thu Nov 10 22:03:35 2011
New Revision: 227430
URL: http://svn.freebsd.org/changeset/base/227430

Log:
  On i386, fbt probes are implemented by writing an invalid opcode over
  certain instructions in a function prologue or epilogue.  DTrace has a
  hook into the invalid opcode fault handler that checks whether the fault
  was due to an probe and if so, runs the DTrace magic.
  
  Upon returning from an invalid opcode fault caused by a probe, DTrace must
  emulate the instruction that was replaced with the invalid opcode and then
  return control to the instruction following the invalid opcode.
  
  There were a pair of related bugs in the emulation for the leave
  instruction.  The leave instruction is used to pop off a stack frame prior
  to returning from a function.  The emulation for this instruction must
  move the trap frame for the invalid opcode fault down the stack to the
  bottom of the stack frame that is being removed, and then execute an iret.
  
  At two points in this process, the emulation code was storing values above
  the current value of the stack pointer.  This opened up a window in which
  if we were two take an interrupt, the trap frame for the interrupt would
  overwrite the values stored on the stack, causing the system to panic
  later.
  
  The first bug was that at one point the emulation code saves the new value
  for $esp above the current stack pointer value.  The fix is to save this
  value instead inside of the original trap frame.  At this point we do
  not need the original trap frame so this is safe.
  
  The second bug is that when the emulate code loads $esp from the stack, it
  points part-way through the new trap frame instead of at its beginning.
  The emulation code adjusts the stack pointer to the correct value
  immediately afterwards, but this still leaves a one instruction window in
  which an interrupt would corrupt this trap frame.  Fix this by adjusting
  the stack frame value before loading it into $esp.
  
  This fixes panics in invop_leave on i386 when using fbt return probes.
  
  Reviewed by:  rpaulo, attilio
  MFC after:1 week

Modified:
  head/sys/cddl/dev/dtrace/i386/dtrace_asm.S

Modified: head/sys/cddl/dev/dtrace/i386/dtrace_asm.S
==
--- head/sys/cddl/dev/dtrace/i386/dtrace_asm.S  Thu Nov 10 21:07:14 2011
(r227429)
+++ head/sys/cddl/dev/dtrace/i386/dtrace_asm.S  Thu Nov 10 22:03:35 2011
(r227430)
@@ -125,11 +125,11 @@ invop_leave:
movl8(%esp), %eax   /* load calling EIP */
incl%eax/* increment over LOCK prefix */
movl%eax, -8(%ebx)  /* store calling EIP */
-   movl%ebx, -4(%esp)  /* temporarily store new %esp */
+   subl$8, %ebx/* adjust for three pushes, one pop */
+   movl%ebx, 8(%esp)   /* temporarily store new %esp */
popl%ebx/* pop off temp */
popl%eax/* pop off temp */
-   movl-12(%esp), %esp /* set stack pointer */
-   subl$8, %esp/* adjust for three pushes, one pop */
+   movl(%esp), %esp/* set stack pointer */
iret/* return from interrupt */
 invop_nop:
/*
___
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: r227431 - head/sys/dev/ti

2011-11-10 Thread Pyun YongHyeon
Author: yongari
Date: Thu Nov 10 22:15:11 2011
New Revision: 227431
URL: http://svn.freebsd.org/changeset/base/227431

Log:
  style.
  No functional changes.

Modified:
  head/sys/dev/ti/if_ti.c

Modified: head/sys/dev/ti/if_ti.c
==
--- head/sys/dev/ti/if_ti.c Thu Nov 10 22:03:35 2011(r227430)
+++ head/sys/dev/ti/if_ti.c Thu Nov 10 22:15:11 2011(r227431)
@@ -507,8 +507,7 @@ ti_copy_mem(struct ti_softc *sc, uint32_
 * At the moment, we don't handle non-aligned cases, we just bail.
 * If this proves to be a problem, it will be fixed.
 */
-   if ((readdata == 0)
-&& (tigon_addr & 0x3)) {
+   if (readdata == 0 && (tigon_addr & 0x3) != 0) {
device_printf(sc->ti_dev, "%s: tigon address %#x isn't "
"word-aligned\n", __func__, tigon_addr);
device_printf(sc->ti_dev, "%s: unaligned writes aren't "
@@ -557,11 +556,8 @@ ti_copy_mem(struct ti_softc *sc, uint32_
ti_offset = TI_WINDOW + (segptr & (TI_WINLEN -1));
 
if (readdata) {
-
-   bus_space_read_region_4(sc->ti_btag,
-   sc->ti_bhandle, ti_offset,
-   (uint32_t *)tmparray,
-   segsize >> 2);
+   bus_space_read_region_4(sc->ti_btag, sc->ti_bhandle,
+   ti_offset, (uint32_t *)tmparray, segsize >> 2);
if (useraddr) {
/*
 * Yeah, this is a little on the kludgy
@@ -569,29 +565,28 @@ ti_copy_mem(struct ti_softc *sc, uint32_
 * used for debugging.
 */
ti_bcopy_swap(tmparray, tmparray2, segsize,
- TI_SWAP_NTOH);
+   TI_SWAP_NTOH);
 
TI_UNLOCK(sc);
if (first_pass) {
copyout(&tmparray2[segresid], ptr,
-   segsize - segresid);
+   segsize - segresid);
first_pass = 0;
} else
copyout(tmparray2, ptr, segsize);
TI_LOCK(sc);
} else {
if (first_pass) {
-
ti_bcopy_swap(tmparray, tmparray2,
- segsize, TI_SWAP_NTOH);
+   segsize, TI_SWAP_NTOH);
TI_UNLOCK(sc);
bcopy(&tmparray2[segresid], ptr,
- segsize - segresid);
+   segsize - segresid);
TI_LOCK(sc);
first_pass = 0;
} else
ti_bcopy_swap(tmparray, ptr, segsize,
- TI_SWAP_NTOH);
+   TI_SWAP_NTOH);
}
 
} else {
@@ -600,15 +595,13 @@ ti_copy_mem(struct ti_softc *sc, uint32_
copyin(ptr, tmparray2, segsize);
TI_LOCK(sc);
ti_bcopy_swap(tmparray2, tmparray, segsize,
- TI_SWAP_HTON);
+   TI_SWAP_HTON);
} else
ti_bcopy_swap(ptr, tmparray, segsize,
- TI_SWAP_HTON);
+   TI_SWAP_HTON);
 
-   bus_space_write_region_4(sc->ti_btag,
-sc->ti_bhandle, ti_offset,
-(uint32_t *)tmparray,
-segsize >> 2);
+   bus_space_write_region_4(sc->ti_btag, sc->ti_bhandle,
+   ti_offset, (uint32_t *)tmparray, segsize >> 2);
}
segptr += segsize;
ptr += segsize;
@@ -619,8 +612,8 @@ ti_copy_mem(struct ti_softc *sc, uint32_
 * Handle leftover, non-word-aligned bytes.
 */
if (resid != 0) {
-   uint32_ttmpval, tmpval2;
-   bus_size_t  ti_offset;
+   uint32_t tmpval, tmpval2;
+   bus_size_t ti_offset;
 
/*
 

svn commit: r227432 - head/sys/dev/ti

2011-11-10 Thread Pyun YongHyeon
Author: yongari
Date: Thu Nov 10 23:14:04 2011
New Revision: 227432
URL: http://svn.freebsd.org/changeset/base/227432

Log:
  Remove dead ifdef.  Driver should always check raised interrupt is
  for the device.

Modified:
  head/sys/dev/ti/if_ti.c

Modified: head/sys/dev/ti/if_ti.c
==
--- head/sys/dev/ti/if_ti.c Thu Nov 10 22:15:11 2011(r227431)
+++ head/sys/dev/ti/if_ti.c Thu Nov 10 23:14:04 2011(r227432)
@@ -2825,14 +2825,11 @@ ti_intr(void *xsc)
TI_LOCK(sc);
ifp = sc->ti_ifp;
 
-/*#ifdef notdef*/
-   /* Avoid this for now -- checking this register is expensive. */
/* Make sure this is really our interrupt. */
if (!(CSR_READ_4(sc, TI_MISC_HOST_CTL) & TI_MHC_INTSTATE)) {
TI_UNLOCK(sc);
return;
}
-/*#endif*/
 
/* Ack interrupt and stop others from occuring. */
CSR_WRITE_4(sc, TI_MB_HOSTINTR, 1);
___
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: r227433 - head/sys/modules/ath

2011-11-10 Thread Adrian Chadd
Author: adrian
Date: Thu Nov 10 23:16:59 2011
New Revision: 227433
URL: http://svn.freebsd.org/changeset/base/227433

Log:
  Revert this previous commit for now - although this override unfortunately
  results in the HAL being built without HAL debugging/diagnostic support,
  the module building process needs to be somehow taught to not build AR5416+
  NICs if AH_SUPPORT_AR5416 isn't defined in opt_ah.h .

Modified:
  head/sys/modules/ath/Makefile

Modified: head/sys/modules/ath/Makefile
==
--- head/sys/modules/ath/Makefile   Thu Nov 10 23:14:04 2011
(r227432)
+++ head/sys/modules/ath/Makefile   Thu Nov 10 23:16:59 2011
(r227433)
@@ -140,9 +140,7 @@ SRCS+=  dfs_null.c
 
 CFLAGS+=  -I. -I${.CURDIR}/../../dev/ath -I${.CURDIR}/../../dev/ath/ath_hal
 
-.if !defined(KERNBUILDDIR)
 opt_ah.h:
echo '#define AH_SUPPORT_AR5416 1' > $@
-.endif
 
 .include 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r227434 - head/sys/dev/ath/ath_hal

2011-11-10 Thread Adrian Chadd
Author: adrian
Date: Fri Nov 11 00:48:41 2011
New Revision: 227434
URL: http://svn.freebsd.org/changeset/base/227434

Log:
  Correct device id comments.

Modified:
  head/sys/dev/ath/ath_hal/ah_devid.h

Modified: head/sys/dev/ath/ath_hal/ah_devid.h
==
--- head/sys/dev/ath/ath_hal/ah_devid.h Thu Nov 10 23:16:59 2011
(r227433)
+++ head/sys/dev/ath/ath_hal/ah_devid.h Fri Nov 11 00:48:41 2011
(r227434)
@@ -73,11 +73,11 @@
 
 /* AR5416 compatible devid's  */
 #define AR5416_DEVID_PCI   0x0023  /* AR5416 PCI (MB/CB) Owl */
-#define AR5416_DEVID_PCIE  0x0024  /* AR5416 PCI-E (XB) Owl */
+#define AR5416_DEVID_PCIE  0x0024  /* AR5418 PCI-E (XB) Owl */
 #defineAR5416_AR9130_DEVID 0x000b  /* AR9130 SoC WiMAC */
 #define AR9160_DEVID_PCI   0x0027  /* AR9160 PCI Sowl */
 #define AR9280_DEVID_PCI   0x0029  /* AR9280 PCI Merlin */
-#define AR9280_DEVID_PCIE  0x002a  /* AR9280 PCI-E Merlin */
+#define AR9280_DEVID_PCIE  0x002a  /* AR9220 PCI-E Merlin */
 #define AR9285_DEVID_PCIE  0x002b  /* AR9285 PCI-E Kite */
 #defineAR2427_DEVID_PCIE   0x002c  /* AR2427 PCI-E w/ 
802.11n bonded out */
 #defineAR9287_DEVID_PCI0x002d  /* AR9227 PCI Kiwi */
___
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: r227435 - head/lib/libc/regex

2011-11-10 Thread Kevin Lo
Author: kevlo
Date: Fri Nov 11 01:35:07 2011
New Revision: 227435
URL: http://svn.freebsd.org/changeset/base/227435

Log:
  Converting int to wint_t leads to broekn comparison of raw char
  and encoded wint_t.
  
  Spotted by:   ache

Modified:
  head/lib/libc/regex/regcomp.c

Modified: head/lib/libc/regex/regcomp.c
==
--- head/lib/libc/regex/regcomp.c   Fri Nov 11 00:48:41 2011
(r227434)
+++ head/lib/libc/regex/regcomp.c   Fri Nov 11 01:35:07 2011
(r227435)
@@ -81,10 +81,10 @@ extern "C" {
 #endif
 
 /* === regcomp.c === */
-static void p_ere(struct parse *p, wint_t stop);
+static void p_ere(struct parse *p, int stop);
 static void p_ere_exp(struct parse *p);
 static void p_str(struct parse *p);
-static void p_bre(struct parse *p, wint_t end1, wint_t end2);
+static void p_bre(struct parse *p, int end1, int end2);
 static int p_simp_re(struct parse *p, int starordinary);
 static int p_count(struct parse *p);
 static void p_bracket(struct parse *p);
@@ -285,11 +285,11 @@ regcomp(regex_t * __restrict preg,
 
 /*
  - p_ere - ERE parser top level, concatenation and alternation
- == static void p_ere(struct parse *p, wint_t stop);
+ == static void p_ere(struct parse *p, int_t stop);
  */
 static void
 p_ere(struct parse *p,
-   wint_t stop)/* character this ERE should end at */
+   int stop)   /* character this ERE should end at */
 {
char c;
sopno prevback;
@@ -493,8 +493,8 @@ p_str(struct parse *p)
 
 /*
  - p_bre - BRE parser top level, anchoring and concatenation
- == static void p_bre(struct parse *p,  wint_t end1, \
- ==wint_t end2);
+ == static void p_bre(struct parse *p,  int end1, \
+ ==int end2);
  * Giving end1 as OUT essentially eliminates the end1/end2 check.
  *
  * This implementation is a bit of a kludge, in that a trailing $ is first
@@ -503,8 +503,8 @@ p_str(struct parse *p)
  */
 static void
 p_bre(struct parse *p,
-   wint_t end1,/* first terminating character */
-   wint_t end2)/* second terminating character */
+   int end1,   /* first terminating character */
+   int end2)   /* second terminating character */
 {
sopno start = HERE();
int first = 1;  /* first subexpression? */
___
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: r227441 - in head/sys: amd64/linux32 cddl/dev/systrace compat/freebsd32 i386/linux kern

2011-11-10 Thread Ryan Stone
Author: rstone
Date: Fri Nov 11 03:49:42 2011
New Revision: 227441
URL: http://svn.freebsd.org/changeset/base/227441

Log:
  Correct the types of the arguments to return probes of the syscall
  provider.  Previously we were erroneously supplying the argument types of
  the corresponding entry probe.
  
  Reviewed by:  rpaulo
  MFC after:1 week

Modified:
  head/sys/amd64/linux32/linux32_systrace_args.c
  head/sys/cddl/dev/systrace/systrace.c
  head/sys/compat/freebsd32/freebsd32_systrace_args.c
  head/sys/i386/linux/linux_systrace_args.c
  head/sys/kern/makesyscalls.sh
  head/sys/kern/systrace_args.c

Modified: head/sys/amd64/linux32/linux32_systrace_args.c
==
--- head/sys/amd64/linux32/linux32_systrace_args.c  Fri Nov 11 02:15:44 
2011(r227440)
+++ head/sys/amd64/linux32/linux32_systrace_args.c  Fri Nov 11 03:49:42 
2011(r227441)
@@ -2095,7 +2095,7 @@ systrace_args(int sysnum, void *params, 
};
 }
 static void
-systrace_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
+systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
 {
const char *p = NULL;
switch (sysnum) {
@@ -5124,3 +5124,1168 @@ systrace_setargdesc(int sysnum, int ndx,
if (p != NULL)
strlcpy(desc, p, descsz);
 }
+static void
+systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
+{
+   const char *p = NULL;
+   switch (sysnum) {
+#definenosys   linux_nosys
+   /* sys_exit */
+   case 1:
+   if (ndx == 0 || ndx == 1)
+   p = "void";
+   break;
+   /* linux_fork */
+   case 2:
+   /* read */
+   case 3:
+   if (ndx == 0 || ndx == 1)
+   p = "int";
+   break;
+   /* write */
+   case 4:
+   if (ndx == 0 || ndx == 1)
+   p = "int";
+   break;
+   /* linux_open */
+   case 5:
+   if (ndx == 0 || ndx == 1)
+   p = "int";
+   break;
+   /* close */
+   case 6:
+   if (ndx == 0 || ndx == 1)
+   p = "int";
+   break;
+   /* linux_waitpid */
+   case 7:
+   if (ndx == 0 || ndx == 1)
+   p = "int";
+   break;
+   /* linux_creat */
+   case 8:
+   if (ndx == 0 || ndx == 1)
+   p = "int";
+   break;
+   /* linux_link */
+   case 9:
+   if (ndx == 0 || ndx == 1)
+   p = "int";
+   break;
+   /* linux_unlink */
+   case 10:
+   if (ndx == 0 || ndx == 1)
+   p = "int";
+   break;
+   /* linux_execve */
+   case 11:
+   if (ndx == 0 || ndx == 1)
+   p = "int";
+   break;
+   /* linux_chdir */
+   case 12:
+   if (ndx == 0 || ndx == 1)
+   p = "int";
+   break;
+   /* linux_time */
+   case 13:
+   if (ndx == 0 || ndx == 1)
+   p = "int";
+   break;
+   /* linux_mknod */
+   case 14:
+   if (ndx == 0 || ndx == 1)
+   p = "int";
+   break;
+   /* linux_chmod */
+   case 15:
+   if (ndx == 0 || ndx == 1)
+   p = "int";
+   break;
+   /* linux_lchown16 */
+   case 16:
+   if (ndx == 0 || ndx == 1)
+   p = "int";
+   break;
+   /* linux_stat */
+   case 18:
+   if (ndx == 0 || ndx == 1)
+   p = "int";
+   break;
+   /* linux_lseek */
+   case 19:
+   if (ndx == 0 || ndx == 1)
+   p = "int";
+   break;
+   /* linux_getpid */
+   case 20:
+   /* linux_mount */
+   case 21:
+   if (ndx == 0 || ndx == 1)
+   p = "int";
+   break;
+   /* linux_oldumount */
+   case 22:
+   if (ndx == 0 || ndx == 1)
+   p = "int";
+   break;
+   /* linux_setuid16 */
+   case 23:
+   if (ndx == 0 || ndx == 1)
+   p = "int";
+   break;
+   /* linux_getuid16 */
+   case 24:
+   /* linux_stime */
+   case 25:
+   /* linux_ptrace */
+   case 26:
+   if (ndx == 0 || ndx == 1)
+   p = "int";
+   break;
+   /* linux_alarm */
+   case 27:
+   if (ndx == 0 || ndx == 1)
+   p = "int";
+   break;
+   /* linux_pause */
+   case 29:
+   /* linux_utime */
+   case 30:
+   if (ndx == 0 || ndx == 1)
+  

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

2011-11-10 Thread Konstantin Belousov
Author: kib
Date: Fri Nov 11 04:10:36 2011
New Revision: 227442
URL: http://svn.freebsd.org/changeset/base/227442

Log:
  Weaken the part of assertions added in the r227394. Only check that the
  process state is stopped.
  
  MFC after:1 week

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

Modified: head/sys/amd64/amd64/machdep.c
==
--- head/sys/amd64/amd64/machdep.c  Fri Nov 11 03:49:42 2011
(r227441)
+++ head/sys/amd64/amd64/machdep.c  Fri Nov 11 04:10:36 2011
(r227442)
@@ -2048,7 +2048,7 @@ fill_fpregs(struct thread *td, struct fp
 {
 
KASSERT(td == curthread || TD_IS_SUSPENDED(td) ||
-   (P_SHOULDSTOP(td->td_proc) && TD_IS_SLEEPING(td)),
+   P_SHOULDSTOP(td->td_proc),
("not suspended thread %p", td));
fpugetregs(td);
fill_fpregs_xmm(&td->td_pcb->pcb_user_save, fpregs);

Modified: head/sys/i386/i386/machdep.c
==
--- head/sys/i386/i386/machdep.cFri Nov 11 03:49:42 2011
(r227441)
+++ head/sys/i386/i386/machdep.cFri Nov 11 04:10:36 2011
(r227442)
@@ -3300,7 +3300,7 @@ fill_fpregs(struct thread *td, struct fp
 {
 
KASSERT(td == curthread || TD_IS_SUSPENDED(td) ||
-   (P_SHOULDSTOP(td->td_proc) && TD_IS_SLEEPING(td)),
+   P_SHOULDSTOP(td->td_proc),
("not suspended thread %p", td));
 #ifdef DEV_NPX
npxgetregs(td);
___
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: r227443 - head/sys/kern

2011-11-10 Thread Konstantin Belousov
Author: kib
Date: Fri Nov 11 04:12:58 2011
New Revision: 227443
URL: http://svn.freebsd.org/changeset/base/227443

Log:
  Guard against the unlikely case of the alias path containing the '%' symbols.
  
  Reported by:  arundel
  MFC after:1 week

Modified:
  head/sys/kern/kern_conf.c

Modified: head/sys/kern/kern_conf.c
==
--- head/sys/kern/kern_conf.c   Fri Nov 11 04:10:36 2011(r227442)
+++ head/sys/kern/kern_conf.c   Fri Nov 11 04:12:58 2011(r227443)
@@ -1016,7 +1016,7 @@ make_dev_physpath_alias(int flags, struc
old_alias = NULL;
ret = 0;
} else {
-   ret = make_dev_alias_p(flags, cdev, pdev, devfspath);
+   ret = make_dev_alias_p(flags, cdev, pdev, "%s", devfspath);
}
 out:
if (old_alias != 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: r227444 - head/sys/kern

2011-11-10 Thread Konstantin Belousov
Author: kib
Date: Fri Nov 11 04:13:47 2011
New Revision: 227444
URL: http://svn.freebsd.org/changeset/base/227444

Log:
  Style.
  
  MFC after:1 week

Modified:
  head/sys/kern/kern_conf.c

Modified: head/sys/kern/kern_conf.c
==
--- head/sys/kern/kern_conf.c   Fri Nov 11 04:12:58 2011(r227443)
+++ head/sys/kern/kern_conf.c   Fri Nov 11 04:13:47 2011(r227444)
@@ -1009,8 +1009,7 @@ make_dev_physpath_alias(int flags, struc
}
 
sprintf(devfspath, "%s/%s", physpath, pdev->si_name);
-   if (old_alias != NULL
-&& strcmp(old_alias->si_name, devfspath) == 0) {
+   if (old_alias != NULL && strcmp(old_alias->si_name, devfspath) == 0) {
/* Retain the existing alias. */
*cdev = old_alias;
old_alias = 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: r227447 - head/sys/compat/freebsd32

2011-11-10 Thread Sergey Kandaurov
Author: pluknet
Date: Fri Nov 11 07:17:00 2011
New Revision: 227447
URL: http://svn.freebsd.org/changeset/base/227447

Log:
  struct timespec32: change types of tv_sec and tv_nsec fields to signed
  to match native struct timespec ABI on __LP32__.
  
  This change is a prerequisite for upcoming futimens()/utimensat() in whose
  implementations it is assumed that timespec32 can take a negative value.
  
  MFC after:1 week

Modified:
  head/sys/compat/freebsd32/freebsd32.h

Modified: head/sys/compat/freebsd32/freebsd32.h
==
--- head/sys/compat/freebsd32/freebsd32.h   Fri Nov 11 04:22:43 2011
(r227446)
+++ head/sys/compat/freebsd32/freebsd32.h   Fri Nov 11 07:17:00 2011
(r227447)
@@ -52,8 +52,8 @@ struct timeval32 {
 } while (0)
 
 struct timespec32 {
-   u_int32_t tv_sec;
-   u_int32_t tv_nsec;
+   int32_t tv_sec;
+   int32_t tv_nsec;
 };
 #define TS_CP(src,dst,fld) do {\
CP((src).fld,(dst).fld,tv_sec); \
___
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"