svn commit: r212491 - head/sys/dev/acpica

2010-09-12 Thread Alexander Motin
Author: mav
Date: Sun Sep 12 11:11:53 2010
New Revision: 212491
URL: http://svn.freebsd.org/changeset/base/212491

Log:
  Instead of storing last event timestamp, store the next event timestamp.
  It corrects handling of the first event offset in emulated periodic mode.

Modified:
  head/sys/dev/acpica/acpi_hpet.c

Modified: head/sys/dev/acpica/acpi_hpet.c
==
--- head/sys/dev/acpica/acpi_hpet.c Sun Sep 12 06:19:35 2010
(r212490)
+++ head/sys/dev/acpica/acpi_hpet.c Sun Sep 12 11:11:53 2010
(r212491)
@@ -98,7 +98,7 @@ struct hpet_softc {
uint32_tcaps;
uint32_tvectors;
uint32_tdiv;
-   uint32_tlast;
+   uint32_tnext;
charname[8];
}   t[32];
int num_timers;
@@ -149,7 +149,7 @@ hpet_start(struct eventtimer *et,
struct hpet_timer *mt = (struct hpet_timer *)et->et_priv;
struct hpet_timer *t;
struct hpet_softc *sc = mt->sc;
-   uint32_t fdiv, cmp;
+   uint32_t fdiv, now;
 
t = (mt->pcpu_master < 0) ? mt : &sc->t[mt->pcpu_slaves[curcpu]];
if (period != NULL) {
@@ -170,24 +170,28 @@ hpet_start(struct eventtimer *et,
if (t->irq < 0)
bus_write_4(sc->mem_res, HPET_ISR, 1 << t->num);
t->caps |= HPET_TCNF_INT_ENB;
-   t->last = bus_read_4(sc->mem_res, HPET_MAIN_COUNTER);
+   now = bus_read_4(sc->mem_res, HPET_MAIN_COUNTER);
 restart:
-   cmp = t->last + fdiv;
+   t->next = now + fdiv;
if (t->mode == 1 && (t->caps & HPET_TCAP_PER_INT)) {
t->caps |= HPET_TCNF_TYPE;
bus_write_4(sc->mem_res, HPET_TIMER_CAP_CNF(t->num),
t->caps | HPET_TCNF_VAL_SET);
-   bus_write_4(sc->mem_res, HPET_TIMER_COMPARATOR(t->num), cmp);
-   bus_write_4(sc->mem_res, HPET_TIMER_COMPARATOR(t->num), t->div);
+   bus_write_4(sc->mem_res, HPET_TIMER_COMPARATOR(t->num),
+   t->next);
+   bus_write_4(sc->mem_res, HPET_TIMER_COMPARATOR(t->num),
+   t->div);
} else {
t->caps &= ~HPET_TCNF_TYPE;
-   bus_write_4(sc->mem_res, HPET_TIMER_CAP_CNF(t->num), t->caps);
-   bus_write_4(sc->mem_res, HPET_TIMER_COMPARATOR(t->num), cmp);
+   bus_write_4(sc->mem_res, HPET_TIMER_CAP_CNF(t->num),
+   t->caps);
+   bus_write_4(sc->mem_res, HPET_TIMER_COMPARATOR(t->num),
+   t->next);
}
if (fdiv < 5000) {
bus_read_4(sc->mem_res, HPET_TIMER_COMPARATOR(t->num));
-   t->last = bus_read_4(sc->mem_res, HPET_MAIN_COUNTER);
-   if ((int32_t)(t->last - cmp) >= 0) {
+   now = bus_read_4(sc->mem_res, HPET_MAIN_COUNTER);
+   if ((int32_t)(now - t->next) >= 0) {
fdiv *= 2;
goto restart;
}
@@ -217,6 +221,8 @@ hpet_intr_single(void *arg)
struct hpet_softc *sc = t->sc;
uint32_t now;
 
+   if (t->mode == 0)
+   return (FILTER_STRAY);
/* Check that per-CPU timer interrupt reached right CPU. */
if (t->pcpu_cpu >= 0 && t->pcpu_cpu != curcpu) {
if ((++t->pcpu_misrouted) % 32 == 0) {
@@ -231,20 +237,21 @@ hpet_intr_single(void *arg)
 */
if ((t->mode == 1 && (t->caps & HPET_TCAP_PER_INT) == 0) ||
t->mode == 2) {
-   t->last = bus_read_4(sc->mem_res, HPET_MAIN_COUNTER);
+   t->next = bus_read_4(sc->mem_res, HPET_MAIN_COUNTER) +
+   sc->freq / 8;
bus_write_4(sc->mem_res, HPET_TIMER_COMPARATOR(t->num),
-   t->last + sc->freq / 8);
+   t->next);
}
return (FILTER_HANDLED);
}
if (t->mode == 1 &&
(t->caps & HPET_TCAP_PER_INT) == 0) {
-   t->last += t->div;
+   t->next += t->div;
now = bus_read_4(sc->mem_res, HPET_MAIN_COUNTER);
-   if ((int32_t)(now - (t->last + t->div / 2)) > 0)
-   t->last = now - t->div / 2;
+   if ((int32_t)((now + t->div / 2) - t->next) > 0)
+   t->next = now + t->div / 2;
bus_write_4(sc->mem_res,
-   HPET_TIMER_COMPARATOR(t->num), t->last + t->div);
+   HPET_TIMER_COMPARATOR(t->num), t->next);
} else if (t->mode == 2)
t->mode = 0;
mt = (t->pcpu_master < 0) ? t : &sc->t[t->pcpu_master];
@@ -713,19 +720,21 @@ hpet_resume(device_t dev)
 #endif
if (t->mode == 0)
 

svn commit: r212492 - in head/lib/libc: db/man sys

2010-09-12 Thread Glen Barber
Author: gjb (doc committer)
Date: Sun Sep 12 14:04:05 2010
New Revision: 212492
URL: http://svn.freebsd.org/changeset/base/212492

Log:
  Bump dates in dbopen(3) and cpuset_getaffinity(2) from r212441 and
  r212438, repectively.
  
  Approved by:  keramida (mentor)
  MFC after:1 week

Modified:
  head/lib/libc/db/man/dbopen.3
  head/lib/libc/sys/cpuset_getaffinity.2

Modified: head/lib/libc/db/man/dbopen.3
==
--- head/lib/libc/db/man/dbopen.3   Sun Sep 12 11:11:53 2010
(r212491)
+++ head/lib/libc/db/man/dbopen.3   Sun Sep 12 14:04:05 2010
(r212492)
@@ -28,7 +28,7 @@
 .\"@(#)dbopen.38.5 (Berkeley) 1/2/94
 .\" $FreeBSD$
 .\"
-.Dd January 2, 1994
+.Dd September 10, 2010
 .Dt DBOPEN 3
 .Os
 .Sh NAME

Modified: head/lib/libc/sys/cpuset_getaffinity.2
==
--- head/lib/libc/sys/cpuset_getaffinity.2  Sun Sep 12 11:11:53 2010
(r212491)
+++ head/lib/libc/sys/cpuset_getaffinity.2  Sun Sep 12 14:04:05 2010
(r212492)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd January 8, 2010
+.Dd September 10, 2010
 .Dt CPUSET 2
 .Os
 .Sh NAME
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


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

2010-09-12 Thread Glen Barber
Author: gjb (doc committer)
Date: Sun Sep 12 14:04:54 2010
New Revision: 212493
URL: http://svn.freebsd.org/changeset/base/212493

Log:
  Bump date from r212440.
  
  Approved by:  keramida (mentor)
  MFC after:1 week

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

Modified: head/share/man/man9/devclass_get_maxunit.9
==
--- head/share/man/man9/devclass_get_maxunit.9  Sun Sep 12 14:04:05 2010
(r212492)
+++ head/share/man/man9/devclass_get_maxunit.9  Sun Sep 12 14:04:54 2010
(r212493)
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 3, 2005
+.Dd September 10, 2005
 .Dt DEVCLASS_GET_MAXUNIT 9
 .Os
 .Sh NAME
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r212494 - in head/sys/cddl/contrib/opensolaris/uts: common/dtrace intel/dtrace

2010-09-12 Thread Rui Paulo
Author: rpaulo
Date: Sun Sep 12 14:12:16 2010
New Revision: 212494
URL: http://svn.freebsd.org/changeset/base/212494

Log:
  Revamp locking a bit. This fixes three problems:
  * processes now can't go away while we are inserting probes (fixes a panic)
  * if a trap happens, we won't be holding the process lock (fixes a hang)
  * fix a LOR between the process lock and the fasttrap bucket list lock
  
  Thanks to kib for pointing some problems.
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c
  head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c  Sun Sep 
12 14:04:54 2010(r212493)
+++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c  Sun Sep 
12 14:12:16 2010(r212494)
@@ -460,11 +460,13 @@ fasttrap_fork(proc_t *p, proc_t *cp)
/*
 * dtrace_helpers_duplicate() allocates memory.
 */
+   _PHOLD(cp);
PROC_UNLOCK(p);
PROC_UNLOCK(cp);
dtrace_helpers_duplicate(p, cp);
PROC_LOCK(cp);
PROC_LOCK(p);
+   _PRELE(cp);
}
/*
 * This check is purposely here instead of in kern_fork.c because,
@@ -494,6 +496,8 @@ fasttrap_fork(proc_t *p, proc_t *cp)
mtx_lock_spin(&cp->p_slock);
sprlock_proc(cp);
mtx_unlock_spin(&cp->p_slock);
+#else
+   _PHOLD(cp);
 #endif
 
/*
@@ -527,6 +531,8 @@ fasttrap_fork(proc_t *p, proc_t *cp)
 #if defined(sun)
mutex_enter(&cp->p_lock);
sprunlock(cp);
+#else
+   _PRELE(cp);
 #endif
 }
 
@@ -542,6 +548,7 @@ fasttrap_exec_exit(proc_t *p)
ASSERT(p == curproc);
 #endif
PROC_LOCK_ASSERT(p, MA_OWNED);
+   _PHOLD(p);
PROC_UNLOCK(p);
 
/*
@@ -554,6 +561,7 @@ fasttrap_exec_exit(proc_t *p)
dtrace_helpers_destroy(p);
 #endif
PROC_LOCK(p);
+   _PRELE(p);
 }
 
 
@@ -591,9 +599,7 @@ fasttrap_tracepoint_enable(proc_t *p, fa
 * Before we make any modifications, make sure we've imposed a barrier
 * on the generation in which this probe was last modified.
 */
-   PROC_UNLOCK(p);
fasttrap_mod_barrier(probe->ftp_gen);
-   PROC_LOCK(p);
 
bucket = &fasttrap_tpoints.fth_table[FASTTRAP_TPOINTS_INDEX(pid, pc)];
 
@@ -695,8 +701,6 @@ again:
 */
 #if defined(sun)
ASSERT(p->p_proc_flag & P_PR_LOCK);
-#else
-   PROC_LOCK_ASSERT(p, MA_OWNED);
 #endif
p->p_dtrace_count++;
 
@@ -889,8 +893,6 @@ fasttrap_tracepoint_disable(proc_t *p, f
 */
 #if defined(sun)
ASSERT(p->p_proc_flag & P_PR_LOCK);
-#else
-   PROC_LOCK_ASSERT(p, MA_OWNED);
 #endif
p->p_dtrace_count--;
}
@@ -1044,9 +1046,14 @@ fasttrap_pid_enable(void *arg, dtrace_id
 * the chance to execute the trap instruction we're about to place
 * in their process's text.
 */
+#ifdef __FreeBSD__
+   /*
+* pfind() returns a locked process.
+*/
+   _PHOLD(p);
PROC_UNLOCK(p);
+#endif
fasttrap_enable_callbacks();
-   PROC_LOCK(p);
 
/*
 * Enable all the tracepoints and add this probe's id to each
@@ -1077,7 +1084,7 @@ fasttrap_pid_enable(void *arg, dtrace_id
mutex_enter(&p->p_lock);
sprunlock(p);
 #else
-   PROC_UNLOCK(p);
+   PRELE(p);
 #endif
 
/*
@@ -1092,7 +1099,7 @@ fasttrap_pid_enable(void *arg, dtrace_id
mutex_enter(&p->p_lock);
sprunlock(p);
 #else
-   PROC_UNLOCK(p);
+   PRELE(p);
 #endif
 
probe->ftp_enabled = 1;
@@ -1121,6 +1128,10 @@ fasttrap_pid_disable(void *arg, dtrace_i
mutex_exit(&provider->ftp_mtx);
return;
}
+#ifdef __FreeBSD__
+   _PHOLD(p);
+   PROC_UNLOCK(p);
+#endif
 
/*
 * Disable all the associated tracepoints (for fully enabled probes).
@@ -1152,13 +1163,13 @@ fasttrap_pid_disable(void *arg, dtrace_i
whack = provider->ftp_marked = 1;
mutex_exit(&provider->ftp_mtx);
}
-#if !defined(sun)
-   PROC_UNLOCK(p);
-#endif
 
if (whack)
fasttrap_pid_cleanup();
 
+#ifdef __FreeBSD__
+   PRELE(p);
+#endif
if (!probe->ftp_enabled)
return;
 

Modified: head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c
==
--- head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c   Sun Sep 
12 14:04:54 2010   

Re: svn commit: r212493 - head/share/man/man9

2010-09-12 Thread Glen Barber
On 9/12/10 10:04 AM, Glen Barber wrote:
> Author: gjb (doc committer)
[snip]
> -.Dd April 3, 2005
> +.Dd September 10, 2005

Bah!  Fixing this now... :(

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


svn commit: r212495 - head/cddl/contrib/opensolaris/lib/libdtrace/common

2010-09-12 Thread Rui Paulo
Author: rpaulo
Date: Sun Sep 12 15:59:14 2010
New Revision: 212495
URL: http://svn.freebsd.org/changeset/base/212495

Log:
  Give a chance to the target binary to run the ctors by waiting until it
  has reached main(). This allows plockstat to work.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c

Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c
==
--- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.cSun Sep 
12 14:12:16 2010(r212494)
+++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.cSun Sep 
12 15:59:14 2010(r212495)
@@ -1103,7 +1103,7 @@ alloc:
 #if defined(sun)
dtp->dt_prcmode = DT_PROC_STOP_PREINIT;
 #else
-   dtp->dt_prcmode = DT_PROC_STOP_POSTINIT;
+   dtp->dt_prcmode = DT_PROC_STOP_MAIN;
 #endif
dtp->dt_linkmode = DT_LINK_KERNEL;
dtp->dt_linktype = DT_LTYP_ELF;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r212439 - head/sys/fs/nfs

2010-09-12 Thread Kostik Belousov
On Sat, Sep 11, 2010 at 08:41:22PM -0400, Rick Macklem wrote:
> > Then, fid_reserved is no more reserved ? Should we rename it ?
> > 
> > Comment for fid_reserved about longword alignment is wrong.
> 
> Well, it's actually more broken than that.
> fid_len - Most file systems set it to the size of their variant
>   of the entire structure, including the Xfid_len field.
>   ZFS sets it to the size of the structure - sizeof(uint16_t)
>   { presumably subtracting out the size if Xfid_len? }.
>   And xfs, well, it does weird stuff with it I can't figure
>   out, but it is definitely not the size of the entire struct.
> 
> As such, exposing fid_len above the VOP_xxx() doesn't make much sense.
> (After my commit yesterday, nothing above the VOP_VPTOFH() uses it.)
> 
> Personally, I'd lean towards a generic struct fid like...
> struct fid {
>uint8_t fid_data[MAXFIDSZ];
> };
> with MAXFIDSZ increased appropriately, but this will require changes
> to xfs and zfs, since they both set the generic fid_len.
> 
> If you go with...
> struct fid {
>uint16_t fid_len;
>uint8_t fid_data[MAXFIDSZ];
> };
> then the hash functions in the two NFS servers need to be changed
> (they assume 32bit alignment of fid_data), but they should be fixed
> anyhow, since they mostly hash to 0 for ZFS at this time. (From what
> I see ZFS file handles looking like.)
> 
> Or, you could just rename fid_reserved to fid_pad and not worry about it.
> 
> Maybe the ZFS folks could decide what they would prefer? rick
Let at least rename the field. And I propose the name like fid_data0
or similar, not the fid_pad, to signify that it is used.


pgp1Tc1u0ve3V.pgp
Description: PGP signature


svn commit: r212496 - head/sys/modules/crypto

2010-09-12 Thread Ivan Voras
Author: ivoras
Date: Sun Sep 12 16:28:26 2010
New Revision: 212496
URL: http://svn.freebsd.org/changeset/base/212496

Log:
  List low-level Blowfish ECB module in the SRCS. It looks like it was dropped
  by accident (and it would be inconvenient to implement it otherwise because it
  uses internal non-published headers).
  
  MFC after:1 week

Modified:
  head/sys/modules/crypto/Makefile

Modified: head/sys/modules/crypto/Makefile
==
--- head/sys/modules/crypto/MakefileSun Sep 12 15:59:14 2010
(r212495)
+++ head/sys/modules/crypto/MakefileSun Sep 12 16:28:26 2010
(r212496)
@@ -12,7 +12,7 @@ KMOD  = crypto
 SRCS   = crypto.c cryptodev_if.c
 SRCS   += criov.c cryptosoft.c xform.c
 SRCS   += cast.c deflate.c rmd160.c rijndael-alg-fst.c rijndael-api.c
-SRCS   += skipjack.c bf_enc.c bf_skey.c
+SRCS   += skipjack.c bf_enc.c bf_ecb.c bf_skey.c
 SRCS   += des_ecb.c des_enc.c des_setkey.c
 SRCS   += sha1.c sha2.c
 SRCS   += opt_param.h cryptodev_if.h bus_if.h device_if.h
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r212497 - in head/libexec/rtld-elf: . powerpc64

2010-09-12 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Sun Sep 12 17:04:51 2010
New Revision: 212497
URL: http://svn.freebsd.org/changeset/base/212497

Log:
  Check for undefined weak symbols during PLT binding on powerpc64, and do
  not attempt to copy NULL function descriptors. This fixes LD_BIND_NOW on
  powerpc64 after r211706.
  
  Reviewed by:  kib

Modified:
  head/libexec/rtld-elf/powerpc64/reloc.c
  head/libexec/rtld-elf/rtld.c
  head/libexec/rtld-elf/rtld.h

Modified: head/libexec/rtld-elf/powerpc64/reloc.c
==
--- head/libexec/rtld-elf/powerpc64/reloc.c Sun Sep 12 16:28:26 2010
(r212496)
+++ head/libexec/rtld-elf/powerpc64/reloc.c Sun Sep 12 17:04:51 2010
(r212497)
@@ -405,8 +405,13 @@ reloc_jmpslots(Obj_Entry *obj)
(void *)target, basename(defobj->path));
 #endif
 
-   reloc_jmpslot(where, target, defobj, obj,
-   (const Elf_Rel *) rela);
+   if (def == &sym_zero) {
+   /* Zero undefined weak symbols */
+   bzero(where, sizeof(struct funcdesc));
+   } else {
+   reloc_jmpslot(where, target, defobj, obj,
+   (const Elf_Rel *) rela);
+   }
}
 
obj->jmpslots_done = true;

Modified: head/libexec/rtld-elf/rtld.c
==
--- head/libexec/rtld-elf/rtld.cSun Sep 12 16:28:26 2010
(r212496)
+++ head/libexec/rtld-elf/rtld.cSun Sep 12 17:04:51 2010
(r212497)
@@ -183,7 +183,7 @@ static Objlist list_main =  /* Objects lo
 static Objlist list_fini = /* Objects needing fini() calls */
   STAILQ_HEAD_INITIALIZER(list_fini);
 
-static Elf_Sym sym_zero;   /* For resolving undefined weak refs. */
+Elf_Sym sym_zero;  /* For resolving undefined weak refs. */
 
 #define GDB_STATE(s,m) r_debug.r_state = s; r_debug_state(&r_debug,m);
 

Modified: head/libexec/rtld-elf/rtld.h
==
--- head/libexec/rtld-elf/rtld.hSun Sep 12 16:28:26 2010
(r212496)
+++ head/libexec/rtld-elf/rtld.hSun Sep 12 17:04:51 2010
(r212497)
@@ -261,6 +261,7 @@ extern void *xcalloc(size_t);
 extern void *xmalloc(size_t);
 extern char *xstrdup(const char *);
 extern Elf_Addr _GLOBAL_OFFSET_TABLE_[];
+extern Elf_Sym sym_zero;   /* For resolving undefined weak refs. */
 
 extern void dump_relocations (Obj_Entry *);
 extern void dump_obj_relocations (Obj_Entry *);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r212498 - head/sbin/newfs

2010-09-12 Thread Glen Barber
Author: gjb (doc committer)
Date: Sun Sep 12 17:50:07 2010
New Revision: 212498
URL: http://svn.freebsd.org/changeset/base/212498

Log:
  Rewording and typo fixes in newfs(8).
  
  PR:   150490
  Submitted by: Eitan Adler 
  Additional fixes by:  Warren Block , keramida
  Approved by:  keramida (mentor)
  MFC after:1 week

Modified:
  head/sbin/newfs/newfs.8

Modified: head/sbin/newfs/newfs.8
==
--- head/sbin/newfs/newfs.8 Sun Sep 12 17:04:51 2010(r212497)
+++ head/sbin/newfs/newfs.8 Sun Sep 12 17:50:07 2010(r212498)
@@ -79,10 +79,10 @@ The following options define the general
 Erase the content of the disk before making the filesystem.
 The reserved area in front of the superblock (for bootcode) will not be erased.
 .Pp
-This is a relevant option for flash based storage devices that use
-wear levelling algorithms.
+This option is only relevant for flash based storage devices that use
+wear-leveling algorithms.
 .Pp
-NB: Erasing may take as long time as writing every sector on the disk.
+Erasing may take a long time as it writes to every sector on the disk.
 .It Fl J
 Enable journaling on the new file system via gjournal.
 See
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r212499 - head/sys/sys

2010-09-12 Thread Konstantin Belousov
Author: kib
Date: Sun Sep 12 17:53:31 2010
New Revision: 212499
URL: http://svn.freebsd.org/changeset/base/212499

Log:
  Fix typo.
  
  MFC after:3 days

Modified:
  head/sys/sys/elf_common.h

Modified: head/sys/sys/elf_common.h
==
--- head/sys/sys/elf_common.h   Sun Sep 12 17:50:07 2010(r212498)
+++ head/sys/sys/elf_common.h   Sun Sep 12 17:53:31 2010(r212499)
@@ -388,7 +388,7 @@ typedef struct {
 #defineDT_ENCODING 32  /* Values greater than or equal to 
DT_ENCODING
   and less than DT_LOOS follow the rules for
   the interpretation of the d_un union
-  as follows: even == 'd_ptr', even == 'd_val'
+  as follows: even == 'd_ptr', odd == 'd_val'
   or none */
 #defineDT_PREINIT_ARRAY 32 /* Address of the array of pointers to
   pre-initialization functions. */
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


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

2010-09-12 Thread Glen Barber
Author: gjb (doc committer)
Date: Sun Sep 12 17:53:36 2010
New Revision: 212500
URL: http://svn.freebsd.org/changeset/base/212500

Log:
  I believe the majority of Gregorian calendars would agree the current
  year is 2010, not 2005.
  
  Approved by:  keramida (mentor)
  Pointy hat to:gjb
  MFC after:1 week

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

Modified: head/share/man/man9/devclass_get_maxunit.9
==
--- head/share/man/man9/devclass_get_maxunit.9  Sun Sep 12 17:53:31 2010
(r212499)
+++ head/share/man/man9/devclass_get_maxunit.9  Sun Sep 12 17:53:36 2010
(r212500)
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 10, 2005
+.Dd September 10, 2010
 .Dt DEVCLASS_GET_MAXUNIT 9
 .Os
 .Sh NAME
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r212501 - head/sys/sys

2010-09-12 Thread Konstantin Belousov
Author: kib
Date: Sun Sep 12 17:55:56 2010
New Revision: 212501
URL: http://svn.freebsd.org/changeset/base/212501

Log:
  Add DF_1_LOADFLTR.
  
  MFC after:3 days

Modified:
  head/sys/sys/elf_common.h

Modified: head/sys/sys/elf_common.h
==
--- head/sys/sys/elf_common.h   Sun Sep 12 17:53:36 2010(r212500)
+++ head/sys/sys/elf_common.h   Sun Sep 12 17:55:56 2010(r212501)
@@ -471,6 +471,7 @@ typedef struct {
 #defineDF_1_BIND_NOW   0x0001  /* Same as DF_BIND_NOW */
 #defineDF_1_GLOBAL 0x0002  /* Set the RTLD_GLOBAL for 
object */
 #defineDF_1_NODELETE   0x0008  /* Set the RTLD_NODELETE for 
object */
+#defineDF_1_LOADFLTR   0x0010  /* Immediate loading of filtees 
*/
 #defineDF_1_NOOPEN 0x0040  /* Do not allow loading on 
dlopen() */
 #defineDF_1_ORIGIN 0x0080  /* Process $ORIGIN */
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r212502 - head/sys/netinet

2010-09-12 Thread Qing Li
Author: qingli
Date: Sun Sep 12 18:04:47 2010
New Revision: 212502
URL: http://svn.freebsd.org/changeset/base/212502

Log:
  Adding an address on an interface also requires the loopback route to
  that address be installed.
  
  PR:   kern/150481
  Submitted by: Ingo Flaschberger 
  MFC after:5 days

Modified:
  head/sys/netinet/raw_ip.c

Modified: head/sys/netinet/raw_ip.c
==
--- head/sys/netinet/raw_ip.c   Sun Sep 12 17:55:56 2010(r212501)
+++ head/sys/netinet/raw_ip.c   Sun Sep 12 18:04:47 2010(r212502)
@@ -741,6 +741,8 @@ rip_ctlinput(int cmd, struct sockaddr *s
if (err == 0)
ia->ia_flags |= IFA_ROUTE;
err = ifa_add_loopback_route((struct ifaddr *)ia, sa);
+   if (err == 0)
+   ia->ia_flags |= IFA_RTSELF;
ifa_free(&ia->ia_ifa);
break;
}
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r212505 - head/usr.sbin/freebsd-update

2010-09-12 Thread Jaakko Heinonen
Author: jh
Date: Sun Sep 12 18:53:44 2010
New Revision: 212505
URL: http://svn.freebsd.org/changeset/base/212505

Log:
  In backup_kernel(), support backing up subdirectories and handle files
  with spaces correctly.
  
  Approved by:  cperciva
  MFC after:1 month

Modified:
  head/usr.sbin/freebsd-update/freebsd-update.sh

Modified: head/usr.sbin/freebsd-update/freebsd-update.sh
==
--- head/usr.sbin/freebsd-update/freebsd-update.sh  Sun Sep 12 18:50:57 
2010(r212504)
+++ head/usr.sbin/freebsd-update/freebsd-update.sh  Sun Sep 12 18:53:44 
2010(r212505)
@@ -2638,11 +2638,13 @@ backup_kernel () {
# "not ours", backup_kernel_finddir would have exited, so
# deleting the directory content is as safe as we can make it.
if [ -d $BACKUPKERNELDIR ]; then
-   rm -f $BACKUPKERNELDIR/*
+   rm -fr $BACKUPKERNELDIR
fi
 
-   # Create directory for backup if it doesn't exist.
+   # Create directories for backup.
mkdir -p $BACKUPKERNELDIR
+   mtree -cdn -p "${KERNELDIR}" | \
+   mtree -Ue -p "${BACKUPKERNELDIR}" > /dev/null
 
# Mark the directory as having been created by freebsd-update.
touch $BACKUPKERNELDIR/.freebsd-update
@@ -2663,9 +2665,8 @@ backup_kernel () {
fi
 
# Backup all the kernel files using hardlinks.
-   find $KERNELDIR -type f $FINDFILTER | \
-   sed -Ee "s,($KERNELDIR)/?(.*),\1/\2 ${BACKUPKERNELDIR}/\2," | \
-   xargs -n 2 cp -pl
+   (cd $KERNELDIR && find . -type f $FINDFILTER -exec \
+   cp -pl '{}' ${BACKUPKERNELDIR}/'{}' \;)
 
# Re-enable patchname expansion.
set +f
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r212506 - head/sys/nfsclient

2010-09-12 Thread Konstantin Belousov
Author: kib
Date: Sun Sep 12 19:06:08 2010
New Revision: 212506
URL: http://svn.freebsd.org/changeset/base/212506

Log:
  Do not fork nfsiod directly from the vop methods. This causes LORs between
  vnode lock and several locks needed during fork, like fd lock.
  
  Instead, schedule the task to be executed in the taskqueue context. We
  still waiting for the fork to finish, but the context of the thread
  executing the task does not make real LORs with our vnode lock.
  
  Submitted by: pluknet at gmail com
  Reviewed by:  jhb
  Tested by:pho
  MFC after:3 weeks

Modified:
  head/sys/nfsclient/nfs.h
  head/sys/nfsclient/nfs_nfsiod.c
  head/sys/nfsclient/nfs_subs.c

Modified: head/sys/nfsclient/nfs.h
==
--- head/sys/nfsclient/nfs.hSun Sep 12 18:53:44 2010(r212505)
+++ head/sys/nfsclient/nfs.hSun Sep 12 19:06:08 2010(r212506)
@@ -125,6 +125,7 @@ extern struct uma_zone *nfsmount_zone;
 
 extern struct nfsstats nfsstats;
 extern struct mtx nfs_iod_mtx;
+extern struct task nfs_nfsiodnew_task;
 
 extern int nfs_numasync;
 extern unsigned int nfs_iodmax;
@@ -253,6 +254,7 @@ int nfs_commit(struct vnode *vp, u_quad_
struct ucred *cred, struct thread *td);
 intnfs_readdirrpc(struct vnode *, struct uio *, struct ucred *);
 intnfs_nfsiodnew(int);
+void   nfs_nfsiodnew_tq(__unused void *, int);
 intnfs_asyncio(struct nfsmount *, struct buf *, struct ucred *, struct 
thread *);
 intnfs_doio(struct vnode *, struct buf *, struct ucred *, struct thread *);
 void   nfs_doio_directwrite (struct buf *);

Modified: head/sys/nfsclient/nfs_nfsiod.c
==
--- head/sys/nfsclient/nfs_nfsiod.c Sun Sep 12 18:53:44 2010
(r212505)
+++ head/sys/nfsclient/nfs_nfsiod.c Sun Sep 12 19:06:08 2010
(r212506)
@@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -75,6 +76,16 @@ static MALLOC_DEFINE(M_NFSSVC, "nfsclien
 
 static voidnfssvc_iod(void *);
 
+struct nfsiod_str {
+   STAILQ_ENTRY(nfsiod_str) ni_links;
+   int *ni_inst;
+   int ni_iod;
+   int ni_error;
+   int ni_done;
+};
+static STAILQ_HEAD(, nfsiod_str) nfsiodhead =
+STAILQ_HEAD_INITIALIZER(nfsiodhead);
+
 static int nfs_asyncdaemon[NFS_MAXASYNCDAEMON];
 
 SYSCTL_DECL(_vfs_nfs);
@@ -159,11 +170,30 @@ SYSCTL_PROC(_vfs_nfs, OID_AUTO, iodmax, 
 sizeof (nfs_iodmax), sysctl_iodmax, "IU",
 "Max number of nfsiod kthreads");
 
+void
+nfs_nfsiodnew_tq(__unused void *arg, int pending)
+{
+   struct nfsiod_str *nip;
+
+   mtx_lock(&nfs_iod_mtx);
+   while ((nip = STAILQ_FIRST(&nfsiodhead)) != NULL) {
+   STAILQ_REMOVE_HEAD(&nfsiodhead, ni_links);
+   mtx_unlock(&nfs_iod_mtx);
+   nip->ni_error = kproc_create(nfssvc_iod, nip->ni_inst, NULL,
+   RFHIGHPID, 0, "nfsiod %d", nip->ni_iod);
+   nip->ni_done = 1;
+   mtx_lock(&nfs_iod_mtx);
+   wakeup(nip);
+   }
+   mtx_unlock(&nfs_iod_mtx);
+}
+
 int
 nfs_nfsiodnew(int set_iodwant)
 {
int error, i;
int newiod;
+   struct nfsiod_str *nip;
 
if (nfs_numasync >= nfs_iodmax)
return (-1);
@@ -179,9 +209,16 @@ nfs_nfsiodnew(int set_iodwant)
if (set_iodwant > 0)
nfs_iodwant[i] = NFSIOD_CREATED_FOR_NFS_ASYNCIO;
mtx_unlock(&nfs_iod_mtx);
-   error = kproc_create(nfssvc_iod, nfs_asyncdaemon + i, NULL, RFHIGHPID,
-   0, "nfsiod %d", newiod);
+   nip = malloc(sizeof(*nip), M_TEMP, M_WAITOK | M_ZERO);
+   nip->ni_inst = nfs_asyncdaemon + i;
+   nip->ni_iod = newiod;
mtx_lock(&nfs_iod_mtx);
+   STAILQ_INSERT_TAIL(&nfsiodhead, nip, ni_links);
+   taskqueue_enqueue(taskqueue_thread, &nfs_nfsiodnew_task);
+   while (!nip->ni_done)
+   mtx_sleep(nip, &nfs_iod_mtx, 0, "niwt", 0);
+   error = nip->ni_error;
+   free(nip, M_TEMP);
if (error) {
if (set_iodwant > 0)
nfs_iodwant[i] = NFSIOD_NOT_AVAILABLE;

Modified: head/sys/nfsclient/nfs_subs.c
==
--- head/sys/nfsclient/nfs_subs.c   Sun Sep 12 18:53:44 2010
(r212505)
+++ head/sys/nfsclient/nfs_subs.c   Sun Sep 12 19:06:08 2010
(r212506)
@@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -117,6 +118,7 @@ int nfs_pbuf_freecnt = -1;  /* start out
 
 struct nfs_bufqnfs_bufq;
 static struct mtx nfs_xid_mtx;
+struct tasknfs_nfsiodnew_task;
 
 /*
  * and the reverse mapping from generic to Version 2 procedure numbers
@@ -354,6 +356,7 @@ nfs_init(struct vfsconf *vfsp)
 */
mtx_init(&nfs_iod_mtx, "NFS iod lock", NULL, MTX_DE

Re: svn commit: r212506 - head/sys/nfsclient

2010-09-12 Thread Robert Watson


On Sun, 12 Sep 2010, Konstantin Belousov wrote:


 Do not fork nfsiod directly from the vop methods. This causes LORs between
 vnode lock and several locks needed during fork, like fd lock.

 Instead, schedule the task to be executed in the taskqueue context. We
 still waiting for the fork to finish, but the context of the thread
 executing the task does not make real LORs with our vnode lock.


Does this actually functionally improve things, or is all this complexity 
about suppressing the lock order reversal?  If we're waiting synchronously for 
the other thread to launch from the task queue, then the lock order reversal 
still exists, it's just not visible to WITNESS...  If we had a static analysis 
tool that could run on lock and sleep/wakeup traces, it would still show a 
deadlock opportunity.


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


svn commit: r212507 - head/sys/arm/arm

2010-09-12 Thread Olivier Houchard
Author: cognet
Date: Sun Sep 12 20:46:32 2010
New Revision: 212507
URL: http://svn.freebsd.org/changeset/base/212507

Log:
  In pmap_remove_all(), do not decrease pm_stats.wired_count if the mapping was
  wired, as it's been done later in pmap_nuke_pv().
  
  Submitted by: Mark Tinguely

Modified:
  head/sys/arm/arm/pmap.c

Modified: head/sys/arm/arm/pmap.c
==
--- head/sys/arm/arm/pmap.c Sun Sep 12 19:06:08 2010(r212506)
+++ head/sys/arm/arm/pmap.c Sun Sep 12 20:46:32 2010(r212507)
@@ -3158,8 +3158,6 @@ pmap_remove_all(vm_page_t m)
*ptep = 0;
PTE_SYNC_CURRENT(pv->pv_pmap, ptep);
pmap_free_l2_bucket(pv->pv_pmap, l2b, 1);
-   if (pv->pv_flags & PVF_WIRED)
-   pv->pv_pmap->pm_stats.wired_count--;
pv->pv_pmap->pm_stats.resident_count--;
flags |= pv->pv_flags;
}
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r212506 - head/sys/nfsclient

2010-09-12 Thread Kostik Belousov
On Sun, Sep 12, 2010 at 09:41:46PM +0100, Robert Watson wrote:
> 
> On Sun, 12 Sep 2010, Konstantin Belousov wrote:
> 
> > Do not fork nfsiod directly from the vop methods. This causes LORs between
> > vnode lock and several locks needed during fork, like fd lock.
> >
> > Instead, schedule the task to be executed in the taskqueue context. We
> > still waiting for the fork to finish, but the context of the thread
> > executing the task does not make real LORs with our vnode lock.
> 
> Does this actually functionally improve things, or is all this complexity 
> about suppressing the lock order reversal?  If we're waiting synchronously 
> for the other thread to launch from the task queue, then the lock order 
> reversal still exists, it's just not visible to WITNESS...  If we had a 
> static analysis tool that could run on lock and sleep/wakeup traces, it 
> would still show a deadlock opportunity.

As I said in commit message, the deadlock should be fixed, because the
taskq thread is executed in the kernel process that should even not have
file descriptors at all.


pgpp9JvvnmXpx.pgp
Description: PGP signature


Re: svn commit: r212506 - head/sys/nfsclient

2010-09-12 Thread Robert Watson


On Sun, 12 Sep 2010, Kostik Belousov wrote:


On Sun, Sep 12, 2010 at 09:41:46PM +0100, Robert Watson wrote:


On Sun, 12 Sep 2010, Konstantin Belousov wrote:

Do not fork nfsiod directly from the vop methods. This causes LORs between 
vnode lock and several locks needed during fork, like fd lock.


Instead, schedule the task to be executed in the taskqueue context. We 
still waiting for the fork to finish, but the context of the thread 
executing the task does not make real LORs with our vnode lock.


Does this actually functionally improve things, or is all this complexity 
about suppressing the lock order reversal?  If we're waiting synchronously 
for the other thread to launch from the task queue, then the lock order 
reversal still exists, it's just not visible to WITNESS...  If we had a 
static analysis tool that could run on lock and sleep/wakeup traces, it 
would still show a deadlock opportunity.


As I said in commit message, the deadlock should be fixed, because the taskq 
thread is executed in the kernel process that should even not have file 
descriptors at all.


Ah, I think I see where my misunderstanding arose: the behavior of kernel 
process fork is changed as a result of running in a different (specific) 
context, and hence never acquires the file descriptor lock class?


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


Re: svn commit: r212506 - head/sys/nfsclient

2010-09-12 Thread Kostik Belousov
On Sun, Sep 12, 2010 at 10:02:24PM +0100, Robert Watson wrote:
> 
> On Sun, 12 Sep 2010, Kostik Belousov wrote:
> 
> >On Sun, Sep 12, 2010 at 09:41:46PM +0100, Robert Watson wrote:
> >>
> >>On Sun, 12 Sep 2010, Konstantin Belousov wrote:
> >>
> >>>Do not fork nfsiod directly from the vop methods. This causes LORs 
> >>>between vnode lock and several locks needed during fork, like fd lock.
> >>>
> >>>Instead, schedule the task to be executed in the taskqueue context. We 
> >>>still waiting for the fork to finish, but the context of the thread 
> >>>executing the task does not make real LORs with our vnode lock.
> >>
> >>Does this actually functionally improve things, or is all this complexity 
> >>about suppressing the lock order reversal?  If we're waiting 
> >>synchronously for the other thread to launch from the task queue, then 
> >>the lock order reversal still exists, it's just not visible to WITNESS... 
> >>If we had a static analysis tool that could run on lock and sleep/wakeup 
> >>traces, it would still show a deadlock opportunity.
> >
> >As I said in commit message, the deadlock should be fixed, because the 
> >taskq thread is executed in the kernel process that should even not have 
> >file descriptors at all.
> 
> Ah, I think I see where my misunderstanding arose: the behavior of kernel 
> process fork is changed as a result of running in a different (specific) 
> context, and hence never acquires the file descriptor lock class?

The original code created nfsiod by forking inside the vop, that happens
to execute in the context of whatever user process that initiated the
operation. Taskqueue is executing in the intr process context, that
should not have file descriptors allocated at all.

Actually, even if the intr process had fd allocated, then it still should
not lock the table.


pgpGvakQjkBsi.pgp
Description: PGP signature


svn commit: r212508 - head/bin/sh

2010-09-12 Thread Jilles Tjoelker
Author: jilles
Date: Sun Sep 12 22:00:31 2010
New Revision: 212508
URL: http://svn.freebsd.org/changeset/base/212508

Log:
  sh: Add __dead2 to two functions that do not return.
  
  Apart from helping static analyzers, this also appears to reduce the size of
  the binary slightly.

Modified:
  head/bin/sh/parser.c

Modified: head/bin/sh/parser.c
==
--- head/bin/sh/parser.cSun Sep 12 20:46:32 2010(r212507)
+++ head/bin/sh/parser.cSun Sep 12 22:00:31 2010(r212508)
@@ -118,8 +118,8 @@ STATIC int readtoken(void);
 STATIC int xxreadtoken(void);
 STATIC int readtoken1(int, char const *, char *, int);
 STATIC int noexpand(char *);
-STATIC void synexpect(int);
-STATIC void synerror(const char *);
+STATIC void synexpect(int) __dead2;
+STATIC void synerror(const char *) __dead2;
 STATIC void setprompt(int);
 
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r212511 - head/usr.sbin/crunch/crunchide

2010-09-12 Thread Warner Losh
Author: imp
Date: Mon Sep 13 00:57:48 2010
New Revision: 212511
URL: http://svn.freebsd.org/changeset/base/212511

Log:
  Use TARGET_CPUARCH instead of TARGET_ARCH here.  Define TARGET_CPUARCH
  based on TARGET_ARCH.  Use TARGET_ARCH still for a powerpc64 test.
  Futureproof for coming mipsel/mipseb and arm/armeb rename.

Modified:
  head/usr.sbin/crunch/crunchide/Makefile

Modified: head/usr.sbin/crunch/crunchide/Makefile
==
--- head/usr.sbin/crunch/crunchide/Makefile Mon Sep 13 00:42:07 2010
(r212510)
+++ head/usr.sbin/crunch/crunchide/Makefile Mon Sep 13 00:57:48 2010
(r212511)
@@ -3,6 +3,14 @@
 PROG=   crunchide
 SRCS=  crunchide.c
 
+# These assignments duplicate much of the functionality of
+# MACHINE_CPUARCH, but there's no easy way to export make functions...
+
+.if defined(TARGET_ARCH)
+TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/}
+.else
+TARGET_CPUARCH=${MACHINE_CPUARCH}
+.endif
 TARGET_ARCH?=  ${MACHINE_ARCH}
 
 .if ${TARGET_ARCH} == i386 && ${MACHINE_ARCH} == i386
@@ -10,8 +18,9 @@ CFLAGS+=-DNLIST_AOUT
 SRCS+= exec_aout.c
 .endif
 
-.if ${TARGET_ARCH} == ia64 || ${TARGET_ARCH} == powerpc64 || \
-${TARGET_ARCH} == sparc64 || ${TARGET_ARCH} == amd64
+# nb: TARGET_ARCH for powerpc64 is correct here
+.if ${TARGET_CPUARCH} == ia64 || ${TARGET_ARCH} == powerpc64 || \
+${TARGET_CPUARCH} == sparc64 || ${TARGET_CPUARCH} == amd64
 CFLAGS+=-DNLIST_ELF64
 SRCS+= exec_elf64.c
 exec_elf64.o: exec_elf32.c
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r212512 - head/usr.bin/xlint

2010-09-12 Thread Warner Losh
Author: imp
Date: Mon Sep 13 01:00:48 2010
New Revision: 212512
URL: http://svn.freebsd.org/changeset/base/212512

Log:
  Move to using TARGET_CPUARCH instead of TARGET_ARCH.

Modified:
  head/usr.bin/xlint/Makefile.inc

Modified: head/usr.bin/xlint/Makefile.inc
==
--- head/usr.bin/xlint/Makefile.inc Mon Sep 13 00:57:48 2010
(r212511)
+++ head/usr.bin/xlint/Makefile.inc Mon Sep 13 01:00:48 2010
(r212512)
@@ -5,8 +5,16 @@ WARNS?=0
 
 .PATH: ${.CURDIR}/../common
 
+# These assignments duplicate much of the functionality of
+# MACHINE_CPUARCH, but there's no easy way to export make functions...
+
+.if defined(TARGET_ARCH)
+TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/}
+.else
+TARGET_CPUARCH=${MACHINE_CPUARCH}
+.endif
 TARGET_ARCH?=  ${MACHINE_ARCH}
-CFLAGS+=   -I${.CURDIR}/../arch/${TARGET_ARCH}
+CFLAGS+=   -I${.CURDIR}/../arch/${TARGET_CPUARCH}
 CFLAGS+=   -I${.CURDIR}/../common
 
 OBJECT_FMT=ELF
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r212513 - in head/usr.bin/xlint/arch: powerpc powerpc64

2010-09-12 Thread Warner Losh
Author: imp
Date: Mon Sep 13 01:20:53 2010
New Revision: 212513
URL: http://svn.freebsd.org/changeset/base/212513

Log:
  merge powerpc and powerpc64 now that we use TARGET_CPUARCH

Deleted:
  head/usr.bin/xlint/arch/powerpc64/
Modified:
  head/usr.bin/xlint/arch/powerpc/targparam.h

Modified: head/usr.bin/xlint/arch/powerpc/targparam.h
==
--- head/usr.bin/xlint/arch/powerpc/targparam.h Mon Sep 13 01:00:48 2010
(r212512)
+++ head/usr.bin/xlint/arch/powerpc/targparam.h Mon Sep 13 01:20:53 2010
(r212513)
@@ -29,13 +29,19 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $FreeBSD$
  */
 
 /*
  * Machine-dependent target parameters for lint1.
  */
 
+#ifdef __powerpc64__
+#include "lp64.h"
+#else
 #include "ilp32.h"
+#endif
 
 /*
  * Should be set to 1 if the difference of two pointers is of type long
@@ -43,8 +49,13 @@
  * kept in sync with the compiler!
  */ 
 
+#ifdef __powerpc64__
+#definePTRDIFF_IS_LONG 1
+#defineSIZEOF_IS_ULONG 1
+#else
 #definePTRDIFF_IS_LONG 0
 #defineSIZEOF_IS_ULONG 0
+#endif
 
 #defineFLOAT_SIZE  (4 * CHAR_BIT)
 #defineDOUBLE_SIZE (8 * CHAR_BIT)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r212515 - head/bin

2010-09-12 Thread Warner Losh
Author: imp
Date: Mon Sep 13 01:29:51 2010
New Revision: 212515
URL: http://svn.freebsd.org/changeset/base/212515

Log:
  Merge from tbemd:
  Add directory names directly and sort at the end.
  Include bsd.arch.inc.mk so we can, in the future, more easily make arch
  dependent changes in /bin (unlikely, but is needed for symmetry).

Modified:
  head/bin/Makefile

Modified: head/bin/Makefile
==
--- head/bin/Makefile   Mon Sep 13 01:27:54 2010(r212514)
+++ head/bin/Makefile   Mon Sep 13 01:29:51 2010(r212515)
@@ -8,7 +8,6 @@ SUBDIR= cat \
chio \
chmod \
cp \
-   ${_csh} \
date \
dd \
df \
@@ -29,10 +28,8 @@ SUBDIR= cat \
ps \
pwait \
pwd \
-   ${_rcp} \
realpath \
rm \
-   ${_rmail} \
rmdir \
setfacl \
sh \
@@ -43,15 +40,19 @@ SUBDIR= cat \
uuidgen
 
 .if ${MK_RCMDS} != "no"
-_rcp=  rcp
+SUBDIR+=   rcp
 .endif
 
 .if ${MK_SENDMAIL} != "no"
-_rmail=rmail
+SUBDIR+=   rmail
 .endif
 
 .if ${MK_TCSH} != "no"
-_csh=  csh
+SUBDIR+=   csh
 .endif
 
+.include 
+
+SUBDIR:=   ${SUBDIR:O}
+
 .include 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r212516 - in head/lib/libthr: . arch/amd64 arch/arm arch/i386 arch/ia64 arch/mips arch/powerpc arch/sparc64 support

2010-09-12 Thread Warner Losh
Author: imp
Date: Mon Sep 13 01:43:10 2010
New Revision: 212516
URL: http://svn.freebsd.org/changeset/base/212516

Log:
  Merge from tbemd, with a small amount of rework:
  For all libthr contexts, use ${MACHINE_CPUARCH}
  for all libc contexts, use ${MACHINE_ARCH} if it exists, otherwise use
  ${MACHINE_CPUARCH}
  Move some common code up a layer (the .PATH statement was the same in
  all the arch submakefiles).
  
  # Hope she hasn't busted powerpc64 with this...

Modified:
  head/lib/libthr/Makefile
  head/lib/libthr/arch/amd64/Makefile.inc
  head/lib/libthr/arch/arm/Makefile.inc
  head/lib/libthr/arch/i386/Makefile.inc
  head/lib/libthr/arch/ia64/Makefile.inc
  head/lib/libthr/arch/mips/Makefile.inc
  head/lib/libthr/arch/powerpc/Makefile.inc
  head/lib/libthr/arch/sparc64/Makefile.inc
  head/lib/libthr/support/Makefile.inc

Modified: head/lib/libthr/Makefile
==
--- head/lib/libthr/MakefileMon Sep 13 01:29:51 2010(r212515)
+++ head/lib/libthr/MakefileMon Sep 13 01:43:10 2010(r212516)
@@ -22,7 +22,7 @@ CFLAGS+=-I${.CURDIR}/../libc/include -I$
 CFLAGS+=-I${.CURDIR}/arch/${MACHINE_CPUARCH}/include
 CFLAGS+=-I${.CURDIR}/sys
 CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf
-CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf/${MACHINE_ARCH}
+CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf/${MACHINE_CPUARCH}
 CFLAGS+=-I${.CURDIR}/../libthread_db
 CFLAGS+=-Winline
 LDFLAGS+=-Wl,-znodelete
@@ -38,6 +38,8 @@ CFLAGS+=-D_PTHREADS_INVARIANTS
 
 PRECIOUSLIB=
 
+.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}/${MACHINE_CPUARCH}
+
 .include "${.CURDIR}/arch/${MACHINE_CPUARCH}/Makefile.inc"
 .include "${.CURDIR}/sys/Makefile.inc"
 .include "${.CURDIR}/thread/Makefile.inc"

Modified: head/lib/libthr/arch/amd64/Makefile.inc
==
--- head/lib/libthr/arch/amd64/Makefile.inc Mon Sep 13 01:29:51 2010
(r212515)
+++ head/lib/libthr/arch/amd64/Makefile.inc Mon Sep 13 01:43:10 2010
(r212516)
@@ -1,5 +1,3 @@
 #$FreeBSD$
 
-.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}
-
 SRCS+= pthread_md.c _umtx_op_err.S

Modified: head/lib/libthr/arch/arm/Makefile.inc
==
--- head/lib/libthr/arch/arm/Makefile.inc   Mon Sep 13 01:29:51 2010
(r212515)
+++ head/lib/libthr/arch/arm/Makefile.inc   Mon Sep 13 01:43:10 2010
(r212516)
@@ -1,5 +1,3 @@
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}
-
 SRCS+= pthread_md.c

