svn commit: r219558 - head/sys/compat/linux

2011-03-11 Thread Dmitry Chagin
Author: dchagin
Date: Sat Mar 12 07:47:05 2011
New Revision: 219558
URL: http://svn.freebsd.org/changeset/base/219558

Log:
  Style(9) fixes. No functional changes.
  
  MFC after:2 Week

Modified:
  head/sys/compat/linux/linux_ipc.c

Modified: head/sys/compat/linux/linux_ipc.c
==
--- head/sys/compat/linux/linux_ipc.c   Sat Mar 12 07:03:06 2011
(r219557)
+++ head/sys/compat/linux/linux_ipc.c   Sat Mar 12 07:47:05 2011
(r219558)
@@ -97,6 +97,7 @@ struct l_msginfo {
 static void
 bsd_to_linux_shminfo( struct shminfo *bpp, struct l_shminfo *lpp)
 {
+
lpp->shmmax = bpp->shmmax;
lpp->shmmin = bpp->shmmin;
lpp->shmmni = bpp->shmmni;
@@ -107,6 +108,7 @@ bsd_to_linux_shminfo( struct shminfo *bp
 static void
 bsd_to_linux_shm_info( struct shm_info *bpp, struct l_shm_info *lpp)
 {
+
lpp->used_ids = bpp->used_ids ;
lpp->shm_tot = bpp->shm_tot ;
lpp->shm_rss = bpp->shm_rss ;
@@ -128,26 +130,28 @@ struct l_ipc_perm {
 static void
 linux_to_bsd_ipc_perm(struct l_ipc_perm *lpp, struct ipc_perm *bpp)
 {
-bpp->key = lpp->key;
-bpp->uid = lpp->uid;
-bpp->gid = lpp->gid;
-bpp->cuid = lpp->cuid;
-bpp->cgid = lpp->cgid;
-bpp->mode = lpp->mode;
-bpp->seq = lpp->seq;
+
+   bpp->key = lpp->key;
+   bpp->uid = lpp->uid;
+   bpp->gid = lpp->gid;
+   bpp->cuid = lpp->cuid;
+   bpp->cgid = lpp->cgid;
+   bpp->mode = lpp->mode;
+   bpp->seq = lpp->seq;
 }
 
 
 static void
 bsd_to_linux_ipc_perm(struct ipc_perm *bpp, struct l_ipc_perm *lpp)
 {
-lpp->key = bpp->key;
-lpp->uid = bpp->uid;
-lpp->gid = bpp->gid;
-lpp->cuid = bpp->cuid;
-lpp->cgid = bpp->cgid;
-lpp->mode = bpp->mode;
-lpp->seq = bpp->seq;
+
+   lpp->key = bpp->key;
+   lpp->uid = bpp->uid;
+   lpp->gid = bpp->gid;
+   lpp->cuid = bpp->cuid;
+   lpp->cgid = bpp->cgid;
+   lpp->mode = bpp->mode;
+   lpp->seq = bpp->seq;
 }
 
 struct l_msqid_ds {
@@ -202,16 +206,18 @@ struct l_shmid_ds {
 static void
 linux_to_bsd_semid_ds(struct l_semid_ds *lsp, struct semid_ds *bsp)
 {
-linux_to_bsd_ipc_perm(&lsp->sem_perm, &bsp->sem_perm);
-bsp->sem_otime = lsp->sem_otime;
-bsp->sem_ctime = lsp->sem_ctime;
-bsp->sem_nsems = lsp->sem_nsems;
-bsp->sem_base = PTRIN(lsp->sem_base);
+
+   linux_to_bsd_ipc_perm(&lsp->sem_perm, &bsp->sem_perm);
+   bsp->sem_otime = lsp->sem_otime;
+   bsp->sem_ctime = lsp->sem_ctime;
+   bsp->sem_nsems = lsp->sem_nsems;
+   bsp->sem_base = PTRIN(lsp->sem_base);
 }
 
 static void
 bsd_to_linux_semid_ds(struct semid_ds *bsp, struct l_semid_ds *lsp)
 {
+
bsd_to_linux_ipc_perm(&bsp->sem_perm, &lsp->sem_perm);
lsp->sem_otime = bsp->sem_otime;
lsp->sem_ctime = bsp->sem_ctime;
@@ -222,62 +228,66 @@ bsd_to_linux_semid_ds(struct semid_ds *b
 static void
 linux_to_bsd_shmid_ds(struct l_shmid_ds *lsp, struct shmid_ds *bsp)
 {
-linux_to_bsd_ipc_perm(&lsp->shm_perm, &bsp->shm_perm);
-bsp->shm_segsz = lsp->shm_segsz;
-bsp->shm_lpid = lsp->shm_lpid;
-bsp->shm_cpid = lsp->shm_cpid;
-bsp->shm_nattch = lsp->shm_nattch;
-bsp->shm_atime = lsp->shm_atime;
-bsp->shm_dtime = lsp->shm_dtime;
-bsp->shm_ctime = lsp->shm_ctime;
+
+   linux_to_bsd_ipc_perm(&lsp->shm_perm, &bsp->shm_perm);
+   bsp->shm_segsz = lsp->shm_segsz;
+   bsp->shm_lpid = lsp->shm_lpid;
+   bsp->shm_cpid = lsp->shm_cpid;
+   bsp->shm_nattch = lsp->shm_nattch;
+   bsp->shm_atime = lsp->shm_atime;
+   bsp->shm_dtime = lsp->shm_dtime;
+   bsp->shm_ctime = lsp->shm_ctime;
 }
 
 static void
 bsd_to_linux_shmid_ds(struct shmid_ds *bsp, struct l_shmid_ds *lsp)
 {
-bsd_to_linux_ipc_perm(&bsp->shm_perm, &lsp->shm_perm);
-if (bsp->shm_segsz > INT_MAX)
-   lsp->shm_segsz = INT_MAX;
-else
-   lsp->shm_segsz = bsp->shm_segsz;
-lsp->shm_lpid = bsp->shm_lpid;
-lsp->shm_cpid = bsp->shm_cpid;
-if (bsp->shm_nattch > SHRT_MAX)
-   lsp->shm_nattch = SHRT_MAX;
-else
-   lsp->shm_nattch = bsp->shm_nattch;
-lsp->shm_atime = bsp->shm_atime;
-lsp->shm_dtime = bsp->shm_dtime;
-lsp->shm_ctime = bsp->shm_ctime;
-lsp->private3 = 0;
+
+   bsd_to_linux_ipc_perm(&bsp->shm_perm, &lsp->shm_perm);
+   if (bsp->shm_segsz > INT_MAX)
+   lsp->shm_segsz = INT_MAX;
+   else
+   lsp->shm_segsz = bsp->shm_segsz;
+   lsp->shm_lpid = bsp->shm_lpid;
+   lsp->shm_cpid = bsp->shm_cpid;
+   if (bsp->shm_nattch > SHRT_MAX)
+   lsp->shm_nattch = SHRT_MAX;
+   else
+   lsp->shm_nattch = bsp->shm_nattch;
+   lsp->shm_atime = bsp->shm_atime;
+   lsp->shm_dtime = bsp->shm_dtime;
+   lsp->shm_ctime = bsp->shm_ctime;
+   lsp->private3 = 0;
 }
 
 static void
 linux_to_bsd_msqid_ds(struct l_msqid_ds *lsp, struct msqid_ds *bsp)
 {
-   

svn commit: r219557 - head/contrib/gdtoa

2011-03-11 Thread David Schultz
Author: das
Date: Sat Mar 12 07:03:06 2011
New Revision: 219557
URL: http://svn.freebsd.org/changeset/base/219557

Log:
  Merge gdtoa-20110304.

Added:
  head/contrib/gdtoa/changes
 - copied unchanged from r219423, vendor/gdtoa/dist/changes
  head/contrib/gdtoa/printf.c
 - copied unchanged from r219423, vendor/gdtoa/dist/printf.c
  head/contrib/gdtoa/printf.c0
 - copied unchanged from r219423, vendor/gdtoa/dist/printf.c0
  head/contrib/gdtoa/stdio1.h
 - copied unchanged from r219423, vendor/gdtoa/dist/stdio1.h
Modified:
  head/contrib/gdtoa/README
  head/contrib/gdtoa/dtoa.c
  head/contrib/gdtoa/g__fmt.c
  head/contrib/gdtoa/g_ddfmt.c
  head/contrib/gdtoa/g_dfmt.c
  head/contrib/gdtoa/gdtoa.c
  head/contrib/gdtoa/gdtoa.h
  head/contrib/gdtoa/gdtoaimp.h
  head/contrib/gdtoa/gethex.c
  head/contrib/gdtoa/hexnan.c
  head/contrib/gdtoa/makefile
  head/contrib/gdtoa/misc.c
  head/contrib/gdtoa/smisc.c
  head/contrib/gdtoa/strtoIg.c
  head/contrib/gdtoa/strtod.c
  head/contrib/gdtoa/strtodI.c
  head/contrib/gdtoa/strtodg.c
  head/contrib/gdtoa/strtof.c
  head/contrib/gdtoa/strtopdd.c
  head/contrib/gdtoa/strtopf.c
  head/contrib/gdtoa/strtopx.c
  head/contrib/gdtoa/strtopxL.c
  head/contrib/gdtoa/strtordd.c
  head/contrib/gdtoa/strtorf.c
  head/contrib/gdtoa/strtorx.c
  head/contrib/gdtoa/strtorxL.c
  head/contrib/gdtoa/ulp.c
Directory Properties:
  head/contrib/gdtoa/   (props changed)

Modified: head/contrib/gdtoa/README
==
--- head/contrib/gdtoa/README   Sat Mar 12 06:35:53 2011(r219556)
+++ head/contrib/gdtoa/README   Sat Mar 12 07:03:06 2011(r219557)
@@ -353,5 +353,12 @@ you also compile with -DNO_LOCALE_CACHE,
 current "decimal point" character string are cached and assumed not
 to change during the program's execution.
 
+On machines with a 64-bit long double and perhaps a 113-bit "quad"
+type, you can invoke "make Printf" to add Printf (and variants, such
+as Fprintf) to gdtoa.a.  These are analogs, declared in stdio1.h, of
+printf and fprintf, etc. in which %La, %Le, %Lf, and %Lg are for long
+double and (if appropriate) %Lqa, %Lqe, %Lqf, and %Lqg are for quad
+precision printing.
+
 Please send comments toDavid M. Gay (dmg at acm dot org, with " at "
 changed at "@" and " dot " changed to ".").

Copied: head/contrib/gdtoa/changes (from r219423, vendor/gdtoa/dist/changes)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/contrib/gdtoa/changes  Sat Mar 12 07:03:06 2011(r219557, copy 
of r219423, vendor/gdtoa/dist/changes)
@@ -0,0 +1,672 @@
+Sun Jun 30 13:48:26 EDT 1991:
+  dtoa.c: adjust dtoa to allow negative ndigits for modes 3,5,7,9
+(fixed-point mode); fix rounding bug in these modes when the input
+d (to be converted) satisfies 10^-(ndigits+1) <= |d| < 10^-ndigits ,
+i.e., when the result, before rounding, would be empty but might
+round to one digit.  Adjust the decpt returned in these modes when
+the result is empty (i.e., when |d| <= 5 * 10^-ndigits).
+
+Tue Jul  2 21:44:00 EDT 1991
+  Correct an inefficiency introduced 2 days ago in dtoa's handling of
+integers in modes 0, 1.
+
+Mon Sep  9 23:29:38 EDT 1991
+  dtoa.c: remove superfluous declaration of size_t.
+
+Sun Oct  6 15:34:15 EDT 1991
+  dtoa.c: fix another bug in modes 3,5,7,9 when the result, before
+rounding, would be empty, but rounds to one digit: *decpt was low by
+one.
+
+Sat Jan 18 12:30:04 EST 1992
+  dtoa.c: add some #ifdef KR_headers lines relevant only if IBM is
+defined; for input decimal strings representing numbers too large, have
+strtod return HUGE_VAL only if __STDC__ is defined; otherwise have it
+return +-Infinity for IEEE arithmetic, +- the largest machine number
+for IBM and VAX arithmetic.  (If __STDC__ is not defined, HUGE_VAL may
+not be defined either, or it may be wrong.)
+
+Mon Apr 27 23:13:43 EDT 1992
+  dtoa.c: tweak strtod (one-line addition) so the end-pointer = start
+pointer when the input has, e.g., only white space.
+
+Thu May  7 18:04:46 EDT 1992
+  dtoa.c: adjust treatment of exponent field (in strtod) to behave
+reasonably with huge numbers and 16-bit ints.
+
+Fri Jun 19 08:29:02 EDT 1992
+  dtoa.c: fix a botch in placement of #ifdef __cplusplus (which only
+matters if you're using a C++ compiler).
+
+Wed Oct 21 11:23:07 EDT 1992
+  dtoa.c: add #ifdef Bad_float_h lines for systems with missing or
+inferior float.h .
+
+Thu Apr 22 07:54:48 EDT 1993
+  dtoa.c: change < to <= in line 2059:
+<  for(result_k = 0; sizeof(Bigint) - sizeof(unsigned long) + j < i;
+---
+>  for(result_k = 0; sizeof(Bigint) - sizeof(unsigned long) + j <= i;
+With 32-bit ints, the former could give too small a block for the return
+value when, e.g., mode = 2 or 4 and ndigits = 24 (16 for 16-bit ints).
+
+Mon Jun 21 12:56:42 EDT 1993
+  dtoa.c: tweak to work with 32-bit ints and 64-bit longs
+whe

svn commit: r219551 - stable/7/share/examples/cvsup

2011-03-11 Thread Doug Barton
Author: dougb
Date: Fri Mar 11 23:16:04 2011
New Revision: 219551
URL: http://svn.freebsd.org/changeset/base/219551

Log:
  MFC r219353:
  
  mbone is no longer a physical category
  
  Submitted by: pav

Modified:
  stable/7/share/examples/cvsup/cvs-supfile
  stable/7/share/examples/cvsup/ports-supfile
Directory Properties:
  stable/7/share/examples/   (props changed)

Modified: stable/7/share/examples/cvsup/cvs-supfile
==
--- stable/7/share/examples/cvsup/cvs-supfile   Fri Mar 11 23:13:22 2011
(r219550)
+++ stable/7/share/examples/cvsup/cvs-supfile   Fri Mar 11 23:16:04 2011
(r219551)
@@ -140,7 +140,6 @@ ports-all
 #ports-lang
 #ports-mail
 #ports-math
-#ports-mbone
 #ports-misc
 #ports-multimedia
 #ports-net

Modified: stable/7/share/examples/cvsup/ports-supfile
==
--- stable/7/share/examples/cvsup/ports-supfile Fri Mar 11 23:13:22 2011
(r219550)
+++ stable/7/share/examples/cvsup/ports-supfile Fri Mar 11 23:16:04 2011
(r219551)
@@ -104,7 +104,6 @@ ports-all
 #ports-lang
 #ports-mail
 #ports-math
-#ports-mbone
 #ports-misc
 #ports-multimedia
 #ports-net
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219550 - stable/8/share/examples/cvsup

2011-03-11 Thread Doug Barton
Author: dougb
Date: Fri Mar 11 23:13:22 2011
New Revision: 219550
URL: http://svn.freebsd.org/changeset/base/219550

Log:
  MFC r219353:
  
  mbone is no longer a physical category
  
  Submitted by: pav

Modified:
  stable/8/share/examples/cvsup/cvs-supfile
  stable/8/share/examples/cvsup/ports-supfile
Directory Properties:
  stable/8/share/examples/   (props changed)

Modified: stable/8/share/examples/cvsup/cvs-supfile
==
--- stable/8/share/examples/cvsup/cvs-supfile   Fri Mar 11 23:12:20 2011
(r219549)
+++ stable/8/share/examples/cvsup/cvs-supfile   Fri Mar 11 23:13:22 2011
(r219550)
@@ -140,7 +140,6 @@ ports-all
 #ports-lang
 #ports-mail
 #ports-math
-#ports-mbone
 #ports-misc
 #ports-multimedia
 #ports-net

Modified: stable/8/share/examples/cvsup/ports-supfile
==
--- stable/8/share/examples/cvsup/ports-supfile Fri Mar 11 23:12:20 2011
(r219549)
+++ stable/8/share/examples/cvsup/ports-supfile Fri Mar 11 23:13:22 2011
(r219550)
@@ -104,7 +104,6 @@ ports-all
 #ports-lang
 #ports-mail
 #ports-math
-#ports-mbone
 #ports-misc
 #ports-multimedia
 #ports-net
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219549 - in stable/8/share/examples: . etc kld/syscall

2011-03-11 Thread Doug Barton
Author: dougb
Date: Fri Mar 11 23:12:20 2011
New Revision: 219549
URL: http://svn.freebsd.org/changeset/base/219549

Log:
  Pull up mergeinfo from r209199,210482,212138,217826

Modified:
Directory Properties:
  stable/8/share/examples/   (props changed)
  stable/8/share/examples/etc/   (props changed)
  stable/8/share/examples/kld/syscall/   (props changed)
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r219526 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2011-03-11 Thread Andriy Gapon
on 11/03/2011 21:50 Kostik Belousov said the following:
> On Fri, Mar 11, 2011 at 07:27:31PM +, Andriy Gapon wrote:
>> Author: avg
>> Date: Fri Mar 11 19:27:31 2011
>> New Revision: 219526
>> URL: http://svn.freebsd.org/changeset/base/219526
>>
>> Log:
>>   use even larger stack size for ZFS txg_sync_thread
>>   
>>   While the stack size was larger than the default stack size on i386, it
>>   was smaller than the default stack size on amd64 and apparently that
>>   wasn't enough.  So, bump the size to 4 pages.  Upcoming ZFSv28 code uses
>>   8 pages for this stack size.
>>   
>>   This is a direct commit to stable/8.
>>   
>>   PR:kern/154681
>>   Discussed with:pjd
>>
>> Modified:
>>   stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c
>>
>> Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c
>> ==
>> --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.cFri Mar 
>> 11 19:21:42 2011(r219525)
>> +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.cFri Mar 
>> 11 19:27:31 2011(r219526)
>> @@ -146,7 +146,7 @@ txg_sync_start(dsl_pool_t *dp)
>>   * 32-bit x86.  This is due in part to nested pools and
>>   * scrub_visitbp() recursion.
>>   */
>> -tx->tx_sync_thread = thread_create(NULL, 12<<10, txg_sync_thread,
>> +tx->tx_sync_thread = thread_create(NULL, 16<<10, txg_sync_thread,
>>  dp, 0, &p0, TS_RUN, minclsyspri);
>>  
>>  mutex_exit(&tx->tx_sync_lock);
> What about architectures where PAGE_SIZE != 4096 ?
> We have ptoa() macro.

I agree, but this is not the moment when the style that you comment on was
introduced.  So, it's better to review (and fix) the code in head.

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


svn commit: r219548 - head/sys/dev/sound/pcm

2011-03-11 Thread Marius Strobl
Author: marius
Date: Fri Mar 11 22:42:04 2011
New Revision: 219548
URL: http://svn.freebsd.org/changeset/base/219548

Log:
  Allocate the sound buffer DMA memory coherent. While NetBSD typically
  also does this for sound drivers it's probably not necessary for all
  combinations of controllers and drivers. However, given that our sound
  drivers completely lack bus_dmamap_sync(9) calls this at least serves
  as a workaround when enabling use of the IOMMU streaming buffers on
  sparc64 and generally for arm and mips.
  
  MFC after:2 weeks

Modified:
  head/sys/dev/sound/pcm/buffer.c

Modified: head/sys/dev/sound/pcm/buffer.c
==
--- head/sys/dev/sound/pcm/buffer.c Fri Mar 11 22:32:17 2011
(r219547)
+++ head/sys/dev/sound/pcm/buffer.c Fri Mar 11 22:42:04 2011
(r219548)
@@ -93,7 +93,7 @@ sndbuf_alloc(struct snd_dbuf *b, bus_dma
int ret;
 
b->dmatag = dmatag;
-   b->dmaflags = dmaflags | BUS_DMA_NOWAIT;
+   b->dmaflags = dmaflags | BUS_DMA_NOWAIT | BUS_DMA_COHERENT;
b->maxsize = size;
b->bufsize = b->maxsize;
b->buf_addr = 0;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


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

2011-03-11 Thread Marius Strobl
Author: marius
Date: Fri Mar 11 22:32:17 2011
New Revision: 219547
URL: http://svn.freebsd.org/changeset/base/219547

Log:
  - Allocate the DMA memory shared between the host and the controller as
coherent.
  - Constify the ti_devs table.
  - Don't bother to set if_mtu to ETHERMTU, ether_ifattach() does that.
  
  MFC after:2 weeks

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

Modified: head/sys/dev/ti/if_ti.c
==
--- head/sys/dev/ti/if_ti.c Fri Mar 11 22:25:34 2011(r219546)
+++ head/sys/dev/ti/if_ti.c Fri Mar 11 22:32:17 2011(r219547)
@@ -145,7 +145,7 @@ typedef enum {
  * Various supported device vendors/types and their names.
  */
 
-static struct ti_type ti_devs[] = {
+static const struct ti_type const ti_devs[] = {
{ ALT_VENDORID, ALT_DEVICEID_ACENIC,
"Alteon AceNIC 1000baseSX Gigabit Ethernet" },
{ ALT_VENDORID, ALT_DEVICEID_ACENIC_COPPER,
@@ -1118,7 +1118,8 @@ ti_alloc_jumbo_mem(sc)
 
if (bus_dmamem_alloc(sc->ti_jumbo_dmat,
 (void**)&sc->ti_cdata.ti_jumbo_buf,
-BUS_DMA_NOWAIT, &sc->ti_jumbo_dmamap) != 0) {
+BUS_DMA_NOWAIT | BUS_DMA_COHERENT,
+&sc->ti_jumbo_dmamap) != 0) {
device_printf(sc->ti_dev, "Failed to allocate jumbo memory\n");
return (ENOBUFS);
}
@@ -2252,7 +2253,7 @@ static int
 ti_probe(dev)
device_tdev;
 {
-   struct ti_type  *t;
+   const struct ti_type*t;
 
t = ti_devs;
 
@@ -2389,7 +2390,8 @@ ti_attach(dev)
}
 
if (bus_dmamem_alloc(sc->ti_rdata_dmat, (void**)&sc->ti_rdata,
-BUS_DMA_NOWAIT, &sc->ti_rdata_dmamap) != 0) {
+BUS_DMA_NOWAIT | BUS_DMA_COHERENT,
+&sc->ti_rdata_dmamap) != 0) {
device_printf(dev, "Failed to allocate rdata memory\n");
error = ENOMEM;
goto fail;
@@ -2487,7 +2489,6 @@ ti_attach(dev)
ifp->if_start = ti_start;
ifp->if_init = ti_init;
ifp->if_baudrate = 10;
-   ifp->if_mtu = ETHERMTU;
ifp->if_snd.ifq_maxlen = TI_TX_RING_CNT - 1;
 
/* Set up ifmedia support. */

Modified: head/sys/dev/ti/if_tireg.h
==
--- head/sys/dev/ti/if_tireg.h  Fri Mar 11 22:25:34 2011(r219546)
+++ head/sys/dev/ti/if_tireg.h  Fri Mar 11 22:32:17 2011(r219547)
@@ -967,7 +967,7 @@ struct ti_chain_data {
 struct ti_type {
u_int16_t   ti_vid;
u_int16_t   ti_did;
-   char*ti_name;
+   const char  *ti_name;
 };
 
 #define TI_HWREV_TIGON 0x01
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219546 - head/sys/dev/xl

2011-03-11 Thread Marius Strobl
Author: marius
Date: Fri Mar 11 22:25:34 2011
New Revision: 219546
URL: http://svn.freebsd.org/changeset/base/219546

Log:
  Allocate the DMA memory shared between the host and the controller as
  coherent.
  
  MFC after:2 weeks

Modified:
  head/sys/dev/xl/if_xl.c

Modified: head/sys/dev/xl/if_xl.c
==
--- head/sys/dev/xl/if_xl.c Fri Mar 11 22:23:46 2011(r219545)
+++ head/sys/dev/xl/if_xl.c Fri Mar 11 22:25:34 2011(r219546)
@@ -1317,8 +1317,8 @@ xl_attach(device_t dev)
}
 
error = bus_dmamem_alloc(sc->xl_ldata.xl_rx_tag,
-   (void **)&sc->xl_ldata.xl_rx_list, BUS_DMA_NOWAIT | BUS_DMA_ZERO,
-   &sc->xl_ldata.xl_rx_dmamap);
+   (void **)&sc->xl_ldata.xl_rx_list, BUS_DMA_NOWAIT |
+   BUS_DMA_COHERENT | BUS_DMA_ZERO, &sc->xl_ldata.xl_rx_dmamap);
if (error) {
device_printf(dev, "no memory for rx list buffers!\n");
bus_dma_tag_destroy(sc->xl_ldata.xl_rx_tag);
@@ -1349,8 +1349,8 @@ xl_attach(device_t dev)
}
 
error = bus_dmamem_alloc(sc->xl_ldata.xl_tx_tag,
-   (void **)&sc->xl_ldata.xl_tx_list, BUS_DMA_NOWAIT | BUS_DMA_ZERO,
-   &sc->xl_ldata.xl_tx_dmamap);
+   (void **)&sc->xl_ldata.xl_tx_list, BUS_DMA_NOWAIT |
+   BUS_DMA_COHERENT | BUS_DMA_ZERO, &sc->xl_ldata.xl_tx_dmamap);
if (error) {
device_printf(dev, "no memory for list buffers!\n");
bus_dma_tag_destroy(sc->xl_ldata.xl_tx_tag);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219545 - head/sys/dev/stge

2011-03-11 Thread Marius Strobl
Author: marius
Date: Fri Mar 11 22:23:46 2011
New Revision: 219545
URL: http://svn.freebsd.org/changeset/base/219545

Log:
  Allocate the DMA memory shared between the host and the controller as
  coherent.
  
  MFC after:2 weeks

Modified:
  head/sys/dev/stge/if_stge.c

Modified: head/sys/dev/stge/if_stge.c
==
--- head/sys/dev/stge/if_stge.c Fri Mar 11 22:21:12 2011(r219544)
+++ head/sys/dev/stge/if_stge.c Fri Mar 11 22:23:46 2011(r219545)
@@ -960,8 +960,8 @@ stge_dma_alloc(struct stge_softc *sc)
 
/* allocate DMA'able memory and load the DMA map for Tx ring. */
error = bus_dmamem_alloc(sc->sc_cdata.stge_tx_ring_tag,
-   (void **)&sc->sc_rdata.stge_tx_ring, BUS_DMA_NOWAIT | BUS_DMA_ZERO,
-   &sc->sc_cdata.stge_tx_ring_map);
+   (void **)&sc->sc_rdata.stge_tx_ring, BUS_DMA_NOWAIT |
+   BUS_DMA_COHERENT | BUS_DMA_ZERO, &sc->sc_cdata.stge_tx_ring_map);
if (error != 0) {
device_printf(sc->sc_dev,
"failed to allocate DMA'able memory for Tx ring\n");
@@ -981,8 +981,8 @@ stge_dma_alloc(struct stge_softc *sc)
 
/* allocate DMA'able memory and load the DMA map for Rx ring. */
error = bus_dmamem_alloc(sc->sc_cdata.stge_rx_ring_tag,
-   (void **)&sc->sc_rdata.stge_rx_ring, BUS_DMA_NOWAIT | BUS_DMA_ZERO,
-   &sc->sc_cdata.stge_rx_ring_map);
+   (void **)&sc->sc_rdata.stge_rx_ring, BUS_DMA_NOWAIT |
+   BUS_DMA_COHERENT | BUS_DMA_ZERO, &sc->sc_cdata.stge_rx_ring_map);
if (error != 0) {
device_printf(sc->sc_dev,
"failed to allocate DMA'able memory for Rx ring\n");
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219544 - head/sys/dev/sk

2011-03-11 Thread Marius Strobl
Author: marius
Date: Fri Mar 11 22:21:12 2011
New Revision: 219544
URL: http://svn.freebsd.org/changeset/base/219544

Log:
  Allocate the DMA memory shared between the host and the controller as
  coherent.
  
  MFC after:2 weeks

Modified:
  head/sys/dev/sk/if_sk.c

Modified: head/sys/dev/sk/if_sk.c
==
--- head/sys/dev/sk/if_sk.c Fri Mar 11 22:19:49 2011(r219543)
+++ head/sys/dev/sk/if_sk.c Fri Mar 11 22:21:12 2011(r219544)
@@ -2036,8 +2036,8 @@ sk_dma_alloc(sc_if)
 
/* allocate DMA'able memory and load the DMA map for Tx ring */
error = bus_dmamem_alloc(sc_if->sk_cdata.sk_tx_ring_tag,
-   (void **)&sc_if->sk_rdata.sk_tx_ring, BUS_DMA_NOWAIT | BUS_DMA_ZERO,
-   &sc_if->sk_cdata.sk_tx_ring_map);
+   (void **)&sc_if->sk_rdata.sk_tx_ring, BUS_DMA_NOWAIT |
+   BUS_DMA_COHERENT | BUS_DMA_ZERO, &sc_if->sk_cdata.sk_tx_ring_map);
if (error != 0) {
device_printf(sc_if->sk_if_dev,
"failed to allocate DMA'able memory for Tx ring\n");
@@ -2057,8 +2057,8 @@ sk_dma_alloc(sc_if)
 
/* allocate DMA'able memory and load the DMA map for Rx ring */
error = bus_dmamem_alloc(sc_if->sk_cdata.sk_rx_ring_tag,
-   (void **)&sc_if->sk_rdata.sk_rx_ring, BUS_DMA_NOWAIT | BUS_DMA_ZERO,
-   &sc_if->sk_cdata.sk_rx_ring_map);
+   (void **)&sc_if->sk_rdata.sk_rx_ring, BUS_DMA_NOWAIT |
+   BUS_DMA_COHERENT | BUS_DMA_ZERO, &sc_if->sk_cdata.sk_rx_ring_map);
if (error != 0) {
device_printf(sc_if->sk_if_dev,
"failed to allocate DMA'able memory for Rx ring\n");
@@ -2165,8 +2165,9 @@ sk_dma_jumbo_alloc(sc_if)
 
/* allocate DMA'able memory and load the DMA map for jumbo Rx ring */
error = bus_dmamem_alloc(sc_if->sk_cdata.sk_jumbo_rx_ring_tag,
-   (void **)&sc_if->sk_rdata.sk_jumbo_rx_ring,
-   BUS_DMA_NOWAIT|BUS_DMA_ZERO, &sc_if->sk_cdata.sk_jumbo_rx_ring_map);
+   (void **)&sc_if->sk_rdata.sk_jumbo_rx_ring, BUS_DMA_NOWAIT |
+   BUS_DMA_COHERENT | BUS_DMA_ZERO,
+   &sc_if->sk_cdata.sk_jumbo_rx_ring_map);
if (error != 0) {
device_printf(sc_if->sk_if_dev,
"failed to allocate DMA'able memory for jumbo Rx ring\n");
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219543 - head/sys/dev/firewire

2011-03-11 Thread Marius Strobl
Author: marius
Date: Fri Mar 11 22:19:49 2011
New Revision: 219543
URL: http://svn.freebsd.org/changeset/base/219543

Log:
  Allocate the DMA memory shared between the host and the controller as
  coherent.
  
  MFC after:2 weeks

Modified:
  head/sys/dev/firewire/fwohci.c
  head/sys/dev/firewire/sbp.c

Modified: head/sys/dev/firewire/fwohci.c
==
--- head/sys/dev/firewire/fwohci.c  Fri Mar 11 22:16:05 2011
(r219542)
+++ head/sys/dev/firewire/fwohci.c  Fri Mar 11 22:19:49 2011
(r219543)
@@ -686,7 +686,7 @@ fwohci_init(struct fwohci_softc *sc, dev
sc->fc.dev = dev;
 
sc->fc.config_rom = fwdma_malloc(&sc->fc, CROMSIZE, CROMSIZE,
-   &sc->crom_dma, BUS_DMA_WAITOK);
+   &sc->crom_dma, BUS_DMA_WAITOK | BUS_DMA_COHERENT);
if(sc->fc.config_rom == NULL){
device_printf(dev, "config_rom alloc failed.");
return ENOMEM;
@@ -708,7 +708,7 @@ fwohci_init(struct fwohci_softc *sc, dev
 /* SID recieve buffer must align 2^11 */
 #defineOHCI_SIDSIZE(1 << 11)
sc->sid_buf = fwdma_malloc(&sc->fc, OHCI_SIDSIZE, OHCI_SIDSIZE,
-   &sc->sid_dma, BUS_DMA_WAITOK);
+   &sc->sid_dma, BUS_DMA_WAITOK | BUS_DMA_COHERENT);
if (sc->sid_buf == NULL) {
device_printf(dev, "sid_buf alloc failed.");
return ENOMEM;

Modified: head/sys/dev/firewire/sbp.c
==
--- head/sys/dev/firewire/sbp.c Fri Mar 11 22:16:05 2011(r219542)
+++ head/sys/dev/firewire/sbp.c Fri Mar 11 22:19:49 2011(r219543)
@@ -562,7 +562,8 @@ END_DEBUG
 
fwdma_malloc(sbp->fd.fc, 
/* alignment */ sizeof(uint32_t),
-   SBP_DMA_SIZE, &sdev->dma, BUS_DMA_NOWAIT);
+   SBP_DMA_SIZE, &sdev->dma, BUS_DMA_NOWAIT |
+   BUS_DMA_COHERENT);
if (sdev->dma.v_addr == NULL) {
printf("%s: dma space allocation failed\n",
__func__);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219540 - in stable/7: lib/libelf usr.sbin/ntp/doc

2011-03-11 Thread Ulrich Spoerlein
Author: uqs
Date: Fri Mar 11 22:09:13 2011
New Revision: 219540
URL: http://svn.freebsd.org/changeset/base/219540

Log:
  MFH r206622,210933,219210: Typo fixes, prologue ordering.

Modified:
  stable/7/lib/libelf/elf.3
  stable/7/lib/libelf/elf_begin.3
  stable/7/lib/libelf/elf_cntl.3
  stable/7/lib/libelf/elf_end.3
  stable/7/lib/libelf/elf_errmsg.3
  stable/7/lib/libelf/elf_fill.3
  stable/7/lib/libelf/elf_flagdata.3
  stable/7/lib/libelf/elf_getarhdr.3
  stable/7/lib/libelf/elf_getarsym.3
  stable/7/lib/libelf/elf_getbase.3
  stable/7/lib/libelf/elf_getdata.3
  stable/7/lib/libelf/elf_getident.3
  stable/7/lib/libelf/elf_getphnum.3
  stable/7/lib/libelf/elf_getscn.3
  stable/7/lib/libelf/elf_getshnum.3
  stable/7/lib/libelf/elf_getshstrndx.3
  stable/7/lib/libelf/elf_hash.3
  stable/7/lib/libelf/elf_kind.3
  stable/7/lib/libelf/elf_memory.3
  stable/7/lib/libelf/elf_next.3
  stable/7/lib/libelf/elf_rand.3
  stable/7/lib/libelf/elf_rawfile.3
  stable/7/lib/libelf/elf_strptr.3
  stable/7/lib/libelf/elf_update.3
  stable/7/lib/libelf/elf_version.3
  stable/7/lib/libelf/gelf.3
  stable/7/lib/libelf/gelf_checksum.3
  stable/7/lib/libelf/gelf_fsize.3
  stable/7/lib/libelf/gelf_getcap.3
  stable/7/lib/libelf/gelf_getclass.3
  stable/7/lib/libelf/gelf_getdyn.3
  stable/7/lib/libelf/gelf_getehdr.3
  stable/7/lib/libelf/gelf_getmove.3
  stable/7/lib/libelf/gelf_getphdr.3
  stable/7/lib/libelf/gelf_getrel.3
  stable/7/lib/libelf/gelf_getrela.3
  stable/7/lib/libelf/gelf_getshdr.3
  stable/7/lib/libelf/gelf_getsym.3
  stable/7/lib/libelf/gelf_getsyminfo.3
  stable/7/lib/libelf/gelf_getsymshndx.3
  stable/7/lib/libelf/gelf_newehdr.3
  stable/7/lib/libelf/gelf_newphdr.3
  stable/7/lib/libelf/gelf_update_ehdr.3
  stable/7/lib/libelf/gelf_xlatetof.3
  stable/7/usr.sbin/ntp/doc/ntp.conf.5
  stable/7/usr.sbin/ntp/doc/ntpq.8
Directory Properties:
  stable/7/lib/libelf/   (props changed)
  stable/7/usr.sbin/ntp/   (props changed)

Modified: stable/7/lib/libelf/elf.3
==
--- stable/7/lib/libelf/elf.3   Fri Mar 11 22:07:28 2011(r219539)
+++ stable/7/lib/libelf/elf.3   Fri Mar 11 22:09:13 2011(r219540)
@@ -24,8 +24,8 @@
 .\" $FreeBSD$
 .\"
 .Dd December 11, 2006
-.Os
 .Dt ELF 3
+.Os
 .Sh NAME
 .Nm elf
 .Nd API for manipulating ELF objects

Modified: stable/7/lib/libelf/elf_begin.3
==
--- stable/7/lib/libelf/elf_begin.3 Fri Mar 11 22:07:28 2011
(r219539)
+++ stable/7/lib/libelf/elf_begin.3 Fri Mar 11 22:09:13 2011
(r219540)
@@ -24,8 +24,8 @@
 .\" $FreeBSD$
 .\"
 .Dd June 20, 2010
-.Os
 .Dt ELF_BEGIN 3
+.Os
 .Sh NAME
 .Nm elf_begin
 .Nd open an ELF file or ar(1) archive

Modified: stable/7/lib/libelf/elf_cntl.3
==
--- stable/7/lib/libelf/elf_cntl.3  Fri Mar 11 22:07:28 2011
(r219539)
+++ stable/7/lib/libelf/elf_cntl.3  Fri Mar 11 22:09:13 2011
(r219540)
@@ -24,8 +24,8 @@
 .\" $FreeBSD$
 .\"
 .Dd August 9, 2006
-.Os
 .Dt ELF_CNTL 3
+.Os
 .Sh NAME
 .Nm elf_cntl
 .Nd control an elf file descriptor
@@ -75,7 +75,7 @@ archive, an ELF file, or other data file
 .Sh IMPLEMENTATION NOTES
 Due to use of
 .Xr mmap 2
-internally, this function is a no-op for for ELF objects opened in
+internally, this function is a no-op for ELF objects opened in
 .Dv ELF_C_READ
 mode.
 .Sh RETURN VALUES

Modified: stable/7/lib/libelf/elf_end.3
==
--- stable/7/lib/libelf/elf_end.3   Fri Mar 11 22:07:28 2011
(r219539)
+++ stable/7/lib/libelf/elf_end.3   Fri Mar 11 22:09:13 2011
(r219540)
@@ -24,8 +24,8 @@
 .\" $FreeBSD$
 .\"
 .Dd June 29, 2006
-.Os
 .Dt ELF_END 3
+.Os
 .Sh NAME
 .Nm elf_end
 .Nd release an ELF descriptor

Modified: stable/7/lib/libelf/elf_errmsg.3
==
--- stable/7/lib/libelf/elf_errmsg.3Fri Mar 11 22:07:28 2011
(r219539)
+++ stable/7/lib/libelf/elf_errmsg.3Fri Mar 11 22:09:13 2011
(r219540)
@@ -24,8 +24,8 @@
 .\" $FreeBSD$
 .\"
 .Dd June 11, 2006
-.Os
 .Dt ELF_ERRMSG 3
+.Os
 .Sh NAME
 .Nm elf_errmsg ,
 .Nm elf_errno

Modified: stable/7/lib/libelf/elf_fill.3
==
--- stable/7/lib/libelf/elf_fill.3  Fri Mar 11 22:07:28 2011
(r219539)
+++ stable/7/lib/libelf/elf_fill.3  Fri Mar 11 22:09:13 2011
(r219540)
@@ -24,8 +24,8 @@
 .\" $FreeBSD$
 .\"
 .Dd June 11, 2006
-.Os
 .Dt ELF_FILL 3
+.Os
 .Sh NAME
 .Nm elf_fill
 .Nd set fill byte for inter-section padding

Modified: stable/7/lib/libelf/elf_flagdata.3
==
--- stable/7/lib/libelf/elf_flagdata.3  Fri Mar 11 22:07:28 2011
(r219539)
+++ stable

svn commit: r219539 - in stable/8: lib/libelf usr.sbin/ntp/doc

2011-03-11 Thread Ulrich Spoerlein
Author: uqs
Date: Fri Mar 11 22:07:28 2011
New Revision: 219539
URL: http://svn.freebsd.org/changeset/base/219539

Log:
  MFH r210933,219210: Typo fixes

Modified:
  stable/8/lib/libelf/elf_cntl.3
  stable/8/usr.sbin/ntp/doc/ntp.conf.5
  stable/8/usr.sbin/ntp/doc/ntpq.8
Directory Properties:
  stable/8/lib/libelf/   (props changed)
  stable/8/usr.sbin/ntp/   (props changed)

Modified: stable/8/lib/libelf/elf_cntl.3
==
--- stable/8/lib/libelf/elf_cntl.3  Fri Mar 11 22:00:45 2011
(r219538)
+++ stable/8/lib/libelf/elf_cntl.3  Fri Mar 11 22:07:28 2011
(r219539)
@@ -75,7 +75,7 @@ archive, an ELF file, or other data file
 .Sh IMPLEMENTATION NOTES
 Due to use of
 .Xr mmap 2
-internally, this function is a no-op for for ELF objects opened in
+internally, this function is a no-op for ELF objects opened in
 .Dv ELF_C_READ
 mode.
 .Sh RETURN VALUES

Modified: stable/8/usr.sbin/ntp/doc/ntp.conf.5
==
--- stable/8/usr.sbin/ntp/doc/ntp.conf.5Fri Mar 11 22:00:45 2011
(r219538)
+++ stable/8/usr.sbin/ntp/doc/ntp.conf.5Fri Mar 11 22:07:28 2011
(r219539)
@@ -317,7 +317,7 @@ the
 option to a lower limit of 4 (16 s).
 .It Cm noselect
 Marks the server as unused, except for display purposes.
-The server is discarded by the selection algroithm.
+The server is discarded by the selection algorithm.
 .It Cm prefer
 Marks the server as preferred.
 All other things being equal,
@@ -1368,7 +1368,7 @@ The
 daemon implements a general purpose address/mask based restriction
 list.
 The list contains address/match entries sorted first
-by increasing address values and and then by increasing mask values.
+by increasing address values and then by increasing mask values.
 A match occurs when the bitwise AND of the mask and the packet
 source address is equal to the bitwise AND of the mask and
 address in the list.
@@ -1405,9 +1405,9 @@ at abusive rates.
 Some violations cause denied service
 only for the offending packet, others cause denied service
 for a timed period and others cause the denied service for
-an indefinate period.
+an indefinite period.
 When a client or network is denied access
-for an indefinate period, the only way at present to remove
+for an indefinite period, the only way at present to remove
 the restrictions is by restarting the server.
 .Ss The Kiss-of-Death Packet
 Ordinarily, packets denied service are simply dropped with no

Modified: stable/8/usr.sbin/ntp/doc/ntpq.8
==
--- stable/8/usr.sbin/ntp/doc/ntpq.8Fri Mar 11 22:00:45 2011
(r219538)
+++ stable/8/usr.sbin/ntp/doc/ntpq.8Fri Mar 11 22:07:28 2011
(r219539)
@@ -269,7 +269,7 @@ Exit
 .It Ic raw
 Causes all output from query commands is printed as received
 from the remote server.
-The only formating/interpretation done on
+The only formatting/interpretation done on
 the data is to transform nonascii data into a printable (but barely
 understandable) form.
 .It Ic timeout Ar milliseconds
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219535 - head/lib/libc/stdlib

2011-03-11 Thread Marius Strobl
Author: marius
Date: Fri Mar 11 21:35:38 2011
New Revision: 219535
URL: http://svn.freebsd.org/changeset/base/219535

Log:
  Now that TLS generally is available on sparc64 since r219534 turn on
  support for it. Note that while sparc64 also supports the static TLS
  model and thus tls_model("initial-exec"), using the default model
  turned out to yield slightly better buildstone performance.

Modified:
  head/lib/libc/stdlib/malloc.c

Modified: head/lib/libc/stdlib/malloc.c
==
--- head/lib/libc/stdlib/malloc.c   Fri Mar 11 21:24:02 2011
(r219534)
+++ head/lib/libc/stdlib/malloc.c   Fri Mar 11 21:35:38 2011
(r219535)
@@ -234,7 +234,7 @@ __FBSDID("$FreeBSD$");
 #ifdef __sparc64__
 #  define LG_QUANTUM   4
 #  define LG_SIZEOF_PTR3
-#  define NO_TLS
+#  define TLS_MODEL/* default */
 #endif
 #ifdef __amd64__
 #  define LG_QUANTUM   4
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219534 - in head: contrib/gcc/config/sparc gnu/lib/libgomp gnu/lib/libstdc++ gnu/usr.bin/cc/cc_tools

2011-03-11 Thread Marius Strobl
Author: marius
Date: Fri Mar 11 21:24:02 2011
New Revision: 219534
URL: http://svn.freebsd.org/changeset/base/219534

Log:
  Now that TLS is supported for sparc64 by both binutils 2.17.50 committed
  in r218822 and rtld(1) committed in r219533 turn on TLS support in GCC.

Modified:
  head/contrib/gcc/config/sparc/freebsd.h
  head/gnu/lib/libgomp/config.h
  head/gnu/lib/libstdc++/config.h
  head/gnu/usr.bin/cc/cc_tools/auto-host.h

Modified: head/contrib/gcc/config/sparc/freebsd.h
==
--- head/contrib/gcc/config/sparc/freebsd.h Fri Mar 11 21:08:02 2011
(r219533)
+++ head/contrib/gcc/config/sparc/freebsd.h Fri Mar 11 21:24:02 2011
(r219534)
@@ -161,6 +161,13 @@ Boston, MA 02110-1301, USA.  */
 
 /* #define DWARF_OFFSET_SIZE PTR_SIZE */
 
+#ifdef HAVE_AS_TLS
+#undef TARGET_SUN_TLS
+#undef TARGET_GNU_TLS
+#define TARGET_SUN_TLS 0
+#define TARGET_GNU_TLS 1
+#endif
+
 #undef ENDFILE_SPEC
 #define ENDFILE_SPEC   \
   "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s} "  \

Modified: head/gnu/lib/libgomp/config.h
==
--- head/gnu/lib/libgomp/config.h   Fri Mar 11 21:08:02 2011
(r219533)
+++ head/gnu/lib/libgomp/config.h   Fri Mar 11 21:24:02 2011
(r219534)
@@ -59,7 +59,7 @@
 #define HAVE_SYS_TYPES_H 1
 
 /* Define to 1 if the target supports thread-local storage. */
-#if !defined(__sparc64__) && !defined(__arm__) && !defined(__mips__)
+#if !defined(__arm__) && !defined(__mips__)
 #define HAVE_TLS 1
 #endif
 

Modified: head/gnu/lib/libstdc++/config.h
==
--- head/gnu/lib/libstdc++/config.h Fri Mar 11 21:08:02 2011
(r219533)
+++ head/gnu/lib/libstdc++/config.h Fri Mar 11 21:24:02 2011
(r219534)
@@ -371,7 +371,7 @@
 /* #undef HAVE_TANL */
 
 /* Define to 1 if the target supports thread-local storage. */
-#if !defined(__sparc64__) && !defined(__arm__) && !defined(__mips__)
+#if !defined(__arm__) && !defined(__mips__)
 #define HAVE_TLS 1
 #endif
 

Modified: head/gnu/usr.bin/cc/cc_tools/auto-host.h
==
--- head/gnu/usr.bin/cc/cc_tools/auto-host.hFri Mar 11 21:08:02 2011
(r219533)
+++ head/gnu/usr.bin/cc/cc_tools/auto-host.hFri Mar 11 21:24:02 2011
(r219534)
@@ -287,7 +287,7 @@
 
 /* Define if your assembler supports thread-local storage. */
 #ifndef USED_FOR_TARGET
-#if !defined(__sparc64__) && !defined(__arm__)
+#if !defined(__arm__)
 #define HAVE_AS_TLS 1
 #endif
 #endif
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219533 - in head: libexec/rtld-elf/sparc64 sys/sparc64/sparc64

2011-03-11 Thread Marius Strobl
Author: marius
Date: Fri Mar 11 21:08:02 2011
New Revision: 219533
URL: http://svn.freebsd.org/changeset/base/219533

Log:
  - Add support for TLS relocations.
  - Emitt an error when encountering an unsupported and in case of the
kernel also for unaligned relocations.
  - Fix R_SPARC_LOX10 relocations. Apparently these are hardly ever used.

Modified:
  head/libexec/rtld-elf/sparc64/reloc.c
  head/sys/sparc64/sparc64/elf_machdep.c

Modified: head/libexec/rtld-elf/sparc64/reloc.c
==
--- head/libexec/rtld-elf/sparc64/reloc.c   Fri Mar 11 20:30:58 2011
(r219532)
+++ head/libexec/rtld-elf/sparc64/reloc.c   Fri Mar 11 21:08:02 2011
(r219533)
@@ -66,6 +66,9 @@ __FBSDID("$FreeBSD$");
 #define_RF_B   0x0800  /* Load address 
relative */
 #define_RF_U   0x0400  /* Unaligned */
 #define_RF_X   0x0200  /* Bare symbols, needs 
proc */
+#define_RF_D   0x0100  /* Use dynamic TLS 
offset */
+#define_RF_O   0x0080  /* Use static TLS 
offset */
+#define_RF_I   0x0040  /* Use TLS object ID */
 #define_RF_SZ(s)   (((s) & 0xff) << 8) /* memory target size */
 #define_RF_RS(s)   ( (s) & 0xff)   /* right shift */
 static const int reloc_target_flags[] = {
@@ -126,6 +129,32 @@ static const int reloc_target_flags[] = 
_RF_S|_RF_A|_RF_SZ(64) | _RF_RS(0), /* REGISTER */
_RF_S|_RF_A|_RF_U|  _RF_SZ(64) | _RF_RS(0), /* UA64 */
_RF_S|_RF_A|_RF_U|  _RF_SZ(16) | _RF_RS(0), /* UA16 */
+
+   /* TLS */
+   _RF_S|_RF_A|_RF_SZ(32) | _RF_RS(10),/* GD_HI22 */
+   _RF_S|_RF_A|_RF_SZ(32) | _RF_RS(0), /* GD_LO10 */
+   0,  /* GD_ADD */
+ _RF_A|_RF_P|  _RF_SZ(32) | _RF_RS(2), /* GD_CALL */
+   _RF_S|_RF_A|_RF_SZ(32) | _RF_RS(10),/* LDM_HI22 */
+   _RF_S|_RF_A|_RF_SZ(32) | _RF_RS(0), /* LDM_LO10 */
+   0,  /* LDM_ADD */
+ _RF_A|_RF_P|  _RF_SZ(32) | _RF_RS(2), /* LDM_CALL */
+   _RF_S|_RF_A|_RF_SZ(32) | _RF_RS(10),/* LDO_HIX22 */
+   _RF_S|_RF_A|_RF_SZ(32) | _RF_RS(0), /* LDO_LOX10 */
+   0,  /* LDO_ADD */
+   _RF_S|_RF_A|_RF_SZ(32) | _RF_RS(10),/* IE_HI22 */
+   _RF_S|_RF_A|_RF_SZ(32) | _RF_RS(0), /* IE_LO10 */
+   0,  /* IE_LD */
+   0,  /* IE_LDX */
+   0,  /* IE_ADD */
+   _RF_S|_RF_A|_RF_O|  _RF_SZ(32) | _RF_RS(10),/* LE_HIX22 */
+   _RF_S|_RF_A|_RF_O|  _RF_SZ(32) | _RF_RS(0), /* LE_LOX10 */
+   _RF_S|  _RF_I|  _RF_SZ(32) | _RF_RS(0), /* DTPMOD32 */
+   _RF_S|  _RF_I|  _RF_SZ(64) | _RF_RS(0), /* DTPMOD64 */
+   _RF_S|_RF_A|_RF_D|  _RF_SZ(32) | _RF_RS(0), /* DTPOFF32 */
+   _RF_S|_RF_A|_RF_D|  _RF_SZ(64) | _RF_RS(0), /* DTPOFF64 */
+   _RF_S|_RF_A|_RF_O|  _RF_SZ(32) | _RF_RS(0), /* TPOFF32 */
+   _RF_S|_RF_A|_RF_O|  _RF_SZ(64) | _RF_RS(0)  /* TPOFF64 */
 };
 
 #if 0
@@ -137,7 +166,11 @@ static const char *const reloc_names[] =
"PCPLT32", "10", "11", "64", "OLO10", "HH22", "HM10", "LM22",
"PC_HH22", "PC_HM10", "PC_LM22", "WDISP16", "WDISP19", "GLOB_JMP",
"7", "5", "6", "DISP64", "PLT64", "HIX22", "LOX10", "H44", "M44",
-   "L44", "REGISTER", "UA64", "UA16"
+   "L44", "REGISTER", "UA64", "UA16", "GD_HI22", "GD_LO10", "GD_ADD",
+   "GD_CALL", "LDM_HI22", "LDMO10", "LDM_ADD", "LDM_CALL", "LDO_HIX22",
+   "LDO_LOX10", "LDO_ADD", "IE_HI22", "IE_LO10", "IE_LD", "IE_LDX",
+   "IE_ADD", "LE_HIX22", "LE_LOX10", "DTPMOD32", "DTPMOD64", "DTPOFF32",
+   "DTPOFF64", "TPOFF32", "TPOFF64"
 };
 #endif
 
@@ -147,6 +180,9 @@ static const char *const reloc_names[] =
 #defineRELOC_UNALIGNED(t)  ((reloc_target_flags[t] & 
_RF_U) != 0)
 #defineRELOC_USE_ADDEND(t) ((reloc_target_flags[t] & 
_RF_A) != 0)
 #defineRELOC_BARE_SYMBOL(t)((reloc_target_flags[t] & 
_RF_X) != 0)
+#defineRELOC_USE_TLS_DOFF(t)   ((reloc_target_flags[t] & 
_RF_D) != 0)
+#defineRELOC_USE_TLS_OFF(t)((reloc_target_flags[t] & 
_RF_O) != 0)
+#defineRELOC_USE_TLS_ID(t) ((reloc_target_flags[t] & 
_RF_I) != 0)
 #defineRELOC_TARGET_SIZE(t)

svn commit: r219532 - in head: libexec/rtld-elf/sparc64 sys/sparc64/sparc64

2011-03-11 Thread Marius Strobl
Author: marius
Date: Fri Mar 11 20:30:58 2011
New Revision: 219532
URL: http://svn.freebsd.org/changeset/base/219532

Log:
  - Remove clause 3 and 4 from TNF licenses. [1]
  - Add the _RF_X committed in r212998 also to the tables in the sparc64
reloc.c in order reduce differences between the kernel and the userland
source. This results in no functional change though.
  - Fix further inconsistencies in the abbreviations of the names of the
relocations.
  - Further whitespace fixes.
  
  Obtained from:NetBSD [1]

Modified:
  head/libexec/rtld-elf/sparc64/reloc.c
  head/sys/sparc64/sparc64/elf_machdep.c

Modified: head/libexec/rtld-elf/sparc64/reloc.c
==
--- head/libexec/rtld-elf/sparc64/reloc.c   Fri Mar 11 20:01:57 2011
(r219531)
+++ head/libexec/rtld-elf/sparc64/reloc.c   Fri Mar 11 20:30:58 2011
(r219532)
@@ -1,4 +1,4 @@
-/* $NetBSD: mdreloc.c,v 1.5 2001/04/25 12:24:51 kleink Exp $   */
+/* $NetBSD: mdreloc.c,v 1.42 2008/04/28 20:23:04 martin Exp $  */
 
 /*-
  * Copyright (c) 2000 Eduardo Horvath.
@@ -16,13 +16,6 @@
  * 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.
- * 3. All advertising materials mentioning features or use of this software
- *must display the following acknowledgement:
- *This product includes software developed by the NetBSD
- *Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- *contributors may be used to endorse or promote products derived
- *from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
@@ -66,28 +59,29 @@ __FBSDID("$FreeBSD$");
  * * the relocation is relative to the load address
  *
  */
-#define _RF_S  0x8000  /* Resolve symbol */
-#define _RF_A  0x4000  /* Use addend */
-#define _RF_P  0x2000  /* Location relative */
-#define _RF_G  0x1000  /* GOT offset */
-#define _RF_B  0x0800  /* Load address relative */
-#define _RF_U  0x0400  /* Unaligned */
-#define _RF_SZ(s)  (((s) & 0xff) << 8) /* memory target size */
-#define _RF_RS(s)  ( (s) & 0xff)   /* right shift */
+#define_RF_S   0x8000  /* Resolve symbol */
+#define_RF_A   0x4000  /* Use addend */
+#define_RF_P   0x2000  /* Location relative */
+#define_RF_G   0x1000  /* GOT offset */
+#define_RF_B   0x0800  /* Load address 
relative */
+#define_RF_U   0x0400  /* Unaligned */
+#define_RF_X   0x0200  /* Bare symbols, needs 
proc */
+#define_RF_SZ(s)   (((s) & 0xff) << 8) /* memory target size */
+#define_RF_RS(s)   ( (s) & 0xff)   /* right shift */
 static const int reloc_target_flags[] = {
0,  /* NONE */
-   _RF_S|_RF_A|_RF_SZ(8)  | _RF_RS(0), /* RELOC_8 */
-   _RF_S|_RF_A|_RF_SZ(16) | _RF_RS(0), /* RELOC_16 */
-   _RF_S|_RF_A|_RF_SZ(32) | _RF_RS(0), /* RELOC_32 */
+   _RF_S|_RF_A|_RF_SZ(8)  | _RF_RS(0), /* 8 */
+   _RF_S|_RF_A|_RF_SZ(16) | _RF_RS(0), /* 16 */
+   _RF_S|_RF_A|_RF_SZ(32) | _RF_RS(0), /* 32 */
_RF_S|_RF_A|_RF_P|  _RF_SZ(8)  | _RF_RS(0), /* DISP_8 */
_RF_S|_RF_A|_RF_P|  _RF_SZ(16) | _RF_RS(0), /* DISP_16 */
_RF_S|_RF_A|_RF_P|  _RF_SZ(32) | _RF_RS(0), /* DISP_32 */
_RF_S|_RF_A|_RF_P|  _RF_SZ(32) | _RF_RS(2), /* WDISP_30 */
_RF_S|_RF_A|_RF_P|  _RF_SZ(32) | _RF_RS(2), /* WDISP_22 */
-   _RF_S|_RF_A|_RF_SZ(32) | _RF_RS(10),/* HI22 */
-   _RF_S|_RF_A|_RF_SZ(32) | _RF_RS(0), /* 22 */
-   _RF_S|_RF_A|_RF_SZ(32) | _RF_RS(0), /* 13 */
-   _RF_S|_RF_A|_RF_SZ(32) | _RF_RS(0), /* LO10 */
+   _RF_S|_RF_A|_RF_X|  _RF_SZ(32) | _RF_RS(10),/* HI22 */
+   _RF_S|_RF_A|_RF_X|  _RF_SZ(32) | _RF_RS(0), /* 22 */
+   _RF_S|_RF_A|_RF_X|  _RF_SZ(32) | _RF_RS(0), /* 13 */
+   _RF_S|_RF_A|_RF_X|  _RF_SZ(32) | _RF_RS(0), /* LO10 */
_RF_G|  _RF_SZ(32) | _RF_RS(0), 

svn commit: r219531 - head/sys/sparc64/sparc64

2011-03-11 Thread Marius Strobl
Author: marius
Date: Fri Mar 11 20:01:57 2011
New Revision: 219531
URL: http://svn.freebsd.org/changeset/base/219531

Log:
  Revert the binutils workaround committed in r219340, the underlying
  problem has been fixed in r219530.

Modified:
  head/sys/sparc64/sparc64/elf_machdep.c

Modified: head/sys/sparc64/sparc64/elf_machdep.c
==
--- head/sys/sparc64/sparc64/elf_machdep.c  Fri Mar 11 20:00:38 2011
(r219530)
+++ head/sys/sparc64/sparc64/elf_machdep.c  Fri Mar 11 20:01:57 2011
(r219531)
@@ -333,14 +333,7 @@ elf_reloc(linker_file_t lf, Elf_Addr rel
addr = lookup(lf, symidx, 1);
if (addr == 0)
return (-1);
-   /*
-* With the addition of TLS support binutils started to make
-* addend values relative to relocbase instead of sections.
-*/
-   if (addr > relocbase && addr <= relocbase + value)
-   value += relocbase;
-   else
-   value += addr;
+   value += addr;
if (RELOC_BARE_SYMBOL(rtype))
value = elf_relocaddr(lf, value);
}
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219530 - head/contrib/binutils/bfd

2011-03-11 Thread Marius Strobl
Author: marius
Date: Fri Mar 11 20:00:38 2011
New Revision: 219530
URL: http://svn.freebsd.org/changeset/base/219530

Log:
  In the upstream rev. 1.61 of elf64-sparc.c the following bug was fixed:
  
  * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
  dynamic relocs against section symbols for the output section vma.
  
  However, with the addition of TLS support in the upstream rev. 1.104
  this fix was essentially reverted. After factoring out the common parts
  of elf32-sparc.c and elf64-sparc.c a comment was added to elfxx-sparc.c
  in the upstream rev. 1.27 as part of unrelated changes, saying that the
  fix from elf64-sparc.c rev. 1.61 indeed should be implemented, but given
  that some unspecified OS has a broken ld.so expecting broken relocations
  deliberately is omitted.
  As the current behavior actually violates the SPARC ABI, FreeBSD never
  had such a broken ld.so and this is actually causing problems with at
  least kernel modules linked with binutils 2.17.50 committed in r218822
  without the workaround committed in r219340 in place, re-implement the
  above fix in a way so that is only applied if the output format is
  ELFOSABI_FREEBSD. In the upstream version it probably would make sense
  to invert this check and only skip adjusting the addend for the OS with
  the broken ld.so, once it's determine which one that is.
  
  Approved by:  dim

Modified:
  head/contrib/binutils/bfd/elfxx-sparc.c

Modified: head/contrib/binutils/bfd/elfxx-sparc.c
==
--- head/contrib/binutils/bfd/elfxx-sparc.c Fri Mar 11 19:44:06 2011
(r219529)
+++ head/contrib/binutils/bfd/elfxx-sparc.c Fri Mar 11 20:00:38 2011
(r219530)
@@ -2474,11 +2474,13 @@ _bfd_sparc_elf_relocate_section (bfd *ou
   Elf_Internal_Rela *rel;
   Elf_Internal_Rela *relend;
   int num_relocs;
+  const struct elf_backend_data *bed;
 
   htab = _bfd_sparc_elf_hash_table (info);
   symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
   sym_hashes = elf_sym_hashes (input_bfd);
   local_got_offsets = elf_local_got_offsets (input_bfd);
+  bed = get_elf_backend_data (output_bfd);
 
   if (elf_hash_table (info)->hgot == NULL)
 got_base = 0;
@@ -2876,11 +2878,6 @@ _bfd_sparc_elf_relocate_section (bfd *ou
{
  asection *osec;
 
- /* We are turning this relocation into one
-against a section symbol.  It would be
-proper to subtract the symbol's value,
-osec->vma, from the emitted reloc addend,
-but ld.so expects buggy relocs.  */
  osec = sec->output_section;
  indx = elf_section_data (osec)->dynindx;
 
@@ -2901,6 +2898,15 @@ _bfd_sparc_elf_relocate_section (bfd *ou
  bfd_set_error (bfd_error_bad_value);
  return FALSE;
}
+
+ /* We are turning this relocation into one
+against a section symbol, so subtract out
+the output section's address but not the
+offset of the input section in the output
+section on OSes where ld.so doesn't expect
+buggy relocs.  */
+ if (bed->elf_osabi == ELFOSABI_FREEBSD)
+   outrel.r_addend -= osec->vma;
}
 
  outrel.r_info = SPARC_ELF_R_INFO (htab, rel, indx,
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r219526 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2011-03-11 Thread Kostik Belousov
On Fri, Mar 11, 2011 at 07:27:31PM +, Andriy Gapon wrote:
> Author: avg
> Date: Fri Mar 11 19:27:31 2011
> New Revision: 219526
> URL: http://svn.freebsd.org/changeset/base/219526
> 
> Log:
>   use even larger stack size for ZFS txg_sync_thread
>   
>   While the stack size was larger than the default stack size on i386, it
>   was smaller than the default stack size on amd64 and apparently that
>   wasn't enough.  So, bump the size to 4 pages.  Upcoming ZFSv28 code uses
>   8 pages for this stack size.
>   
>   This is a direct commit to stable/8.
>   
>   PR: kern/154681
>   Discussed with: pjd
> 
> Modified:
>   stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c
> 
> Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c
> ==
> --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Fri Mar 
> 11 19:21:42 2011(r219525)
> +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c Fri Mar 
> 11 19:27:31 2011(r219526)
> @@ -146,7 +146,7 @@ txg_sync_start(dsl_pool_t *dp)
>* 32-bit x86.  This is due in part to nested pools and
>* scrub_visitbp() recursion.
>*/
> - tx->tx_sync_thread = thread_create(NULL, 12<<10, txg_sync_thread,
> + tx->tx_sync_thread = thread_create(NULL, 16<<10, txg_sync_thread,
>   dp, 0, &p0, TS_RUN, minclsyspri);
>  
>   mutex_exit(&tx->tx_sync_lock);
What about architectures where PAGE_SIZE != 4096 ?
We have ptoa() macro.


pgp6w5vokKhgQ.pgp
Description: PGP signature


svn commit: r219529 - stable/8/share/termcap

2011-03-11 Thread Ed Schouten
Author: ed
Date: Fri Mar 11 19:44:06 2011
New Revision: 219529
URL: http://svn.freebsd.org/changeset/base/219529

Log:
  MFC r218844:
  
Improve 256 color support.
  
- Add screen-256color,
- Improve rxvt-256color to set pa and op properly.
- Add rxvt-unicode-256color as an alias to rxvt-256color.
  
PR:   conf/152713, conf/153164
Submitted by: Alexander Verbod and Frédéric Perrin

Modified:
  stable/8/share/termcap/termcap.src
Directory Properties:
  stable/8/share/termcap/   (props changed)

Modified: stable/8/share/termcap/termcap.src
==
--- stable/8/share/termcap/termcap.src  Fri Mar 11 19:40:49 2011
(r219528)
+++ stable/8/share/termcap/termcap.src  Fri Mar 11 19:44:06 2011
(r219529)
@@ -2784,6 +2784,9 @@ SH|screen-s|VT 100/ANSI X3.64 virtual te
:ts=\E_:fs=\E\\:ds=\E_\E\\:tc=screen:
 SW|screen-w|VT 100/ANSI X3.64 virtual terminal with 132 cols:\
:co#132:tc=screen:
+screen-256color|VT 100/ANSI X3.64 terminal with 256 colors:\
+   :Co#256:pa#32767:\
+   :AB=\E[48;5;%dm:AF=\E[38;5;%dm:tc=screen:
 # $Xorg: termcap,v 1.3 2000/08/17 19:55:10 cpqbld Exp $
 #
 # Note:
@@ -4586,7 +4589,11 @@ rxvt|rxvt terminal emulator (X Window Sy
:pa#64:Co#8:AF=\E[3%dm:AB=\E[4%dm:op=\E[39;49m:tc=rxvt-mono:
 
 rxvt-256color|rxvt terminal emulator with 256 colors:\
-   :Co#256:AF=\E[38;5;%dm:AB=\E[48;5;%dm:tc=rxvt-unicode:
+   :Co#256:pa#32767:\
+   :AB=\E[48;5;%dm:AF=\E[38;5;%dm:op=\E[39;49m:tc=rxvt-unicode:
+
+rxvt-unicode-256color|rxvt-unicode terminal with 256 colors (X Window System):\
+   :tc=rxvt-256color:
 
 # Termcap entry for Eterm, taken from the sources of Eterm-0.9.2
 Eterm|Eterm Terminal Emulator (X11 Window System):\
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219528 - head/usr.sbin/bsdinstall/scripts

2011-03-11 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Fri Mar 11 19:40:49 2011
New Revision: 219528
URL: http://svn.freebsd.org/changeset/base/219528

Log:
  Correct typo.

Modified:
  head/usr.sbin/bsdinstall/scripts/auto

Modified: head/usr.sbin/bsdinstall/scripts/auto
==
--- head/usr.sbin/bsdinstall/scripts/auto   Fri Mar 11 19:32:15 2011
(r219527)
+++ head/usr.sbin/bsdinstall/scripts/auto   Fri Mar 11 19:40:49 2011
(r219528)
@@ -114,7 +114,7 @@ if [ ! -z "$FETCH_DISTRIBUTIONS" ]; then
ALL_DISTRIBUTIONS="$DISTRIBUTIONS"
 
# Download to a directory in the new system as scratch space
-   BSDINSTALL_FETCHDEST="$BSDINSTALL_CHROOT/usr/bsdinstall-dist"
+   BSDINSTALL_FETCHDEST="$BSDINSTALL_CHROOT/usr/freebsd-dist"
mkdir -p "$BSDINSTALL_FETCHDEST" || error
 
export DISTRIBUTIONS="$FETCH_DISTRIBUTIONS"
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219527 - head/tools/tools/iwi

2011-03-11 Thread Bruce Cran
Author: brucec
Date: Fri Mar 11 19:32:15 2011
New Revision: 219527
URL: http://svn.freebsd.org/changeset/base/219527

Log:
  Fix warnings and style(9) issues.
  Set WARNS to 6.

Modified:
  head/tools/tools/iwi/Makefile
  head/tools/tools/iwi/iwistats.c

Modified: head/tools/tools/iwi/Makefile
==
--- head/tools/tools/iwi/Makefile   Fri Mar 11 19:27:31 2011
(r219526)
+++ head/tools/tools/iwi/Makefile   Fri Mar 11 19:32:15 2011
(r219527)
@@ -2,5 +2,6 @@
 
 PROG=  iwistats
 NO_MAN=
+WARNS?=6
 
 .include 

Modified: head/tools/tools/iwi/iwistats.c
==
--- head/tools/tools/iwi/iwistats.c Fri Mar 11 19:27:31 2011
(r219526)
+++ head/tools/tools/iwi/iwistats.c Fri Mar 11 19:32:15 2011
(r219527)
@@ -113,16 +113,17 @@ get_statistics(const char *iface)
static uint32_t stats[256];
const struct statistic *stat;
char oid[32];
-   int ifaceno, len;
+   size_t len;
+   int ifaceno;
 
if (sscanf(iface, "iwi%u", &ifaceno) != 1)
errx(EX_DATAERR, "Invalid interface name '%s'", iface);
 
-   len = sizeof stats;
-   (void)snprintf(oid, sizeof oid, "dev.iwi.%u.stats", ifaceno);
+   len = sizeof(stats);
+   (void)snprintf(oid, sizeof(oid), "dev.iwi.%u.stats", ifaceno);
if (sysctlbyname(oid, stats, &len, NULL, 0) == -1)
err(EX_OSERR, "Can't retrieve statistics");
 
for (stat = tbl; stat->index != -1; stat++)
-   (void)printf("%-60s[%lu]\n", stat->desc, stats[stat->index]);
+   (void)printf("%-60s[%u]\n", stat->desc, stats[stat->index]);
 }
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219526 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2011-03-11 Thread Andriy Gapon
Author: avg
Date: Fri Mar 11 19:27:31 2011
New Revision: 219526
URL: http://svn.freebsd.org/changeset/base/219526

Log:
  use even larger stack size for ZFS txg_sync_thread
  
  While the stack size was larger than the default stack size on i386, it
  was smaller than the default stack size on amd64 and apparently that
  wasn't enough.  So, bump the size to 4 pages.  Upcoming ZFSv28 code uses
  8 pages for this stack size.
  
  This is a direct commit to stable/8.
  
  PR:   kern/154681
  Discussed with:   pjd

Modified:
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c

Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c
==
--- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c   Fri Mar 
11 19:21:42 2011(r219525)
+++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c   Fri Mar 
11 19:27:31 2011(r219526)
@@ -146,7 +146,7 @@ txg_sync_start(dsl_pool_t *dp)
 * 32-bit x86.  This is due in part to nested pools and
 * scrub_visitbp() recursion.
 */
-   tx->tx_sync_thread = thread_create(NULL, 12<<10, txg_sync_thread,
+   tx->tx_sync_thread = thread_create(NULL, 16<<10, txg_sync_thread,
dp, 0, &p0, TS_RUN, minclsyspri);
 
mutex_exit(&tx->tx_sync_lock);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219525 - head/sys/amd64/conf

2011-03-11 Thread Andriy Gapon
Author: avg
Date: Fri Mar 11 19:21:42 2011
New Revision: 219525
URL: http://svn.freebsd.org/changeset/base/219525

Log:
  amd64/NOTES: use a greater number in KSTACK_PAGES example
  
  This is a minor cosmetic change - the users are more likely to want to
  increase (rather than decrease) default kernel stack size,
  which is already 4 pages on amd64.
  
  MFC after:4 days

Modified:
  head/sys/amd64/conf/NOTES

Modified: head/sys/amd64/conf/NOTES
==
--- head/sys/amd64/conf/NOTES   Fri Mar 11 19:19:47 2011(r219524)
+++ head/sys/amd64/conf/NOTES   Fri Mar 11 19:21:42 2011(r219525)
@@ -547,7 +547,7 @@ options LINSYSFS
 # KSTACK_PAGES is the number of memory pages to assign to the kernel
 # stack of each thread.
 
-optionsKSTACK_PAGES=3
+optionsKSTACK_PAGES=5
 
 #
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219524 - head/tools/tools/ether_reflect

2011-03-11 Thread Bruce Cran
Author: brucec
Date: Fri Mar 11 19:19:47 2011
New Revision: 219524
URL: http://svn.freebsd.org/changeset/base/219524

Log:
  Fix the build: we have snprintf(3).
  
  MFC after:1 week

Modified:
  head/tools/tools/ether_reflect/Makefile

Modified: head/tools/tools/ether_reflect/Makefile
==
--- head/tools/tools/ether_reflect/Makefile Fri Mar 11 18:56:55 2011
(r219523)
+++ head/tools/tools/ether_reflect/Makefile Fri Mar 11 19:19:47 2011
(r219524)
@@ -6,5 +6,6 @@
 PROG=   ether_reflect
 DPADD= ${LIBPCAP}
 LDADD= -lpcap
+CFLAGS+=-DHAVE_SNPRINTF
 
 .include 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219523 - in head/sys: amd64/amd64 ia64/ia64 powerpc/aim sparc64/sparc64 sun4v/sun4v sys

2011-03-11 Thread Matthew D Fleming
Author: mdf
Date: Fri Mar 11 18:56:55 2011
New Revision: 219523
URL: http://svn.freebsd.org/changeset/base/219523

Log:
  Mostly revert r219468, as I had misremembered the C standard regarding
  the size of an extern array.
  
  Keep one change from strncpy to strlcpy.

Modified:
  head/sys/amd64/amd64/machdep.c
  head/sys/ia64/ia64/machdep.c
  head/sys/powerpc/aim/machdep.c
  head/sys/sparc64/sparc64/machdep.c
  head/sys/sun4v/sun4v/machdep.c
  head/sys/sys/kernel.h

Modified: head/sys/amd64/amd64/machdep.c
==
--- head/sys/amd64/amd64/machdep.c  Fri Mar 11 18:51:42 2011
(r219522)
+++ head/sys/amd64/amd64/machdep.c  Fri Mar 11 18:56:55 2011
(r219523)
@@ -1758,7 +1758,7 @@ hammer_time(u_int64_t modulep, u_int64_t
 
 env = getenv("kernelname");
if (env != NULL)
-   strlcpy(kernelname, env, MAXPATHLEN);
+   strlcpy(kernelname, env, sizeof(kernelname));
 
 #ifdef XENHVM
if (inw(0x10) == 0x49d2) {

Modified: head/sys/ia64/ia64/machdep.c
==
--- head/sys/ia64/ia64/machdep.cFri Mar 11 18:51:42 2011
(r219522)
+++ head/sys/ia64/ia64/machdep.cFri Mar 11 18:56:55 2011
(r219523)
@@ -792,7 +792,7 @@ ia64_init(void)
 
p = getenv("kernelname");
if (p != NULL) {
-   strlcpy(kernelname, p, MAXPATHLEN);
+   strlcpy(kernelname, p, sizeof(kernelname));
freeenv(p);
}
 

Modified: head/sys/powerpc/aim/machdep.c
==
--- head/sys/powerpc/aim/machdep.c  Fri Mar 11 18:51:42 2011
(r219522)
+++ head/sys/powerpc/aim/machdep.c  Fri Mar 11 18:56:55 2011
(r219523)
@@ -540,7 +540,7 @@ powerpc_init(vm_offset_t startkernel, vm
 */
 env = getenv("kernelname");
 if (env != NULL) {
-   strlcpy(kernelname, env, MAXPATHLEN);
+   strlcpy(kernelname, env, sizeof(kernelname));
freeenv(env);
}
 

Modified: head/sys/sparc64/sparc64/machdep.c
==
--- head/sys/sparc64/sparc64/machdep.c  Fri Mar 11 18:51:42 2011
(r219522)
+++ head/sys/sparc64/sparc64/machdep.c  Fri Mar 11 18:56:55 2011
(r219523)
@@ -532,7 +532,7 @@ sparc64_init(caddr_t mdp, u_long o1, u_l
init_param2(physmem);
env = getenv("kernelname");
if (env != NULL) {
-   strlcpy(kernelname, env, MAXPATHLEN);
+   strlcpy(kernelname, env, sizeof(kernelname));
freeenv(env);
}
 

Modified: head/sys/sun4v/sun4v/machdep.c
==
--- head/sys/sun4v/sun4v/machdep.c  Fri Mar 11 18:51:42 2011
(r219522)
+++ head/sys/sun4v/sun4v/machdep.c  Fri Mar 11 18:56:55 2011
(r219523)
@@ -425,7 +425,7 @@ sparc64_init(caddr_t mdp, u_long o1, u_l
 
env = getenv("kernelname");
if (env != NULL) {
-   strlcpy(kernelname, env, MAXPATHLEN);
+   strlcpy(kernelname, env, sizeof(kernelname));
freeenv(env);
}
 

Modified: head/sys/sys/kernel.h
==
--- head/sys/sys/kernel.h   Fri Mar 11 18:51:42 2011(r219522)
+++ head/sys/sys/kernel.h   Fri Mar 11 18:56:55 2011(r219523)
@@ -55,7 +55,7 @@
 /* Global variables for the kernel. */
 
 /* 1.1 */
-extern char kernelname[/*MAXPATHLEN*/];
+extern char kernelname[MAXPATHLEN];
 
 extern int tick;   /* usec per tick (100 / hz) */
 extern int hz; /* system clock's frequency */
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219522 - head/tools/tools/aac

2011-03-11 Thread Bruce Cran
Author: brucec
Date: Fri Mar 11 18:51:42 2011
New Revision: 219522
URL: http://svn.freebsd.org/changeset/base/219522

Log:
  Fix warnings and set WARNS to 6.
  
  MFC after:1 week

Modified:
  head/tools/tools/aac/Makefile
  head/tools/tools/aac/aac_checkq.c

Modified: head/tools/tools/aac/Makefile
==
--- head/tools/tools/aac/Makefile   Fri Mar 11 18:48:28 2011
(r219521)
+++ head/tools/tools/aac/Makefile   Fri Mar 11 18:51:42 2011
(r219522)
@@ -2,6 +2,7 @@
 
 PROG=  aac_checkq
 NO_MAN=
+WARNS?=6
 BINDIR?=/usr/local/bin
 
 .include 

Modified: head/tools/tools/aac/aac_checkq.c
==
--- head/tools/tools/aac/aac_checkq.c   Fri Mar 11 18:48:28 2011
(r219521)
+++ head/tools/tools/aac/aac_checkq.c   Fri Mar 11 18:51:42 2011
(r219522)
@@ -34,7 +34,11 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
+#include 
+
+void usage(void);
 
 /*
  * Simple program to print out the queue stats on the given queue index.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219521 - head/tools/tools/cfi

2011-03-11 Thread Bruce Cran
Author: brucec
Date: Fri Mar 11 18:48:28 2011
New Revision: 219521
URL: http://svn.freebsd.org/changeset/base/219521

Log:
  Fix warnings and set WARNS to 6.
  
  MFC after:1 week

Modified:
  head/tools/tools/cfi/Makefile
  head/tools/tools/cfi/cfi.c

Modified: head/tools/tools/cfi/Makefile
==
--- head/tools/tools/cfi/Makefile   Fri Mar 11 18:46:11 2011
(r219520)
+++ head/tools/tools/cfi/Makefile   Fri Mar 11 18:48:28 2011
(r219521)
@@ -3,5 +3,6 @@
 PROG=  cfi
 BINDIR=/usr/local/bin
 NO_MAN=
+WARNS?=6
 
 .include 

Modified: head/tools/tools/cfi/cfi.c
==
--- head/tools/tools/cfi/cfi.c  Fri Mar 11 18:46:11 2011(r219520)
+++ head/tools/tools/cfi/cfi.c  Fri Mar 11 18:48:28 2011(r219521)
@@ -38,9 +38,12 @@
 #include 
 #include 
 
-#include 
+#include 
 #include 
+#include 
 #include 
+#include 
+#include 
 
 const char *progname;
 const char *dvname;
@@ -48,8 +51,6 @@ const char *dvname;
 static void
 usage(void)
 {
-   int i;
-
fprintf(stderr, "usage: %s [-f device] op...\n", progname);
fprintf(stderr, "where op's are:\n");
fprintf(stderr, "fact\t\tread factory PR segment\n");
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r218909 - in head: bin/df bin/sh lib/libc/arm/gen lib/libc/ia64/gen lib/libc/mips/gen lib/libc/powerpc/gen lib/libc/powerpc64/gen lib/libpkg lib/libstand lib/msun/src sys/amd64/amd64 s

2011-03-11 Thread John Baldwin
On Monday, February 21, 2011 4:01:34 am Bruce Cran wrote:
> Author: brucec
> Date: Mon Feb 21 09:01:34 2011
> New Revision: 218909
> URL: http://svn.freebsd.org/changeset/base/218909
> 
> Log:
>   Fix typos - remove duplicate "the".
>   
>   PR: bin/154928
>   Submitted by:   Eitan Adler 
>   MFC after:  3 days

A few of these weren't just duplicates but were actually using 'the' when
they should have been using some other word instead:

> Modified: head/lib/libpkg/version.c
> ==
> --- head/lib/libpkg/version.c Mon Feb 21 05:10:34 2011(r218908)
> +++ head/lib/libpkg/version.c Mon Feb 21 09:01:34 2011(r218909)
> @@ -76,7 +76,7 @@ split_version(const char *pkgname, const
>  if (pkgname == NULL)
>   errx(2, "%s: Passed NULL pkgname.", __func__);
>  
> -/* Look for the last '-' the the pkgname */
> +/* Look for the last '-' the pkgname */
>  ch = strrchr(pkgname, '-');
>  /* Cheat if we are just passed a version, not a valid package name */
>  versionstr = ch ? ch + 1 : pkgname;

This is not a double the, it should be "Look for the last '-' in the pkgname".

> Modified: head/sys/dev/drm/r300_reg.h
> ==
> --- head/sys/dev/drm/r300_reg.h   Mon Feb 21 05:10:34 2011
> (r218908)
> +++ head/sys/dev/drm/r300_reg.h   Mon Feb 21 09:01:34 2011
> (r218909)
> @@ -353,7 +353,7 @@ __FBSDID("$FreeBSD$");
>  #   define R300_PVS_CNTL_1_PROGRAM_START_SHIFT   0
>  #   define R300_PVS_CNTL_1_POS_END_SHIFT 10
>  #   define R300_PVS_CNTL_1_PROGRAM_END_SHIFT 20
> -/* Addresses are relative the the vertex program parameters area. */
> +/* Addresses are relative the vertex program parameters area. */
>  #define R300_VAP_PVS_CNTL_2 0x22D4
>  #   define R300_PVS_CNTL_2_PARAM_OFFSET_SHIFT 0
>  #   define R300_PVS_CNTL_2_PARAM_COUNT_SHIFT  16

I think this should be "Addresses are relative to the vertex ...".

> Modified: head/sys/dev/ep/if_epreg.h
> ==
> --- head/sys/dev/ep/if_epreg.hMon Feb 21 05:10:34 2011
> (r218908)
> +++ head/sys/dev/ep/if_epreg.hMon Feb 21 09:01:34 2011
> (r218909)
> @@ -113,7 +113,7 @@
>  /**
>   * *
>   * These are the registers for the 3Com 3c509 and their bit patterns when *
> - * applicable.  They have been taken out the the "EtherLink III Parallel  *
> + * applicable.  They have been taken out the "EtherLink III Parallel  *
>   * Tasking EISA and ISA Technical Reference" "Beta Draft 10/30/92" manual *
>   * from 3com.
>   *
>   * *

I think this should be 'Then have been taken out of the "Etherlink III...'

> Modified: head/sys/dev/vx/if_vxreg.h
> ==
> --- head/sys/dev/vx/if_vxreg.hMon Feb 21 05:10:34 2011
> (r218908)
> +++ head/sys/dev/vx/if_vxreg.hMon Feb 21 09:01:34 2011
> (r218909)
> @@ -112,7 +112,7 @@
>  
>  /**
>   * These are the registers for the 3Com 3c509 and their bit patterns when *
> - * applicable.  They have been taken out the the "EtherLink III Parallel  *
> + * applicable.  They have been taken out the "EtherLink III Parallel  *
>   * Tasking EISA and ISA Technical Reference" "Beta Draft 10/30/92" manual *
>   * from 3com.
>   *
>   **/

Same as above.  "out of the" rather than "out the"

> Modified: head/sys/gnu/fs/xfs/xfs_dir_leaf.c
> ==
> --- head/sys/gnu/fs/xfs/xfs_dir_leaf.cMon Feb 21 05:10:34 2011
> (r218908)
> +++ head/sys/gnu/fs/xfs/xfs_dir_leaf.cMon Feb 21 09:01:34 2011
> (r218909)
> @@ -2153,7 +2153,7 @@ xfs_dir_leaf_getdents_int(
>  }
>  
>  /*
> - * Format a dirent64 structure and copy it out the the user's buffer.
> + * Format a dirent64 structure and copy it out the user's buffer.
>   */
>  int
>  xfs_dir_put_dirent64_direct(xfs_dir_put_args_t *pa)
> @@ -2185,7 +2185,7 @@ xfs_dir_put_dirent64_direct(xfs_dir_put_
>  }
>  
>  /*
> - * Format a dirent64 structure and copy it out the the user's buffer.
> + * Format a dirent64 structure and copy it out the user's buffer.
>   */
>  int
>  xfs_dir_put_dirent64_uio(xfs_dir_put_args_t *pa)

I think these should both be "out to the user's buffer".


> Modified: head/sys/netgraph/blu

svn commit: r219520 - stable/8/sys/cddl/dev/cyclic/i386

2011-03-11 Thread Andriy Gapon
Author: avg
Date: Fri Mar 11 18:46:11 2011
New Revision: 219520
URL: http://svn.freebsd.org/changeset/base/219520

Log:
  MFC r216505: cyclic xcall: use smp_no_rendevous_barrier as setup
  function parameter

Modified:
  stable/8/sys/cddl/dev/cyclic/i386/cyclic_machdep.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/cddl/dev/cyclic/i386/cyclic_machdep.c
==
--- stable/8/sys/cddl/dev/cyclic/i386/cyclic_machdep.c  Fri Mar 11 18:44:16 
2011(r219519)
+++ stable/8/sys/cddl/dev/cyclic/i386/cyclic_machdep.c  Fri Mar 11 18:46:11 
2011(r219520)
@@ -122,6 +122,6 @@ static void reprogram(cyb_arg_t arg, hrt
 static void xcall(cyb_arg_t arg, cpu_t *c, cyc_func_t func, void *param)
 {
 
-   smp_rendezvous_cpus((cpumask_t) (1 << c->cpuid), NULL,
-   func, smp_no_rendevous_barrier, param);
+   smp_rendezvous_cpus((cpumask_t) (1 << c->cpuid),
+   smp_no_rendevous_barrier, func, smp_no_rendevous_barrier, param);
 }
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219519 - head/tools/tools/ncpus

2011-03-11 Thread Bruce Cran
Author: brucec
Date: Fri Mar 11 18:44:16 2011
New Revision: 219519
URL: http://svn.freebsd.org/changeset/base/219519

Log:
  mptable.h is now in include/x86.

Modified:
  head/tools/tools/ncpus/biosmptable.c

Modified: head/tools/tools/ncpus/biosmptable.c
==
--- head/tools/tools/ncpus/biosmptable.cFri Mar 11 18:42:17 2011
(r219518)
+++ head/tools/tools/ncpus/biosmptable.cFri Mar 11 18:44:16 2011
(r219519)
@@ -34,7 +34,7 @@
 __FBSDID("$FreeBSD$");
 
 #include 
-#include 
+#include 
 
 #include 
 #include 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219518 - stable/7/sys/cddl/dev/cyclic/i386

2011-03-11 Thread Andriy Gapon
Author: avg
Date: Fri Mar 11 18:42:17 2011
New Revision: 219518
URL: http://svn.freebsd.org/changeset/base/219518

Log:
  MFC r216505: cyclic xcall: use smp_no_rendevous_barrier as setup
  function parameter

Modified:
  stable/7/sys/cddl/dev/cyclic/i386/cyclic_machdep.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/cddl/dev/cyclic/i386/cyclic_machdep.c
==
--- stable/7/sys/cddl/dev/cyclic/i386/cyclic_machdep.c  Fri Mar 11 18:28:20 
2011(r219517)
+++ stable/7/sys/cddl/dev/cyclic/i386/cyclic_machdep.c  Fri Mar 11 18:42:17 
2011(r219518)
@@ -122,6 +122,6 @@ static void reprogram(cyb_arg_t arg, hrt
 static void xcall(cyb_arg_t arg, cpu_t *c, cyc_func_t func, void *param)
 {
 
-   smp_rendezvous_cpus((cpumask_t) (1 << c->cpuid), NULL,
-   func, smp_no_rendevous_barrier, param);
+   smp_rendezvous_cpus((cpumask_t) (1 << c->cpuid),
+   smp_no_rendevous_barrier, func, smp_no_rendevous_barrier, param);
 }
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r219483 - head/sys/boot/i386/gptboot

2011-03-11 Thread Pawel Jakub Dawidek
On Fri, Mar 11, 2011 at 01:11:15PM +, John Baldwin wrote:
> Author: jhb
> Date: Fri Mar 11 13:11:15 2011
> New Revision: 219483
> URL: http://svn.freebsd.org/changeset/base/219483
> 
> Log:
>   Remove all object files during 'make clean'.

Oops, I think that was me. Thank you, John.

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


pgpN4jOfBqEnJ.pgp
Description: PGP signature


svn commit: r219517 - stable/8/sys/mips/rmi/dev/xlr

2011-03-11 Thread Andriy Gapon
Author: avg
Date: Fri Mar 11 18:28:20 2011
New Revision: 219517
URL: http://svn.freebsd.org/changeset/base/219517

Log:
  MFC r216375,r216408: fix atomic_set_xxx misuse in rge

Modified:
  stable/8/sys/mips/rmi/dev/xlr/rge.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/mips/rmi/dev/xlr/rge.c
==
--- stable/8/sys/mips/rmi/dev/xlr/rge.c Fri Mar 11 18:21:16 2011
(r219516)
+++ stable/8/sys/mips/rmi/dev/xlr/rge.c Fri Mar 11 18:28:20 2011
(r219517)
@@ -170,10 +170,8 @@ extern uint32_t cpu_ltop_map[32];
 static int port_counters[4][8] __aligned(XLR_CACHELINE_SIZE);
 
 #define port_inc_counter(port, counter)
atomic_add_int(&port_counters[port][(counter)], 1)
-#define port_set_counter(port, counter, value) 
atomic_set_int(&port_counters[port][(counter)], (value))
 #else
 #define port_inc_counter(port, counter)/* Nothing */
-#define port_set_counter(port, counter, value) /* Nothing */
 #endif
 
 int xlr_rge_tx_prepend[MAXCPU];
@@ -2281,7 +2279,7 @@ rmi_xlr_mac_open(struct rge_softc *sc)
mtx_unlock_spin(&priv->lock);
 
for (i = 0; i < 8; i++) {
-   atomic_set_int(&(priv->frin_to_be_sent[i]), 0);
+   priv->frin_to_be_sent[i] = 0;
}
 
return 0;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219516 - stable/7/sys/dev/drm

2011-03-11 Thread Andriy Gapon
Author: avg
Date: Fri Mar 11 18:21:16 2011
New Revision: 219516
URL: http://svn.freebsd.org/changeset/base/219516

Log:
  MFC r216374: fix atomic_set_xxx misuse in drm

Modified:
  stable/7/sys/dev/drm/drm_irq.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/drm/drm_irq.c
==
--- stable/7/sys/dev/drm/drm_irq.c  Fri Mar 11 18:15:30 2011
(r219515)
+++ stable/7/sys/dev/drm/drm_irq.c  Fri Mar 11 18:21:16 2011
(r219516)
@@ -140,7 +140,7 @@ int drm_vblank_init(struct drm_device *d
for (i = 0; i < num_crtcs; i++) {
DRM_INIT_WAITQUEUE(&dev->vblank[i].queue);
dev->vblank[i].refcount = 0;
-   atomic_set_rel_32(&dev->vblank[i].count, 0);
+   atomic_store_rel_32(&dev->vblank[i].count, 0);
}
dev->vblank_disable_allowed = 0;
DRM_SPINUNLOCK(&dev->vbl_lock);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219515 - stable/8/sys/dev/drm

2011-03-11 Thread Andriy Gapon
Author: avg
Date: Fri Mar 11 18:15:30 2011
New Revision: 219515
URL: http://svn.freebsd.org/changeset/base/219515

Log:
  MFC r216374: fix atomic_set_xxx misuse in drm

Modified:
  stable/8/sys/dev/drm/drm_irq.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/dev/drm/drm_irq.c
==
--- stable/8/sys/dev/drm/drm_irq.c  Fri Mar 11 18:10:37 2011
(r219514)
+++ stable/8/sys/dev/drm/drm_irq.c  Fri Mar 11 18:15:30 2011
(r219515)
@@ -140,7 +140,7 @@ int drm_vblank_init(struct drm_device *d
for (i = 0; i < num_crtcs; i++) {
DRM_INIT_WAITQUEUE(&dev->vblank[i].queue);
dev->vblank[i].refcount = 0;
-   atomic_set_rel_32(&dev->vblank[i].count, 0);
+   atomic_store_rel_32(&dev->vblank[i].count, 0);
}
dev->vblank_disable_allowed = 0;
DRM_SPINUNLOCK(&dev->vbl_lock);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219514 - stable/7/sys/dev/acpi_support

2011-03-11 Thread Andriy Gapon
Author: avg
Date: Fri Mar 11 18:10:37 2011
New Revision: 219514
URL: http://svn.freebsd.org/changeset/base/219514

Log:
  MFC r216376: acpi_fujitsu: update for P8010
  
  PR:   kern/121102

Modified:
  stable/7/sys/dev/acpi_support/acpi_fujitsu.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/acpi_support/acpi_fujitsu.c
==
--- stable/7/sys/dev/acpi_support/acpi_fujitsu.cFri Mar 11 18:07:49 
2011(r219513)
+++ stable/7/sys/dev/acpi_support/acpi_fujitsu.cFri Mar 11 18:10:37 
2011(r219514)
@@ -1,6 +1,6 @@
 /*-
  * Copyright (c) 2002 Sean Bullington 
- *   2003-2006 Anish Mistry 
+ *   2003-2008 Anish Mistry 
  *   2004 Mark Santcroos 
  * All Rights Reserved.
  *
@@ -84,6 +84,7 @@ ACPI_MODULE_NAME("Fujitsu")
 #define METHOD_RVOL6
 #define METHOD_GSIF7
 #define METHOD_GHKS8
+#define METHOD_GBLS9
 
 /* Notify event */
 #defineACPI_NOTIFY_STATUS_CHANGED  0x80
@@ -108,6 +109,7 @@ struct acpi_fujitsu_softc {
/* Control methods */
struct int_nameval  _sta,   /* unused */
gbll,   /* brightness */
+   gbls,   /* get brightness state */
ghks,   /* hotkey selector */
gbuf,   /* unused (buffer?) */
gmou,   /* mouse */
@@ -189,6 +191,11 @@ static struct {
.description= "Brightness level of the LCD panel"
},
{
+   .name   = "lcd_brightness",
+   .method = METHOD_GBLS,
+   .description= "Brightness level of the LCD panel"
+   },
+   {
.name   = "volume",
.method = METHOD_GVOL,
.description= "Speakers/headphones volume level"
@@ -358,6 +365,7 @@ acpi_fujitsu_init(struct acpi_fujitsu_so
/* Setup all of the names for each control method */
sc->_sta.name = "_STA";
sc->gbll.name = "GBLL";
+   sc->gbls.name = "GBLS";
sc->ghks.name = "GHKS";
sc->gmou.name = "GMOU";
sc->gsif.name = "GSIF";
@@ -386,6 +394,9 @@ acpi_fujitsu_init(struct acpi_fujitsu_so
case METHOD_GBLL:
exists = sc->gbll.exists;
break;
+   case METHOD_GBLS:
+   exists = sc->gbls.exists;
+   break;
case METHOD_GVOL:
case METHOD_MUTE:
exists = sc->gvol.exists;
@@ -462,6 +473,9 @@ acpi_fujitsu_method_get(struct acpi_fuji
case METHOD_GBLL:
nv = sc->gbll;
break;
+   case METHOD_GBLS:
+   nv = sc->gbls;
+   break;
case METHOD_GMOU:
nv = sc->gmou;
break;
@@ -519,6 +533,11 @@ acpi_fujitsu_method_set(struct acpi_fuji
control = "SBLL";
nv = sc->gbll;
break;
+   case METHOD_GBLS:
+   changed = BRIGHT_CHANGED;
+   control = "SBL2";
+   nv = sc->gbls;
+   break;
case METHOD_GMOU:
changed = MOUSE_CHANGED;
control = "SMOU";
@@ -587,6 +606,14 @@ acpi_fujitsu_check_hardware(struct acpi_
}
 
if (ACPI_FAILURE(acpi_GetInteger(sc->handle,
+   sc->gbls.name, &val))) {
+   sc->gbls.exists = 0;
+   } else {
+   sc->gbls.exists = 1;
+   }
+
+   // don't add if we can use the new method
+   if (sc->gbls.exists || ACPI_FAILURE(acpi_GetInteger(sc->handle,
sc->gbll.name, &val))) {
sc->gbll.exists = 0;
} else {
@@ -683,6 +710,9 @@ acpi_fujitsu_update(struct acpi_fujitsu_
/* Clear the modification bit */
sc->gmou.value &= MOUSE_SETTING_BITS;

+   /* Set the value in case it is not hardware controlled 
*/
+acpi_fujitsu_method_set(sc, METHOD_GMOU, 
sc->gmou.value);
+
acpi_UserNotify("FUJITSU", sc->handle, 
FN_POINTER_ENABLE);

ACPI_VPRINT(sc->dev, acpi_sc, "Internal pointer is now 
%s\n",
@@ -690,6 +720,29 @@ acpi_fujitsu_update(struct acpi_fujitsu_
}
}
 
+   /* Screen Brightness Level P8XXX */
+   if(sc

svn commit: r219513 - stable/8/sys/dev/acpi_support

2011-03-11 Thread Andriy Gapon
Author: avg
Date: Fri Mar 11 18:07:49 2011
New Revision: 219513
URL: http://svn.freebsd.org/changeset/base/219513

Log:
  MFC r216376: acpi_fujitsu: update for P8010
  
  PR:   kern/121102

Modified:
  stable/8/sys/dev/acpi_support/acpi_fujitsu.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/dev/acpi_support/acpi_fujitsu.c
==
--- stable/8/sys/dev/acpi_support/acpi_fujitsu.cFri Mar 11 17:47:59 
2011(r219512)
+++ stable/8/sys/dev/acpi_support/acpi_fujitsu.cFri Mar 11 18:07:49 
2011(r219513)
@@ -1,6 +1,6 @@
 /*-
  * Copyright (c) 2002 Sean Bullington 
- *   2003-2006 Anish Mistry 
+ *   2003-2008 Anish Mistry 
  *   2004 Mark Santcroos 
  * All Rights Reserved.
  *
@@ -86,6 +86,7 @@ ACPI_MODULE_NAME("Fujitsu")
 #define METHOD_RVOL6
 #define METHOD_GSIF7
 #define METHOD_GHKS8
+#define METHOD_GBLS9
 
 /* Notify event */
 #defineACPI_NOTIFY_STATUS_CHANGED  0x80
@@ -110,6 +111,7 @@ struct acpi_fujitsu_softc {
/* Control methods */
struct int_nameval  _sta,   /* unused */
gbll,   /* brightness */
+   gbls,   /* get brightness state */
ghks,   /* hotkey selector */
gbuf,   /* unused (buffer?) */
gmou,   /* mouse */
@@ -191,6 +193,11 @@ static struct {
.description= "Brightness level of the LCD panel"
},
{
+   .name   = "lcd_brightness",
+   .method = METHOD_GBLS,
+   .description= "Brightness level of the LCD panel"
+   },
+   {
.name   = "volume",
.method = METHOD_GVOL,
.description= "Speakers/headphones volume level"
@@ -360,6 +367,7 @@ acpi_fujitsu_init(struct acpi_fujitsu_so
/* Setup all of the names for each control method */
sc->_sta.name = "_STA";
sc->gbll.name = "GBLL";
+   sc->gbls.name = "GBLS";
sc->ghks.name = "GHKS";
sc->gmou.name = "GMOU";
sc->gsif.name = "GSIF";
@@ -387,6 +395,9 @@ acpi_fujitsu_init(struct acpi_fujitsu_so
case METHOD_GBLL:
exists = sc->gbll.exists;
break;
+   case METHOD_GBLS:
+   exists = sc->gbls.exists;
+   break;
case METHOD_GVOL:
case METHOD_MUTE:
exists = sc->gvol.exists;
@@ -463,6 +474,9 @@ acpi_fujitsu_method_get(struct acpi_fuji
case METHOD_GBLL:
nv = sc->gbll;
break;
+   case METHOD_GBLS:
+   nv = sc->gbls;
+   break;
case METHOD_GMOU:
nv = sc->gmou;
break;
@@ -520,6 +534,11 @@ acpi_fujitsu_method_set(struct acpi_fuji
control = "SBLL";
nv = sc->gbll;
break;
+   case METHOD_GBLS:
+   changed = BRIGHT_CHANGED;
+   control = "SBL2";
+   nv = sc->gbls;
+   break;
case METHOD_GMOU:
changed = MOUSE_CHANGED;
control = "SMOU";
@@ -585,6 +604,14 @@ acpi_fujitsu_check_hardware(struct acpi_
}
 
if (ACPI_FAILURE(acpi_GetInteger(sc->handle,
+   sc->gbls.name, &val))) {
+   sc->gbls.exists = 0;
+   } else {
+   sc->gbls.exists = 1;
+   }
+
+   // don't add if we can use the new method
+   if (sc->gbls.exists || ACPI_FAILURE(acpi_GetInteger(sc->handle,
sc->gbll.name, &val))) {
sc->gbll.exists = 0;
} else {
@@ -681,6 +708,9 @@ acpi_fujitsu_update(struct acpi_fujitsu_
/* Clear the modification bit */
sc->gmou.value &= MOUSE_SETTING_BITS;

+   /* Set the value in case it is not hardware controlled 
*/
+acpi_fujitsu_method_set(sc, METHOD_GMOU, 
sc->gmou.value);
+
acpi_UserNotify("FUJITSU", sc->handle, 
FN_POINTER_ENABLE);

ACPI_VPRINT(sc->dev, acpi_sc, "Internal pointer is now 
%s\n",
@@ -688,6 +718,29 @@ acpi_fujitsu_update(struct acpi_fujitsu_
}
}
 
+

svn commit: r219512 - head/release

2011-03-11 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Fri Mar 11 17:47:59 2011
New Revision: 219512
URL: http://svn.freebsd.org/changeset/base/219512

Log:
  Fix bugs and make improvements to documentation renaming.
  
  Submitted by: Garrett Cooper

Modified:
  head/release/Makefile.bsdinstall

Modified: head/release/Makefile.bsdinstall
==
--- head/release/Makefile.bsdinstallFri Mar 11 17:33:31 2011
(r219511)
+++ head/release/Makefile.bsdinstallFri Mar 11 17:47:59 2011
(r219512)
@@ -19,6 +19,7 @@
 
 WORLDDIR?= ${.CURDIR}/..
 PORTSDIR?= /usr/ports
+RELNOTES_LANG?= en_US.ISO8859-1
 
 TARGET_ARCH?=  ${MACHINE_ARCH}
 .if ${TARGET_ARCH} == ${MACHINE_ARCH}
@@ -68,12 +69,12 @@ ports.txz:
 reldoc:
cd ${.CURDIR}/doc && ${MAKE} all install clean 'FORMATS=html txt' 
INSTALL_COMPRESSED='' URLS_ABSOLUTE=YES DOCDIR=${.OBJDIR}/rdoc
-mkdir ${.OBJDIR}/reldoc
-   @for i in hardware readme relnotes errata; do \
-   cp ${.OBJDIR}/rdoc/${RELNOTES_LANG}/$$i/${TARGET}/article.txt \
-   ${.OBJDIR}/reldoc/`echo $${i} | tr 'a-z' 'A-Z'`.TXT; \
-   cp ${.OBJDIR}/rdoc/${RELNOTES_LANG}/$$i/${TARGET}/article.html \
-   ${.OBJDIR}/reldoc/`echo $${i} | tr 'a-z' 'A-Z'`.HTM; \
-   done
+.for i in hardware readme relnotes errata
+   ln -f ${.OBJDIR}/rdoc/${RELNOTES_LANG}/$i/article.txt \
+   ${.OBJDIR}/reldoc/${i:U}.TXT
+   ln -f ${.OBJDIR}/rdoc/${RELNOTES_LANG}/$i/article.html \
+   ${.OBJDIR}/reldoc/${i:U}.HTM
+.endfor
@cp ${.OBJDIR}/rdoc/${RELNOTES_LANG}/readme/docbook.css 
${.OBJDIR}/reldoc
 
 system: packagesystem
@@ -85,7 +86,9 @@ system: packagesystem
mkdir ${.OBJDIR}/release/usr/freebsd-dist
cp ${.OBJDIR}/*.txz ${.OBJDIR}/release/usr/freebsd-dist
 # Copy documentation, if generated
-   -cp ${.OBJDIR}/reldoc/* ${.OBJDIR}/release
+.if !defined(NODOC)
+   cp ${.OBJDIR}/reldoc/* ${.OBJDIR}/release
+.endif
 # Set up installation environment
ln -s /tmp/bsdinstall_etc/resolv.conf ${.OBJDIR}/release/etc/resolv.conf
echo sendmail_enable=\"NONE\" > ${.OBJDIR}/release/etc/rc.conf
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219511 - head/tools/test/malloc

2011-03-11 Thread Bruce Cran
Author: brucec
Date: Fri Mar 11 17:33:31 2011
New Revision: 219511
URL: http://svn.freebsd.org/changeset/base/219511

Log:
  Fix warnings and style(9) issues.
  Set WARNS to 6.
  
  MFC after:1 week

Modified:
  head/tools/test/malloc/Makefile
  head/tools/test/malloc/main.c

Modified: head/tools/test/malloc/Makefile
==
--- head/tools/test/malloc/Makefile Fri Mar 11 17:12:39 2011
(r219510)
+++ head/tools/test/malloc/Makefile Fri Mar 11 17:33:31 2011
(r219511)
@@ -4,6 +4,7 @@ SRCS=   main.c
 .PATH: ${.CURDIR}/../../../lib/libc/stdlib
 
 NO_MAN=
+WARNS?=6
 
 test:  malloc
@echo

Modified: head/tools/test/malloc/main.c
==
--- head/tools/test/malloc/main.c   Fri Mar 11 17:12:39 2011
(r219510)
+++ head/tools/test/malloc/main.c   Fri Mar 11 17:33:31 2011
(r219511)
@@ -1,6 +1,7 @@
 /* $FreeBSD$ */
 #include 
 #include 
+#include 
 #include 
 
 u_long NBUCKETS= 2000;
@@ -12,25 +13,25 @@ char **foo;
 int
 main(int argc, char **argv) 
 {
-int i,j,k;
+u_long i,j,k;
 
 if (argc > 1) NOPS = strtoul(argv[1],0,0);
 if (argc > 2) NBUCKETS = strtoul(argv[2],0,0);
 if (argc > 3) NSIZE   = strtoul(argv[3],0,0);
-printf("BRK(0)=%x ",sbrk(0));
-foo = malloc (sizeof *foo * NBUCKETS);
-memset(foo,0,sizeof *foo * NBUCKETS);
+printf("BRK(0)=%p ", sbrk(0));
+foo = malloc(sizeof(*foo) * NBUCKETS);
+memset(foo, 0, sizeof(*foo) * NBUCKETS);
 for (i = 1; i <= 4096; i *= 2) {
-for (j = 0 ; j < 40960/i && j < NBUCKETS; j++) {
+for (j = 0; j < 40960/i && j < NBUCKETS; j++) {
foo[j] = malloc(i);
 }
-for (j = 0 ; j < 40960/i && j < NBUCKETS; j++) {
+for (j = 0; j < 40960/i && j < NBUCKETS; j++) {
free(foo[j]);
-   foo[j] = 0;
+   foo[j] = NULL;
 }
 }
 
-for (i = 0 ; i < NOPS ; i++) {
+for (i = 0; i < NOPS; i++) {
j = random() % NBUCKETS;
k = random() % NSIZE;
foo[j] = realloc(foo[j], k & 1 ? 0 : k);
@@ -39,19 +40,19 @@ main(int argc, char **argv) 
 * Workaround because realloc return bogus pointer rather than
 * NULL if passed zero length.
 */
-   foo[j] = 0;
+   foo[j] = NULL;
}
if (foo[j])
foo[j][0] = 1;
 }
-printf("BRK(1)=%x ",sbrk(0));
-for (j = 0 ; j < NBUCKETS ; j++) {
+printf("BRK(1)=%p ", sbrk(0));
+for (j = 0; j < NBUCKETS; j++) {
if (foo[j]) {
free(foo[j]);
-   foo[j] = 0;
+   foo[j] = NULL;
}
 }
-printf("BRK(2)=%x NOPS=%lu NBUCKETS=%lu NSIZE=%lu\n",
-   sbrk(0),NOPS,NBUCKETS,NSIZE);
+printf("BRK(2)=%p NOPS=%lu NBUCKETS=%lu NSIZE=%lu\n",
+   sbrk(0), NOPS, NBUCKETS, NSIZE);
 return 0;
 }
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r219492 - stable/8/sys/kern

2011-03-11 Thread Andriy Gapon
on 11/03/2011 17:14 Andriy Gapon said the following:
> Author: avg
> Date: Fri Mar 11 15:14:40 2011
> New Revision: 219492
> URL: http://svn.freebsd.org/changeset/base/219492
> 
> Log:
>   MFC r215750: taskqueue: drop unused tq_name field

In stable/7 this field is still used in tasqueue_find function.

> Modified:
>   stable/8/sys/kern/subr_taskqueue.c
> Directory Properties:
>   stable/8/sys/   (props changed)
>   stable/8/sys/amd64/include/xen/   (props changed)
>   stable/8/sys/cddl/contrib/opensolaris/   (props changed)
>   stable/8/sys/contrib/dev/acpica/   (props changed)
>   stable/8/sys/contrib/pf/   (props changed)
> 
> Modified: stable/8/sys/kern/subr_taskqueue.c
> ==
> --- stable/8/sys/kern/subr_taskqueue.cFri Mar 11 15:06:56 2011
> (r219491)
> +++ stable/8/sys/kern/subr_taskqueue.cFri Mar 11 15:14:40 2011
> (r219492)
> @@ -53,7 +53,6 @@ struct taskqueue_busy {
>  
>  struct taskqueue {
>   STAILQ_HEAD(, task) tq_queue;
> - const char  *tq_name;
>   taskqueue_enqueue_fntq_enqueue;
>   void*tq_context;
>   TAILQ_HEAD(, taskqueue_busy) tq_active;
> @@ -98,7 +97,7 @@ TQ_SLEEP(struct taskqueue *tq, void *p, 
>  }
>  
>  static struct taskqueue *
> -_taskqueue_create(const char *name, int mflags,
> +_taskqueue_create(const char *name __unused, int mflags,
>taskqueue_enqueue_fn enqueue, void *context,
>int mtxflags, const char *mtxname)
>  {
> @@ -110,7 +109,6 @@ _taskqueue_create(const char *name, int 
>  
>   STAILQ_INIT(&queue->tq_queue);
>   TAILQ_INIT(&queue->tq_active);
> - queue->tq_name = name;
>   queue->tq_enqueue = enqueue;
>   queue->tq_context = context;
>   queue->tq_spin = (mtxflags & MTX_SPIN) != 0;


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


svn commit: r219510 - stable/7/sys/dev/acpica

2011-03-11 Thread Andriy Gapon
Author: avg
Date: Fri Mar 11 17:12:39 2011
New Revision: 219510
URL: http://svn.freebsd.org/changeset/base/219510

Log:
  MFC r216503: small cleanup of acpi battery status setting and checking
  
  PR:   kern/124744

Modified:
  stable/7/sys/dev/acpica/acpi_battery.c
  stable/7/sys/dev/acpica/acpi_cmbat.c
  stable/7/sys/dev/acpica/acpi_smbat.c
  stable/7/sys/dev/acpica/acpiio.h
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/acpica/acpi_battery.c
==
--- stable/7/sys/dev/acpica/acpi_battery.c  Fri Mar 11 17:01:14 2011
(r219509)
+++ stable/7/sys/dev/acpica/acpi_battery.c  Fri Mar 11 17:12:39 2011
(r219510)
@@ -101,8 +101,9 @@ acpi_battery_get_info_expire(void)
 int
 acpi_battery_bst_valid(struct acpi_bst *bst)
 {
-return (bst->state < ACPI_BATT_STAT_MAX && bst->cap != ACPI_BATT_UNKNOWN &&
-   bst->volt != ACPI_BATT_UNKNOWN);
+
+return (bst->state != ACPI_BATT_STAT_NOT_PRESENT &&
+   bst->cap != ACPI_BATT_UNKNOWN && bst->volt != ACPI_BATT_UNKNOWN);
 }
 
 /* Check _BIF results for validity. */

Modified: stable/7/sys/dev/acpica/acpi_cmbat.c
==
--- stable/7/sys/dev/acpica/acpi_cmbat.cFri Mar 11 17:01:14 2011
(r219509)
+++ stable/7/sys/dev/acpica/acpi_cmbat.cFri Mar 11 17:12:39 2011
(r219510)
@@ -278,6 +278,12 @@ acpi_cmbat_get_bst(void *arg)
goto end;
 acpi_cmbat_info_updated(&sc->bst_lastupdated);
 
+/* Clear out undefined/extended bits that might be set by hardware. */
+sc->bst.state &= ACPI_BATT_STAT_BST_MASK;
+if ((sc->bst.state & ACPI_BATT_STAT_INVALID) == ACPI_BATT_STAT_INVALID)
+   ACPI_VPRINT(dev, acpi_device_get_parent_softc(dev),
+   "battery reports simultaneous charging and discharging\n");
+
 /* XXX If all batteries are critical, perhaps we should suspend. */
 if (sc->bst.state & ACPI_BATT_STAT_CRITICAL) {
if ((sc->flags & ACPI_BATT_STAT_CRITICAL) == 0) {

Modified: stable/7/sys/dev/acpica/acpi_smbat.c
==
--- stable/7/sys/dev/acpica/acpi_smbat.cFri Mar 11 17:01:14 2011
(r219509)
+++ stable/7/sys/dev/acpica/acpi_smbat.cFri Mar 11 17:12:39 2011
(r219510)
@@ -389,6 +389,7 @@ acpi_smbat_get_bst(device_t dev, struct 
 
if (val > 0) {
sc->bst.rate = val * factor;
+   sc->bst.state &= ~SMBATT_BS_DISCHARGING;
sc->bst.state |= ACPI_BATT_STAT_CHARGING;
} else if (val < 0)
sc->bst.rate = (-val) * factor;

Modified: stable/7/sys/dev/acpica/acpiio.h
==
--- stable/7/sys/dev/acpica/acpiio.hFri Mar 11 17:01:14 2011
(r219509)
+++ stable/7/sys/dev/acpica/acpiio.hFri Mar 11 17:12:39 2011
(r219510)
@@ -74,11 +74,22 @@ struct acpi_bst {
 uint32_t volt; /* Present Voltage */
 };
 
+/*
+ * Note that the following definitions represent status bits for internal
+ * driver state.  The first three of them (charging, discharging and critical)
+ * conveninetly conform to ACPI specification of status returned by _BST
+ * method.  Other definitions (not present, etc) are synthetic.
+ * Also note that according to the specification the charging and discharging
+ * status bits must not be set at the same time.
+ */
 #define ACPI_BATT_STAT_DISCHARG0x0001
 #define ACPI_BATT_STAT_CHARGING0x0002
 #define ACPI_BATT_STAT_CRITICAL0x0004
-#define ACPI_BATT_STAT_NOT_PRESENT 0x0007
-#define ACPI_BATT_STAT_MAX 0x0007
+#define ACPI_BATT_STAT_INVALID \
+(ACPI_BATT_STAT_DISCHARG | ACPI_BATT_STAT_CHARGING)
+#define ACPI_BATT_STAT_BST_MASK\
+(ACPI_BATT_STAT_INVALID | ACPI_BATT_STAT_CRITICAL)
+#define ACPI_BATT_STAT_NOT_PRESENT ACPI_BATT_STAT_BST_MASK
 
 union acpi_battery_ioctl_arg {
 int unit;  /* Device unit or 
ACPI_BATTERY_ALL_UNITS. */
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219509 - head/release

2011-03-11 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Fri Mar 11 17:01:14 2011
New Revision: 219509
URL: http://svn.freebsd.org/changeset/base/219509

Log:
  Add support for generating release documentation. Note that, due to the
  release documentation build being broken at the moment, this is only
  partially functional.

Modified:
  head/release/Makefile.bsdinstall

Modified: head/release/Makefile.bsdinstall
==
--- head/release/Makefile.bsdinstallFri Mar 11 16:58:21 2011
(r219508)
+++ head/release/Makefile.bsdinstallFri Mar 11 17:01:14 2011
(r219509)
@@ -13,6 +13,7 @@
 #  PORTSDIR: location of ports tree to distribute (default: /usr/ports)
 #  NOPORTS:  if set, do not distribute ports tree
 #  NOSRC:if set, do not distribute source tree
+#  NODOC:if set, do not generate release documentation
 #  TARGET/TARGET_ARCH: architecture of built release 
 #
 
@@ -35,6 +36,9 @@ EXTRA_PACKAGES+= ports.txz
 .if !defined(NOSRC)
 EXTRA_PACKAGES+= src.txz
 .endif
+.if !defined(NODOC)
+EXTRA_PACKAGES+= reldoc
+.endif
 
 .include 
 
@@ -61,6 +65,17 @@ ports.txz:
ln -fs ${PORTSDIR} ${DISTDIR}/usr/ports
cd ${DISTDIR} && tar cLvJf ${.OBJDIR}/ports.txz --exclude 
usr/ports/distfiles --exclude usr/ports/packages --exclude 'usr/ports/INDEX*' 
--exclude work usr/ports
 
+reldoc:
+   cd ${.CURDIR}/doc && ${MAKE} all install clean 'FORMATS=html txt' 
INSTALL_COMPRESSED='' URLS_ABSOLUTE=YES DOCDIR=${.OBJDIR}/rdoc
+   -mkdir ${.OBJDIR}/reldoc
+   @for i in hardware readme relnotes errata; do \
+   cp ${.OBJDIR}/rdoc/${RELNOTES_LANG}/$$i/${TARGET}/article.txt \
+   ${.OBJDIR}/reldoc/`echo $${i} | tr 'a-z' 'A-Z'`.TXT; \
+   cp ${.OBJDIR}/rdoc/${RELNOTES_LANG}/$$i/${TARGET}/article.html \
+   ${.OBJDIR}/reldoc/`echo $${i} | tr 'a-z' 'A-Z'`.HTM; \
+   done
+   @cp ${.OBJDIR}/rdoc/${RELNOTES_LANG}/readme/docbook.css 
${.OBJDIR}/reldoc
+
 system: packagesystem
 # Install system
-mkdir ${.OBJDIR}/release
@@ -69,6 +84,8 @@ system: packagesystem
 # Copy distfiles
mkdir ${.OBJDIR}/release/usr/freebsd-dist
cp ${.OBJDIR}/*.txz ${.OBJDIR}/release/usr/freebsd-dist
+# Copy documentation, if generated
+   -cp ${.OBJDIR}/reldoc/* ${.OBJDIR}/release
 # Set up installation environment
ln -s /tmp/bsdinstall_etc/resolv.conf ${.OBJDIR}/release/etc/resolv.conf
echo sendmail_enable=\"NONE\" > ${.OBJDIR}/release/etc/rc.conf
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219508 - head/release

2011-03-11 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Fri Mar 11 16:58:21 2011
New Revision: 219508
URL: http://svn.freebsd.org/changeset/base/219508

Log:
  Add a wrapper script for Makefile.bsdinstall that does the source
  checkout/chroot/compile/release dance that the existing release Makefile
  does for those who want a totally pristine release build.

Added:
  head/release/generate-release.sh   (contents, props changed)

Added: head/release/generate-release.sh
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/release/generate-release.shFri Mar 11 16:58:21 2011
(r219508)
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+# generate-release.sh: check out source trees, and build release components 
with
+#  totally clean, fresh trees
+#
+#  Usage: generate-release.sh svn-branch scratch-dir
+#
+# Environment variables:
+#  CVSUP_HOST: Host of a cvsup server to obtain the ports tree. Must be set
+#   to include ports.
+#  CVSUP_TAG:  CVS tag for ports (HEAD by default)
+#  MAKE_FLAGS: optional flags to pass to make (e.g. -j)
+# 
+#  Note: Since this requires a chroot, release cross-builds will not work!
+#
+# $FreeBSD$
+#
+
+mkdir -p $2/usr/src
+svn co svn://svn.freebsd.org/base/$1 $2/usr/src || exit 1
+if [ ! -z $CVSUP_HOST ]; then
+   cat > $2/ports-supfile << EOF
+   *default host=$CVSUP_HOST
+   *default base=/var/db
+   *default prefix=/usr
+   *default release=cvs tag=${CVSUP_TAG:-.}
+   *default delete use-rel-suffix
+   *default compress
+   ports-all
+EOF
+else
+   RELEASE_FLAGS=-DNOPORTS
+fi
+
+cd $2/usr/src
+make $MAKE_FLAGS buildworld || exit 1
+make installworld distribution DESTDIR=$2 || exit 1
+mount -t devfs devfs $2/dev
+
+if [ ! -z $CVSUP_HOST ]; then 
+   cp /etc/resolv.conf $2/etc/resolv.conf
+   chroot $2 /usr/bin/csup /ports-supfile || exit 1
+fi
+chroot $2 /bin/sh -c "cd /usr/src && make $MAKE_FLAGS buildworld buildkernel" 
|| exit 1
+mkdir $2/R
+chroot $2 /bin/sh -c "cd /usr/src/release && MAKEOBJDIR=/R make -f 
Makefile.bsdinstall release $RELEASE_FLAGS" || exit 1
+
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219507 - stable/8/sys/dev/acpica

2011-03-11 Thread Andriy Gapon
Author: avg
Date: Fri Mar 11 16:43:39 2011
New Revision: 219507
URL: http://svn.freebsd.org/changeset/base/219507

Log:
  MFC r216503: small cleanup of acpi battery status setting and checking
  
  PR:   kern/124744

Modified:
  stable/8/sys/dev/acpica/acpi_battery.c
  stable/8/sys/dev/acpica/acpi_cmbat.c
  stable/8/sys/dev/acpica/acpi_smbat.c
  stable/8/sys/dev/acpica/acpiio.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/dev/acpica/acpi_battery.c
==
--- stable/8/sys/dev/acpica/acpi_battery.c  Fri Mar 11 16:30:30 2011
(r219506)
+++ stable/8/sys/dev/acpica/acpi_battery.c  Fri Mar 11 16:43:39 2011
(r219507)
@@ -102,8 +102,9 @@ acpi_battery_get_info_expire(void)
 int
 acpi_battery_bst_valid(struct acpi_bst *bst)
 {
-return (bst->state < ACPI_BATT_STAT_MAX && bst->cap != ACPI_BATT_UNKNOWN &&
-   bst->volt != ACPI_BATT_UNKNOWN);
+
+return (bst->state != ACPI_BATT_STAT_NOT_PRESENT &&
+   bst->cap != ACPI_BATT_UNKNOWN && bst->volt != ACPI_BATT_UNKNOWN);
 }
 
 /* Check _BIF results for validity. */

Modified: stable/8/sys/dev/acpica/acpi_cmbat.c
==
--- stable/8/sys/dev/acpica/acpi_cmbat.cFri Mar 11 16:30:30 2011
(r219506)
+++ stable/8/sys/dev/acpica/acpi_cmbat.cFri Mar 11 16:43:39 2011
(r219507)
@@ -279,6 +279,12 @@ acpi_cmbat_get_bst(void *arg)
goto end;
 acpi_cmbat_info_updated(&sc->bst_lastupdated);
 
+/* Clear out undefined/extended bits that might be set by hardware. */
+sc->bst.state &= ACPI_BATT_STAT_BST_MASK;
+if ((sc->bst.state & ACPI_BATT_STAT_INVALID) == ACPI_BATT_STAT_INVALID)
+   ACPI_VPRINT(dev, acpi_device_get_parent_softc(dev),
+   "battery reports simultaneous charging and discharging\n");
+
 /* XXX If all batteries are critical, perhaps we should suspend. */
 if (sc->bst.state & ACPI_BATT_STAT_CRITICAL) {
if ((sc->flags & ACPI_BATT_STAT_CRITICAL) == 0) {

Modified: stable/8/sys/dev/acpica/acpi_smbat.c
==
--- stable/8/sys/dev/acpica/acpi_smbat.cFri Mar 11 16:30:30 2011
(r219506)
+++ stable/8/sys/dev/acpica/acpi_smbat.cFri Mar 11 16:43:39 2011
(r219507)
@@ -390,6 +390,7 @@ acpi_smbat_get_bst(device_t dev, struct 
 
if (val > 0) {
sc->bst.rate = val * factor;
+   sc->bst.state &= ~SMBATT_BS_DISCHARGING;
sc->bst.state |= ACPI_BATT_STAT_CHARGING;
} else if (val < 0)
sc->bst.rate = (-val) * factor;

Modified: stable/8/sys/dev/acpica/acpiio.h
==
--- stable/8/sys/dev/acpica/acpiio.hFri Mar 11 16:30:30 2011
(r219506)
+++ stable/8/sys/dev/acpica/acpiio.hFri Mar 11 16:43:39 2011
(r219507)
@@ -74,11 +74,22 @@ struct acpi_bst {
 uint32_t volt; /* Present Voltage */
 };
 
+/*
+ * Note that the following definitions represent status bits for internal
+ * driver state.  The first three of them (charging, discharging and critical)
+ * conveninetly conform to ACPI specification of status returned by _BST
+ * method.  Other definitions (not present, etc) are synthetic.
+ * Also note that according to the specification the charging and discharging
+ * status bits must not be set at the same time.
+ */
 #define ACPI_BATT_STAT_DISCHARG0x0001
 #define ACPI_BATT_STAT_CHARGING0x0002
 #define ACPI_BATT_STAT_CRITICAL0x0004
-#define ACPI_BATT_STAT_NOT_PRESENT 0x0007
-#define ACPI_BATT_STAT_MAX 0x0007
+#define ACPI_BATT_STAT_INVALID \
+(ACPI_BATT_STAT_DISCHARG | ACPI_BATT_STAT_CHARGING)
+#define ACPI_BATT_STAT_BST_MASK\
+(ACPI_BATT_STAT_INVALID | ACPI_BATT_STAT_CRITICAL)
+#define ACPI_BATT_STAT_NOT_PRESENT ACPI_BATT_STAT_BST_MASK
 
 union acpi_battery_ioctl_arg {
 int unit;  /* Device unit or 
ACPI_BATTERY_ALL_UNITS. */
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219505 - stable/8

2011-03-11 Thread John Baldwin
Author: jhb
Date: Fri Mar 11 16:24:49 2011
New Revision: 219505
URL: http://svn.freebsd.org/changeset/base/219505

Log:
  MFC 219137: Fully honor KERNSRCDIR for 'make universe' if it is set.

Modified:
  stable/8/Makefile   (contents, props changed)

Modified: stable/8/Makefile
==
--- stable/8/Makefile   Fri Mar 11 16:21:45 2011(r219504)
+++ stable/8/Makefile   Fri Mar 11 16:24:49 2011(r219505)
@@ -289,6 +289,7 @@ MAKE_JUST_WORLDS=   YES
 .else
 UNIVERSE_TARGET?=  buildworld
 .endif
+KERNSRCDIR?=   ${.CURDIR}/sys
 
 .if defined(DOING_TINDERBOX)
 FAILFILE=tinderbox.failed
@@ -321,8 +322,8 @@ universe_${target}:
@echo ">> ${target} ${UNIVERSE_TARGET} completed on `LC_ALL=C date`"
 .endif
 .if !defined(MAKE_JUST_WORLDS)
-.if exists(${.CURDIR}/sys/${target}/conf/NOTES)
-   @(cd ${.CURDIR}/sys/${target}/conf && env __MAKE_CONF=/dev/null \
+.if exists(${KERNSRCDIR}/${target}/conf/NOTES)
+   @(cd ${KERNSRCDIR}/${target}/conf && env __MAKE_CONF=/dev/null \
${MAKE} LINT > ${.CURDIR}/_.${target}.makeLINT 2>&1 || \
(echo "${target} 'make LINT' failed," \
"check _.${target}.makeLINT for details"| ${MAKEFAIL}))
@@ -336,7 +337,7 @@ universe_kernels: universe_kernconfs
 .if !defined(TARGET)
 TARGET!=   uname -m
 .endif
-KERNCONFS!=cd ${.CURDIR}/sys/${TARGET}/conf && \
+KERNCONFS!=cd ${KERNSRCDIR}/${TARGET}/conf && \
find [A-Z0-9]*[A-Z0-9] -type f -maxdepth 0 \
! -name DEFAULTS ! -name NOTES
 universe_kernconfs:
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219504 - stable/8

2011-03-11 Thread John Baldwin
Author: jhb
Date: Fri Mar 11 16:21:45 2011
New Revision: 219504
URL: http://svn.freebsd.org/changeset/base/219504

Log:
  MFC 219136:
  Use a suitable DIRPRFX for each invocation of make in the build32 and
  install32 targets so that the full path to each program or library is
  displayed in the make output.

Modified:
  stable/8/Makefile.inc1   (contents, props changed)

Modified: stable/8/Makefile.inc1
==
--- stable/8/Makefile.inc1  Fri Mar 11 16:14:06 2011(r219503)
+++ stable/8/Makefile.inc1  Fri Mar 11 16:21:45 2011(r219504)
@@ -445,36 +445,38 @@ build32:
 .for _t in obj depend all
cd ${.CURDIR}/kerberos5/tools; \
MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} SSP_CFLAGS= DESTDIR= \
-   ${_t}
+   DIRPRFX=kerberos5/tools/ ${_t}
 .endfor
 .endif
 .for _t in obj includes
-   cd ${.CURDIR}/include; ${LIB32WMAKE} ${_t}
-   cd ${.CURDIR}/lib; ${LIB32WMAKE} ${_t}
+   cd ${.CURDIR}/include; ${LIB32WMAKE} DIRPRFX=include/ ${_t}
+   cd ${.CURDIR}/lib; ${LIB32WMAKE} DIRPRFX=lib/ ${_t}
 .if ${MK_CDDL} != "no"
-   cd ${.CURDIR}/cddl/lib; ${LIB32WMAKE} ${_t}
+   cd ${.CURDIR}/cddl/lib; ${LIB32WMAKE} DIRPRFX=cddl/lib/ ${_t}
 .endif
-   cd ${.CURDIR}/gnu/lib; ${LIB32WMAKE} ${_t}
+   cd ${.CURDIR}/gnu/lib; ${LIB32WMAKE} DIRPRFX=gnu/lib/ ${_t}
 .if ${MK_CRYPT} != "no"
-   cd ${.CURDIR}/secure/lib; ${LIB32WMAKE} ${_t}
+   cd ${.CURDIR}/secure/lib; ${LIB32WMAKE} DIRPRFX=secure/lib/ ${_t}
 .endif
 .if ${MK_KERBEROS} != "no"
-   cd ${.CURDIR}/kerberos5/lib; ${LIB32WMAKE} ${_t}
+   cd ${.CURDIR}/kerberos5/lib; ${LIB32WMAKE} DIRPRFX=kerberos5/lib ${_t}
 .endif
 .endfor
 .for _dir in usr.bin/lex/lib
-   cd ${.CURDIR}/${_dir}; ${LIB32WMAKE} obj
+   cd ${.CURDIR}/${_dir}; ${LIB32WMAKE} DIRPRFX=${_dir}/ obj
 .endfor
 .for _dir in lib/ncurses/ncurses lib/ncurses/ncursesw lib/libmagic
cd ${.CURDIR}/${_dir}; \
MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} SSP_CFLAGS= DESTDIR= \
-   build-tools
+   DIRPRFX=${_dir}/ build-tools
 .endfor
cd ${.CURDIR}; \
${LIB32WMAKE} -f Makefile.inc1 libraries
 .for _t in obj depend all
-   cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32WMAKE} ${_t}
-   cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32WMAKE} ${_t}
+   cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32WMAKE} \
+   DIRPRFX=libexec/rtld-elf/ ${_t}
+   cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32WMAKE} \
+   DIRPRFX=usr.bin/ldd ${_t}
 .endfor
 
 distribute32 install32:
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219503 - stable/8/sys/kern

2011-03-11 Thread John Baldwin
Author: jhb
Date: Fri Mar 11 16:14:06 2011
New Revision: 219503
URL: http://svn.freebsd.org/changeset/base/219503

Log:
  MFC 219135:
  Similar to 189574, properly handle subclasses of bus drivers when deleting
  a driver during kldunload.  Specifically, recursively walk the tree of
  subclasses of a given driver attachment's bus device class detaching all
  instances of that driver for each class and its subclasses.

Modified:
  stable/8/sys/kern/subr_bus.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/kern/subr_bus.c
==
--- stable/8/sys/kern/subr_bus.cFri Mar 11 16:13:26 2011
(r219502)
+++ stable/8/sys/kern/subr_bus.cFri Mar 11 16:14:06 2011
(r219503)
@@ -1023,10 +1023,12 @@ devclass_find(const char *classname)
  * is called by devclass_add_driver to accomplish the recursive
  * notification of all the children classes of dc, as well as dc.
  * Each layer will have BUS_DRIVER_ADDED() called for all instances of
- * the devclass.  We do a full search here of the devclass list at
- * each iteration level to save storing children-lists in the devclass
- * structure.  If we ever move beyond a few dozen devices doing this,
- * we may need to reevaluate...
+ * the devclass.
+ *
+ * We do a full search here of the devclass list at each iteration
+ * level to save storing children-lists in the devclass structure.  If
+ * we ever move beyond a few dozen devices doing this, we may need to
+ * reevaluate...
  *
  * @param dc   the devclass to edit
  * @param driver   the driver that was just added
@@ -1121,6 +1123,78 @@ devclass_add_driver(devclass_t dc, drive
 }
 
 /**
+ * @brief Register that a device driver has been deleted from a devclass
+ *
+ * Register that a device driver has been removed from a devclass.
+ * This is called by devclass_delete_driver to accomplish the
+ * recursive notification of all the children classes of busclass, as
+ * well as busclass.  Each layer will attempt to detach the driver
+ * from any devices that are children of the bus's devclass.  The function
+ * will return an error if a device fails to detach.
+ * 
+ * We do a full search here of the devclass list at each iteration
+ * level to save storing children-lists in the devclass structure.  If
+ * we ever move beyond a few dozen devices doing this, we may need to
+ * reevaluate...
+ *
+ * @param busclass the devclass of the parent bus
+ * @param dc   the devclass of the driver being deleted
+ * @param driver   the driver being deleted
+ */
+static int
+devclass_driver_deleted(devclass_t busclass, devclass_t dc, driver_t *driver)
+{
+   devclass_t parent;
+   device_t dev;
+   int error, i;
+
+   /*
+* Disassociate from any devices.  We iterate through all the
+* devices in the devclass of the driver and detach any which are
+* using the driver and which have a parent in the devclass which
+* we are deleting from.
+*
+* Note that since a driver can be in multiple devclasses, we
+* should not detach devices which are not children of devices in
+* the affected devclass.
+*/
+   for (i = 0; i < dc->maxunit; i++) {
+   if (dc->devices[i]) {
+   dev = dc->devices[i];
+   if (dev->driver == driver && dev->parent &&
+   dev->parent->devclass == busclass) {
+   if ((error = device_detach(dev)) != 0)
+   return (error);
+   device_set_driver(dev, NULL);
+   BUS_PROBE_NOMATCH(dev->parent, dev);
+   devnomatch(dev);
+   dev->flags |= DF_DONENOMATCH;
+   }
+   }
+   }
+
+   /*
+* Walk through the children classes.  Since we only keep a
+* single parent pointer around, we walk the entire list of
+* devclasses looking for children.  We set the
+* DC_HAS_CHILDREN flag when a child devclass is created on
+* the parent, so we only walk the list for those devclasses
+* that have children.
+*/
+   if (!(busclass->flags & DC_HAS_CHILDREN))
+   return (0);
+   parent = busclass;
+   TAILQ_FOREACH(busclass, &devclasses, link) {
+   if (busclass->parent == parent) {
+   error = devclass_driver_deleted(busclass, dc, driver);
+   if (error)
+   return (error);
+   }
+   }
+   return (0);
+}
+
+/**
  * @brief Delete a device driv

svn commit: r219502 - in stable/7/sys/cddl: compat/opensolaris/sys dev/cyclic

2011-03-11 Thread Andriy Gapon
Author: avg
Date: Fri Mar 11 16:13:26 2011
New Revision: 219502
URL: http://svn.freebsd.org/changeset/base/219502

Log:
  MFC r216254: opensolaris cyclic: fix deadlock and make a little bit
  closer to upstream

Modified:
  stable/7/sys/cddl/compat/opensolaris/sys/cyclic_impl.h
  stable/7/sys/cddl/dev/cyclic/cyclic.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/cddl/compat/opensolaris/sys/cyclic_impl.h
==
--- stable/7/sys/cddl/compat/opensolaris/sys/cyclic_impl.h  Fri Mar 11 
16:11:42 2011(r219501)
+++ stable/7/sys/cddl/compat/opensolaris/sys/cyclic_impl.h  Fri Mar 11 
16:13:26 2011(r219502)
@@ -288,7 +288,14 @@ typedef struct cyc_id {
 
 typedef struct cyc_xcallarg {
cyc_cpu_t *cyx_cpu;
-   hrtime_t cyx_exp;
+   cyc_handler_t *cyx_hdlr;
+   cyc_time_t *cyx_when;
+   cyc_index_t cyx_ndx;
+   cyc_index_t *cyx_heap;
+   cyclic_t *cyx_cyclics;
+   cyc_index_t cyx_size;
+   uint16_t cyx_flags;
+   int cyx_wait;
 } cyc_xcallarg_t;
 
 #defineCY_DEFAULT_PERCPU   1

Modified: stable/7/sys/cddl/dev/cyclic/cyclic.c
==
--- stable/7/sys/cddl/dev/cyclic/cyclic.c   Fri Mar 11 16:11:42 2011
(r219501)
+++ stable/7/sys/cddl/dev/cyclic/cyclic.c   Fri Mar 11 16:13:26 2011
(r219502)
@@ -473,73 +473,6 @@ cyclic_expire(cyc_cpu_t *cpu, cyc_index_
(*handler)(arg);
 }
 
-static void
-cyclic_enable_xcall(void *v)
-{
-   cyc_xcallarg_t *argp = v;
-   cyc_cpu_t *cpu = argp->cyx_cpu;
-   cyc_backend_t *be = cpu->cyp_backend;
-
-   be->cyb_enable(be->cyb_arg);
-}
-
-static void
-cyclic_enable(cyc_cpu_t *cpu)
-{
-   cyc_backend_t *be = cpu->cyp_backend;
-   cyc_xcallarg_t arg;
-
-   arg.cyx_cpu = cpu;
-
-   /* Cross call to the target CPU */
-   be->cyb_xcall(be->cyb_arg, cpu->cyp_cpu, cyclic_enable_xcall, &arg);
-}
-
-static void
-cyclic_disable_xcall(void *v)
-{
-   cyc_xcallarg_t *argp = v;
-   cyc_cpu_t *cpu = argp->cyx_cpu;
-   cyc_backend_t *be = cpu->cyp_backend;
-
-   be->cyb_disable(be->cyb_arg);
-}
-
-static void
-cyclic_disable(cyc_cpu_t *cpu)
-{
-   cyc_backend_t *be = cpu->cyp_backend;
-   cyc_xcallarg_t arg;
-
-   arg.cyx_cpu = cpu;
-
-   /* Cross call to the target CPU */
-   be->cyb_xcall(be->cyb_arg, cpu->cyp_cpu, cyclic_disable_xcall, &arg);
-}
-
-static void
-cyclic_reprogram_xcall(void *v)
-{
-   cyc_xcallarg_t *argp = v;
-   cyc_cpu_t *cpu = argp->cyx_cpu;
-   cyc_backend_t *be = cpu->cyp_backend;
-
-   be->cyb_reprogram(be->cyb_arg, argp->cyx_exp);
-}
-
-static void
-cyclic_reprogram(cyc_cpu_t *cpu, hrtime_t exp)
-{
-   cyc_backend_t *be = cpu->cyp_backend;
-   cyc_xcallarg_t arg;
-
-   arg.cyx_cpu = cpu;
-   arg.cyx_exp = exp;
-
-   /* Cross call to the target CPU */
-   be->cyb_xcall(be->cyb_arg, cpu->cyp_cpu, cyclic_reprogram_xcall, &arg);
-}
-
 /*
  *  cyclic_fire(cpu_t *)
  *
@@ -570,17 +503,15 @@ static void
 cyclic_fire(cpu_t *c)
 {
cyc_cpu_t *cpu = c->cpu_cyclic;
-
-   mtx_lock_spin(&cpu->cyp_mtx);
-
+   cyc_backend_t *be = cpu->cyp_backend;
cyc_index_t *heap = cpu->cyp_heap;
cyclic_t *cyclic, *cyclics = cpu->cyp_cyclics;
+   void *arg = be->cyb_arg;
hrtime_t now = gethrtime();
hrtime_t exp;
 
if (cpu->cyp_nelems == 0) {
/* This is a spurious fire. */
-   mtx_unlock_spin(&cpu->cyp_mtx);
return;
}
 
@@ -631,8 +562,45 @@ cyclic_fire(cpu_t *c)
 * Now we have a cyclic in the root slot which isn't in the past;
 * reprogram the interrupt source.
 */
-   cyclic_reprogram(cpu, exp);
+   be->cyb_reprogram(arg, exp);
+}
+
+static void
+cyclic_expand_xcall(cyc_xcallarg_t *arg)
+{
+   cyc_cpu_t *cpu = arg->cyx_cpu;
+   cyc_index_t new_size = arg->cyx_size, size = cpu->cyp_size, i;
+   cyc_index_t *new_heap = arg->cyx_heap;
+   cyclic_t *cyclics = cpu->cyp_cyclics, *new_cyclics = arg->cyx_cyclics;
+
+   /* Disable preemption and interrupts. */
+   mtx_lock_spin(&cpu->cyp_mtx);
+
+   /*
+* Assert that the new size is a power of 2.
+*/
+   ASSERT((new_size & (new_size - 1)) == 0);
+   ASSERT(new_size == (size << 1));
+   ASSERT(cpu->cyp_heap != NULL && cpu->cyp_cyclics != NULL);
+
+   bcopy(cpu->cyp_heap, new_heap, sizeof (cyc_index_t) * size);
+   bcopy(cyclics, new_cyclics, sizeof (cyclic_t) * size);
+
+   /*
+* Set up the free list, and set all of the new cyclics to be CYF_FREE.
+*/
+   for (i = size; i < new_size; i++) {
+   

svn commit: r219501 - in stable/8/sys/cddl: compat/opensolaris/sys dev/cyclic

2011-03-11 Thread Andriy Gapon
Author: avg
Date: Fri Mar 11 16:11:42 2011
New Revision: 219501
URL: http://svn.freebsd.org/changeset/base/219501

Log:
  MFC r216254: opensolaris cyclic: fix deadlock and make a little bit
  closer to upstream

Modified:
  stable/8/sys/cddl/compat/opensolaris/sys/cyclic_impl.h
  stable/8/sys/cddl/dev/cyclic/cyclic.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/cddl/compat/opensolaris/sys/cyclic_impl.h
==
--- stable/8/sys/cddl/compat/opensolaris/sys/cyclic_impl.h  Fri Mar 11 
16:07:20 2011(r219500)
+++ stable/8/sys/cddl/compat/opensolaris/sys/cyclic_impl.h  Fri Mar 11 
16:11:42 2011(r219501)
@@ -288,7 +288,14 @@ typedef struct cyc_id {
 
 typedef struct cyc_xcallarg {
cyc_cpu_t *cyx_cpu;
-   hrtime_t cyx_exp;
+   cyc_handler_t *cyx_hdlr;
+   cyc_time_t *cyx_when;
+   cyc_index_t cyx_ndx;
+   cyc_index_t *cyx_heap;
+   cyclic_t *cyx_cyclics;
+   cyc_index_t cyx_size;
+   uint16_t cyx_flags;
+   int cyx_wait;
 } cyc_xcallarg_t;
 
 #defineCY_DEFAULT_PERCPU   1

Modified: stable/8/sys/cddl/dev/cyclic/cyclic.c
==
--- stable/8/sys/cddl/dev/cyclic/cyclic.c   Fri Mar 11 16:07:20 2011
(r219500)
+++ stable/8/sys/cddl/dev/cyclic/cyclic.c   Fri Mar 11 16:11:42 2011
(r219501)
@@ -473,73 +473,6 @@ cyclic_expire(cyc_cpu_t *cpu, cyc_index_
(*handler)(arg);
 }
 
-static void
-cyclic_enable_xcall(void *v)
-{
-   cyc_xcallarg_t *argp = v;
-   cyc_cpu_t *cpu = argp->cyx_cpu;
-   cyc_backend_t *be = cpu->cyp_backend;
-
-   be->cyb_enable(be->cyb_arg);
-}
-
-static void
-cyclic_enable(cyc_cpu_t *cpu)
-{
-   cyc_backend_t *be = cpu->cyp_backend;
-   cyc_xcallarg_t arg;
-
-   arg.cyx_cpu = cpu;
-
-   /* Cross call to the target CPU */
-   be->cyb_xcall(be->cyb_arg, cpu->cyp_cpu, cyclic_enable_xcall, &arg);
-}
-
-static void
-cyclic_disable_xcall(void *v)
-{
-   cyc_xcallarg_t *argp = v;
-   cyc_cpu_t *cpu = argp->cyx_cpu;
-   cyc_backend_t *be = cpu->cyp_backend;
-
-   be->cyb_disable(be->cyb_arg);
-}
-
-static void
-cyclic_disable(cyc_cpu_t *cpu)
-{
-   cyc_backend_t *be = cpu->cyp_backend;
-   cyc_xcallarg_t arg;
-
-   arg.cyx_cpu = cpu;
-
-   /* Cross call to the target CPU */
-   be->cyb_xcall(be->cyb_arg, cpu->cyp_cpu, cyclic_disable_xcall, &arg);
-}
-
-static void
-cyclic_reprogram_xcall(void *v)
-{
-   cyc_xcallarg_t *argp = v;
-   cyc_cpu_t *cpu = argp->cyx_cpu;
-   cyc_backend_t *be = cpu->cyp_backend;
-
-   be->cyb_reprogram(be->cyb_arg, argp->cyx_exp);
-}
-
-static void
-cyclic_reprogram(cyc_cpu_t *cpu, hrtime_t exp)
-{
-   cyc_backend_t *be = cpu->cyp_backend;
-   cyc_xcallarg_t arg;
-
-   arg.cyx_cpu = cpu;
-   arg.cyx_exp = exp;
-
-   /* Cross call to the target CPU */
-   be->cyb_xcall(be->cyb_arg, cpu->cyp_cpu, cyclic_reprogram_xcall, &arg);
-}
-
 /*
  *  cyclic_fire(cpu_t *)
  *
@@ -570,17 +503,15 @@ static void
 cyclic_fire(cpu_t *c)
 {
cyc_cpu_t *cpu = c->cpu_cyclic;
-
-   mtx_lock_spin(&cpu->cyp_mtx);
-
+   cyc_backend_t *be = cpu->cyp_backend;
cyc_index_t *heap = cpu->cyp_heap;
cyclic_t *cyclic, *cyclics = cpu->cyp_cyclics;
+   void *arg = be->cyb_arg;
hrtime_t now = gethrtime();
hrtime_t exp;
 
if (cpu->cyp_nelems == 0) {
/* This is a spurious fire. */
-   mtx_unlock_spin(&cpu->cyp_mtx);
return;
}
 
@@ -631,8 +562,45 @@ cyclic_fire(cpu_t *c)
 * Now we have a cyclic in the root slot which isn't in the past;
 * reprogram the interrupt source.
 */
-   cyclic_reprogram(cpu, exp);
+   be->cyb_reprogram(arg, exp);
+}
+
+static void
+cyclic_expand_xcall(cyc_xcallarg_t *arg)
+{
+   cyc_cpu_t *cpu = arg->cyx_cpu;
+   cyc_index_t new_size = arg->cyx_size, size = cpu->cyp_size, i;
+   cyc_index_t *new_heap = arg->cyx_heap;
+   cyclic_t *cyclics = cpu->cyp_cyclics, *new_cyclics = arg->cyx_cyclics;
+
+   /* Disable preemption and interrupts. */
+   mtx_lock_spin(&cpu->cyp_mtx);
+
+   /*
+* Assert that the new size is a power of 2.
+*/
+   ASSERT((new_size & (new_size - 1)) == 0);
+   ASSERT(new_size == (size << 1));
+   ASSERT(cpu->cyp_heap != NULL && cpu->cyp_cyclics != NULL);
+
+   bcopy(cpu->cyp_heap, new_heap, sizeof (cyc_index_t) * size);
+   bcopy(cyclics, new_cyclics, sizeof (cyclic_t) * size);
+
+   /*
+* Set up the free list, and set all of the new cyclics to be CYF_FREE.
+*/
+   

svn commit: r219500 - stable/7/sys/cddl/dev/cyclic/i386

2011-03-11 Thread Andriy Gapon
Author: avg
Date: Fri Mar 11 16:07:20 2011
New Revision: 219500
URL: http://svn.freebsd.org/changeset/base/219500

Log:
  MFC r216252: opensolaris cyclic xcall: no need for special handling of curcpu

Modified:
  stable/7/sys/cddl/dev/cyclic/i386/cyclic_machdep.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/cddl/dev/cyclic/i386/cyclic_machdep.c
==
--- stable/7/sys/cddl/dev/cyclic/i386/cyclic_machdep.c  Fri Mar 11 16:05:36 
2011(r219499)
+++ stable/7/sys/cddl/dev/cyclic/i386/cyclic_machdep.c  Fri Mar 11 16:07:20 
2011(r219500)
@@ -121,13 +121,7 @@ static void reprogram(cyb_arg_t arg, hrt
 
 static void xcall(cyb_arg_t arg, cpu_t *c, cyc_func_t func, void *param)
 {
-   /*
-* If the target CPU is the current one, just call the
-* function. This covers the non-SMP case.
-*/
-   if (c == &solaris_cpu[curcpu])
-   (*func)(param);
-   else
-   smp_rendezvous_cpus((cpumask_t) (1 << c->cpuid), NULL,
-   func, smp_no_rendevous_barrier, param);
+
+   smp_rendezvous_cpus((cpumask_t) (1 << c->cpuid), NULL,
+   func, smp_no_rendevous_barrier, param);
 }
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219499 - stable/8/sys/cddl/dev/cyclic/i386

2011-03-11 Thread Andriy Gapon
Author: avg
Date: Fri Mar 11 16:05:36 2011
New Revision: 219499
URL: http://svn.freebsd.org/changeset/base/219499

Log:
  MFC r216252: opensolaris cyclic xcall: no need for special handling of curcpu

Modified:
  stable/8/sys/cddl/dev/cyclic/i386/cyclic_machdep.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/cddl/dev/cyclic/i386/cyclic_machdep.c
==
--- stable/8/sys/cddl/dev/cyclic/i386/cyclic_machdep.c  Fri Mar 11 16:02:38 
2011(r219498)
+++ stable/8/sys/cddl/dev/cyclic/i386/cyclic_machdep.c  Fri Mar 11 16:05:36 
2011(r219499)
@@ -121,13 +121,7 @@ static void reprogram(cyb_arg_t arg, hrt
 
 static void xcall(cyb_arg_t arg, cpu_t *c, cyc_func_t func, void *param)
 {
-   /*
-* If the target CPU is the current one, just call the
-* function. This covers the non-SMP case.
-*/
-   if (c == &solaris_cpu[curcpu])
-   (*func)(param);
-   else
-   smp_rendezvous_cpus((cpumask_t) (1 << c->cpuid), NULL,
-   func, smp_no_rendevous_barrier, param);
+
+   smp_rendezvous_cpus((cpumask_t) (1 << c->cpuid), NULL,
+   func, smp_no_rendevous_barrier, param);
 }
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219498 - in stable/7/sys/cddl/dev/dtrace: amd64 i386

2011-03-11 Thread Andriy Gapon
Author: avg
Date: Fri Mar 11 16:02:38 2011
New Revision: 219498
URL: http://svn.freebsd.org/changeset/base/219498

Log:
  MFC r216251: dtrace_xcall: no need for special handling of curcpu

Modified:
  stable/7/sys/cddl/dev/dtrace/amd64/dtrace_subr.c
  stable/7/sys/cddl/dev/dtrace/i386/dtrace_subr.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/cddl/dev/dtrace/amd64/dtrace_subr.c
==
--- stable/7/sys/cddl/dev/dtrace/amd64/dtrace_subr.cFri Mar 11 16:00:56 
2011(r219497)
+++ stable/7/sys/cddl/dev/dtrace/amd64/dtrace_subr.cFri Mar 11 16:02:38 
2011(r219498)
@@ -115,26 +115,13 @@ dtrace_xcall(processorid_t cpu, dtrace_x
 {
cpumask_t cpus;
 
-   critical_enter();
-
if (cpu == DTRACE_CPUALL)
cpus = all_cpus;
else
-   cpus = (cpumask_t) (1 << cpu);
-
-   /* If the current CPU is in the set, call the function directly: */
-   if ((cpus & (1 << curcpu)) != 0) {
-   (*func)(arg);
-
-   /* Mask the current CPU from the set */
-   cpus &= ~(1 << curcpu);
-   }
-
-   /* If there are any CPUs in the set, cross-call to those CPUs */
-   if (cpus != 0)
-   smp_rendezvous_cpus(cpus, NULL, func, smp_no_rendevous_barrier, 
arg);
+   cpus = (cpumask_t)1 << cpu;
 
-   critical_exit();
+   smp_rendezvous_cpus(cpus, smp_no_rendevous_barrier, func,
+   smp_no_rendevous_barrier, arg);
 }
 
 static void

Modified: stable/7/sys/cddl/dev/dtrace/i386/dtrace_subr.c
==
--- stable/7/sys/cddl/dev/dtrace/i386/dtrace_subr.c Fri Mar 11 16:00:56 
2011(r219497)
+++ stable/7/sys/cddl/dev/dtrace/i386/dtrace_subr.c Fri Mar 11 16:02:38 
2011(r219498)
@@ -115,26 +115,13 @@ dtrace_xcall(processorid_t cpu, dtrace_x
 {
cpumask_t cpus;
 
-   critical_enter();
-
if (cpu == DTRACE_CPUALL)
cpus = all_cpus;
else
-   cpus = (cpumask_t) (1 << cpu);
-
-   /* If the current CPU is in the set, call the function directly: */
-   if ((cpus & (1 << curcpu)) != 0) {
-   (*func)(arg);
-
-   /* Mask the current CPU from the set */
-   cpus &= ~(1 << curcpu);
-   }
-
-   /* If there are any CPUs in the set, cross-call to those CPUs */
-   if (cpus != 0)
-   smp_rendezvous_cpus(cpus, NULL, func, smp_no_rendevous_barrier, 
arg);
+   cpus = (cpumask_t)1 << cpu;
 
-   critical_exit();
+   smp_rendezvous_cpus(cpus, smp_no_rendevous_barrier, func,
+   smp_no_rendevous_barrier, arg);
 }
 
 static void
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219497 - in stable/8/sys/cddl/dev/dtrace: amd64 i386

2011-03-11 Thread Andriy Gapon
Author: avg
Date: Fri Mar 11 16:00:56 2011
New Revision: 219497
URL: http://svn.freebsd.org/changeset/base/219497

Log:
  MFC r216251: dtrace_xcall: no need for special handling of curcpu

Modified:
  stable/8/sys/cddl/dev/dtrace/amd64/dtrace_subr.c
  stable/8/sys/cddl/dev/dtrace/i386/dtrace_subr.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/cddl/dev/dtrace/amd64/dtrace_subr.c
==
--- stable/8/sys/cddl/dev/dtrace/amd64/dtrace_subr.cFri Mar 11 15:53:11 
2011(r219496)
+++ stable/8/sys/cddl/dev/dtrace/amd64/dtrace_subr.cFri Mar 11 16:00:56 
2011(r219497)
@@ -115,26 +115,13 @@ dtrace_xcall(processorid_t cpu, dtrace_x
 {
cpumask_t cpus;
 
-   critical_enter();
-
if (cpu == DTRACE_CPUALL)
cpus = all_cpus;
else
-   cpus = (cpumask_t) (1 << cpu);
-
-   /* If the current CPU is in the set, call the function directly: */
-   if ((cpus & (1 << curcpu)) != 0) {
-   (*func)(arg);
-
-   /* Mask the current CPU from the set */
-   cpus &= ~(1 << curcpu);
-   }
-
-   /* If there are any CPUs in the set, cross-call to those CPUs */
-   if (cpus != 0)
-   smp_rendezvous_cpus(cpus, NULL, func, smp_no_rendevous_barrier, 
arg);
+   cpus = (cpumask_t)1 << cpu;
 
-   critical_exit();
+   smp_rendezvous_cpus(cpus, smp_no_rendevous_barrier, func,
+   smp_no_rendevous_barrier, arg);
 }
 
 static void

Modified: stable/8/sys/cddl/dev/dtrace/i386/dtrace_subr.c
==
--- stable/8/sys/cddl/dev/dtrace/i386/dtrace_subr.c Fri Mar 11 15:53:11 
2011(r219496)
+++ stable/8/sys/cddl/dev/dtrace/i386/dtrace_subr.c Fri Mar 11 16:00:56 
2011(r219497)
@@ -115,26 +115,13 @@ dtrace_xcall(processorid_t cpu, dtrace_x
 {
cpumask_t cpus;
 
-   critical_enter();
-
if (cpu == DTRACE_CPUALL)
cpus = all_cpus;
else
-   cpus = (cpumask_t) (1 << cpu);
-
-   /* If the current CPU is in the set, call the function directly: */
-   if ((cpus & (1 << curcpu)) != 0) {
-   (*func)(arg);
-
-   /* Mask the current CPU from the set */
-   cpus &= ~(1 << curcpu);
-   }
-
-   /* If there are any CPUs in the set, cross-call to those CPUs */
-   if (cpus != 0)
-   smp_rendezvous_cpus(cpus, NULL, func, smp_no_rendevous_barrier, 
arg);
+   cpus = (cpumask_t)1 << cpu;
 
-   critical_exit();
+   smp_rendezvous_cpus(cpus, smp_no_rendevous_barrier, func,
+   smp_no_rendevous_barrier, arg);
 }
 
 static void
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219496 - stable/7/sys/dev/cxgb/ulp/tom

2011-03-11 Thread Andriy Gapon
Author: avg
Date: Fri Mar 11 15:53:11 2011
New Revision: 219496
URL: http://svn.freebsd.org/changeset/base/219496

Log:
  MFC r216373: fix incorrect use of atomic_set_xxx in cxgb

Modified:
  stable/7/sys/dev/cxgb/ulp/tom/cxgb_tom.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/cxgb/ulp/tom/cxgb_tom.c
==
--- stable/7/sys/dev/cxgb/ulp/tom/cxgb_tom.cFri Mar 11 15:50:45 2011
(r219495)
+++ stable/7/sys/dev/cxgb/ulp/tom/cxgb_tom.cFri Mar 11 15:53:11 2011
(r219496)
@@ -240,7 +240,7 @@ init_tid_tabs(struct tid_info *t, unsign
t->atid_base = atid_base;
t->afree = NULL;
t->stids_in_use = t->atids_in_use = 0;
-   atomic_set_int(&t->tids_in_use, 0);
+   t->tids_in_use = 0;
mtx_init(&t->stid_lock, "stid", NULL, MTX_DUPOK|MTX_DEF);
mtx_init(&t->atid_lock, "atid", NULL, MTX_DUPOK|MTX_DEF);
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219495 - stable/8/sys/dev/cxgb/ulp/tom

2011-03-11 Thread Andriy Gapon
Author: avg
Date: Fri Mar 11 15:50:45 2011
New Revision: 219495
URL: http://svn.freebsd.org/changeset/base/219495

Log:
  MFC r216373: fix incorrect use of atomic_set_xxx in cxgb

Modified:
  stable/8/sys/dev/cxgb/ulp/tom/cxgb_tom.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/dev/cxgb/ulp/tom/cxgb_tom.c
==
--- stable/8/sys/dev/cxgb/ulp/tom/cxgb_tom.cFri Mar 11 15:38:42 2011
(r219494)
+++ stable/8/sys/dev/cxgb/ulp/tom/cxgb_tom.cFri Mar 11 15:50:45 2011
(r219495)
@@ -269,7 +269,7 @@ init_tid_tabs(struct tid_info *t, unsign
t->atid_base = atid_base;
t->afree = NULL;
t->stids_in_use = t->atids_in_use = 0;
-   atomic_set_int(&t->tids_in_use, 0);
+   t->tids_in_use = 0;
mtx_init(&t->stid_lock, "stid", NULL, MTX_DUPOK|MTX_DEF);
mtx_init(&t->atid_lock, "atid", NULL, MTX_DUPOK|MTX_DEF);
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219494 - in stable/8/sys/cddl/dev/dtrace: amd64 i386

2011-03-11 Thread Andriy Gapon
Author: avg
Date: Fri Mar 11 15:38:42 2011
New Revision: 219494
URL: http://svn.freebsd.org/changeset/base/219494

Log:
  MFC r216250: dtrace_gethrtime_init: pin to master while examining other CPUs

Modified:
  stable/8/sys/cddl/dev/dtrace/amd64/dtrace_subr.c
  stable/8/sys/cddl/dev/dtrace/i386/dtrace_subr.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/cddl/dev/dtrace/amd64/dtrace_subr.c
==
--- stable/8/sys/cddl/dev/dtrace/amd64/dtrace_subr.cFri Mar 11 15:34:06 
2011(r219493)
+++ stable/8/sys/cddl/dev/dtrace/amd64/dtrace_subr.cFri Mar 11 15:38:42 
2011(r219494)
@@ -405,6 +405,7 @@ dtrace_gethrtime_init_cpu(void *arg)
 static void
 dtrace_gethrtime_init(void *arg)
 {
+   struct pcpu *pc;
uint64_t tsc_f;
cpumask_t map;
int i;
@@ -437,15 +438,14 @@ dtrace_gethrtime_init(void *arg)
nsec_scale = ((uint64_t)NANOSEC << SCALE_SHIFT) / tsc_f;
 
/* The current CPU is the reference one. */
+   sched_pin();
tsc_skew[curcpu] = 0;
-
CPU_FOREACH(i) {
if (i == curcpu)
continue;
 
-   map = 0;
-   map |= (1 << curcpu);
-   map |= (1 << i);
+   pc = pcpu_find(i);
+   map = PCPU_GET(cpumask) | pc->pc_cpumask;
 
smp_rendezvous_cpus(map, dtrace_gethrtime_init_sync,
dtrace_gethrtime_init_cpu,
@@ -453,6 +453,7 @@ dtrace_gethrtime_init(void *arg)
 
tsc_skew[i] = tgt_cpu_tsc - hst_cpu_tsc;
}
+   sched_unpin();
 }
 
 SYSINIT(dtrace_gethrtime_init, SI_SUB_SMP, SI_ORDER_ANY, 
dtrace_gethrtime_init, NULL);

Modified: stable/8/sys/cddl/dev/dtrace/i386/dtrace_subr.c
==
--- stable/8/sys/cddl/dev/dtrace/i386/dtrace_subr.c Fri Mar 11 15:34:06 
2011(r219493)
+++ stable/8/sys/cddl/dev/dtrace/i386/dtrace_subr.c Fri Mar 11 15:38:42 
2011(r219494)
@@ -405,6 +405,7 @@ dtrace_gethrtime_init_cpu(void *arg)
 static void
 dtrace_gethrtime_init(void *arg)
 {
+   struct pcpu *pc;
uint64_t tsc_f;
cpumask_t map;
int i;
@@ -437,15 +438,14 @@ dtrace_gethrtime_init(void *arg)
nsec_scale = ((uint64_t)NANOSEC << SCALE_SHIFT) / tsc_f;
 
/* The current CPU is the reference one. */
+   sched_pin();
tsc_skew[curcpu] = 0;
-
CPU_FOREACH(i) {
if (i == curcpu)
continue;
 
-   map = 0;
-   map |= (1 << curcpu);
-   map |= (1 << i);
+   pc = pcpu_find(i);
+   map = PCPU_GET(cpumask) | pc->pc_cpumask;
 
smp_rendezvous_cpus(map, dtrace_gethrtime_init_sync,
dtrace_gethrtime_init_cpu,
@@ -453,6 +453,7 @@ dtrace_gethrtime_init(void *arg)
 
tsc_skew[i] = tgt_cpu_tsc - hst_cpu_tsc;
}
+   sched_unpin();
 }
 
 SYSINIT(dtrace_gethrtime_init, SI_SUB_SMP, SI_ORDER_ANY, 
dtrace_gethrtime_init, NULL);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219493 - stable/8/sys/kern

2011-03-11 Thread John Baldwin
Author: jhb
Date: Fri Mar 11 15:34:06 2011
New Revision: 219493
URL: http://svn.freebsd.org/changeset/base/219493

Log:
  MFC 208898:
  Call BUS_PROBE_NOMATCH() when device detached due to driver unload.
  This allows bus to power-down device when driver unloaded on-flight.

Modified:
  stable/8/sys/kern/subr_bus.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/kern/subr_bus.c
==
--- stable/8/sys/kern/subr_bus.cFri Mar 11 15:14:40 2011
(r219492)
+++ stable/8/sys/kern/subr_bus.cFri Mar 11 15:34:06 2011
(r219493)
@@ -1180,6 +1180,9 @@ devclass_delete_driver(devclass_t buscla
if ((error = device_detach(dev)) != 0)
return (error);
device_set_driver(dev, NULL);
+   BUS_PROBE_NOMATCH(dev->parent, dev);
+   devnomatch(dev);
+   dev->flags |= DF_DONENOMATCH;
}
}
}
@@ -2674,6 +2677,7 @@ device_attach(device_t dev)
}
device_sysctl_update(dev);
dev->state = DS_ATTACHED;
+   dev->flags &= ~DF_DONENOMATCH;
devadded(dev);
return (0);
 }
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219492 - stable/8/sys/kern

2011-03-11 Thread Andriy Gapon
Author: avg
Date: Fri Mar 11 15:14:40 2011
New Revision: 219492
URL: http://svn.freebsd.org/changeset/base/219492

Log:
  MFC r215750: taskqueue: drop unused tq_name field

Modified:
  stable/8/sys/kern/subr_taskqueue.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/kern/subr_taskqueue.c
==
--- stable/8/sys/kern/subr_taskqueue.c  Fri Mar 11 15:06:56 2011
(r219491)
+++ stable/8/sys/kern/subr_taskqueue.c  Fri Mar 11 15:14:40 2011
(r219492)
@@ -53,7 +53,6 @@ struct taskqueue_busy {
 
 struct taskqueue {
STAILQ_HEAD(, task) tq_queue;
-   const char  *tq_name;
taskqueue_enqueue_fntq_enqueue;
void*tq_context;
TAILQ_HEAD(, taskqueue_busy) tq_active;
@@ -98,7 +97,7 @@ TQ_SLEEP(struct taskqueue *tq, void *p, 
 }
 
 static struct taskqueue *
-_taskqueue_create(const char *name, int mflags,
+_taskqueue_create(const char *name __unused, int mflags,
 taskqueue_enqueue_fn enqueue, void *context,
 int mtxflags, const char *mtxname)
 {
@@ -110,7 +109,6 @@ _taskqueue_create(const char *name, int 
 
STAILQ_INIT(&queue->tq_queue);
TAILQ_INIT(&queue->tq_active);
-   queue->tq_name = name;
queue->tq_enqueue = enqueue;
queue->tq_context = context;
queue->tq_spin = (mtxflags & MTX_SPIN) != 0;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219491 - in stable/7/sys: amd64/include i386/include

2011-03-11 Thread Andriy Gapon
Author: avg
Date: Fri Mar 11 15:06:56 2011
New Revision: 219491
URL: http://svn.freebsd.org/changeset/base/219491

Log:
  MFC r215748: specialreg.h: add definitions for some useful bits found in
  CPUID.6 EAX and ECX

Modified:
  stable/7/sys/amd64/include/specialreg.h
  stable/7/sys/i386/include/specialreg.h
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/amd64/include/specialreg.h
==
--- stable/7/sys/amd64/include/specialreg.h Fri Mar 11 15:05:23 2011
(r219490)
+++ stable/7/sys/amd64/include/specialreg.h Fri Mar 11 15:06:56 2011
(r219491)
@@ -133,6 +133,15 @@
 #defineCPUID2_POPCNT   0x0080
 
 /*
+ * Important bits in the Thermal and Power Management flags
+ * CPUID.6 EAX and ECX.
+ */
+#defineCPUTPM1_SENSOR  0x0001
+#defineCPUTPM1_TURBO   0x0002
+#defineCPUTPM1_ARAT0x0004
+#defineCPUTPM2_EFFREQ  0x0001
+
+/*
  * Important bits in the AMD extended cpuid flags
  */
 #defineAMDID_SYSCALL   0x0800

Modified: stable/7/sys/i386/include/specialreg.h
==
--- stable/7/sys/i386/include/specialreg.h  Fri Mar 11 15:05:23 2011
(r219490)
+++ stable/7/sys/i386/include/specialreg.h  Fri Mar 11 15:06:56 2011
(r219491)
@@ -130,6 +130,15 @@
 #defineCPUID2_POPCNT   0x0080
 
 /*
+ * Important bits in the Thermal and Power Management flags
+ * CPUID.6 EAX and ECX.
+ */
+#defineCPUTPM1_SENSOR  0x0001
+#defineCPUTPM1_TURBO   0x0002
+#defineCPUTPM1_ARAT0x0004
+#defineCPUTPM2_EFFREQ  0x0001
+
+/*
  * Important bits in the AMD extended cpuid flags
  */
 #defineAMDID_SYSCALL   0x0800
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219490 - in stable/8/sys: amd64/include i386/include

2011-03-11 Thread Andriy Gapon
Author: avg
Date: Fri Mar 11 15:05:23 2011
New Revision: 219490
URL: http://svn.freebsd.org/changeset/base/219490

Log:
  MFC r215748: specialreg.h: add definitions for some useful bits found in
  CPUID.6 EAX and ECX

Modified:
  stable/8/sys/amd64/include/specialreg.h
  stable/8/sys/i386/include/specialreg.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/amd64/include/specialreg.h
==
--- stable/8/sys/amd64/include/specialreg.h Fri Mar 11 15:01:54 2011
(r219489)
+++ stable/8/sys/amd64/include/specialreg.h Fri Mar 11 15:05:23 2011
(r219490)
@@ -136,6 +136,15 @@
 #defineCPUID2_AESNI0x0200
 
 /*
+ * Important bits in the Thermal and Power Management flags
+ * CPUID.6 EAX and ECX.
+ */
+#defineCPUTPM1_SENSOR  0x0001
+#defineCPUTPM1_TURBO   0x0002
+#defineCPUTPM1_ARAT0x0004
+#defineCPUTPM2_EFFREQ  0x0001
+
+/*
  * Important bits in the AMD extended cpuid flags
  */
 #defineAMDID_SYSCALL   0x0800

Modified: stable/8/sys/i386/include/specialreg.h
==
--- stable/8/sys/i386/include/specialreg.h  Fri Mar 11 15:01:54 2011
(r219489)
+++ stable/8/sys/i386/include/specialreg.h  Fri Mar 11 15:05:23 2011
(r219490)
@@ -133,6 +133,15 @@
 #defineCPUID2_AESNI0x0200
 
 /*
+ * Important bits in the Thermal and Power Management flags
+ * CPUID.6 EAX and ECX.
+ */
+#defineCPUTPM1_SENSOR  0x0001
+#defineCPUTPM1_TURBO   0x0002
+#defineCPUTPM1_ARAT0x0004
+#defineCPUTPM2_EFFREQ  0x0001
+
+/*
  * Important bits in the AMD extended cpuid flags
  */
 #defineAMDID_SYSCALL   0x0800
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219489 - in stable/7/sys: amd64/include i386/include

2011-03-11 Thread Andriy Gapon
Author: avg
Date: Fri Mar 11 15:01:54 2011
New Revision: 219489
URL: http://svn.freebsd.org/changeset/base/219489

Log:
  MFC r215524: specialreg.h: add definitions for MPERF/APERF pair of MSRs

Modified:
  stable/7/sys/amd64/include/specialreg.h
  stable/7/sys/i386/include/specialreg.h
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/amd64/include/specialreg.h
==
--- stable/7/sys/amd64/include/specialreg.h Fri Mar 11 14:58:17 2011
(r219488)
+++ stable/7/sys/amd64/include/specialreg.h Fri Mar 11 15:01:54 2011
(r219489)
@@ -230,6 +230,8 @@
 #defineMSR_BIOS_SIGN   0x08b
 #defineMSR_PERFCTR00x0c1
 #defineMSR_PERFCTR10x0c2
+#defineMSR_MPERF   0x0e7
+#defineMSR_APERF   0x0e8
 #defineMSR_IA32_EXT_CONFIG 0x0ee   /* Undocumented. Core Solo/Duo 
only */
 #defineMSR_MTRRcap 0x0fe
 #defineMSR_BBL_CR_ADDR 0x116

Modified: stable/7/sys/i386/include/specialreg.h
==
--- stable/7/sys/i386/include/specialreg.h  Fri Mar 11 14:58:17 2011
(r219488)
+++ stable/7/sys/i386/include/specialreg.h  Fri Mar 11 15:01:54 2011
(r219489)
@@ -236,6 +236,8 @@
 #defineMSR_BIOS_SIGN   0x08b
 #defineMSR_PERFCTR00x0c1
 #defineMSR_PERFCTR10x0c2
+#defineMSR_MPERF   0x0e7
+#defineMSR_APERF   0x0e8
 #defineMSR_IA32_EXT_CONFIG 0x0ee   /* Undocumented. Core Solo/Duo 
only */
 #defineMSR_MTRRcap 0x0fe
 #defineMSR_BBL_CR_ADDR 0x116
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219488 - in stable/8/sys: amd64/include i386/include

2011-03-11 Thread Andriy Gapon
Author: avg
Date: Fri Mar 11 14:58:17 2011
New Revision: 219488
URL: http://svn.freebsd.org/changeset/base/219488

Log:
  MFC r215524: specialreg.h: add definitions for MPERF/APERF pair of MSRs

Modified:
  stable/8/sys/amd64/include/specialreg.h
  stable/8/sys/i386/include/specialreg.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/amd64/include/specialreg.h
==
--- stable/8/sys/amd64/include/specialreg.h Fri Mar 11 14:55:23 2011
(r219487)
+++ stable/8/sys/amd64/include/specialreg.h Fri Mar 11 14:58:17 2011
(r219488)
@@ -240,6 +240,8 @@
 #defineMSR_BIOS_SIGN   0x08b
 #defineMSR_PERFCTR00x0c1
 #defineMSR_PERFCTR10x0c2
+#defineMSR_MPERF   0x0e7
+#defineMSR_APERF   0x0e8
 #defineMSR_IA32_EXT_CONFIG 0x0ee   /* Undocumented. Core Solo/Duo 
only */
 #defineMSR_MTRRcap 0x0fe
 #defineMSR_BBL_CR_ADDR 0x116

Modified: stable/8/sys/i386/include/specialreg.h
==
--- stable/8/sys/i386/include/specialreg.h  Fri Mar 11 14:55:23 2011
(r219487)
+++ stable/8/sys/i386/include/specialreg.h  Fri Mar 11 14:58:17 2011
(r219488)
@@ -246,6 +246,8 @@
 #defineMSR_BIOS_SIGN   0x08b
 #defineMSR_PERFCTR00x0c1
 #defineMSR_PERFCTR10x0c2
+#defineMSR_MPERF   0x0e7
+#defineMSR_APERF   0x0e8
 #defineMSR_IA32_EXT_CONFIG 0x0ee   /* Undocumented. Core Solo/Duo 
only */
 #defineMSR_MTRRcap 0x0fe
 #defineMSR_BBL_CR_ADDR 0x116
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219487 - in stable/7/sys: amd64/include i386/i386 i386/include

2011-03-11 Thread Andriy Gapon
Author: avg
Date: Fri Mar 11 14:55:23 2011
New Revision: 219487
URL: http://svn.freebsd.org/changeset/base/219487

Log:
  MFC r215523: specialreg.h: add AMD-specific "Hardware Configuration
  Register" MSR

Modified:
  stable/7/sys/amd64/include/specialreg.h
  stable/7/sys/i386/i386/initcpu.c
  stable/7/sys/i386/include/specialreg.h
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/amd64/include/specialreg.h
==
--- stable/7/sys/amd64/include/specialreg.h Fri Mar 11 14:53:34 2011
(r219486)
+++ stable/7/sys/amd64/include/specialreg.h Fri Mar 11 14:55:23 2011
(r219487)
@@ -494,6 +494,7 @@
 #defineMSR_PERFCTR20xc0010006
 #defineMSR_PERFCTR30xc0010007
 #defineMSR_SYSCFG  0xc0010010
+#defineMSR_HWCR0xc0010015
 #defineMSR_IORRBASE0   0xc0010016
 #defineMSR_IORRMASK0   0xc0010017
 #defineMSR_IORRBASE1   0xc0010018

Modified: stable/7/sys/i386/i386/initcpu.c
==
--- stable/7/sys/i386/i386/initcpu.cFri Mar 11 14:53:34 2011
(r219486)
+++ stable/7/sys/i386/i386/initcpu.cFri Mar 11 14:55:23 2011
(r219487)
@@ -680,7 +680,7 @@ initializecpu(void)
 (cpu_id & ~0xf) == 0x670 ||
 (cpu_id & ~0xf) == 0x680)) {
u_int regs[4];
-   wrmsr(0xC0010015, rdmsr(0xC0010015) & ~0x08000);
+   wrmsr(MSR_HWCR, rdmsr(MSR_HWCR) & ~0x08000);
do_cpuid(1, regs);
cpu_feature = regs[3];
}

Modified: stable/7/sys/i386/include/specialreg.h
==
--- stable/7/sys/i386/include/specialreg.h  Fri Mar 11 14:53:34 2011
(r219486)
+++ stable/7/sys/i386/include/specialreg.h  Fri Mar 11 14:55:23 2011
(r219487)
@@ -544,7 +544,8 @@
 #defineAMD_WT_ALLOC_FRE0x1 /* fixed (A-F) range 
enable */
 
 /* AMD64 MSR's */
-#defineMSR_EFER0xc080  /* extended features */
+#defineMSR_EFER0xc080  /* extended features */
+#defineMSR_HWCR0xc0010015
 #defineMSR_K8_UCODE_UPDATE 0xc0010020  /* update microcode */
 #defineMSR_MC0_CTL_MASK0xc0010044
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219486 - in stable/8/sys: amd64/include i386/i386 i386/include

2011-03-11 Thread Andriy Gapon
Author: avg
Date: Fri Mar 11 14:53:34 2011
New Revision: 219486
URL: http://svn.freebsd.org/changeset/base/219486

Log:
  MFC r215523: specialreg.h: add AMD-specific "Hardware Configuration
  Register" MSR

Modified:
  stable/8/sys/amd64/include/specialreg.h
  stable/8/sys/i386/i386/initcpu.c
  stable/8/sys/i386/include/specialreg.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/amd64/include/specialreg.h
==
--- stable/8/sys/amd64/include/specialreg.h Fri Mar 11 14:46:27 2011
(r219485)
+++ stable/8/sys/amd64/include/specialreg.h Fri Mar 11 14:53:34 2011
(r219486)
@@ -504,6 +504,7 @@
 #defineMSR_PERFCTR20xc0010006
 #defineMSR_PERFCTR30xc0010007
 #defineMSR_SYSCFG  0xc0010010
+#defineMSR_HWCR0xc0010015
 #defineMSR_IORRBASE0   0xc0010016
 #defineMSR_IORRMASK0   0xc0010017
 #defineMSR_IORRBASE1   0xc0010018

Modified: stable/8/sys/i386/i386/initcpu.c
==
--- stable/8/sys/i386/i386/initcpu.cFri Mar 11 14:46:27 2011
(r219485)
+++ stable/8/sys/i386/i386/initcpu.cFri Mar 11 14:53:34 2011
(r219486)
@@ -672,7 +672,7 @@ initializecpu(void)
 (cpu_id & ~0xf) == 0x670 ||
 (cpu_id & ~0xf) == 0x680)) {
u_int regs[4];
-   wrmsr(0xC0010015, rdmsr(0xC0010015) & ~0x08000);
+   wrmsr(MSR_HWCR, rdmsr(MSR_HWCR) & ~0x08000);
do_cpuid(1, regs);
cpu_feature = regs[3];
}

Modified: stable/8/sys/i386/include/specialreg.h
==
--- stable/8/sys/i386/include/specialreg.h  Fri Mar 11 14:46:27 2011
(r219485)
+++ stable/8/sys/i386/include/specialreg.h  Fri Mar 11 14:53:34 2011
(r219486)
@@ -554,7 +554,8 @@
 #defineAMD_WT_ALLOC_FRE0x1 /* fixed (A-F) range 
enable */
 
 /* AMD64 MSR's */
-#defineMSR_EFER0xc080  /* extended features */
+#defineMSR_EFER0xc080  /* extended features */
+#defineMSR_HWCR0xc0010015
 #defineMSR_K8_UCODE_UPDATE 0xc0010020  /* update microcode */
 #defineMSR_MC0_CTL_MASK0xc0010044
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219485 - in stable/7/sys: amd64/include i386/include

2011-03-11 Thread Andriy Gapon
Author: avg
Date: Fri Mar 11 14:46:27 2011
New Revision: 219485
URL: http://svn.freebsd.org/changeset/base/219485

Log:
  MFC r215522: specialreg.h: add definition for AMD Core Performance Boost bit

Modified:
  stable/7/sys/amd64/include/specialreg.h
  stable/7/sys/i386/include/specialreg.h
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/amd64/include/specialreg.h
==
--- stable/7/sys/amd64/include/specialreg.h Fri Mar 11 14:38:35 2011
(r219484)
+++ stable/7/sys/amd64/include/specialreg.h Fri Mar 11 14:46:27 2011
(r219485)
@@ -196,6 +196,7 @@
 #defineAMDPM_100MHZ_STEPS  0x0040
 #defineAMDPM_HW_PSTATE 0x0080
 #defineAMDPM_TSC_INVARIANT 0x0100
+#defineAMDPM_CPB   0x0200
 
 /*
  * AMD extended function 8000_0008h ecx info

Modified: stable/7/sys/i386/include/specialreg.h
==
--- stable/7/sys/i386/include/specialreg.h  Fri Mar 11 14:38:35 2011
(r219484)
+++ stable/7/sys/i386/include/specialreg.h  Fri Mar 11 14:46:27 2011
(r219485)
@@ -195,6 +195,7 @@
 #defineAMDPM_100MHZ_STEPS  0x0040
 #defineAMDPM_HW_PSTATE 0x0080
 #defineAMDPM_TSC_INVARIANT 0x0100
+#defineAMDPM_CPB   0x0200
 
 /*
  * AMD extended function 8000_0008h ecx info
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219484 - in stable/8/sys: amd64/include i386/include

2011-03-11 Thread Andriy Gapon
Author: avg
Date: Fri Mar 11 14:38:35 2011
New Revision: 219484
URL: http://svn.freebsd.org/changeset/base/219484

Log:
  MFC r215522: specialreg.h: add definition for AMD Core Performance Boost bit

Modified:
  stable/8/sys/amd64/include/specialreg.h
  stable/8/sys/i386/include/specialreg.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/amd64/include/specialreg.h
==
--- stable/8/sys/amd64/include/specialreg.h Fri Mar 11 13:11:15 2011
(r219483)
+++ stable/8/sys/amd64/include/specialreg.h Fri Mar 11 14:38:35 2011
(r219484)
@@ -206,6 +206,7 @@
 #defineAMDPM_100MHZ_STEPS  0x0040
 #defineAMDPM_HW_PSTATE 0x0080
 #defineAMDPM_TSC_INVARIANT 0x0100
+#defineAMDPM_CPB   0x0200
 
 /*
  * AMD extended function 8000_0008h ecx info

Modified: stable/8/sys/i386/include/specialreg.h
==
--- stable/8/sys/i386/include/specialreg.h  Fri Mar 11 13:11:15 2011
(r219483)
+++ stable/8/sys/i386/include/specialreg.h  Fri Mar 11 14:38:35 2011
(r219484)
@@ -205,6 +205,7 @@
 #defineAMDPM_100MHZ_STEPS  0x0040
 #defineAMDPM_HW_PSTATE 0x0080
 #defineAMDPM_TSC_INVARIANT 0x0100
+#defineAMDPM_CPB   0x0200
 
 /*
  * AMD extended function 8000_0008h ecx info
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219483 - head/sys/boot/i386/gptboot

2011-03-11 Thread John Baldwin
Author: jhb
Date: Fri Mar 11 13:11:15 2011
New Revision: 219483
URL: http://svn.freebsd.org/changeset/base/219483

Log:
  Remove all object files during 'make clean'.
  
  PR:   kern/154888
  Submitted by: arundel
  MFC after:1 week

Modified:
  head/sys/boot/i386/gptboot/Makefile

Modified: head/sys/boot/i386/gptboot/Makefile
==
--- head/sys/boot/i386/gptboot/Makefile Fri Mar 11 12:12:35 2011
(r219482)
+++ head/sys/boot/i386/gptboot/Makefile Fri Mar 11 13:11:15 2011
(r219483)
@@ -65,7 +65,8 @@ gptldr.bin: gptldr.out
 gptldr.out: gptldr.o
${LD} ${LDFLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} gptldr.o
 
-CLEANFILES+=   gptboot.bin gptboot.out gptboot.o sio.o ufsread.o
+CLEANFILES+=   gptboot.bin gptboot.out gptboot.o sio.o gpt.o crc32.o drv.o \
+   cons.o util.o
 
 gptboot.bin: gptboot.out
objcopy -S -O binary gptboot.out ${.TARGET}
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219482 - head/sbin/hastd

2011-03-11 Thread Mikolaj Golub
Author: trociny
Date: Fri Mar 11 12:12:35 2011
New Revision: 219482
URL: http://svn.freebsd.org/changeset/base/219482

Log:
  Make workers inherit debug level from the main process.
  
  Approved by:  pjd (mentor)
  MFC after:1 week

Modified:
  head/sbin/hastd/primary.c
  head/sbin/hastd/secondary.c

Modified: head/sbin/hastd/primary.c
==
--- head/sbin/hastd/primary.c   Fri Mar 11 11:58:54 2011(r219481)
+++ head/sbin/hastd/primary.c   Fri Mar 11 12:12:35 2011(r219482)
@@ -806,7 +806,7 @@ hastd_primary(struct hast_resource *res)
 {
pthread_t td;
pid_t pid;
-   int error, mode;
+   int error, mode, debuglevel;
 
/*
 * Create communication channel for sending control commands from
@@ -858,6 +858,7 @@ hastd_primary(struct hast_resource *res)
 
gres = res;
mode = pjdlog_mode_get();
+   debuglevel = pjdlog_debug_get();
 
/* Declare that we are sender. */
proto_send(res->hr_event, NULL, 0);
@@ -869,6 +870,7 @@ hastd_primary(struct hast_resource *res)
descriptors_assert(res, mode);
 
pjdlog_init(mode);
+   pjdlog_debug_set(debuglevel);
pjdlog_prefix_set("[%s] (%s) ", res->hr_name, role2str(res->hr_role));
setproctitle("%s (primary)", res->hr_name);
 

Modified: head/sbin/hastd/secondary.c
==
--- head/sbin/hastd/secondary.c Fri Mar 11 11:58:54 2011(r219481)
+++ head/sbin/hastd/secondary.c Fri Mar 11 12:12:35 2011(r219482)
@@ -346,7 +346,7 @@ hastd_secondary(struct hast_resource *re
sigset_t mask;
pthread_t td;
pid_t pid;
-   int error, mode;
+   int error, mode, debuglevel;
 
/*
 * Create communication channel between parent and child.
@@ -398,6 +398,7 @@ hastd_secondary(struct hast_resource *re
 
gres = res;
mode = pjdlog_mode_get();
+   debuglevel = pjdlog_debug_get();
 
/* Declare that we are sender. */
proto_send(res->hr_event, NULL, 0);
@@ -409,6 +410,7 @@ hastd_secondary(struct hast_resource *re
descriptors_assert(res, mode);
 
pjdlog_init(mode);
+   pjdlog_debug_set(debuglevel);
pjdlog_prefix_set("[%s] (%s) ", res->hr_name, role2str(res->hr_role));
setproctitle("%s (secondary)", res->hr_name);
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r219481 - in head/sys: conf dev/ath/ath_hal/ar9002 modules/ath

2011-03-11 Thread Adrian Chadd
Author: adrian
Date: Fri Mar 11 11:58:54 2011
New Revision: 219481
URL: http://svn.freebsd.org/changeset/base/219481

Log:
  Port over the AR9285 PA calibration and initial calibration code from
  Linux ath9k.
  
  The ath9k ar9002_hw_init_cal() isn't entirely clear about what
  is supposed to be called for what chipsets, so I'm ignoring the
  rest of it and just porting the AR9285 init cal path as-is and
  leaving the rest alone. Subsequent commits may also tidy up the
  Merlin (AR9285) and other chipset support.
  
  Obtained from:Linux ath9k

Added:
  head/sys/dev/ath/ath_hal/ar9002/ar9285_cal.c   (contents, props changed)
  head/sys/dev/ath/ath_hal/ar9002/ar9285_cal.h   (contents, props changed)
  head/sys/dev/ath/ath_hal/ar9002/ar9285phy.h   (contents, props changed)
Modified:
  head/sys/conf/files
  head/sys/dev/ath/ath_hal/ar9002/ar9285.h
  head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c
  head/sys/modules/ath/Makefile

Modified: head/sys/conf/files
==
--- head/sys/conf/files Fri Mar 11 11:35:36 2011(r219480)
+++ head/sys/conf/files Fri Mar 11 11:58:54 2011(r219481)
@@ -767,6 +767,8 @@ dev/ath/ath_hal/ar9002/ar9285_attach.c o
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
 dev/ath/ath_hal/ar9002/ar9285_reset.c optional ath_hal | ath_ar9285 \ 
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
+dev/ath/ath_hal/ar9002/ar9285_cal.c optional ath_hal | ath_ar9285 \ 
+   compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
 # rf backends
 dev/ath/ath_hal/ar5212/ar2316.coptional ath_rf2316 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"

Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285.h
==
--- head/sys/dev/ath/ath_hal/ar9002/ar9285.hFri Mar 11 11:35:36 2011
(r219480)
+++ head/sys/dev/ath/ath_hal/ar9002/ar9285.hFri Mar 11 11:58:54 2011
(r219481)
@@ -25,6 +25,12 @@ struct ath_hal_9285 {
 
HAL_INI_ARRAY   ah_ini_txgain;
HAL_INI_ARRAY   ah_ini_rxgain;
+
+   struct {
+   int32_t prev_offset;/* Previous value of PA offset value */
+   int8_t max_skipcount;   /* Max No. of times PACAL can be 
skipped */
+   int8_t skipcount;   /* No. of times the PACAL to be skipped 
*/
+   } pacal_info;
 };
 #defineAH9285(_ah) ((struct ath_hal_9285 *)(_ah))
 

Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c
==
--- head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Fri Mar 11 11:35:36 
2011(r219480)
+++ head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Fri Mar 11 11:58:54 
2011(r219481)
@@ -33,6 +33,8 @@
 #include "ar9002/ar9285v2.ini"
 #include "ar9002/ar9280v2.ini" /* XXX ini for tx/rx gain */
 
+#include "ar9002/ar9285_cal.h"
+
 static const HAL_PERCAL_DATA ar9280_iq_cal = { /* single sample */
.calName = "IQ", .calType = IQ_MISMATCH_CAL,
.calNumSamples  = MIN_CAL_SAMPLES,
@@ -118,6 +120,10 @@ ar9285Attach(uint16_t devid, HAL_SOFTC s
AH5416(ah)->ah_cal.adcDcCalInitData.calData = &ar9280_adc_init_dc_cal;
AH5416(ah)->ah_cal.suppCals = ADC_GAIN_CAL | ADC_DC_CAL | 
IQ_MISMATCH_CAL;
 
+   if (AR_SREV_KITE_12_OR_LATER(ah))
+   AH5416(ah)->ah_cal_initcal  = ar9285InitCalHardware;
+   AH5416(ah)->ah_cal_pacal= ar9002_hw_pa_cal;
+
AH5416(ah)->ah_spurMitigate = ar9280SpurMitigate;
AH5416(ah)->ah_writeIni = ar9285WriteIni;
AH5416(ah)->ah_rx_chainmask = AR9285_DEFAULT_RXCHAINMASK;

Added: head/sys/dev/ath/ath_hal/ar9002/ar9285_cal.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/dev/ath/ath_hal/ar9002/ar9285_cal.cFri Mar 11 11:58:54 
2011(r219481)
@@ -0,0 +1,269 @@
+/*
+ * Copyright (c) 2008-2010 Atheros Communications Inc.
+ * Copyright (c) 2011 Adrian Chadd, Xenion Pty Ltd.
+ *
+ * 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

svn commit: r219480 - head/sys/dev/ath/ath_hal/ar5416

2011-03-11 Thread Adrian Chadd
Author: adrian
Date: Fri Mar 11 11:35:36 2011
New Revision: 219480
URL: http://svn.freebsd.org/changeset/base/219480

Log:
  Introduce methods for the initial calibration and the new PA calibration
  routines.
  
  These are needed for the AR9285/AR2427 and AR9287 calibration routines
  which will be introducecd in a later commit.

Modified:
  head/sys/dev/ath/ath_hal/ar5416/ar5416.h
  head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
  head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c
  head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.h

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h
==
--- head/sys/dev/ath/ath_hal/ar5416/ar5416.hFri Mar 11 11:07:53 2011
(r219479)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416.hFri Mar 11 11:35:36 2011
(r219480)
@@ -74,6 +74,12 @@ struct ath_hal_5416 {
void(*ah_spurMitigate)(struct ath_hal *,
const struct ieee80211_channel *);
 
+   /* calibration ops */
+   HAL_BOOL(*ah_cal_initcal)(struct ath_hal *,
+   const struct ieee80211_channel *);
+   void(*ah_cal_pacal)(struct ath_hal *,
+   HAL_BOOL is_reset);
+
/* optional open-loop tx power control related methods */
void(*ah_olcInit)(struct ath_hal *);
void(*ah_olcTempCompensation)(struct ath_hal *);

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
==
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Fri Mar 11 11:07:53 
2011(r219479)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Fri Mar 11 11:35:36 
2011(r219480)
@@ -178,6 +178,9 @@ ar5416InitState(struct ath_hal_5416 *ahp
AH5416(ah)->ah_writeIni = ar5416WriteIni;
AH5416(ah)->ah_spurMitigate = ar5416SpurMitigate;
 
+   /* Internal calibration ops */
+   AH5416(ah)->ah_cal_initcal  = ar5416InitCalHardware;
+
/* Internal TX power control related operations */
AH5416(ah)->ah_olcInit = ar5416olcInit;
AH5416(ah)->ah_olcTempCompensation  = ar5416olcTempCompensation;

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c
==
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.cFri Mar 11 11:07:53 
2011(r219479)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.cFri Mar 11 11:35:36 
2011(r219480)
@@ -183,18 +183,9 @@ ar5416RunInitCals(struct ath_hal *ah, in
 }
 #endif
 
-/*
- * Initialize Calibration infrastructure.
- */
 HAL_BOOL
-ar5416InitCal(struct ath_hal *ah, const struct ieee80211_channel *chan)
+ar5416InitCalHardware(struct ath_hal *ah, const struct ieee80211_channel *chan)
 {
-   struct ar5416PerCal *cal = &AH5416(ah)->ah_cal;
-   HAL_CHANNEL_INTERNAL *ichan;
-
-   ichan = ath_hal_checkchannel(ah, chan);
-   HALASSERT(ichan != AH_NULL);
-
if (AR_SREV_MERLIN_10_OR_LATER(ah)) {
/* Enable Rx Filter Cal */
OS_REG_CLR_BIT(ah, AR_PHY_ADC_CTL, AR_PHY_ADC_CTL_OFF_PWDADC);
@@ -235,6 +226,32 @@ ar5416InitCal(struct ath_hal *ah, const 
return AH_FALSE;
}
 
+   return AH_TRUE;
+}
+
+/*
+ * Initialize Calibration infrastructure.
+ */
+HAL_BOOL
+ar5416InitCal(struct ath_hal *ah, const struct ieee80211_channel *chan)
+{
+   struct ar5416PerCal *cal = &AH5416(ah)->ah_cal;
+   HAL_CHANNEL_INTERNAL *ichan;
+
+   ichan = ath_hal_checkchannel(ah, chan);
+   HALASSERT(ichan != AH_NULL);
+
+   /* Do initial chipset-specific calibration */
+   if (! AH5416(ah)->ah_cal_initcal(ah, chan)) {
+   HALDEBUG(ah, HAL_DEBUG_ANY, "%s: initial chipset calibration 
did "
+   "not complete in time; noisy environment?\n", __func__);
+   return AH_FALSE;
+   }
+
+   /* If there's PA Cal, do it */
+   if (AH5416(ah)->ah_cal_pacal)
+   AH5416(ah)->ah_cal_pacal(ah, AH_TRUE);
+
/* 
 * Do NF calibration after DC offset and other CALs.
 * Per system engineers, noise floor value can sometimes be 20 dB
@@ -468,6 +485,10 @@ ar5416PerCalibrationN(struct ath_hal *ah
 
/* Do NF cal only at longer intervals */
if (longcal) {
+   /* Do PA calibration if the chipset supports */
+   if (AH5416(ah)->ah_cal_pacal)
+   AH5416(ah)->ah_cal_pacal(ah, AH_FALSE);
+
/* Do temperature compensation if the chipset needs it */
AH5416(ah)->ah_olcTempCompensation(ah);
 

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.h
==
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.hFri Mar 11 11:07:53 
2011(r219479)
+++ head/sys/dev/ath

svn commit: r219479 - in head/sys/dev/ath/ath_hal: ar5416 ar9002

2011-03-11 Thread Adrian Chadd
Author: adrian
Date: Fri Mar 11 11:07:53 2011
New Revision: 219479
URL: http://svn.freebsd.org/changeset/base/219479

Log:
  Remove the ar9285FillVpdTable() and just use ar5416FillVpdTable().

Modified:
  head/sys/dev/ath/ath_hal/ar5416/ar5416.h
  head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c
  head/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h
==
--- head/sys/dev/ath/ath_hal/ar5416/ar5416.hFri Mar 11 10:11:22 2011
(r219478)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416.hFri Mar 11 11:07:53 2011
(r219479)
@@ -233,6 +233,9 @@ extern  void ar5416RestoreChainMask(struc
 /* TX power setup related routines in ar5416_reset.c */
 extern HAL_BOOL getLowerUpperIndex(uint8_t target, uint8_t *pList,
uint16_t listSize,  uint16_t *indexL, uint16_t *indexR);
+extern HAL_BOOL ar5416FillVpdTable(uint8_t pwrMin, uint8_t pwrMax,
+   uint8_t *pPwrList, uint8_t *pVpdList, uint16_t numIntercepts,
+   uint8_t *pRetVpdList);
 extern void ar5416GetGainBoundariesAndPdadcs(struct ath_hal *ah,
const struct ieee80211_channel *chan, CAL_DATA_PER_FREQ *pRawDataSet,
uint8_t * bChans, uint16_t availPiers,

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c
==
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c  Fri Mar 11 10:11:22 
2011(r219478)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c  Fri Mar 11 11:07:53 
2011(r219479)
@@ -67,9 +67,6 @@ static uint16_t ar5416GetMaxEdgePower(ui
 static int16_t interpolate(uint16_t target, uint16_t srcLeft,
uint16_t srcRight, int16_t targetLeft, int16_t targetRight);
 static void ar5416Set11nRegs(struct ath_hal *ah, const struct 
ieee80211_channel *chan);
-static HAL_BOOL ar5416FillVpdTable(uint8_t pwrMin, uint8_t pwrMax,
-   uint8_t *pPwrList, uint8_t *pVpdList,
-   uint16_t numIntercepts, uint8_t *pRetVpdList);
 
 /*
  * Places the device in and out of reset and then places sane
@@ -2350,7 +2347,7 @@ getLowerUpperIndex(uint8_t target, uint8
  * Fill the Vpdlist for indices Pmax-Pmin
  * Note: pwrMin, pwrMax and Vpdlist are all in dBm * 4
  */
-static HAL_BOOL
+HAL_BOOL
 ar5416FillVpdTable(uint8_t pwrMin, uint8_t pwrMax, uint8_t *pPwrList,
uint8_t *pVpdList, uint16_t numIntercepts, uint8_t 
*pRetVpdList)
 {

Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c
==
--- head/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c  Fri Mar 11 10:11:22 
2011(r219478)
+++ head/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c  Fri Mar 11 11:07:53 
2011(r219479)
@@ -59,8 +59,6 @@ static HAL_BOOL ar9285SetPowerCalTable(s
int16_t *pTxPowerIndexOffset);
 static int16_t interpolate(uint16_t target, uint16_t srcLeft,
uint16_t srcRight, int16_t targetLeft, int16_t targetRight);
-static HAL_BOOL ar9285FillVpdTable(uint8_t, uint8_t, uint8_t *, uint8_t *,
-  uint16_t, uint8_t *);
 static void ar9285GetGainBoundariesAndPdadcs(struct ath_hal *ah, 
const struct ieee80211_channel *chan, CAL_DATA_PER_FREQ_4K *pRawDataSet,
uint8_t * bChans, uint16_t availPiers,
@@ -667,7 +665,7 @@ ar9285GetGainBoundariesAndPdadcs(struct 
 for (i = 0; i < numXpdGains; i++) {
 minPwrT4[i] = pRawDataSet[idxL].pwrPdg[i][0];
 maxPwrT4[i] = pRawDataSet[idxL].pwrPdg[i][4];
-ar9285FillVpdTable(minPwrT4[i], maxPwrT4[i],
+ar5416FillVpdTable(minPwrT4[i], maxPwrT4[i],
   pRawDataSet[idxL].pwrPdg[i],
pRawDataSet[idxL].vpdPdg[i],
   AR5416_PD_GAIN_ICEPTS, vpdTableI[i]);
@@ -687,9 +685,9 @@ ar9285GetGainBoundariesAndPdadcs(struct 
 HALASSERT(maxPwrT4[i] > minPwrT4[i]);
 
 /* Fill pier Vpds */
-ar9285FillVpdTable(minPwrT4[i], maxPwrT4[i], pPwrL, pVpdL,
+ar5416FillVpdTable(minPwrT4[i], maxPwrT4[i], pPwrL, pVpdL,
   AR5416_PD_GAIN_ICEPTS, vpdTableL[i]);
-ar9285FillVpdTable(minPwrT4[i], maxPwrT4[i], pPwrR, pVpdR,
+ar5416FillVpdTable(minPwrT4[i], maxPwrT4[i], pPwrR, pVpdR,
   AR5416_PD_GAIN_ICEPTS, vpdTableR[i]);
 
 /* Interpolate the final vpd */
@@ -782,37 +780,7 @@ ar9285GetGainBoundariesAndPdadcs(struct 
 }
 return;
 }
-/*
- * XXX same as ar5416FillVpdTable
- */
-static HAL_BOOL
-ar9285FillVpdTable(uint8_t pwrMin, uint8_t pwrMax, uint8_t *pPwrList,
-   uint8_t *pVpdList, uint16_t numIntercepts, uint8_t 
*pRetVpdList)
-{
-uint16_t  i, k;
-uint8_t   currPwr = pwrMin;
-uint16_t  idxL, idxR;
-
-HALASSERT(pwrMax > pwrMin);
-for (i = 0; i <= (pwrMax - pwrMin) / 2; i++) {

svn commit: r219478 - in head: share/misc usr.bin/calendar/calendars

2011-03-11 Thread Mikolaj Golub
Author: trociny
Date: Fri Mar 11 10:11:22 2011
New Revision: 219478
URL: http://svn.freebsd.org/changeset/base/219478

Log:
  Add myself to calendar.freebsd and committers-src.dot.
  
  Approved by:  pjd (mentor)

Modified:
  head/share/misc/committers-src.dot
  head/usr.bin/calendar/calendars/calendar.freebsd

Modified: head/share/misc/committers-src.dot
==
--- head/share/misc/committers-src.dot  Fri Mar 11 08:59:40 2011
(r219477)
+++ head/share/misc/committers-src.dot  Fri Mar 11 10:11:22 2011
(r219478)
@@ -235,6 +235,7 @@ ticso [label="Bernd Walter\nticso@FreeBS
 tijl [label="Tijl Coosemans\nt...@freebsd.org\n2010/07/16"]
 trasz [label="Edward Tomasz Napierala\ntr...@freebsd.org\n2008/08/22"]
 trhodes [label="Tom Rhodes\ntrho...@freebsd.org\n2002/05/28"]
+trociny [label="Mikolaj Golub\ntroc...@freebsd.org\n2011/03/10"]
 tuexen [label="Michael Tuexen\ntue...@freebsd.org\n2009/06/06"]
 ume [label="Hajimu UMEMOTO\n...@freebsd.org\n2000/02/26"]
 uqs [label="Ulrich Spoerlein\n...@freebsd.org\n2010/01/28"]
@@ -435,6 +436,7 @@ kib -> rdivacky
 kib -> rmacklem
 kib -> stas
 kib -> tijl
+kib -> trociny
 
 kmacy -> lstewart
 
@@ -488,6 +490,7 @@ philip -> uqs
 
 pjd -> kib
 pjd -> lulf
+pjd -> trociny
 
 rgrimes -> markm
 

Modified: head/usr.bin/calendar/calendars/calendar.freebsd
==
--- head/usr.bin/calendar/calendars/calendar.freebsdFri Mar 11 08:59:40 
2011(r219477)
+++ head/usr.bin/calendar/calendars/calendar.freebsdFri Mar 11 10:11:22 
2011(r219478)
@@ -231,6 +231,7 @@
 08/06  Anton Berezin  born in Dnepropetrovsk, Ukraine, 1970
 08/06  John-Mark Gurney  born in Detroit, Michigan, United 
States, 1978
 08/07  Jonathan Mini  born in San Mateo, California, United 
States, 1979
+08/08  Mikolaj Golub  born in Kharkov, USSR, 1977
 08/10  Peter Pentchev  born in Sofia, Bulgaria, 1977
 08/12  Joe Marcus Clarke  born in Lakeland, Florida, 
United States, 1976
 08/12  Max Brazhnikov  born in Leningradskaya, Russian 
Federation, 1979
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"