Modified: head/lib/libthr/arch/i386/Makefile.inc
==
--- head/lib/libthr/arch/i386/Makefile.inc  Mon Sep 13 01:29:51 2010
(r212515)
+++ head/lib/libthr/arch/i386/Makefile.inc  Mon Sep 13 01:43:10 2010
(r212516)
@@ -1,5 +1,3 @@
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}
-
 SRCS+= pthread_md.c _umtx_op_err.S

Modified: head/lib/libthr/arch/ia64/Makefile.inc
==
--- head/lib/libthr/arch/ia64/Makefile.inc  Mon Sep 13 01:29:51 2010
(r212515)
+++ head/lib/libthr/arch/ia64/Makefile.inc  Mon Sep 13 01:43:10 2010
(r212516)
@@ -1,5 +1,3 @@
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}
-
 SRCS+= _umtx_op_err.S pthread_md.c

Modified: head/lib/libthr/arch/mips/Makefile.inc
==
--- head/lib/libthr/arch/mips/Makefile.inc  Mon Sep 13 01:29:51 2010
(r212515)
+++ head/lib/libthr/arch/mips/Makefile.inc  Mon Sep 13 01:43:10 2010
(r212516)
@@ -1,5 +1,3 @@
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}
-
 SRCS+= pthread_md.c

Modified: head/lib/libthr/arch/powerpc/Makefile.inc
==
--- head/lib/libthr/arch/powerpc/Makefile.inc   Mon Sep 13 01:29:51 2010
(r212515)
+++ head/lib/libthr/arch/powerpc/Makefile.inc   Mon Sep 13 01:43:10 2010
(r212516)
@@ -1,5 +1,3 @@
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}/${MACHINE_CPUARCH}
-
 SRCS+= pthread_md.c

Modified: head/lib/libthr/arch/sparc64/Makefile.inc
==
--- head/lib/libthr/arch/sparc64/Makefile.inc   Mon Sep 13 01:29:51 2010
(r212515)
+++ head/lib/libthr/arch/sparc64/Makefile.inc   Mon Sep 13 01:43:10 2010
(r212516)
@@ -1,5 +1,3 @@
 # $FreeBSD$
 
-.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}
-
 SRCS+= pthread_md.c

Modified: head/lib/libthr/support/Makefile.inc
==
--- head/lib/libthr/support/Makefile.incMon Sep 13 01:29:51 2010
(r212515)
+++ head/li

svn commit: r212517 - head/lib/libz

2010-09-12 Thread Warner Losh
Author: imp
Date: Mon Sep 13 01:44:07 2010
New Revision: 212517
URL: http://svn.freebsd.org/changeset/base/212517

Log:
  Include FreeBSD svn tag

Modified:
  head/lib/libz/minigzip.c

Modified: head/lib/libz/minigzip.c
==
--- head/lib/libz/minigzip.cMon Sep 13 01:43:10 2010(r212516)
+++ head/lib/libz/minigzip.cMon Sep 13 01:44:07 2010(r212517)
@@ -13,6 +13,8 @@
  * or in pipe mode.
  */
 
+#include 
+__FBSDID("$FreeBSD$");
 /* @(#) $Id$ */
 
 #include "zlib.h"
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r212518 - head/lib/msun

2010-09-12 Thread Warner Losh
Author: imp
Date: Mon Sep 13 01:44:56 2010
New Revision: 212518
URL: http://svn.freebsd.org/changeset/base/212518

Log:
  MFtbemd: Move to using MACHINE_CPUARCH, now that it is safe.

Modified:
  head/lib/msun/Makefile

Modified: head/lib/msun/Makefile
==
--- head/lib/msun/Makefile  Mon Sep 13 01:44:07 2010(r212517)
+++ head/lib/msun/Makefile  Mon Sep 13 01:44:56 2010(r212518)
@@ -12,12 +12,12 @@
 #
 #
 
-.if ${MACHINE_ARCH} == "i386"
+.if ${MACHINE_CPUARCH} == "i386"
 ARCH_SUBDIR= i387
 .elif ${MACHINE_ARCH} == "powerpc64"
 ARCH_SUBDIR= powerpc
 .else
-ARCH_SUBDIR= ${MACHINE_ARCH}
+ARCH_SUBDIR= ${MACHINE_CPUARCH}
 .endif
 
 .include "${ARCH_SUBDIR}/Makefile.inc"
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r212521 - head/sys/conf

2010-09-12 Thread Warner Losh
Author: imp
Date: Mon Sep 13 02:02:20 2010
New Revision: 212521
URL: http://svn.freebsd.org/changeset/base/212521

Log:
  Use :T:Micc here like everywhere else we test icc

Modified:
  head/sys/conf/kern.pre.mk

Modified: head/sys/conf/kern.pre.mk
==
--- head/sys/conf/kern.pre.mk   Mon Sep 13 02:01:29 2010(r212520)
+++ head/sys/conf/kern.pre.mk   Mon Sep 13 02:02:20 2010(r212521)
@@ -42,7 +42,7 @@ COPTFLAGS+= -fno-strict-aliasing
 . endif
 .endif
 .if !defined(NO_CPU_COPTFLAGS)
-. if ${CC} == "icc"
+. if ${CC:T:Micc} == "icc"
 COPTFLAGS+= ${_ICC_CPUCFLAGS:C/(-x[^M^K^W]+)[MKW]+|-x[MKW]+/\1/}
 . else
 COPTFLAGS+= ${_CPUCFLAGS}
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r212523 - in head/sys/modules: scc sound/sound

2010-09-12 Thread Warner Losh
Author: imp
Date: Mon Sep 13 02:05:42 2010
New Revision: 212523
URL: http://svn.freebsd.org/changeset/base/212523

Log:
  MFtbemd: use MACHINE_CPUARCH

Modified:
  head/sys/modules/scc/Makefile
  head/sys/modules/sound/sound/Makefile

Modified: head/sys/modules/scc/Makefile
==
--- head/sys/modules/scc/Makefile   Mon Sep 13 02:04:02 2010
(r212522)
+++ head/sys/modules/scc/Makefile   Mon Sep 13 02:05:42 2010
(r212523)
@@ -5,7 +5,7 @@
 .if ${MACHINE} == "sparc64"
 scc_bfe= scc_bfe_ebus.c scc_bfe_sbus.c
 .endif
-.if ${MACHINE_ARCH} == "powerpc"
+.if ${MACHINE_CPUARCH} == "powerpc"
 scc_bfe= scc_bfe_macio.c scc_bfe_quicc.c
 .endif
 

Modified: head/sys/modules/sound/sound/Makefile
==
--- head/sys/modules/sound/sound/Makefile   Mon Sep 13 02:04:02 2010
(r212522)
+++ head/sys/modules/sound/sound/Makefile   Mon Sep 13 02:05:42 2010
(r212523)
@@ -44,7 +44,7 @@ CLEANFILES+=  feeder_eq_gen.h feeder_rate
 
 EXPORT_SYMS=   YES # XXX evaluate
 
-.if ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "powerpc"
+.if ${MACHINE_CPUARCH} == "sparc64" || ${MACHINE_CPUARCH} == "powerpc"
 # Create an empty opt_isa.h in order to keep kmod.mk from linking in an
 # existing one from KERNBUILDDIR which possibly has DEV_ISA defined so
 # sound.ko is always built without isadma support.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r212525 - head/usr.sbin

2010-09-12 Thread Warner Losh
Author: imp
Date: Mon Sep 13 02:21:07 2010
New Revision: 212525
URL: http://svn.freebsd.org/changeset/base/212525

Log:
  Merge from tbemd: use Makefile.arch to control building.
  
  Reviewed by:  arch@ (many times, no objection)

Added:
  head/usr.sbin/Makefile.amd64   (contents, props changed)
  head/usr.sbin/Makefile.arm   (contents, props changed)
  head/usr.sbin/Makefile.i386   (contents, props changed)
  head/usr.sbin/Makefile.ia64   (contents, props changed)
  head/usr.sbin/Makefile.mips   (contents, props changed)
  head/usr.sbin/Makefile.orig   (contents, props changed)
  head/usr.sbin/Makefile.powerpc   (contents, props changed)
  head/usr.sbin/Makefile.sparc64   (contents, props changed)
Modified:
  head/usr.sbin/Makefile

Modified: head/usr.sbin/Makefile
==
--- head/usr.sbin/Makefile  Mon Sep 13 02:10:29 2010(r212524)
+++ head/usr.sbin/Makefile  Mon Sep 13 02:21:07 2010(r212525)
@@ -3,27 +3,9 @@
 
 .include 
 
-SUBDIR=${_ac} \
-   ${_accton} \
-   ${_acpi} \
-   adduser \
-   ${_amd} \
-   ${_ancontrol} \
-   ${_apm} \
-   ${_apmd} \
+SUBDIR= adduser \
arp \
-   ${_asf} \
-   ${_atm} \
-   ${_audit} \
-   ${_auditd} \
-   ${_auditreduce} \
-   ${_authpf} \
-   ${_bluetooth} \
-   ${_boot0cfg} \
-   ${_boot98cfg} \
bootparamd \
-   ${_bsnmpd} \
-   ${_btxld} \
burncd \
cdcontrol \
chkgrp \
@@ -31,153 +13,71 @@ SUBDIR=${_ac} \
chroot \
ckdist \
clear_locks \
-   ${_config} \
-   ${_cpucontrol} \
crashinfo \
cron \
-   ${_crunch} \
-   ${_ctm} \
daemon \
dconschat \
devinfo \
digictl \
diskinfo \
-   ${_dnssec-dsfromkey} \
-   ${_dnssec-keyfromlabel} \
-   ${_dnssec-keygen} \
-   ${_dnssec-signzone} \
dumpcis \
-   ${_editmap} \
-   ${_edquota} \
-   ${_eeprom} \
extattr \
extattrctl \
-   ${_faithd} \
-   ${_fdcontrol} \
-   ${_fdformat} \
-   ${_fdread} \
-   ${_fdwrite} \
fifolog \
-   ${_flowctl} \
-   ${_freebsd-update} \
-   ${_ftp-proxy} \
fwcontrol \
getfmac \
getpmac \
gstat \
-   ${_gssd} \
i2c \
ifmcstat \
inetd \
iostat \
-   ${_ip6addrctl} \
-   ${_ipfwpcap} \
-   ${_IPXrouted} \
-   ${_jail} \
-   ${_jexec} \
-   ${_jls} \
-   ${_kbdcontrol} \
-   ${_kbdmap} \
-   ${_keyserv} \
-   ${_kgmon} \
-   ${_kgzip} \
kldxref \
lastlogin \
-   ${_lmcconfig} \
-   ${_lpr} \
-   ${_lptcontrol} \
-   ${_mailstats} \
mailwrapper \
makefs \
-   ${_makemap} \
-   ${_manctl} \
+   manctl \
memcontrol \
mergemaster \
mfiutil \
mixer \
-   ${_mld6query} \
mlxcontrol \
mountd \
-   ${_mount_nwfs} \
mount_portalfs \
-   ${_mount_smbfs} \
-   ${_moused} \
-   ${_mptable} \
mptutil \
mtest \
mtree \
-   ${_named} \
-   ${_named-checkconf} \
-   ${_named-checkzone} \
-   ${_named.reload} \
-   ${_ndiscvt} \
-   ${_ndp} \
newsyslog \
nfscbd \
nfsd \
nfsdumpstate \
nfsrevoke \
nfsuserd \
-   ${_ngctl} \
-   ${_nghook} \
nologin \
-   ${_nscd} \
-   ${_ntp} \
-   ${_nvram} \
-   ${_ofwdump} \
pc-sysinstall \
pciconf \
periodic \
-   ${_pkg_install} \
-   ${_pmcannotate} \
-   ${_pmccontrol} \
-   ${_pmcstat} \
-   ${_pnpinfo} \
-   ${_portsnap} \
powerd \
-   ${_ppp} \
-   ${_pppctl} \
-   ${_praliases} \
-   ${_praudit} \
procctl \
pstat \
pw \
pwd_mkdb \
quot \
-   ${_quotaon} \
rarpd \
-   ${_repquota} \
-   ${_rip6query} \
rmt \
-   ${_rndc} \
-   ${_rndc-confgen} \
-   ${_route6d} \
rpcbind \
rpc.lockd \
rpc.statd \
rpc.umntall \
-   ${_rpc.yppasswdd} \
-   ${_rpc.ypupdated} \
-   ${_rpc.ypxfrd} \
-   ${_rrenumd} \
-   ${_rtadvd} \
rtprio \
-   ${_rtsold} \
-   ${_rwhod} \
-   ${_sa} \
-   ${_sade} \
-   ${_sendmail} \
service \
services_mkdb \
setfib \
setfmac \
setpmac \
-   ${_sicontrol} \
smbmsg \
snapinfo \
-   ${_spkrtest} \
spray \
-   ${_sysinstall} \
syslogd \
tcpdchk \
tcpdmatch \
@@ -185,344 +85,220 @@ SUBDIR=  ${_ac} \
tcpdump \
timed \
traceroute \
-   ${_traceroute6} \
trpt \
tzsetup \
-   ${_uathload} \
ugidfw \
-   ${_uhsoctl} \
-

svn commit: r212526 - head/usr.bin

2010-09-12 Thread Warner Losh
Author: imp
Date: Mon Sep 13 02:23:03 2010
New Revision: 212526
URL: http://svn.freebsd.org/changeset/base/212526

Log:
  Merge from tbemd: Move to using Makefile.arch to control what's build.
  
  Reviewed by:  (arch@, no objection)

Added:
  head/usr.bin/Makefile.amd64   (contents, props changed)
  head/usr.bin/Makefile.arm   (contents, props changed)
  head/usr.bin/Makefile.i386   (contents, props changed)
  head/usr.bin/Makefile.ia64   (contents, props changed)
  head/usr.bin/Makefile.powerpc   (contents, props changed)
  head/usr.bin/Makefile.sparc64   (contents, props changed)

Added: head/usr.bin/Makefile.amd64
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/usr.bin/Makefile.amd64 Mon Sep 13 02:23:03 2010(r212526)
@@ -0,0 +1,7 @@
+# $FreeBSD$
+
+.if ${MK_NCP} != "no"
+SUBDIR+=   ncplist
+SUBDIR+=   ncplogin
+.endif
+SUBDIR+=   smbutil

Added: head/usr.bin/Makefile.arm
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/usr.bin/Makefile.arm   Mon Sep 13 02:23:03 2010(r212526)
@@ -0,0 +1,3 @@
+# $FreeBSD$
+
+SUBDIR:=   ${SUBDIR:Ntruss}

Added: head/usr.bin/Makefile.i386
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/usr.bin/Makefile.i386  Mon Sep 13 02:23:03 2010(r212526)
@@ -0,0 +1,7 @@
+# $FreeBSD$
+
+.if ${MK_NCP} != "no"
+SUBDIR+=   ncplist
+SUBDIR+=   ncplogin
+.endif
+SUBDIR+=   smbutil

Added: head/usr.bin/Makefile.ia64
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/usr.bin/Makefile.ia64  Mon Sep 13 02:23:03 2010(r212526)
@@ -0,0 +1,3 @@
+# $FreeBSD$
+
+SUBDIR+=   smbutil

Added: head/usr.bin/Makefile.powerpc
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/usr.bin/Makefile.powerpc   Mon Sep 13 02:23:03 2010
(r212526)
@@ -0,0 +1,3 @@
+# $FreeBSD$
+
+SUBDIR+=   smbutil

Added: head/usr.bin/Makefile.sparc64
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/usr.bin/Makefile.sparc64   Mon Sep 13 02:23:03 2010
(r212526)
@@ -0,0 +1,3 @@
+# $FreeBSD$
+
+SUBDIR+=   smbutil
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r212525 - head/usr.sbin

2010-09-12 Thread Andrew Thompson
On 13 September 2010 14:21, Warner Losh  wrote:
> Author: imp
> Date: Mon Sep 13 02:21:07 2010
> New Revision: 212525
> URL: http://svn.freebsd.org/changeset/base/212525
>
> Log:
>  Merge from tbemd: use Makefile.arch to control building.
>
>  Reviewed by:  arch@ (many times, no objection)
>
> Added:
>  head/usr.sbin/Makefile.amd64   (contents, props changed)
>  head/usr.sbin/Makefile.arm   (contents, props changed)
>  head/usr.sbin/Makefile.i386   (contents, props changed)
>  head/usr.sbin/Makefile.ia64   (contents, props changed)
>  head/usr.sbin/Makefile.mips   (contents, props changed)
>  head/usr.sbin/Makefile.orig   (contents, props changed)

^^ oops.

>  head/usr.sbin/Makefile.powerpc   (contents, props changed)
>  head/usr.sbin/Makefile.sparc64   (contents, props changed)
> Modified:
>  head/usr.sbin/Makefile
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r212527 - head/sbin

2010-09-12 Thread Warner Losh
Author: imp
Date: Mon Sep 13 02:25:21 2010
New Revision: 212527
URL: http://svn.freebsd.org/changeset/base/212527

Log:
  MF tbemd: Move to using Makefile.arch to select what to build.
  
  Reviewed by:  arch@ (no objection)

Added:
  head/sbin/Makefile.amd64   (contents, props changed)
  head/sbin/Makefile.arm   (contents, props changed)
  head/sbin/Makefile.i386   (contents, props changed)
  head/sbin/Makefile.ia64   (contents, props changed)
  head/sbin/Makefile.mips   (contents, props changed)
  head/sbin/Makefile.pc98   (contents, props changed)
  head/sbin/Makefile.sparc64   (contents, props changed)
Modified:
  head/sbin/Makefile

Modified: head/sbin/Makefile
==
--- head/sbin/Makefile  Mon Sep 13 02:23:03 2010(r212526)
+++ head/sbin/Makefile  Mon Sep 13 02:25:21 2010(r212527)
@@ -5,26 +5,21 @@
 
 # XXX MISSING: icheck ncheck
 
-SUBDIR=adjkerntz \
+SUBDIR=adjkerntz \
atacontrol \
-   ${_atm} \
badsect \
-   ${_bsdlabel} \
camcontrol \
ccdconfig \
clri \
comcontrol \
conscontrol \
ddb \
-   ${_devd} \
devfs \
dhclient \
dmesg \
dump \
dumpfs \
dumpon \
-   ${_fdisk} \
-   ${_fdisk_pc98} \
ffsinfo \
fsck \
fsck_ffs \
@@ -40,15 +35,12 @@ SUBDIR= adjkerntz \
hastd \
ifconfig \
init \
-   ${_ipf} \
-   ${_ipfw} \
iscontrol \
kldconfig \
kldload \
kldstat \
kldunload \
ldconfig \
-   ${_mca} \
md5 \
mdconfig \
mdmfs \
@@ -62,96 +54,62 @@ SUBDIR= adjkerntz \
mount_nullfs \
mount_udf \
mount_unionfs \
-   ${_natd} \
newfs \
newfs_msdos \
nfsiod \
nos-tun \
-   ${_pfctl} \
-   ${_pflogd} \
ping \
-   ${_ping6} \
-   ${_quotacheck} \
rcorder \
reboot \
recoverdisk \
restore \
route \
-   ${_routed} \
-   ${_rtsol} \
savecore \
-   ${_sconfig} \
setkey \
shutdown \
spppcontrol \
-   ${_sunlabel} \
swapon \
sysctl \
tunefs \
umount \
 
 .if ${MK_ATM} != "no"
-_atm=  atm
+SUBDIR+=   atm
 .endif
 
 .if ${MK_CXX} != "no"
-_devd= devd
+SUBDIR+=   devd
 .endif
 
 .if ${MK_IPFILTER} != "no"
-_ipf=  ipf
+SUBDIR+=   ipf
 .endif
 
 .if ${MK_IPFW} != "no"
-_ipfw= ipfw
-_natd= natd
+SUBDIR+=   ipfw
+SUBDIR+=   natd
 .endif
 
 .if ${MK_PF} != "no"
-_pfctl=pfctl
-_pflogd=   pflogd
+SUBDIR+=   pfctl
+SUBDIR+=   pflogd
 .endif
 
 .if ${MK_INET6} != "no"
-_ping6=ping6
-_rtsol=rtsol
-.endif
-
-.if ${MACHINE_ARCH} != "ia64" && ${MACHINE_ARCH} != "powerpc"
-_bsdlabel= bsdlabel
+SUBDIR+=   ping6
+SUBDIR+=   rtsol
 .endif
 
 .if ${MK_QUOTAS} != "no"
-_quotacheck=   quotacheck
+SUBDIR+=   quotacheck
 .endif
 
 .if ${MK_ROUTED} != "no"
-_routed=   routed
-.endif
-
-.if ${MACHINE_ARCH} == "i386"
-.if ${MACHINE} == "i386"
-_fdisk=fdisk
-.elif ${MACHINE} == "pc98"
-_fdisk_pc98=   fdisk_pc98
-.endif
-_sconfig=  sconfig
+SUBDIR+=   routed
 .endif
 
-.if ${MACHINE_ARCH} == "amd64"
-_fdisk=fdisk
-.endif
+.include 
 
-.if ${MACHINE_ARCH} == "arm"
-_fdisk=fdisk
-.endif
-
-.if ${MACHINE_ARCH} == "ia64"
-_mca=  mca
-.endif
-
-.if ${MACHINE_ARCH} == "sparc64"
-_sunlabel= sunlabel
-.endif
+SUBDIR:=   ${SUBDIR:O}
 
 .include 

Added: head/sbin/Makefile.amd64
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sbin/Makefile.amd64Mon Sep 13 02:25:21 2010(r212527)
@@ -0,0 +1,4 @@
+# $FreeBSD$
+
+SUBDIR += bsdlabel
+SUBDIR += fdisk

Added: head/sbin/Makefile.arm
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sbin/Makefile.arm  Mon Sep 13 02:25:21 2010(r212527)
@@ -0,0 +1,4 @@
+# $FreeBSD$
+
+SUBDIR += bsdlabel
+SUBDIR += fdisk

Added: head/sbin/Makefile.i386
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sbin/Makefile.i386 Mon Sep 13 02:25:21 2010(r212527)
@@ -0,0 +1,5 @@
+# $FreeBSD$
+
+SUBDIR += bsdlabel
+SUBDIR += fdisk
+SUBDIR += sconfig

Added: head/sbin/Makefile.ia64
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sbin/Makefile.ia64 Mon Sep 13 02:25:21 2010(r212527)
@@ -0,0 +1,3 @@
+# $FreeBSD

svn commit: r212528 - head/usr.sbin

2010-09-12 Thread Warner Losh
Author: imp
Date: Mon Sep 13 02:26:36 2010
New Revision: 212528
URL: http://svn.freebsd.org/changeset/base/212528

Log:
  Ooops!  Shouldn't have committed this

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


Re: svn commit: r212525 - head/usr.sbin

2010-09-12 Thread M. Warner Losh
In message: 
Andrew Thompson  writes:
: On 13 September 2010 14:21, Warner Losh  wrote:
: > Author: imp
: > Date: Mon Sep 13 02:21:07 2010
: > New Revision: 212525
: > URL: http://svn.freebsd.org/changeset/base/212525
: >
: > Log:
: >  Merge from tbemd: use Makefile.arch to control building.
: >
: >  Reviewed by:  arch@ (many times, no objection)
: >
: > Added:
: >  head/usr.sbin/Makefile.amd64   (contents, props changed)
: >  head/usr.sbin/Makefile.arm   (contents, props changed)
: >  head/usr.sbin/Makefile.i386   (contents, props changed)
: >  head/usr.sbin/Makefile.ia64   (contents, props changed)
: >  head/usr.sbin/Makefile.mips   (contents, props changed)
: >  head/usr.sbin/Makefile.orig   (contents, props changed)
: 
: ^^ oops.

Yea, noticed when I almost made the mistake again.  Fixed.  Thanks!

Others?

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


svn commit: r212531 - head/lib/msun

2010-09-12 Thread Warner Losh
Author: imp
Date: Mon Sep 13 04:23:23 2010
New Revision: 212531
URL: http://svn.freebsd.org/changeset/base/212531

Log:
  This is exactly the same as the .else, so remove it.

Modified:
  head/lib/msun/Makefile

Modified: head/lib/msun/Makefile
==
--- head/lib/msun/Makefile  Mon Sep 13 02:35:48 2010(r212530)
+++ head/lib/msun/Makefile  Mon Sep 13 04:23:23 2010(r212531)
@@ -14,8 +14,6 @@
 
 .if ${MACHINE_CPUARCH} == "i386"
 ARCH_SUBDIR= i387
-.elif ${MACHINE_ARCH} == "powerpc64"
-ARCH_SUBDIR= powerpc
 .else
 ARCH_SUBDIR= ${MACHINE_CPUARCH}
 .endif
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r212532 - in head/sys: conf mips/include mips/mips

2010-09-12 Thread Jayachandran C.
Author: jchandra
Date: Mon Sep 13 05:03:37 2010
New Revision: 212532
URL: http://svn.freebsd.org/changeset/base/212532

Log:
  The functions in sys/mips/mips/psraccess.S can be implemented with
  mips_rd_status/mips_wr_status.  Implement them in mips/include/cpufunc.h,
  and remove psraccess.S.
  
  Reviewed by:  neel, imp

Deleted:
  head/sys/mips/mips/psraccess.S
Modified:
  head/sys/conf/files.mips
  head/sys/mips/include/cpufunc.h
  head/sys/mips/include/md_var.h

Modified: head/sys/conf/files.mips
==
--- head/sys/conf/files.mipsMon Sep 13 04:23:23 2010(r212531)
+++ head/sys/conf/files.mipsMon Sep 13 05:03:37 2010(r212532)
@@ -22,7 +22,6 @@
 mips/mips/machdep.cstandard
 mips/mips/mp_machdep.c optional smp
 mips/mips/mpboot.S optional smp
-mips/mips/psraccess.S  standard
 # --
 # Phase 3
 # --

Modified: head/sys/mips/include/cpufunc.h
==
--- head/sys/mips/include/cpufunc.h Mon Sep 13 04:23:23 2010
(r212531)
+++ head/sys/mips/include/cpufunc.h Mon Sep 13 05:03:37 2010
(r212532)
@@ -266,6 +266,24 @@ intr_restore(register_t ie)
}
 }
 
+static __inline uint32_t
+set_intr_mask(uint32_t mask)
+{
+   uint32_t ostatus;
+
+   ostatus = mips_rd_status();
+   mask = (ostatus & ~MIPS_SR_INT_MASK) | (~mask & MIPS_SR_INT_MASK);
+   mips_wr_status(mask);
+   return (ostatus);
+}
+
+static __inline uint32_t
+get_intr_mask(void)
+{
+
+   return (mips_rd_status() & MIPS_SR_INT_MASK);
+}
+
 static __inline void
 breakpoint(void)
 {

Modified: head/sys/mips/include/md_var.h
==
--- head/sys/mips/include/md_var.h  Mon Sep 13 04:23:23 2010
(r212531)
+++ head/sys/mips/include/md_var.h  Mon Sep 13 05:03:37 2010
(r212532)
@@ -75,9 +75,5 @@ void  mips_postboot_fixup(void);
 void   platform_identify(void);
 
 extern int busdma_swi_pending;
-void busdma_swi(void);
-
-u_int32_t set_intr_mask(u_int32_t);
-u_int32_t get_intr_mask(void);
-
+void   busdma_swi(void);
 #endif /* !_MACHINE_MD_VAR_H_ */
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r212533 - head/sys/dev/acpica

2010-09-12 Thread Alexander Motin
Author: mav
Date: Mon Sep 13 06:32:56 2010
New Revision: 212533
URL: http://svn.freebsd.org/changeset/base/212533

Log:
  Add tunable 'hint.hpet.X.per_cpu' to specify how much per-CPU timers driver
  should provide if there is sufficient hardware. Default is 1.

Modified:
  head/sys/dev/acpica/acpi_hpet.c

Modified: head/sys/dev/acpica/acpi_hpet.c
==
--- head/sys/dev/acpica/acpi_hpet.c Mon Sep 13 05:03:37 2010
(r212532)
+++ head/sys/dev/acpica/acpi_hpet.c Mon Sep 13 06:32:56 2010
(r212533)
@@ -74,6 +74,7 @@ struct hpet_softc {
int irq;
int useirq;
int legacy_route;
+   int per_cpu;
uint32_tallowed_irqs;
struct resource *mem_res;
struct resource *intr_res;
@@ -501,6 +502,11 @@ hpet_attach(device_t dev)
resource_int_value(device_get_name(dev), device_get_unit(dev),
 "allowed_irqs", &sc->allowed_irqs);
 
+   /* Get how much per-CPU timers we should try to provide. */
+   sc->per_cpu = 1;
+   resource_int_value(device_get_name(dev), device_get_unit(dev),
+"per_cpu", &sc->per_cpu);
+
num_msi = 0;
sc->useirq = 0;
/* Find IRQ vectors for all timers. */
@@ -556,7 +562,7 @@ hpet_attach(device_t dev)
if (sc->legacy_route)
hpet_enable(sc);
/* Group timers for per-CPU operation. */
-   num_percpu_et = min(num_msi / mp_ncpus, 1);
+   num_percpu_et = min(num_msi / mp_ncpus, sc->per_cpu);
num_percpu_t = num_percpu_et * mp_ncpus;
pcpu_master = 0;
cur_cpu = CPU_FIRST();
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r212534 - in head/usr.bin/xlint: . arch/powerpc arch/powerpc64

2010-09-12 Thread Warner Losh
Author: imp
Date: Mon Sep 13 06:35:35 2010
New Revision: 212534
URL: http://svn.freebsd.org/changeset/base/212534

Log:
  Revert r212513 and reimplement the search order to be ARCH, CPUARCH

Added:
  head/usr.bin/xlint/arch/powerpc64/
 - copied from r212512, head/usr.bin/xlint/arch/powerpc64/
Modified:
  head/usr.bin/xlint/Makefile.inc
  head/usr.bin/xlint/arch/powerpc/targparam.h

Modified: head/usr.bin/xlint/Makefile.inc
==
--- head/usr.bin/xlint/Makefile.inc Mon Sep 13 06:32:56 2010
(r212533)
+++ head/usr.bin/xlint/Makefile.inc Mon Sep 13 06:35:35 2010
(r212534)
@@ -7,14 +7,17 @@ WARNS?=   0
 
 # These assignments duplicate much of the functionality of
 # MACHINE_CPUARCH, but there's no easy way to export make functions...
-
 .if defined(TARGET_ARCH)
-TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/}
+TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/}
 .else
-TARGET_CPUARCH=${MACHINE_CPUARCH}
+TARGET_CPUARCH=${MACHINE_CPUARCH}
+TARGET_ARCH=   ${MACHINE_ARCH}
 .endif
-TARGET_ARCH?=  ${MACHINE_ARCH}
+.if exists(${.CURDIR}/../arch/${TARGET_ARCH}
+CFLAGS+=   -I${.CURDIR}/../arch/${TARGET_ARCH}
+.else
 CFLAGS+=   -I${.CURDIR}/../arch/${TARGET_CPUARCH}
+.enidf
 CFLAGS+=   -I${.CURDIR}/../common
 
 OBJECT_FMT=ELF

Modified: head/usr.bin/xlint/arch/powerpc/targparam.h
==
--- head/usr.bin/xlint/arch/powerpc/targparam.h Mon Sep 13 06:32:56 2010
(r212533)
+++ head/usr.bin/xlint/arch/powerpc/targparam.h Mon Sep 13 06:35:35 2010
(r212534)
@@ -37,11 +37,7 @@
  * Machine-dependent target parameters for lint1.
  */
 
-#ifdef __powerpc64__
-#include "lp64.h"
-#else
 #include "ilp32.h"
-#endif
 
 /*
  * Should be set to 1 if the difference of two pointers is of type long
@@ -49,13 +45,8 @@
  * kept in sync with the compiler!
  */ 
 
-#ifdef __powerpc64__
-#definePTRDIFF_IS_LONG 1
-#defineSIZEOF_IS_ULONG 1
-#else
 #definePTRDIFF_IS_LONG 0
 #defineSIZEOF_IS_ULONG 0
-#endif
 
 #defineFLOAT_SIZE  (4 * CHAR_BIT)
 #defineDOUBLE_SIZE (8 * CHAR_BIT)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r212535 - head/usr.bin/xlint

2010-09-12 Thread Warner Losh
Author: imp
Date: Mon Sep 13 06:50:07 2010
New Revision: 212535
URL: http://svn.freebsd.org/changeset/base/212535

Log:
  Doh! two last second refactoring typos crept in.  Fix.

Modified:
  head/usr.bin/xlint/Makefile.inc

Modified: head/usr.bin/xlint/Makefile.inc
==
--- head/usr.bin/xlint/Makefile.inc Mon Sep 13 06:35:35 2010
(r212534)
+++ head/usr.bin/xlint/Makefile.inc Mon Sep 13 06:50:07 2010
(r212535)
@@ -13,11 +13,11 @@ TARGET_CPUARCH= ${TARGET_ARCH:C/mipse[bl
 TARGET_CPUARCH=${MACHINE_CPUARCH}
 TARGET_ARCH=   ${MACHINE_ARCH}
 .endif
-.if exists(${.CURDIR}/../arch/${TARGET_ARCH}
+.if exists(${.CURDIR}/../arch/${TARGET_ARCH})
 CFLAGS+=   -I${.CURDIR}/../arch/${TARGET_ARCH}
 .else
 CFLAGS+=   -I${.CURDIR}/../arch/${TARGET_CPUARCH}
-.enidf
+.endif
 CFLAGS+=   -I${.CURDIR}/../common
 
 OBJECT_FMT=ELF
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"