svn commit: r205438 - stable/8/usr.bin/procstat

2010-03-22 Thread Konstantin Belousov
Author: kib
Date: Mon Mar 22 09:29:56 2010
New Revision: 205438
URL: http://svn.freebsd.org/changeset/base/205438

Log:
  MFC r204879:
  Teach procstat(1) to display some information about signal disposition
  and pending/blocked status for signals.
  
  MFC r204880:
  Add file forgotten in r204879.

Added:
  stable/8/usr.bin/procstat/procstat_sigs.c
 - copied unchanged from r204880, head/usr.bin/procstat/procstat_sigs.c
Modified:
  stable/8/usr.bin/procstat/Makefile
  stable/8/usr.bin/procstat/procstat.1
  stable/8/usr.bin/procstat/procstat.c
  stable/8/usr.bin/procstat/procstat.h
Directory Properties:
  stable/8/usr.bin/procstat/   (props changed)

Modified: stable/8/usr.bin/procstat/Makefile
==
--- stable/8/usr.bin/procstat/Makefile  Mon Mar 22 07:06:12 2010
(r205437)
+++ stable/8/usr.bin/procstat/Makefile  Mon Mar 22 09:29:56 2010
(r205438)
@@ -9,6 +9,7 @@ SRCS=   procstat.c  \
procstat_cred.c \
procstat_files.c\
procstat_kstack.c   \
+   procstat_sigs.c \
procstat_threads.c  \
procstat_vm.c
 

Modified: stable/8/usr.bin/procstat/procstat.1
==
--- stable/8/usr.bin/procstat/procstat.1Mon Mar 22 07:06:12 2010
(r205437)
+++ stable/8/usr.bin/procstat/procstat.1Mon Mar 22 09:29:56 2010
(r205438)
@@ -25,7 +25,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd August 20, 2008
+.Dd March 7, 2010
 .Dt PROCSTAT 1
 .Os
 .Sh NAME
@@ -34,8 +34,9 @@
 .Sh SYNOPSIS
 .Nm
 .Op Fl h
+.Op Fl n
 .Op Fl w Ar interval
-.Op Fl b | c | f | k | s | t | v
+.Op Fl b | c | f | i | j | k | s | t | v
 .Op Fl a | Ar pid ...
 .Sh DESCRIPTION
 The
@@ -56,6 +57,10 @@ Display binary information for the proce
 Display command line arguments for the process.
 .It Fl f
 Display file descriptor information for the process.
+.It Fl i
+Display signal pending and disposition information for the process.
+.It Fl j
+Display signal pending and blocked information for the process threads.
 .It Fl k
 Display the stacks of kernel threads in the process, excluding stacks of
 threads currently running on a CPU and threads with stacks swapped to disk.
@@ -198,6 +203,58 @@ direct I/O
 .It l
 lock held
 .El
+.Ss Signal Disposition Information
+Display signal pending and disposition for a process:
+.Pp
+.Bl -tag -width ident -compact
+.It PID
+process ID
+.It COMM
+command
+.It SIG
+signal name
+.It FLAGS
+process signal disposition details, three symbols
+.Bl -tag -width X -compact
+.It P
+if signal is pending in the global process queue, - otherwise
+.It I
+if signal delivery disposition is SIGIGN, - otherwise
+.It C
+if signal delivery is to catch it, - otherwise
+.El
+.El
+.Pp
+If
+.Fl n
+switch is given, the signal numbers are shown instead of signal names.
+.Ss Thread Signal Information
+Display signal pending and blocked for a process threads:
+.Pp
+.Bl -tag -width ident -compact
+.It PID
+process ID
+.It COMM
+command
+.It TID
+thread ID
+.It SIG
+signal name
+.It FLAGS
+thread signal delivery status, two symbols
+.Bl -tag -width X -compact
+.It P
+if signal is pending for the thread, - otherwise
+.It B
+if signal is blocked in the thread signal mask, - if not blocked
+.El
+.El
+.Pp
+The
+.Fl n
+switch has the same effect as for the
+.Fl i
+switch, the signals numbers are shown instead of signal names.
 .Ss Kernel Thread Stacks
 Display kernel thread stacks for a process, allowing further interpretation
 of thread wait channels.

Modified: stable/8/usr.bin/procstat/procstat.c
==
--- stable/8/usr.bin/procstat/procstat.cMon Mar 22 07:06:12 2010
(r205437)
+++ stable/8/usr.bin/procstat/procstat.cMon Mar 22 09:29:56 2010
(r205438)
@@ -38,15 +38,15 @@
 
 #include procstat.h
 
-static int aflag, bflag, cflag, fflag, kflag, sflag, tflag, vflag;
-inthflag;
+static int aflag, bflag, cflag, fflag, iflag, jflag, kflag, sflag, tflag, 
vflag;
+inthflag, nflag;
 
 static void
 usage(void)
 {
 
-   fprintf(stderr, usage: procstat [-h] [-w interval] [-b | -c | -f | 
-   -k | -s | -t | -v]\n);
+   fprintf(stderr, usage: procstat [-h] [-n] [-w interval] [-b | -c | -f 
| 
+   -i | -j | -k | -s | -t | -v]\n);
fprintf(stderr, [-a | pid ...]\n);
exit(EX_USAGE);
 }
@@ -61,6 +61,10 @@ procstat(pid_t pid, struct kinfo_proc *k
procstat_args(pid, kipp);
else if (fflag)
procstat_files(pid, kipp);
+   else if (iflag)
+   procstat_sigs(pid, kipp);
+   else if (jflag)
+   procstat_threads_sigs(pid, kipp);
else if (kflag)
procstat_kstack(pid, kipp, kflag);
else if (sflag)
@@ -109,7 +113,7 @@ main(int argc, char *argv[])
char *dummy;
 

svn commit: r205439 - stable/8/sbin/ipfw

2010-03-22 Thread Gleb Smirnoff
Author: glebius
Date: Mon Mar 22 10:11:59 2010
New Revision: 205439
URL: http://svn.freebsd.org/changeset/base/205439

Log:
  MFC r200183 by luigi:
  
restore setting of sin_len (was removed in 1.146 last february) as
it seems that now it is necessary for 'forward' to work outside lo0.
  
  Approved by:  luigi

Modified:
  stable/8/sbin/ipfw/ipfw2.c
Directory Properties:
  stable/8/sbin/ipfw/   (props changed)

Modified: stable/8/sbin/ipfw/ipfw2.c
==
--- stable/8/sbin/ipfw/ipfw2.c  Mon Mar 22 09:29:56 2010(r205438)
+++ stable/8/sbin/ipfw/ipfw2.c  Mon Mar 22 10:11:59 2010(r205439)
@@ -2740,9 +2740,11 @@ chkarg:  
 
/*
 * In the kernel we assume AF_INET and use only
-* sin_port and sin_addr.
+* sin_port and sin_addr. Remember to set sin_len as
+* the routing code seems to use it too.
 */
p-sa.sin_family = AF_INET;
+   p-sa.sin_len = sizeof(struct sockaddr_in);
p-sa.sin_port = 0;
/*
 * locate the address-port separator (':' or ',')
___
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: r205440 - vendor/openpam/dist/include/security

2010-03-22 Thread Dag-Erling Smorgrav
Author: des
Date: Mon Mar 22 10:58:16 2010
New Revision: 205440
URL: http://svn.freebsd.org/changeset/base/205440

Log:
  Merge upstream r432:
  
  pam_end() already contains a NULL check, and it is not unreasonable to
  call it with a NULL pamh in a cleanup / error-handling situation.  Remove
  OPENPAM_NONNULL, which may cause gcc to optimize away the NULL check.

Modified:
  vendor/openpam/dist/include/security/pam_appl.h

Modified: vendor/openpam/dist/include/security/pam_appl.h
==
--- vendor/openpam/dist/include/security/pam_appl.h Mon Mar 22 10:11:59 
2010(r205439)
+++ vendor/openpam/dist/include/security/pam_appl.h Mon Mar 22 10:58:16 
2010(r205440)
@@ -72,8 +72,7 @@ pam_close_session(pam_handle_t *_pamh,
 
 int
 pam_end(pam_handle_t *_pamh,
-   int _status)
-   OPENPAM_NONNULL((1));
+   int _status);
 
 int
 pam_get_data(const pam_handle_t *_pamh,
___
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: r205441 - head/contrib/openpam/include/security

2010-03-22 Thread Dag-Erling Smorgrav
Author: des
Date: Mon Mar 22 11:00:57 2010
New Revision: 205441
URL: http://svn.freebsd.org/changeset/base/205441

Log:
  Merge upstream r432:
  
  pam_end() already contains a NULL check, and it is not unreasonable to
  call it with a NULL pamh in a cleanup / error-handling situation.  Remove
  OPENPAM_NONNULL, which may cause gcc to optimize away the NULL check.
  
  This fixes a potential NULL pointer dereference in error-handling code
  in passwd(1).

Modified:
  head/contrib/openpam/include/security/pam_appl.h
Directory Properties:
  head/contrib/openpam/   (props changed)

Modified: head/contrib/openpam/include/security/pam_appl.h
==
--- head/contrib/openpam/include/security/pam_appl.hMon Mar 22 10:58:16 
2010(r205440)
+++ head/contrib/openpam/include/security/pam_appl.hMon Mar 22 11:00:57 
2010(r205441)
@@ -72,8 +72,7 @@ pam_close_session(pam_handle_t *_pamh,
 
 int
 pam_end(pam_handle_t *_pamh,
-   int _status)
-   OPENPAM_NONNULL((1));
+   int _status);
 
 int
 pam_get_data(const pam_handle_t *_pamh,
___
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: r205442 - stable/8/sys/dev/mxge

2010-03-22 Thread Andrew Gallatin
Author: gallatin
Date: Mon Mar 22 11:18:51 2010
New Revision: 205442
URL: http://svn.freebsd.org/changeset/base/205442

Log:
  MFC 205255: Fix 2 bugs in mxge_attach()

Modified:
  stable/8/sys/dev/mxge/if_mxge.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)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/mxge/if_mxge.c
==
--- stable/8/sys/dev/mxge/if_mxge.c Mon Mar 22 11:00:57 2010
(r205441)
+++ stable/8/sys/dev/mxge/if_mxge.c Mon Mar 22 11:18:51 2010
(r205442)
@@ -4610,8 +4610,6 @@ mxge_attach(device_t dev)
err = ENOMEM;
goto abort_with_nothing;
}
-   taskqueue_start_threads(sc-tq, 1, PI_NET, %s taskq,
-   device_get_nameunit(sc-dev));
 
err = bus_dma_tag_create(NULL,  /* parent */
 1, /* alignment */
@@ -4717,7 +4715,7 @@ mxge_attach(device_t dev)
err = mxge_alloc_rings(sc);
if (err != 0) {
device_printf(sc-dev, failed to allocate rings\n);
-   goto abort_with_dmabench;
+   goto abort_with_slices;
}
 
err = mxge_add_irq(sc);
@@ -4770,6 +4768,8 @@ mxge_attach(device_t dev)
ifp-if_transmit = mxge_transmit;
ifp-if_qflush = mxge_qflush;
 #endif
+   taskqueue_start_threads(sc-tq, 1, PI_NET, %s taskq,
+   device_get_nameunit(sc-dev));
callout_reset(sc-co_hdl, mxge_ticks, mxge_tick, sc);
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: r205443 - head/contrib/openpam/include/security

2010-03-22 Thread Dag-Erling Smorgrav
Author: des
Date: Mon Mar 22 11:32:19 2010
New Revision: 205443
URL: http://svn.freebsd.org/changeset/base/205443

Log:
  Forced commit to register MFC reminder.
  
  MFC after:2 weeks

Modified:
  head/contrib/openpam/include/security/pam_appl.h

Modified: head/contrib/openpam/include/security/pam_appl.h
==
___
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: r205444 - head/sys/i386/i386

2010-03-22 Thread Ed Maste
Author: emaste
Date: Mon Mar 22 11:52:53 2010
New Revision: 205444
URL: http://svn.freebsd.org/changeset/base/205444

Log:
  Merge r197455 from amd64:
  
Add a backtrace to the fpudna in kernel mode! case, to help track down
where this comes from.
  
Reviewed by:bde

Modified:
  head/sys/i386/i386/trap.c

Modified: head/sys/i386/i386/trap.c
==
--- head/sys/i386/i386/trap.c   Mon Mar 22 11:32:19 2010(r205443)
+++ head/sys/i386/i386/trap.c   Mon Mar 22 11:52:53 2010(r205444)
@@ -540,6 +540,10 @@ trap(struct trapframe *frame)
 * XXX this should be fatal unless the kernel has
 * registered such use.
 */
+   printf(npxdna in kernel mode!\n);
+#ifdef KDB
+   kdb_backtrace();
+#endif
if (npxdna())
goto out;
 #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: r205445 - stable/7/sys/dev/mxge

2010-03-22 Thread Andrew Gallatin
Author: gallatin
Date: Mon Mar 22 13:20:25 2010
New Revision: 205445
URL: http://svn.freebsd.org/changeset/base/205445

Log:
  MFC 205255: Fix 2 bugs in mxge_attach()

Modified:
  stable/7/sys/dev/mxge/if_mxge.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/mxge/if_mxge.c
==
--- stable/7/sys/dev/mxge/if_mxge.c Mon Mar 22 11:52:53 2010
(r205444)
+++ stable/7/sys/dev/mxge/if_mxge.c Mon Mar 22 13:20:25 2010
(r205445)
@@ -4330,8 +4330,6 @@ mxge_attach(device_t dev)
err = ENOMEM;
goto abort_with_nothing;
}
-   taskqueue_start_threads(sc-tq, 1, PI_NET, %s taskq,
-   device_get_nameunit(sc-dev));
 
err = bus_dma_tag_create(NULL,  /* parent */
 1, /* alignment */
@@ -4437,7 +4435,7 @@ mxge_attach(device_t dev)
err = mxge_alloc_rings(sc);
if (err != 0) {
device_printf(sc-dev, failed to allocate rings\n);
-   goto abort_with_dmabench;
+   goto abort_with_slices;
}
 
err = mxge_add_irq(sc);
@@ -4483,6 +4481,8 @@ mxge_attach(device_t dev)
mxge_change_mtu(sc, mxge_initial_mtu);
 
mxge_add_sysctls(sc);
+   taskqueue_start_threads(sc-tq, 1, PI_NET, %s taskq,
+   device_get_nameunit(sc-dev));
callout_reset(sc-co_hdl, mxge_ticks, mxge_tick, sc);
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: r205446 - stable/6/sys/dev/mxge

2010-03-22 Thread Andrew Gallatin
Author: gallatin
Date: Mon Mar 22 13:21:52 2010
New Revision: 205446
URL: http://svn.freebsd.org/changeset/base/205446

Log:
  MFC 205255: Fix 2 bugs in mxge_attach()

Modified:
  stable/6/sys/dev/mxge/if_mxge.c
Directory Properties:
  stable/6/sys/   (props changed)
  stable/6/sys/contrib/pf/   (props changed)
  stable/6/sys/dev/cxgb/   (props changed)

Modified: stable/6/sys/dev/mxge/if_mxge.c
==
--- stable/6/sys/dev/mxge/if_mxge.c Mon Mar 22 13:20:25 2010
(r205445)
+++ stable/6/sys/dev/mxge/if_mxge.c Mon Mar 22 13:21:52 2010
(r205446)
@@ -4329,8 +4329,6 @@ mxge_attach(device_t dev)
err = ENOMEM;
goto abort_with_nothing;
}
-   taskqueue_start_threads(sc-tq, 1, PI_NET, %s taskq,
-   device_get_nameunit(sc-dev));
 
err = bus_dma_tag_create(NULL,  /* parent */
 1, /* alignment */
@@ -4436,7 +4434,7 @@ mxge_attach(device_t dev)
err = mxge_alloc_rings(sc);
if (err != 0) {
device_printf(sc-dev, failed to allocate rings\n);
-   goto abort_with_dmabench;
+   goto abort_with_slices;
}
 
err = mxge_add_irq(sc);
@@ -4482,6 +4480,8 @@ mxge_attach(device_t dev)
mxge_change_mtu(sc, mxge_initial_mtu);
 
mxge_add_sysctls(sc);
+   taskqueue_start_threads(sc-tq, 1, PI_NET, %s taskq,
+   device_get_nameunit(sc-dev));
callout_reset(sc-co_hdl, mxge_ticks, mxge_tick, sc);
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: r205427 - in head: tools/regression/usr.bin/ncal usr.bin/ncal

2010-03-22 Thread Alexander Best
thanks. :)

a small correction to the commit message:
Replace -b with -C and -N (as proposed by Alexander). ;)

-- 
Alexander Best
___
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: r205447 - stable/8/sys/dev/mxge

2010-03-22 Thread Andrew Gallatin
Author: gallatin
Date: Mon Mar 22 14:50:08 2010
New Revision: 205447
URL: http://svn.freebsd.org/changeset/base/205447

Log:
  MFC 204212: Update mxge to support IFCAP_VLAN_HWTSO.

Modified:
  stable/8/sys/dev/mxge/if_mxge.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)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/mxge/if_mxge.c
==
--- stable/8/sys/dev/mxge/if_mxge.c Mon Mar 22 13:21:52 2010
(r205446)
+++ stable/8/sys/dev/mxge/if_mxge.c Mon Mar 22 14:50:08 2010
(r205447)
@@ -4122,6 +4122,13 @@ mxge_ioctl(struct ifnet *ifp, u_long com
}
if (mask  IFCAP_VLAN_HWTAGGING)
ifp-if_capenable ^= IFCAP_VLAN_HWTAGGING;
+   if (mask  IFCAP_VLAN_HWTSO)
+   ifp-if_capenable ^= IFCAP_VLAN_HWTSO;
+
+   if (!(ifp-if_capabilities  IFCAP_VLAN_HWTSO) ||
+   !(ifp-if_capenable  IFCAP_VLAN_HWTAGGING))
+   ifp-if_capenable = ~IFCAP_VLAN_HWTSO;
+
mtx_unlock(sc-driver_mtx);
VLAN_CAPABILITIES(ifp);
 
@@ -4733,6 +4740,11 @@ mxge_attach(device_t dev)
 
 #ifdef MXGE_NEW_VLAN_API
ifp-if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWCSUM;
+
+   /* Only FW 1.4.32 and newer can do TSO over vlans */
+   if (sc-fw_ver_major == 1  sc-fw_ver_minor == 4 
+   sc-fw_ver_tiny = 32)
+   ifp-if_capabilities |= IFCAP_VLAN_HWTSO;
 #endif
 
sc-max_mtu = mxge_max_mtu(sc);
___
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: r205444 - head/sys/i386/i386

2010-03-22 Thread John Baldwin
On Monday 22 March 2010 7:52:54 am Ed Maste wrote:
 Author: emaste
 Date: Mon Mar 22 11:52:53 2010
 New Revision: 205444
 URL: http://svn.freebsd.org/changeset/base/205444
 
 Log:
   Merge r197455 from amd64:
   
 Add a backtrace to the fpudna in kernel mode! case, to help track down
 where this comes from.
   
 Reviewed by:  bde

Should we make this a panic instead perhaps?

-- 
John Baldwin
___
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: r205448 - in head/sys: amd64/include i386/include

2010-03-22 Thread John Baldwin
Author: jhb
Date: Mon Mar 22 15:08:26 2010
New Revision: 205448
URL: http://svn.freebsd.org/changeset/base/205448

Log:
  Remove unneeded type specifiers from 64-bit constants.  The compiler
  infers their natural type from the constants' values.
  
  Submitted by: bde
  MFC after:3 days

Modified:
  head/sys/amd64/include/specialreg.h
  head/sys/i386/include/specialreg.h

Modified: head/sys/amd64/include/specialreg.h
==
--- head/sys/amd64/include/specialreg.h Mon Mar 22 14:50:08 2010
(r205447)
+++ head/sys/amd64/include/specialreg.h Mon Mar 22 15:08:26 2010
(r205448)
@@ -321,16 +321,16 @@
 #defineMTRR_N64K   8   /* numbers of fixed-size 
entries */
 #defineMTRR_N16K   16
 #defineMTRR_N4K64
-#defineMTRR_CAP_WC 0x0400UL
-#defineMTRR_CAP_FIXED  0x0100UL
-#defineMTRR_CAP_VCNT   0x00ffUL
-#defineMTRR_DEF_ENABLE 0x0800UL
-#defineMTRR_DEF_FIXED_ENABLE   0x0400UL
-#defineMTRR_DEF_TYPE   0x00ffUL
-#defineMTRR_PHYSBASE_PHYSBASE  0x000ff000UL
-#defineMTRR_PHYSBASE_TYPE  0x00ffUL
-#defineMTRR_PHYSMASK_PHYSMASK  0x000ff000UL
-#defineMTRR_PHYSMASK_VALID 0x0800UL
+#defineMTRR_CAP_WC 0x0400
+#defineMTRR_CAP_FIXED  0x0100
+#defineMTRR_CAP_VCNT   0x00ff
+#defineMTRR_DEF_ENABLE 0x0800
+#defineMTRR_DEF_FIXED_ENABLE   0x0400
+#defineMTRR_DEF_TYPE   0x00ff
+#defineMTRR_PHYSBASE_PHYSBASE  0x000ff000
+#defineMTRR_PHYSBASE_TYPE  0x00ff
+#defineMTRR_PHYSMASK_PHYSMASK  0x000ff000
+#defineMTRR_PHYSMASK_VALID 0x0800
 
 /* Performance Control Register (5x86 only). */
 #definePCR00x20
@@ -360,31 +360,31 @@
 #defineMCG_STATUS_RIPV 0x0001
 #defineMCG_STATUS_EIPV 0x0002
 #defineMCG_STATUS_MCIP 0x0004
-#defineMCG_CTL_ENABLE  0xUL
-#defineMCG_CTL_DISABLE 0xUL
+#defineMCG_CTL_ENABLE  0x
+#defineMCG_CTL_DISABLE 0x
 #defineMSR_MC_CTL(x)   (MSR_MC0_CTL + (x) * 4)
 #defineMSR_MC_STATUS(x)(MSR_MC0_STATUS + (x) * 4)
 #defineMSR_MC_ADDR(x)  (MSR_MC0_ADDR + (x) * 4)
 #defineMSR_MC_MISC(x)  (MSR_MC0_MISC + (x) * 4)
 #defineMSR_MC_CTL2(x)  (MSR_MC0_CTL2 + (x))/* If 
MCG_CAP_CMCI_P */
-#defineMC_STATUS_MCA_ERROR 0xUL
-#defineMC_STATUS_MODEL_ERROR   0xUL
-#defineMC_STATUS_OTHER_INFO0x01ffUL
-#defineMC_STATUS_COR_COUNT 0x001fffc0UL/* If 
MCG_CAP_TES_P */
-#defineMC_STATUS_TES_STATUS0x0060UL/* If 
MCG_CAP_TES_P */
-#defineMC_STATUS_AR0x0080UL/* If 
MCG_CAP_CMCI_P */
-#defineMC_STATUS_S 0x0100UL/* If 
MCG_CAP_CMCI_P */
-#defineMC_STATUS_PCC   0x0200UL
-#defineMC_STATUS_ADDRV 0x0400UL
-#defineMC_STATUS_MISCV 0x0800UL
-#defineMC_STATUS_EN0x1000UL
-#defineMC_STATUS_UC0x2000UL
-#defineMC_STATUS_OVER  0x4000UL
-#defineMC_STATUS_VAL   0x8000UL
-#defineMC_MISC_RA_LSB  0x003fUL/* If 
MCG_CAP_SER_P */
-#defineMC_MISC_ADDRESS_MODE0x01c0UL/* If 
MCG_CAP_SER_P */
-#defineMC_CTL2_THRESHOLD   0x3fffUL
-#defineMC_CTL2_CMCI_EN 0x4000UL
+#defineMC_STATUS_MCA_ERROR 0x
+#defineMC_STATUS_MODEL_ERROR   0x
+#defineMC_STATUS_OTHER_INFO0x01ff
+#defineMC_STATUS_COR_COUNT 0x001fffc0  /* If 
MCG_CAP_TES_P */
+#defineMC_STATUS_TES_STATUS0x0060  /* If 
MCG_CAP_TES_P */
+#defineMC_STATUS_AR0x0080  /* If 
MCG_CAP_CMCI_P */
+#defineMC_STATUS_S 0x0100  /* If 
MCG_CAP_CMCI_P */
+#defineMC_STATUS_PCC   0x0200
+#defineMC_STATUS_ADDRV 0x0400
+#defineMC_STATUS_MISCV 0x0800
+#defineMC_STATUS_EN0x1000
+#defineMC_STATUS_UC

Re: svn commit: r205444 - head/sys/i386/i386

2010-03-22 Thread Ed Maste
On Mon, Mar 22, 2010 at 08:49:36AM -0400, John Baldwin wrote:

 On Monday 22 March 2010 7:52:54 am Ed Maste wrote:
  Author: emaste
  Date: Mon Mar 22 11:52:53 2010
  New Revision: 205444
  URL: http://svn.freebsd.org/changeset/base/205444
  
  Log:
Merge r197455 from amd64:

  Add a backtrace to the fpudna in kernel mode! case, to help track down
  where this comes from.

  Reviewed by:bde
 
 Should we make this a panic instead perhaps?

I was just about to follow up with a comment to that effect.  We do want
it to become a panic, but I would prefer to hold off until we address
the known issue with padlock(4).

http://www.freebsd.org/cgi/query-pr.cgi?pr=amd64/135014

Bruce Evans' comment in that PR is:
 The printf should always have been a panic, but changing to a panic
 now would be too drastic.

-Ed
___
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: r205449 - stable/8/lib/libc/rpc

2010-03-22 Thread John Baldwin
Author: jhb
Date: Mon Mar 22 15:52:26 2010
New Revision: 205449
URL: http://svn.freebsd.org/changeset/base/205449

Log:
  MFC 204950,205020:
  Use thr_once() with once_t controls to initialize various thread_key_t
  objects used to provide per-thread storage in the RPC code.  Almost all
  of these used double-checking with a dedicated mutex (tsd_lock) to do this
  before.  However, that is not always safe with more relaxed memory orders.
  There were also other bugs, such as one in __rpc_createrr() that caused a
  new key to be allocated each time __rpc_createrr() was invoked.

Modified:
  stable/8/lib/libc/rpc/Symbol.map
  stable/8/lib/libc/rpc/clnt_simple.c
  stable/8/lib/libc/rpc/getnetconfig.c
  stable/8/lib/libc/rpc/key_call.c
  stable/8/lib/libc/rpc/mt_misc.c
  stable/8/lib/libc/rpc/mt_misc.h
  stable/8/lib/libc/rpc/rpc_generic.c
  stable/8/lib/libc/rpc/rpc_soc.c
Directory Properties:
  stable/8/lib/libc/   (props changed)
  stable/8/lib/libc/stdtime/   (props changed)

Modified: stable/8/lib/libc/rpc/Symbol.map
==
--- stable/8/lib/libc/rpc/Symbol.mapMon Mar 22 15:08:26 2010
(r205448)
+++ stable/8/lib/libc/rpc/Symbol.mapMon Mar 22 15:52:26 2010
(r205449)
@@ -239,10 +239,6 @@ FBSDprivate_1.0 {
__key_encryptsession_pk_LOCAL;
__key_decryptsession_pk_LOCAL;
__key_gendes_LOCAL;
-   __tsd_lock; /*
-* Why does usr.bin/rpcinfo/Makefile need rpc_generic.c?
-* Remove this hack if rpcinfo stops building with it.
-*/
__svc_clean_idle;
__rpc_gss_unwrap;
__rpc_gss_unwrap_stub;

Modified: stable/8/lib/libc/rpc/clnt_simple.c
==
--- stable/8/lib/libc/rpc/clnt_simple.c Mon Mar 22 15:08:26 2010
(r205448)
+++ stable/8/lib/libc/rpc/clnt_simple.c Mon Mar 22 15:52:26 2010
(r205449)
@@ -76,7 +76,11 @@ struct rpc_call_private {
charnettype[NETIDLEN];  /* Network type */
 };
 static struct rpc_call_private *rpc_call_private_main;
+static thread_key_t rpc_call_key;
+static once_t rpc_call_once = ONCE_INITIALIZER;
+static int rpc_call_key_error;
 
+static void rpc_call_key_init(void);
 static void rpc_call_destroy(void *);
 
 static void
@@ -91,6 +95,13 @@ rpc_call_destroy(void *vp)
}
 }
 
+static void
+rpc_call_key_init(void)
+{
+
+   rpc_call_key_error = thr_keycreate(rpc_call_key, rpc_call_destroy);
+}
+
 /*
  * This is the simplified interface to the client rpc layer.
  * The client handle is not destroyed here and is reused for
@@ -112,17 +123,16 @@ rpc_call(host, prognum, versnum, procnum
struct rpc_call_private *rcp = (struct rpc_call_private *) 0;
enum clnt_stat clnt_stat;
struct timeval timeout, tottimeout;
-   static thread_key_t rpc_call_key;
int main_thread = 1;
 
if ((main_thread = thr_main())) {
rcp = rpc_call_private_main;
} else {
-   if (rpc_call_key == 0) {
-   mutex_lock(tsd_lock);
-   if (rpc_call_key == 0)
-   thr_keycreate(rpc_call_key, rpc_call_destroy);
-   mutex_unlock(tsd_lock);
+   if (thr_once(rpc_call_once, rpc_call_key_init) != 0 ||
+   rpc_call_key_error != 0) {
+   rpc_createerr.cf_stat = RPC_SYSTEMERROR;
+   rpc_createerr.cf_error.re_errno = rpc_call_key_error;
+   return (rpc_createerr.cf_stat);
}
rcp = (struct rpc_call_private *)thr_getspecific(rpc_call_key);
}

Modified: stable/8/lib/libc/rpc/getnetconfig.c
==
--- stable/8/lib/libc/rpc/getnetconfig.cMon Mar 22 15:08:26 2010
(r205448)
+++ stable/8/lib/libc/rpc/getnetconfig.cMon Mar 22 15:52:26 2010
(r205449)
@@ -130,21 +130,29 @@ static struct netconfig *dup_ncp(struct 
 
 
 static FILE *nc_file;  /* for netconfig db */
-static pthread_mutex_t nc_file_lock = PTHREAD_MUTEX_INITIALIZER;
+static mutex_t nc_file_lock = MUTEX_INITIALIZER;
 
 static struct netconfig_info   ni = { 0, 0, NULL, NULL};
-static pthread_mutex_t ni_lock = PTHREAD_MUTEX_INITIALIZER;
+static mutex_t ni_lock = MUTEX_INITIALIZER;
 
+static thread_key_t nc_key;
+static once_t nc_once = ONCE_INITIALIZER;
+static int nc_key_error;
+
+static void
+nc_key_init(void)
+{
+
+   nc_key_error = thr_keycreate(nc_key, free);
+}
 
 #define MAXNETCONFIGLINE1000
 
 static int *
 __nc_error()
 {
-   static pthread_mutex_t nc_lock = PTHREAD_MUTEX_INITIALIZER;
-   static thread_key_t nc_key = 0;
static int nc_error = 0;
-   int error, *nc_addr;
+   int *nc_addr;
 
/*
 * Use the static `nc_error' if we 

svn commit: r205450 - stable/7/lib/libc/rpc

2010-03-22 Thread John Baldwin
Author: jhb
Date: Mon Mar 22 15:54:56 2010
New Revision: 205450
URL: http://svn.freebsd.org/changeset/base/205450

Log:
  MFC 204950,205020:
  Use thr_once() with once_t controls to initialize various thread_key_t
  objects used to provide per-thread storage in the RPC code.  Almost all
  of these used double-checking with a dedicated mutex (tsd_lock) to do this
  before.  However, that is not always safe with more relaxed memory orders.
  There were also other bugs, such as one in __rpc_createrr() that caused a
  new key to be allocated each time __rpc_createrr() was invoked.

Modified:
  stable/7/lib/libc/rpc/Symbol.map
  stable/7/lib/libc/rpc/clnt_simple.c
  stable/7/lib/libc/rpc/getnetconfig.c
  stable/7/lib/libc/rpc/key_call.c
  stable/7/lib/libc/rpc/mt_misc.c
  stable/7/lib/libc/rpc/mt_misc.h
  stable/7/lib/libc/rpc/rpc_generic.c
  stable/7/lib/libc/rpc/rpc_soc.c
Directory Properties:
  stable/7/lib/libc/   (props changed)
  stable/7/lib/libc/stdtime/   (props changed)

Modified: stable/7/lib/libc/rpc/Symbol.map
==
--- stable/7/lib/libc/rpc/Symbol.mapMon Mar 22 15:52:26 2010
(r205449)
+++ stable/7/lib/libc/rpc/Symbol.mapMon Mar 22 15:54:56 2010
(r205450)
@@ -239,9 +239,5 @@ FBSDprivate_1.0 {
__key_encryptsession_pk_LOCAL;
__key_decryptsession_pk_LOCAL;
__key_gendes_LOCAL;
-   __tsd_lock; /*
-* Why does usr.bin/rpcinfo/Makefile need rpc_generic.c?
-* Remove this hack if rpcinfo stops building with it.
-*/
__svc_clean_idle;
 };

Modified: stable/7/lib/libc/rpc/clnt_simple.c
==
--- stable/7/lib/libc/rpc/clnt_simple.c Mon Mar 22 15:52:26 2010
(r205449)
+++ stable/7/lib/libc/rpc/clnt_simple.c Mon Mar 22 15:54:56 2010
(r205450)
@@ -76,7 +76,11 @@ struct rpc_call_private {
charnettype[NETIDLEN];  /* Network type */
 };
 static struct rpc_call_private *rpc_call_private_main;
+static thread_key_t rpc_call_key;
+static once_t rpc_call_once = ONCE_INITIALIZER;
+static int rpc_call_key_error;
 
+static void rpc_call_key_init(void);
 static void rpc_call_destroy(void *);
 
 static void
@@ -91,6 +95,13 @@ rpc_call_destroy(void *vp)
}
 }
 
+static void
+rpc_call_key_init(void)
+{
+
+   rpc_call_key_error = thr_keycreate(rpc_call_key, rpc_call_destroy);
+}
+
 /*
  * This is the simplified interface to the client rpc layer.
  * The client handle is not destroyed here and is reused for
@@ -112,17 +123,16 @@ rpc_call(host, prognum, versnum, procnum
struct rpc_call_private *rcp = (struct rpc_call_private *) 0;
enum clnt_stat clnt_stat;
struct timeval timeout, tottimeout;
-   static thread_key_t rpc_call_key;
int main_thread = 1;
 
if ((main_thread = thr_main())) {
rcp = rpc_call_private_main;
} else {
-   if (rpc_call_key == 0) {
-   mutex_lock(tsd_lock);
-   if (rpc_call_key == 0)
-   thr_keycreate(rpc_call_key, rpc_call_destroy);
-   mutex_unlock(tsd_lock);
+   if (thr_once(rpc_call_once, rpc_call_key_init) != 0 ||
+   rpc_call_key_error != 0) {
+   rpc_createerr.cf_stat = RPC_SYSTEMERROR;
+   rpc_createerr.cf_error.re_errno = rpc_call_key_error;
+   return (rpc_createerr.cf_stat);
}
rcp = (struct rpc_call_private *)thr_getspecific(rpc_call_key);
}

Modified: stable/7/lib/libc/rpc/getnetconfig.c
==
--- stable/7/lib/libc/rpc/getnetconfig.cMon Mar 22 15:52:26 2010
(r205449)
+++ stable/7/lib/libc/rpc/getnetconfig.cMon Mar 22 15:54:56 2010
(r205450)
@@ -130,21 +130,29 @@ static struct netconfig *dup_ncp(struct 
 
 
 static FILE *nc_file;  /* for netconfig db */
-static pthread_mutex_t nc_file_lock = PTHREAD_MUTEX_INITIALIZER;
+static mutex_t nc_file_lock = MUTEX_INITIALIZER;
 
 static struct netconfig_info   ni = { 0, 0, NULL, NULL};
-static pthread_mutex_t ni_lock = PTHREAD_MUTEX_INITIALIZER;
+static mutex_t ni_lock = MUTEX_INITIALIZER;
 
+static thread_key_t nc_key;
+static once_t nc_once = ONCE_INITIALIZER;
+static int nc_key_error;
+
+static void
+nc_key_init(void)
+{
+
+   nc_key_error = thr_keycreate(nc_key, free);
+}
 
 #define MAXNETCONFIGLINE1000
 
 static int *
 __nc_error()
 {
-   static pthread_mutex_t nc_lock = PTHREAD_MUTEX_INITIALIZER;
-   static thread_key_t nc_key = 0;
static int nc_error = 0;
-   int error, *nc_addr;
+   int *nc_addr;
 
/*
 * Use the static `nc_error' if we are the main thread
@@ -153,15 +161,8 @@ __nc_error()

Re: svn commit: r205448 - in head/sys: amd64/include i386/include

2010-03-22 Thread John Baldwin
On Monday 22 March 2010 11:08:26 am John Baldwin wrote:
 Author: jhb
 Date: Mon Mar 22 15:08:26 2010
 New Revision: 205448
 URL: http://svn.freebsd.org/changeset/base/205448
 
 Log:
   Remove unneeded type specifiers from 64-bit constants.  The compiler
   infers their natural type from the constants' values.
   
   Submitted by:   bde
   MFC after:  3 days

Verified that *_mem.o did not change MD5 sums (MTRR-related constants).  mca.o 
did change MD5 sum on both architectures, but it was a harmless change.  A 
'shr' instruction became a 'sar' instruction.

-- 
John Baldwin
___
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: r205451 - stable/8/sbin/ipfw

2010-03-22 Thread Luigi Rizzo
Author: luigi
Date: Mon Mar 22 16:40:10 2010
New Revision: 205451
URL: http://svn.freebsd.org/changeset/base/205451

Log:
  mfc r205179: print correctly addresses with an OR block

Modified:
  stable/8/sbin/ipfw/ipfw2.c
Directory Properties:
  stable/8/sbin/ipfw/   (props changed)

Modified: stable/8/sbin/ipfw/ipfw2.c
==
--- stable/8/sbin/ipfw/ipfw2.c  Mon Mar 22 15:54:56 2010(r205450)
+++ stable/8/sbin/ipfw/ipfw2.c  Mon Mar 22 16:40:10 2010(r205451)
@@ -895,9 +895,9 @@ print_icmptypes(ipfw_insn_u32 *cmd)
 #defineHAVE_DSTIP  0x0004
 #defineHAVE_PROTO4 0x0008
 #defineHAVE_PROTO6 0x0010
+#defineHAVE_IP 0x0100
 #defineHAVE_OPTIONS0x8000
 
-#defineHAVE_IP (HAVE_PROTO | HAVE_SRCIP | HAVE_DSTIP)
 static void
 show_prerequisites(int *flags, int want, int cmd __unused)
 {
@@ -998,7 +998,9 @@ show_ipfw(struct ip_fw *rule, int pcwidt
switch(cmd-opcode) {
case O_CHECK_STATE:
printf(check-state);
-   flags = HAVE_IP; /* avoid printing anything else */
+   /* avoid printing anything else */
+   flags = HAVE_PROTO | HAVE_SRCIP |
+   HAVE_DSTIP | HAVE_IP;
break;
 
case O_ACCEPT:
@@ -1136,7 +1138,8 @@ show_ipfw(struct ip_fw *rule, int pcwidt
show_prerequisites(flags, HAVE_PROTO, 0);
printf( from any to any);
}
-   flags |= HAVE_IP | HAVE_OPTIONS;
+   flags |= HAVE_IP | HAVE_OPTIONS | HAVE_PROTO |
+HAVE_SRCIP | HAVE_DSTIP;
}
 
if (co.comment_only)
@@ -1225,9 +1228,12 @@ show_ipfw(struct ip_fw *rule, int pcwidt
break;
 
case O_IP_DSTPORT:
-   show_prerequisites(flags, HAVE_IP, 0);
+   show_prerequisites(flags,
+   HAVE_PROTO | HAVE_SRCIP |
+   HAVE_DSTIP | HAVE_IP, 0);
case O_IP_SRCPORT:
-   show_prerequisites(flags, HAVE_PROTO|HAVE_SRCIP, 0);
+   show_prerequisites(flags,
+   HAVE_PROTO | HAVE_SRCIP, 0);
if ((cmd-len  F_OR)  !or_block)
printf( {);
if (cmd-len  F_NOT)
@@ -1248,7 +1254,8 @@ show_ipfw(struct ip_fw *rule, int pcwidt
if ((flags  (HAVE_PROTO4 | HAVE_PROTO6)) 
!(flags  HAVE_PROTO))
show_prerequisites(flags,
-   HAVE_IP | HAVE_OPTIONS, 0);
+   HAVE_PROTO | HAVE_IP | HAVE_SRCIP |
+   HAVE_DSTIP | HAVE_OPTIONS, 0);
if (flags  HAVE_OPTIONS)
printf( proto);
if (pe)
@@ -1266,7 +1273,8 @@ show_ipfw(struct ip_fw *rule, int pcwidt
((cmd-opcode == O_IP4) 
(flags  HAVE_PROTO4)))
break;
-   show_prerequisites(flags, HAVE_IP | HAVE_OPTIONS, 0);
+   show_prerequisites(flags, HAVE_PROTO | HAVE_SRCIP |
+   HAVE_DSTIP | HAVE_IP | HAVE_OPTIONS, 0);
if ((cmd-len  F_OR)  !or_block)
printf( {);
if (cmd-len  F_NOT  cmd-opcode != O_IN)
@@ -1520,7 +1528,8 @@ show_ipfw(struct ip_fw *rule, int pcwidt
or_block = 0;
}
}
-   show_prerequisites(flags, HAVE_IP, 0);
+   show_prerequisites(flags, HAVE_PROTO | HAVE_SRCIP | HAVE_DSTIP
+ | HAVE_IP, 0);
if (comment)
printf( // %s, comment);
printf(\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: r205452 - head/sys/compat/x86bios

2010-03-22 Thread Jung-uk Kim
Author: jkim
Date: Mon Mar 22 17:30:34 2010
New Revision: 205452
URL: http://svn.freebsd.org/changeset/base/205452

Log:
  Fix i386 PAE kernel build.
  
  Reported by:  tinderbox

Modified:
  head/sys/compat/x86bios/x86bios.c

Modified: head/sys/compat/x86bios/x86bios.c
==
--- head/sys/compat/x86bios/x86bios.c   Mon Mar 22 16:40:10 2010
(r205451)
+++ head/sys/compat/x86bios/x86bios.c   Mon Mar 22 17:30:34 2010
(r205452)
@@ -555,7 +555,7 @@ x86bios_map_mem(void)
printf(x86bios:   ROM 0x%06x-0x%06x at %p\n,
X86BIOS_ROM_BASE, X86BIOS_MEM_SIZE - X86BIOS_SEG_SIZE - 1,
(void *)((vm_offset_t)x86bios_rom + X86BIOS_ROM_BASE -
-   x86bios_rom_phys));
+   (vm_offset_t)x86bios_rom_phys));
printf(x86bios: HIMEM 0x%06x-0x%06x at %p\n,
X86BIOS_MEM_SIZE - X86BIOS_SEG_SIZE, X86BIOS_MEM_SIZE - 1,
(void *)((vm_offset_t)x86bios_rom + X86BIOS_ROM_SIZE -
___
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: r205454 - head/sys/ia64/ia64

2010-03-22 Thread Marcel Moolenaar
Author: marcel
Date: Mon Mar 22 18:24:42 2010
New Revision: 205454
URL: http://svn.freebsd.org/changeset/base/205454

Log:
  o   Remove the pmap argument to pmap_invalidate_all() as it's not used
  other than in a potentially dangerous KASSERT.
  o   Hand-inline pmap_remove_page() as it's only called from 1 place and
  the abstraction that pmap_remove_page() provides is not enough to
  warrant the obfuscation. Eliminate the dangerous KASSERT in the
  process.
  o   In pmap_remove_pte(), remove the KASSERT for pmap being the current
  one as it's not safe in the face of CPU migration.

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

Modified: head/sys/ia64/ia64/pmap.c
==
--- head/sys/ia64/ia64/pmap.c   Mon Mar 22 17:57:00 2010(r205453)
+++ head/sys/ia64/ia64/pmap.c   Mon Mar 22 18:24:42 2010(r205454)
@@ -238,7 +238,7 @@ static pv_entry_t get_pv_entry(pmap_t lo
 static voidpmap_enter_quick_locked(pmap_t pmap, vm_offset_t va,
vm_page_t m, vm_prot_t prot);
 static voidpmap_free_pte(struct ia64_lpte *pte, vm_offset_t va);
-static voidpmap_invalidate_all(pmap_t pmap);
+static voidpmap_invalidate_all(void);
 static int pmap_remove_pte(pmap_t pmap, struct ia64_lpte *pte,
vm_offset_t va, pv_entry_t pv, int freepte);
 static int pmap_remove_vhpt(vm_offset_t va);
@@ -475,7 +475,7 @@ pmap_bootstrap()
/*
 * Clear out any random TLB entries left over from booting.
 */
-   pmap_invalidate_all(kernel_pmap);
+   pmap_invalidate_all();
 
map_gateway_page();
 }
@@ -575,16 +575,14 @@ pmap_invalidate_all_1(void *arg)
 }
 
 static void
-pmap_invalidate_all(pmap_t pmap)
+pmap_invalidate_all(void)
 {
 
-   KASSERT((pmap == kernel_pmap || pmap == PCPU_GET(md.current_pmap)),
-   (invalidating TLB for non-current pmap));
-
 #ifdef SMP
-   if (mp_ncpus  1)
+   if (mp_ncpus  1) {
smp_rendezvous(NULL, pmap_invalidate_all_1, NULL, NULL);
-   else
+   return;
+   }
 #endif
pmap_invalidate_all_1(NULL);
 }
@@ -1158,9 +1156,6 @@ pmap_remove_pte(pmap_t pmap, struct ia64
int error;
vm_page_t m;
 
-   KASSERT((pmap == kernel_pmap || pmap == PCPU_GET(md.current_pmap)),
-   (removing pte for non-current pmap));
-
/*
 * First remove from the VHPT.
 */
@@ -1319,23 +1314,6 @@ pmap_map(vm_offset_t *virt, vm_offset_t 
 }
 
 /*
- * Remove a single page from a process address space
- */
-static void
-pmap_remove_page(pmap_t pmap, vm_offset_t va)
-{
-   struct ia64_lpte *pte;
-
-   KASSERT((pmap == kernel_pmap || pmap == PCPU_GET(md.current_pmap)),
-   (removing page for non-current pmap));
-
-   pte = pmap_find_vhpt(va);
-   if (pte != NULL)
-   pmap_remove_pte(pmap, pte, va, 0, 1);
-   return;
-}
-
-/*
  * Remove the given range of addresses from the specified map.
  *
  * It is assumed that the start and end are properly
@@ -1362,7 +1340,9 @@ pmap_remove(pmap_t pmap, vm_offset_t sva
 * code.
 */
if (sva + PAGE_SIZE == eva) {
-   pmap_remove_page(pmap, sva);
+   pte = pmap_find_vhpt(sva);
+   if (pte != NULL)
+   pmap_remove_pte(pmap, pte, sva, 0, 1);
goto out;
}
 
@@ -1927,7 +1907,8 @@ pmap_remove_pages(pmap_t pmap)
pv_entry_t pv, npv;
 
if (pmap != vmspace_pmap(curthread-td_proc-p_vmspace)) {
-   printf(warning: pmap_remove_pages called with non-current 
pmap\n);
+   printf(warning: %s called with non-current pmap\n,
+   __func__);
return;
}
 
___
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: r205455 - head/sys/compat/x86bios

2010-03-22 Thread Jung-uk Kim
Author: jkim
Date: Mon Mar 22 18:43:36 2010
New Revision: 205455
URL: http://svn.freebsd.org/changeset/base/205455

Log:
  Support memory wraparound instead of high memory as VM86 mode does.
  
  Suggested by: delphij

Modified:
  head/sys/compat/x86bios/x86bios.c

Modified: head/sys/compat/x86bios/x86bios.c
==
--- head/sys/compat/x86bios/x86bios.c   Mon Mar 22 18:24:42 2010
(r205454)
+++ head/sys/compat/x86bios/x86bios.c   Mon Mar 22 18:43:36 2010
(r205455)
@@ -56,8 +56,7 @@ __FBSDID($FreeBSD$);
 
 #defineX86BIOS_IVT_SIZE0x0500  /* 1K + 256 (BDA) */
 #defineX86BIOS_SEG_SIZE0x0001  /* 64K */
-#defineX86BIOS_MEM_SIZE(0x0010 + X86BIOS_SEG_SIZE)
-   /* 1M + 64K (high memory) */
+#defineX86BIOS_MEM_SIZE0x0010  /* 1M */
 
 #defineX86BIOS_IVT_BASE0x
 #defineX86BIOS_RAM_BASE0x1000
@@ -115,9 +114,11 @@ x86bios_get_pages(uint32_t offset, size_
 {
int i;
 
-   if (offset + size  X86BIOS_MEM_SIZE)
+   if (offset + size  X86BIOS_MEM_SIZE + X86BIOS_IVT_SIZE)
return (NULL);
 
+   if (offset = X86BIOS_MEM_SIZE)
+   offset -= X86BIOS_MEM_SIZE;
i = offset / X86BIOS_PAGE_SIZE;
if (x86bios_map[i] != 0)
return ((void *)(x86bios_map[i] + offset -
@@ -526,13 +527,6 @@ x86bios_map_mem(void)
return (1);
}
 #endif
-   /* Change attribute for high memory. */
-   if (pmap_change_attr((vm_offset_t)x86bios_rom + X86BIOS_ROM_SIZE -
-   X86BIOS_SEG_SIZE, X86BIOS_SEG_SIZE, PAT_WRITE_BACK) != 0) {
-   pmap_unmapdev((vm_offset_t)x86bios_ivt, X86BIOS_IVT_SIZE);
-   pmap_unmapdev((vm_offset_t)x86bios_rom, X86BIOS_ROM_SIZE);
-   return (1);
-   }
 
x86bios_seg = contigmalloc(X86BIOS_SEG_SIZE, M_DEVBUF, M_WAITOK,
X86BIOS_RAM_BASE, x86bios_rom_phys, X86BIOS_PAGE_SIZE, 0);
@@ -556,10 +550,6 @@ x86bios_map_mem(void)
X86BIOS_ROM_BASE, X86BIOS_MEM_SIZE - X86BIOS_SEG_SIZE - 1,
(void *)((vm_offset_t)x86bios_rom + X86BIOS_ROM_BASE -
(vm_offset_t)x86bios_rom_phys));
-   printf(x86bios: HIMEM 0x%06x-0x%06x at %p\n,
-   X86BIOS_MEM_SIZE - X86BIOS_SEG_SIZE, X86BIOS_MEM_SIZE - 1,
-   (void *)((vm_offset_t)x86bios_rom + X86BIOS_ROM_SIZE -
-   X86BIOS_SEG_SIZE));
}
 
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: r205458 - stable/7/sys/net

2010-03-22 Thread Pyun YongHyeon
Author: yongari
Date: Mon Mar 22 19:04:02 2010
New Revision: 205458
URL: http://svn.freebsd.org/changeset/base/205458

Log:
  MFC r204149:
Add TSO support on VLANs. Intentionally separated IFCAP_VLAN_HWTSO
from IFCAP_VLAN_HWTAGGING. I think some hardwares may be able to
TSO over VLAN without VLAN hardware tagging.
Driver changes and userland support will follow.

Modified:
  stable/7/sys/net/if.h
  stable/7/sys/net/if_vlan.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/net/if.h
==
--- stable/7/sys/net/if.h   Mon Mar 22 18:51:56 2010(r205457)
+++ stable/7/sys/net/if.h   Mon Mar 22 19:04:02 2010(r205458)
@@ -217,6 +217,7 @@ struct if_data {
 #defineIFCAP_TOE4  0x04000 /* interface can offload TCP */
 #defineIFCAP_TOE6  0x08000 /* interface can offload TCP6 */
 #defineIFCAP_VLAN_HWFILTER 0x1 /* interface hw can filter vlan 
tag */
+#defineIFCAP_VLAN_HWTSO0x4 /* can do IFCAP_TSO on VLANs */
 
 #define IFCAP_HWCSUM   (IFCAP_RXCSUM | IFCAP_TXCSUM)
 #defineIFCAP_TSO   (IFCAP_TSO4 | IFCAP_TSO6)

Modified: stable/7/sys/net/if_vlan.c
==
--- stable/7/sys/net/if_vlan.c  Mon Mar 22 18:51:56 2010(r205457)
+++ stable/7/sys/net/if_vlan.c  Mon Mar 22 19:04:02 2010(r205458)
@@ -1271,11 +1271,26 @@ vlan_capabilities(struct ifvlan *ifv)
if (p-if_capenable  IFCAP_VLAN_HWCSUM 
p-if_capenable  IFCAP_VLAN_HWTAGGING) {
ifp-if_capenable = p-if_capenable  IFCAP_HWCSUM;
-   ifp-if_hwassist = p-if_hwassist;
+   ifp-if_hwassist = p-if_hwassist  (CSUM_IP | CSUM_TCP |
+   CSUM_UDP | CSUM_SCTP | CSUM_IP_FRAGS | CSUM_FRAGMENT);
} else {
ifp-if_capenable = 0;
ifp-if_hwassist = 0;
}
+   /*
+* If the parent interface can do TSO on VLANs then
+* propagate the hardware-assisted flag. TSO on VLANs
+* does not necessarily require hardware VLAN tagging.
+*/
+   if (p-if_capabilities  IFCAP_VLAN_HWTSO)
+   ifp-if_capabilities |= p-if_capabilities  IFCAP_TSO;
+   if (p-if_capenable  IFCAP_VLAN_HWTSO) {
+   ifp-if_capenable |= p-if_capenable  IFCAP_TSO;
+   ifp-if_hwassist |= p-if_hwassist  CSUM_TSO;
+   } else {
+   ifp-if_capenable = ~(p-if_capenable  IFCAP_TSO);
+   ifp-if_hwassist = ~(p-if_hwassist  CSUM_TSO);
+   }
 }
 
 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: r205459 - stable/7/sbin/ifconfig

2010-03-22 Thread Pyun YongHyeon
Author: yongari
Date: Mon Mar 22 19:36:47 2010
New Revision: 205459
URL: http://svn.freebsd.org/changeset/base/205459

Log:
  MFC r182414:
Add support in ifconfig to control the vlan hardware filter feature.

Modified:
  stable/7/sbin/ifconfig/ifconfig.8
  stable/7/sbin/ifconfig/ifconfig.c
  stable/7/sbin/ifconfig/ifvlan.c
Directory Properties:
  stable/7/sbin/ifconfig/   (props changed)

Modified: stable/7/sbin/ifconfig/ifconfig.8
==
--- stable/7/sbin/ifconfig/ifconfig.8   Mon Mar 22 19:04:02 2010
(r205458)
+++ stable/7/sbin/ifconfig/ifconfig.8   Mon Mar 22 19:36:47 2010
(r205459)
@@ -402,18 +402,20 @@ they support in their capabilities.
 is a synonym for enabling all available WOL mechanisms.
 To disable WOL use
 .Fl wol .
-.It Cm vlanmtu , vlanhwtag
+.It Cm vlanmtu , vlanhwtag, vlanhwfilter
 If the driver offers user-configurable VLAN support, enable
-reception of extended frames or tag processing in hardware,
+reception of extended frames, tag processing in hardware, or
+frame filtering in hardware,
 respectively.
 Note that this must be issued on a physical interface associated with
 .Xr vlan 4 ,
 not on a
 .Xr vlan 4
 interface itself.
-.It Fl vlanmtu , vlanhwtag
+.It Fl vlanmtu , vlanhwtag, vlanhwfilter
 If the driver offers user-configurable VLAN support, disable
-reception of extended frames or tag processing in hardware,
+reception of extended frames, tag processing in hardware, or
+frame filtering in hardware,
 respectively.
 .It Cm polling
 Turn on

Modified: stable/7/sbin/ifconfig/ifconfig.c
==
--- stable/7/sbin/ifconfig/ifconfig.c   Mon Mar 22 19:04:02 2010
(r205458)
+++ stable/7/sbin/ifconfig/ifconfig.c   Mon Mar 22 19:36:47 2010
(r205459)
@@ -777,7 +777,8 @@ setifname(const char *val, int dummy __u
 
 #defineIFCAPBITS \
 \020\1RXCSUM\2TXCSUM\3NETCONS\4VLAN_MTU\5VLAN_HWTAGGING\6JUMBO_MTU\7POLLING \
-\10VLAN_HWCSUM\11TSO4\12TSO6\13LRO\14WOL_UCAST\15WOL_MCAST\16WOL_MAGIC
+\10VLAN_HWCSUM\11TSO4\12TSO6\13LRO\14WOL_UCAST\15WOL_MCAST\16WOL_MAGIC \
+\21VLAN_HWFILTER
 
 /*
  * Print the status of the interface.  If an address family was

Modified: stable/7/sbin/ifconfig/ifvlan.c
==
--- stable/7/sbin/ifconfig/ifvlan.c Mon Mar 22 19:04:02 2010
(r205458)
+++ stable/7/sbin/ifconfig/ifvlan.c Mon Mar 22 19:36:47 2010
(r205459)
@@ -180,6 +180,8 @@ static struct cmd vlan_cmds[] = {
DEF_CMD(-vlanmtu, -IFCAP_VLAN_MTU,setifcap),
DEF_CMD(vlanhwtag,IFCAP_VLAN_HWTAGGING,   setifcap),
DEF_CMD(-vlanhwtag,   -IFCAP_VLAN_HWTAGGING,  setifcap),
+   DEF_CMD(vlanhwfilter, IFCAP_VLAN_HWFILTER,setifcap),
+   DEF_CMD(-vlanhwfilter, -IFCAP_VLAN_HWFILTER,  setifcap),
 };
 static struct afswtch af_vlan = {
.af_name= af_vlan,
___
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: r205460 - stable/7/sbin/ifconfig

2010-03-22 Thread Pyun YongHyeon
Author: yongari
Date: Mon Mar 22 19:50:33 2010
New Revision: 205460
URL: http://svn.freebsd.org/changeset/base/205460

Log:
  MFC r204150:
Add TSO support on VLAN in fconfig(8).

Modified:
  stable/7/sbin/ifconfig/ifconfig.8
  stable/7/sbin/ifconfig/ifconfig.c
  stable/7/sbin/ifconfig/ifvlan.c
Directory Properties:
  stable/7/sbin/ifconfig/   (props changed)

Modified: stable/7/sbin/ifconfig/ifconfig.8
==
--- stable/7/sbin/ifconfig/ifconfig.8   Mon Mar 22 19:36:47 2010
(r205459)
+++ stable/7/sbin/ifconfig/ifconfig.8   Mon Mar 22 19:50:33 2010
(r205460)
@@ -28,7 +28,7 @@
 .\ From: @(#)ifconfig.8   8.3 (Berkeley) 1/5/94
 .\ $FreeBSD$
 .\
-.Dd October 19, 2008
+.Dd February 20, 2010
 .Dt IFCONFIG 8
 .Os
 .Sh NAME
@@ -402,20 +402,20 @@ they support in their capabilities.
 is a synonym for enabling all available WOL mechanisms.
 To disable WOL use
 .Fl wol .
-.It Cm vlanmtu , vlanhwtag, vlanhwfilter
+.It Cm vlanmtu , vlanhwtag, vlanhwfilter, vlanhwtso
 If the driver offers user-configurable VLAN support, enable
-reception of extended frames, tag processing in hardware, or
-frame filtering in hardware,
+reception of extended frames, tag processing in hardware,
+frame filtering in hardware, or TSO on VLAN,
 respectively.
 Note that this must be issued on a physical interface associated with
 .Xr vlan 4 ,
 not on a
 .Xr vlan 4
 interface itself.
-.It Fl vlanmtu , vlanhwtag, vlanhwfilter
+.It Fl vlanmtu , vlanhwtag, vlanhwfilter, vlanhwtso
 If the driver offers user-configurable VLAN support, disable
-reception of extended frames, tag processing in hardware, or
-frame filtering in hardware,
+reception of extended frames, tag processing in hardware,
+frame filtering in hardware, or TSO on VLAN,
 respectively.
 .It Cm polling
 Turn on

Modified: stable/7/sbin/ifconfig/ifconfig.c
==
--- stable/7/sbin/ifconfig/ifconfig.c   Mon Mar 22 19:36:47 2010
(r205459)
+++ stable/7/sbin/ifconfig/ifconfig.c   Mon Mar 22 19:50:33 2010
(r205460)
@@ -778,7 +778,7 @@ setifname(const char *val, int dummy __u
 #defineIFCAPBITS \
 \020\1RXCSUM\2TXCSUM\3NETCONS\4VLAN_MTU\5VLAN_HWTAGGING\6JUMBO_MTU\7POLLING \
 \10VLAN_HWCSUM\11TSO4\12TSO6\13LRO\14WOL_UCAST\15WOL_MCAST\16WOL_MAGIC \
-\21VLAN_HWFILTER
+\21VLAN_HWFILTER\23VLAN_HWTSO
 
 /*
  * Print the status of the interface.  If an address family was

Modified: stable/7/sbin/ifconfig/ifvlan.c
==
--- stable/7/sbin/ifconfig/ifvlan.c Mon Mar 22 19:36:47 2010
(r205459)
+++ stable/7/sbin/ifconfig/ifvlan.c Mon Mar 22 19:50:33 2010
(r205460)
@@ -182,6 +182,8 @@ static struct cmd vlan_cmds[] = {
DEF_CMD(-vlanhwtag,   -IFCAP_VLAN_HWTAGGING,  setifcap),
DEF_CMD(vlanhwfilter, IFCAP_VLAN_HWFILTER,setifcap),
DEF_CMD(-vlanhwfilter, -IFCAP_VLAN_HWFILTER,  setifcap),
+   DEF_CMD(-vlanhwtso,   -IFCAP_VLAN_HWTSO,  setifcap),
+   DEF_CMD(vlanhwtso,IFCAP_VLAN_HWTSO,   setifcap),
 };
 static struct afswtch af_vlan = {
.af_name= af_vlan,
___
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: r205461 - stable/8/etc/ppp

2010-03-22 Thread Jung-uk Kim
Author: jkim
Date: Mon Mar 22 19:50:57 2010
New Revision: 205461
URL: http://svn.freebsd.org/changeset/base/205461

Log:
  MFC:  r203943
  
  Remove COMPILATIONDATE from the default section.  This string is no longer
  being substituted since r162063.

Modified:
  stable/8/etc/ppp/ppp.conf
Directory Properties:
  stable/8/etc/   (props changed)

Modified: stable/8/etc/ppp/ppp.conf
==
--- stable/8/etc/ppp/ppp.conf   Mon Mar 22 19:50:33 2010(r205460)
+++ stable/8/etc/ppp/ppp.conf   Mon Mar 22 19:50:57 2010(r205461)
@@ -10,7 +10,7 @@
 
 default:
  set log Phase Chat LCP IPCP CCP tun command
- ident user-ppp VERSION (built COMPILATIONDATE)
+ ident user-ppp VERSION
 
  # Ensure that device references the correct serial port
  # for your modem. (cuau0 = COM1, cuau1 = COM2)
___
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: r205462 - stable/7/etc/ppp

2010-03-22 Thread Jung-uk Kim
Author: jkim
Date: Mon Mar 22 19:52:06 2010
New Revision: 205462
URL: http://svn.freebsd.org/changeset/base/205462

Log:
  MFC:  r203943
  
  Remove COMPILATIONDATE from the default section.  This string is no longer
  being substituted since r162063.

Modified:
  stable/7/etc/ppp/ppp.conf
Directory Properties:
  stable/7/etc/   (props changed)

Modified: stable/7/etc/ppp/ppp.conf
==
--- stable/7/etc/ppp/ppp.conf   Mon Mar 22 19:50:57 2010(r205461)
+++ stable/7/etc/ppp/ppp.conf   Mon Mar 22 19:52:06 2010(r205462)
@@ -10,7 +10,7 @@
 
 default:
  set log Phase Chat LCP IPCP CCP tun command
- ident user-ppp VERSION (built COMPILATIONDATE)
+ ident user-ppp VERSION
 
  # Ensure that device references the correct serial port
  # for your modem. (cuad0 = COM1, cuad1 = COM2)
___
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: r205463 - stable/8/sys/net

2010-03-22 Thread Jung-uk Kim
Author: jkim
Date: Mon Mar 22 19:59:00 2010
New Revision: 205463
URL: http://svn.freebsd.org/changeset/base/205463

Log:
  MFC:  r205092
  
  Tidy up callout for select(2) and read timeout.
  
  - Add a missing callout_drain(9) before the descriptor deallocation.[1]
  - Prefer callout_init_mtx(9) over callout_init(9) and let the callout
  subsystem handle the mutex for callout function.
  
  PR:   kern/144453
  Submitted by: Alexander Sack (asack at niksun dot com)[1]

Modified:
  stable/8/sys/net/bpf.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)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/net/bpf.c
==
--- stable/8/sys/net/bpf.c  Mon Mar 22 19:52:06 2010(r205462)
+++ stable/8/sys/net/bpf.c  Mon Mar 22 19:59:00 2010(r205463)
@@ -611,6 +611,7 @@ bpf_dtor(void *data)
mac_bpfdesc_destroy(d);
 #endif /* MAC */
knlist_destroy(d-bd_sel.si_note);
+   callout_drain(d-bd_callout);
bpf_freed(d);
free(d, M_BPF);
 }
@@ -648,7 +649,7 @@ bpfopen(struct cdev *dev, int flags, int
mac_bpfdesc_create(td-td_ucred, d);
 #endif
mtx_init(d-bd_mtx, devtoname(dev), bpf cdev lock, MTX_DEF);
-   callout_init(d-bd_callout, CALLOUT_MPSAFE);
+   callout_init_mtx(d-bd_callout, d-bd_mtx, 0);
knlist_init_mtx(d-bd_sel.si_note, d-bd_mtx);
 
return (0);
@@ -804,13 +805,15 @@ bpf_timed_out(void *arg)
 {
struct bpf_d *d = (struct bpf_d *)arg;
 
-   BPFD_LOCK(d);
+   BPFD_LOCK_ASSERT(d);
+
+   if (callout_pending(d-bd_callout) || !callout_active(d-bd_callout))
+   return;
if (d-bd_state == BPF_WAITING) {
d-bd_state = BPF_TIMED_OUT;
if (d-bd_slen != 0)
bpf_wakeup(d);
}
-   BPFD_UNLOCK(d);
 }
 
 static int
___
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: r205464 - stable/7/sys/net

2010-03-22 Thread Jung-uk Kim
Author: jkim
Date: Mon Mar 22 20:12:10 2010
New Revision: 205464
URL: http://svn.freebsd.org/changeset/base/205464

Log:
  MFC:  r205092
  
  Tidy up callout for select(2) and read timeout.
  
  - Add a missing callout_drain(9) before the descriptor deallocation.[1]
  - Prefer callout_init_mtx(9) over callout_init(9) and let the callout
  subsystem handle the mutex for callout function.
  
  PR:   kern/144453
  Submitted by: Alexander Sack (asack at niksun dot com)[1]

Modified:
  stable/7/sys/net/bpf.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/net/bpf.c
==
--- stable/7/sys/net/bpf.c  Mon Mar 22 19:59:00 2010(r205463)
+++ stable/7/sys/net/bpf.c  Mon Mar 22 20:12:10 2010(r205464)
@@ -424,7 +424,7 @@ bpfopen(struct cdev *dev, int flags, int
mac_create_bpfdesc(td-td_ucred, d);
 #endif
mtx_init(d-bd_mtx, devtoname(dev), bpf cdev lock, MTX_DEF);
-   callout_init(d-bd_callout, CALLOUT_MPSAFE);
+   callout_init_mtx(d-bd_callout, d-bd_mtx, 0);
knlist_init_mtx(d-bd_sel.si_note, d-bd_mtx);
 
return (0);
@@ -455,6 +455,7 @@ bpfclose(struct cdev *dev, int flags, in
mac_destroy_bpfdesc(d);
 #endif /* MAC */
knlist_destroy(d-bd_sel.si_note);
+   callout_drain(d-bd_callout);
bpf_freed(d);
dev-si_drv1 = NULL;
free(d, M_BPF);
@@ -615,13 +616,15 @@ bpf_timed_out(void *arg)
 {
struct bpf_d *d = (struct bpf_d *)arg;
 
-   BPFD_LOCK(d);
+   BPFD_LOCK_ASSERT(d);
+
+   if (callout_pending(d-bd_callout) || !callout_active(d-bd_callout))
+   return;
if (d-bd_state == BPF_WAITING) {
d-bd_state = BPF_TIMED_OUT;
if (d-bd_slen != 0)
bpf_wakeup(d);
}
-   BPFD_UNLOCK(d);
 }
 
 static int
___
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: r205465 - stable/6/sys/net

2010-03-22 Thread Jung-uk Kim
Author: jkim
Date: Mon Mar 22 20:21:22 2010
New Revision: 205465
URL: http://svn.freebsd.org/changeset/base/205465

Log:
  MFC:  r205092
  
  Tidy up callout for select(2) and read timeout.
  
  - Add a missing callout_drain(9) before the descriptor deallocation.[1]
  - Prefer callout_init_mtx(9) over callout_init(9) and let the callout
  subsystem handle the mutex for callout function.
  
  PR:   kern/144453
  Submitted by: Alexander Sack (asack at niksun dot com)[1]

Modified:
  stable/6/sys/net/bpf.c
Directory Properties:
  stable/6/sys/   (props changed)
  stable/6/sys/contrib/pf/   (props changed)
  stable/6/sys/dev/cxgb/   (props changed)

Modified: stable/6/sys/net/bpf.c
==
--- stable/6/sys/net/bpf.c  Mon Mar 22 20:12:10 2010(r205464)
+++ stable/6/sys/net/bpf.c  Mon Mar 22 20:21:22 2010(r205465)
@@ -398,7 +398,7 @@ bpfopen(struct cdev *dev, int flags, int
mac_create_bpfdesc(td-td_ucred, d);
 #endif
mtx_init(d-bd_mtx, devtoname(dev), bpf cdev lock, MTX_DEF);
-   callout_init(d-bd_callout, NET_CALLOUT_MPSAFE);
+   callout_init_mtx(d-bd_callout, d-bd_mtx, 0);
knlist_init(d-bd_sel.si_note, d-bd_mtx, NULL, NULL, NULL);
 
return (0);
@@ -429,6 +429,7 @@ bpfclose(struct cdev *dev, int flags, in
mac_destroy_bpfdesc(d);
 #endif /* MAC */
knlist_destroy(d-bd_sel.si_note);
+   callout_drain(d-bd_callout);
bpf_freed(d);
dev-si_drv1 = NULL;
free(d, M_BPF);
@@ -577,13 +578,15 @@ bpf_timed_out(void *arg)
 {
struct bpf_d *d = (struct bpf_d *)arg;
 
-   BPFD_LOCK(d);
+   BPFD_LOCK_ASSERT(d);
+
+   if (callout_pending(d-bd_callout) || !callout_active(d-bd_callout))
+   return;
if (d-bd_state == BPF_WAITING) {
d-bd_state = BPF_TIMED_OUT;
if (d-bd_slen != 0)
bpf_wakeup(d);
}
-   BPFD_UNLOCK(d);
 }
 
 static int
___
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: r205467 - stable/6/sys/net

2010-03-22 Thread Jung-uk Kim
Author: jkim
Date: Mon Mar 22 20:26:52 2010
New Revision: 205467
URL: http://svn.freebsd.org/changeset/base/205467

Log:
  MFC:  r204105
  
  Return partially filled buffer for non-blocking read(2)
  in non-immediate mode.
  
  PR:   kern/143855
  Submitted by: Guy Harris (guy at alum dot mit dot edu)

Modified:
  stable/6/sys/net/bpf.c
Directory Properties:
  stable/6/sys/   (props changed)
  stable/6/sys/contrib/pf/   (props changed)
  stable/6/sys/dev/cxgb/   (props changed)

Modified: stable/6/sys/net/bpf.c
==
--- stable/6/sys/net/bpf.c  Mon Mar 22 20:24:00 2010(r205466)
+++ stable/6/sys/net/bpf.c  Mon Mar 22 20:26:52 2010(r205467)
@@ -456,8 +456,9 @@ static  int
 bpfread(struct cdev *dev, struct uio *uio, int ioflag)
 {
struct bpf_d *d = dev-si_drv1;
-   int timed_out;
int error;
+   int non_block;
+   int timed_out;
 
/*
 * Restrict application to use a buffer the same size as
@@ -466,6 +467,8 @@ bpfread(struct cdev *dev, struct uio *ui
if (uio-uio_resid != d-bd_bufsize)
return (EINVAL);
 
+   non_block = ((ioflag  O_NONBLOCK) != 0);
+
BPFD_LOCK(d);
d-bd_pid = curthread-td_proc-p_pid;
if (d-bd_state == BPF_WAITING)
@@ -478,14 +481,20 @@ bpfread(struct cdev *dev, struct uio *ui
 * have arrived to fill the store buffer.
 */
while (d-bd_hbuf == NULL) {
-   if ((d-bd_immediate || timed_out)  d-bd_slen != 0) {
+   if (d-bd_slen != 0) {
/*
 * A packet(s) either arrived since the previous
 * read or arrived while we were asleep.
-* Rotate the buffers and return what's here.
 */
-   ROTATE_BUFFERS(d);
-   break;
+   if (d-bd_immediate || non_block || timed_out) {
+   /*
+* Rotate the buffers and return what's here
+* if we are in immediate mode, non-blocking
+* flag is set, or this descriptor timed out.
+*/
+   ROTATE_BUFFERS(d);
+   break;
+   }
}
 
/*
@@ -499,7 +508,7 @@ bpfread(struct cdev *dev, struct uio *ui
return (ENXIO);
}
 
-   if (ioflag  O_NONBLOCK) {
+   if (non_block) {
BPFD_UNLOCK(d);
return (EWOULDBLOCK);
}
___
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: r205468 - stable/8/sys/fs/fdescfs

2010-03-22 Thread Jung-uk Kim
Author: jkim
Date: Mon Mar 22 20:36:35 2010
New Revision: 205468
URL: http://svn.freebsd.org/changeset/base/205468

Log:
  MFC:  r205223
  
  Fix a long standing regression of readdir(3) in fdescfs(5) introduced
  in r1.48.  We were stopping at the first null pointer when multiple file
  descriptors were opened and one in the middle was closed.  This restores
  traditional behaviour of fdescfs.

Modified:
  stable/8/sys/fs/fdescfs/fdesc_vnops.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)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/fs/fdescfs/fdesc_vnops.c
==
--- stable/8/sys/fs/fdescfs/fdesc_vnops.c   Mon Mar 22 20:26:52 2010
(r205467)
+++ stable/8/sys/fs/fdescfs/fdesc_vnops.c   Mon Mar 22 20:36:35 2010
(r205468)
@@ -522,11 +522,10 @@ fdesc_readdir(ap)
 
FILEDESC_SLOCK(fdp);
while (i  fdp-fd_nfiles + 2  uio-uio_resid = UIO_MX) {
+   bzero((caddr_t)dp, UIO_MX);
switch (i) {
case 0: /* `.' */
case 1: /* `..' */
-   bzero((caddr_t)dp, UIO_MX);
-
dp-d_fileno = i + FD_ROOT;
dp-d_namlen = i + 1;
dp-d_reclen = UIO_MX;
@@ -535,26 +534,24 @@ fdesc_readdir(ap)
dp-d_type = DT_DIR;
break;
default:
-   if (fdp-fd_ofiles[fcnt] == NULL) {
-   FILEDESC_SUNLOCK(fdp);
-   goto done;
-   }
-
-   bzero((caddr_t) dp, UIO_MX);
+   if (fdp-fd_ofiles[fcnt] == NULL)
+   break;
dp-d_namlen = sprintf(dp-d_name, %d, fcnt);
dp-d_reclen = UIO_MX;
dp-d_type = DT_UNKNOWN;
dp-d_fileno = i + FD_DESC;
break;
}
-   /*
-* And ship to userland
-*/
-   FILEDESC_SUNLOCK(fdp);
-   error = uiomove(dp, UIO_MX, uio);
-   if (error)
-   goto done;
-   FILEDESC_SLOCK(fdp);
+   if (dp-d_namlen != 0) {
+   /*
+* And ship to userland
+*/
+   FILEDESC_SUNLOCK(fdp);
+   error = uiomove(dp, UIO_MX, uio);
+   if (error)
+   goto done;
+   FILEDESC_SLOCK(fdp);
+   }
i++;
fcnt++;
}
___
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: r205469 - stable/7/sys/fs/fdescfs

2010-03-22 Thread Jung-uk Kim
Author: jkim
Date: Mon Mar 22 20:41:44 2010
New Revision: 205469
URL: http://svn.freebsd.org/changeset/base/205469

Log:
  MFC:  r205223
  
  Fix a long standing regression of readdir(3) in fdescfs(5) introduced
  in r1.48.  We were stopping at the first null pointer when multiple file
  descriptors were opened and one in the middle was closed.  This restores
  traditional behaviour of fdescfs.

Modified:
  stable/7/sys/fs/fdescfs/fdesc_vnops.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/fs/fdescfs/fdesc_vnops.c
==
--- stable/7/sys/fs/fdescfs/fdesc_vnops.c   Mon Mar 22 20:36:35 2010
(r205468)
+++ stable/7/sys/fs/fdescfs/fdesc_vnops.c   Mon Mar 22 20:41:44 2010
(r205469)
@@ -568,11 +568,10 @@ fdesc_readdir(ap)
 
FILEDESC_SLOCK(fdp);
while (i  fdp-fd_nfiles + 2  uio-uio_resid = UIO_MX) {
+   bzero((caddr_t)dp, UIO_MX);
switch (i) {
case 0: /* `.' */
case 1: /* `..' */
-   bzero((caddr_t)dp, UIO_MX);
-
dp-d_fileno = i + FD_ROOT;
dp-d_namlen = i + 1;
dp-d_reclen = UIO_MX;
@@ -581,26 +580,24 @@ fdesc_readdir(ap)
dp-d_type = DT_DIR;
break;
default:
-   if (fdp-fd_ofiles[fcnt] == NULL) {
-   FILEDESC_SUNLOCK(fdp);
-   goto done;
-   }
-
-   bzero((caddr_t) dp, UIO_MX);
+   if (fdp-fd_ofiles[fcnt] == NULL)
+   break;
dp-d_namlen = sprintf(dp-d_name, %d, fcnt);
dp-d_reclen = UIO_MX;
dp-d_type = DT_UNKNOWN;
dp-d_fileno = i + FD_DESC;
break;
}
-   /*
-* And ship to userland
-*/
-   FILEDESC_SUNLOCK(fdp);
-   error = uiomove(dp, UIO_MX, uio);
-   if (error)
-   goto done;
-   FILEDESC_SLOCK(fdp);
+   if (dp-d_namlen != 0) {
+   /*
+* And ship to userland
+*/
+   FILEDESC_SUNLOCK(fdp);
+   error = uiomove(dp, UIO_MX, uio);
+   if (error)
+   goto done;
+   FILEDESC_SLOCK(fdp);
+   }
i++;
fcnt++;
}
___
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: r205470 - stable/6/sys/fs/fdescfs

2010-03-22 Thread Jung-uk Kim
Author: jkim
Date: Mon Mar 22 20:52:52 2010
New Revision: 205470
URL: http://svn.freebsd.org/changeset/base/205470

Log:
  MFC:  r205223
  
  Fix a long standing regression of readdir(3) in fdescfs(5) introduced
  in r1.48.  We were stopping at the first null pointer when multiple file
  descriptors were opened and one in the middle was closed.  This restores
  traditional behaviour of fdescfs.

Modified:
  stable/6/sys/fs/fdescfs/fdesc_vnops.c
Directory Properties:
  stable/6/sys/   (props changed)
  stable/6/sys/contrib/pf/   (props changed)
  stable/6/sys/dev/cxgb/   (props changed)

Modified: stable/6/sys/fs/fdescfs/fdesc_vnops.c
==
--- stable/6/sys/fs/fdescfs/fdesc_vnops.c   Mon Mar 22 20:41:44 2010
(r205469)
+++ stable/6/sys/fs/fdescfs/fdesc_vnops.c   Mon Mar 22 20:52:52 2010
(r205470)
@@ -440,11 +440,10 @@ fdesc_readdir(ap)
 
FILEDESC_LOCK_FAST(fdp);
while (i  fdp-fd_nfiles + 2  uio-uio_resid = UIO_MX) {
+   bzero((caddr_t)dp, UIO_MX);
switch (i) {
case 0: /* `.' */
case 1: /* `..' */
-   bzero((caddr_t)dp, UIO_MX);
-
dp-d_fileno = i + FD_ROOT;
dp-d_namlen = i + 1;
dp-d_reclen = UIO_MX;
@@ -453,26 +452,24 @@ fdesc_readdir(ap)
dp-d_type = DT_DIR;
break;
default:
-   if (fdp-fd_ofiles[fcnt] == NULL) {
-   FILEDESC_UNLOCK_FAST(fdp);
-   goto done;
-   }
-
-   bzero((caddr_t) dp, UIO_MX);
+   if (fdp-fd_ofiles[fcnt] == NULL)
+   break;
dp-d_namlen = sprintf(dp-d_name, %d, fcnt);
dp-d_reclen = UIO_MX;
dp-d_type = DT_UNKNOWN;
dp-d_fileno = i + FD_DESC;
break;
}
-   /*
-* And ship to userland
-*/
-   FILEDESC_UNLOCK_FAST(fdp);
-   error = uiomove(dp, UIO_MX, uio);
-   if (error)
-   goto done;
-   FILEDESC_LOCK_FAST(fdp);
+   if (dp-d_namlen != 0) {
+   /*
+* And ship to userland
+*/
+   FILEDESC_UNLOCK_FAST(fdp);
+   error = uiomove(dp, UIO_MX, uio);
+   if (error)
+   goto done;
+   FILEDESC_LOCK_FAST(fdp);
+   }
i++;
fcnt++;
}
___
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: r205471 - in head: . lib/libz lib/libz/contrib lib/libz/doc sys/sys

2010-03-22 Thread Xin LI
Author: delphij
Date: Mon Mar 22 21:11:55 2010
New Revision: 205471
URL: http://svn.freebsd.org/changeset/base/205471

Log:
  Update to zlib 1.2.4 and add versioned symbols to the
  library.
  
  Sponsored by: iXsystems, Inc.

Added:
  head/lib/libz/Symbol.map
 - copied unchanged from r205470, user/delphij/libz/Symbol.map
  head/lib/libz/Versions.def
 - copied unchanged from r205470, user/delphij/libz/Versions.def
  head/lib/libz/contrib/
 - copied from r205470, user/delphij/libz/contrib/
  head/lib/libz/doc/
 - copied from r205470, user/delphij/libz/doc/
  head/lib/libz/gzclose.c
 - copied unchanged from r205470, user/delphij/libz/gzclose.c
  head/lib/libz/gzguts.h
 - copied unchanged from r205470, user/delphij/libz/gzguts.h
  head/lib/libz/gzlib.c
 - copied unchanged from r205470, user/delphij/libz/gzlib.c
  head/lib/libz/gzread.c
 - copied unchanged from r205470, user/delphij/libz/gzread.c
  head/lib/libz/gzwrite.c
 - copied unchanged from r205470, user/delphij/libz/gzwrite.c
Deleted:
  head/lib/libz/algorithm.txt
  head/lib/libz/gzio.c
Modified:
  head/ObsoleteFiles.inc
  head/lib/libz/ChangeLog
  head/lib/libz/FAQ
  head/lib/libz/Makefile
  head/lib/libz/README
  head/lib/libz/adler32.c
  head/lib/libz/compress.c
  head/lib/libz/crc32.c
  head/lib/libz/deflate.c
  head/lib/libz/deflate.h
  head/lib/libz/example.c
  head/lib/libz/infback.c
  head/lib/libz/inffast.c
  head/lib/libz/inflate.c
  head/lib/libz/inflate.h
  head/lib/libz/inftrees.c
  head/lib/libz/inftrees.h
  head/lib/libz/minigzip.c   (contents, props changed)
  head/lib/libz/trees.c
  head/lib/libz/uncompr.c
  head/lib/libz/zconf.h
  head/lib/libz/zlib.3
  head/lib/libz/zlib.h
  head/lib/libz/zutil.c
  head/lib/libz/zutil.h
  head/sys/sys/param.h
Directory Properties:
  head/lib/libz/   (props changed)

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Mon Mar 22 20:52:52 2010(r205470)
+++ head/ObsoleteFiles.inc  Mon Mar 22 21:11:55 2010(r205471)
@@ -14,6 +14,11 @@
 # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last.
 #
 
+# 20100322: libz update
+OLD_LIBS+=lib/libz.so.5
+.if ${TARGET_ARCH} == amd64
+OLD_LIBS+=usr/lib32/libz.so.5
+.endif
 # 20100314: removal of regexp.h
 OLD_FILES+=usr/include/regexp.h
 OLD_FILES+=usr/share/man/man3/regexp.3.gz

Modified: head/lib/libz/ChangeLog
==
--- head/lib/libz/ChangeLog Mon Mar 22 20:52:52 2010(r205470)
+++ head/lib/libz/ChangeLog Mon Mar 22 21:11:55 2010(r205471)
@@ -1,6 +1,281 @@
 
 ChangeLog file for zlib
 
+Changes in 1.2.4 (14 Mar 2010)
+- Fix VER3 extraction in configure for no fourth subversion
+- Update zlib.3, add docs to Makefile.in to make .pdf out of it
+- Add zlib.3.pdf to distribution
+- Don't set error code in gzerror() if passed pointer is NULL
+- Apply destination directory fixes to CMakeLists.txt [Lowman]
+- Move #cmakedefine's to a new zconf.in.cmakein
+- Restore zconf.h for builds that don't use configure or cmake
+- Add distclean to dummy Makefile for convenience
+- Update and improve INDEX, README, and FAQ
+- Update CMakeLists.txt for the return of zconf.h [Lowman]
+- Update contrib/vstudio/vc9 and vc10 [Vollant]
+- Change libz.dll.a back to libzdll.a in win32/Makefile.gcc
+- Apply license and readme changes to contrib/asm686 [Raiter]
+- Check file name lengths and add -c option in minigzip.c [Li]
+- Update contrib/amd64 and contrib/masmx86/ [Vollant]
+- Avoid use of eof parameter in trees.c to not shadow library variable
+- Update make_vms.com for removal of zlibdefs.h [Zinser]
+- Update assembler code and vstudio projects in contrib [Vollant]
+- Remove outdated assembler code contrib/masm686 and contrib/asm586
+- Remove old vc7 and vc8 from contrib/vstudio
+- Update win32/Makefile.msc, add ZLIB_VER_SUBREVISION [Rowe]
+- Fix memory leaks in gzclose_r() and gzclose_w(), file leak in gz_open()
+- Add contrib/gcc_gvmat64 for longest_match and inflate_fast [Vollant]
+- Remove *64 functions from win32/zlib.def (they're not 64-bit yet)
+- Fix bug in void-returning vsprintf() case in gzwrite.c
+- Fix name change from inflate.h in contrib/inflate86/inffas86.c
+- Check if temporary file exists before removing in make_vms.com [Zinser]
+- Fix make install and uninstall for --static option
+- Fix usage of _MSC_VER in gzguts.h and zutil.h [Truta]
+- Update readme.txt in contrib/masmx64 and masmx86 to assemble
+
+Changes in 1.2.3.9 (21 Feb 2010)
+- Expunge gzio.c
+- Move as400 build information to old
+- Fix updates in contrib/minizip and contrib/vstudio
+- Add const to vsnprintf test in configure to avoid warnings [Weigelt]
+- Delete zconf.h (made by configure) [Weigelt]
+- Change zconf.in.h to zconf.h.in per convention [Weigelt]
+- Check for NULL buf in gzgets()
+- Return empty string for gzgets

svn commit: r205472 - head/usr.bin/minigzip

2010-03-22 Thread Xin LI
Author: delphij
Date: Mon Mar 22 21:19:17 2010
New Revision: 205472
URL: http://svn.freebsd.org/changeset/base/205472

Log:
  Enable mmap for minigzip(1).

Modified:
  head/usr.bin/minigzip/Makefile

Modified: head/usr.bin/minigzip/Makefile
==
--- head/usr.bin/minigzip/Makefile  Mon Mar 22 21:11:55 2010
(r205471)
+++ head/usr.bin/minigzip/Makefile  Mon Mar 22 21:19:17 2010
(r205472)
@@ -1,10 +1,13 @@
 # $FreeBSD$
 
+SRCDIR=${.CURDIR}/../../lib/libz
+.PATH: ${SRCDIR}
+
 PROG=  minigzip
-LDADD= -lz
-DPADD= ${LIBZ}
-.PATH: ${.CURDIR}/../../lib/libz
 
 WARNS?=5
+CFLAGS+=-DUSE_MMAP
+DPADD= ${LIBZ}
+LDADD= -lz
 
 .include bsd.prog.mk
___
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: r205473 - vendor/tzdata/dist

2010-03-22 Thread Edwin Groothuis
Author: edwin
Date: Mon Mar 22 21:25:08 2010
New Revision: 205473
URL: http://svn.freebsd.org/changeset/base/205473

Log:
  Vendor import of tzdata2010f:
  
  The Australian Antartic Division:
  - Macquarie Island will stay on UTC+11 for winter and not switch back from 
DST.
  - Casey station reverted to its normal time of UTC+8 on 5 March 2010.
  - Davis station will revert to its normal time of UTC+7 at 10 March 2010
  - Mawson station stays on UTC+5.
  
  Syria will start DST on Thursday 1 April 2010 at midnight.
  
  Correct Samao DST start date (26 Sep vs 24 Oct)
  
  Obtained from:ftp://elsie.nci.nih.gov/pub/

Modified:
  vendor/tzdata/dist/antarctica
  vendor/tzdata/dist/asia
  vendor/tzdata/dist/australasia
  vendor/tzdata/dist/zone.tab

Modified: vendor/tzdata/dist/antarctica
==
--- vendor/tzdata/dist/antarctica   Mon Mar 22 21:19:17 2010
(r205472)
+++ vendor/tzdata/dist/antarctica   Mon Mar 22 21:25:08 2010
(r205473)
@@ -1,5 +1,5 @@
 # pre
-# @(#)antarctica   8.7
+# @(#)antarctica   8.8
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -57,6 +57,33 @@ Rule ChileAQ 1999only-   Apr  4  3:00u   
0   
 Rule   ChileAQ 1999max -   Oct Sun=9  4:00u   1:00S
 Rule   ChileAQ 2000max -   Mar Sun=9  3:00u   0   -
 
+# These rules are stolen from the `australasia' file.
+Rule   AusAQ   1917only-   Jan  1  0:011:00-
+Rule   AusAQ   1917only-   Mar 25  2:000   -
+Rule   AusAQ   1942only-   Jan  1  2:001:00-
+Rule   AusAQ   1942only-   Mar 29  2:000   -
+Rule   AusAQ   1942only-   Sep 27  2:001:00-
+Rule   AusAQ   19431944-   Mar lastSun 2:000   -
+Rule   AusAQ   1943only-   Oct  3  2:001:00-
+Rule   ATAQ1967only-   Oct Sun=1  2:00s   1:00-
+Rule   ATAQ1968only-   Mar lastSun 2:00s   0   -
+Rule   ATAQ19681985-   Oct lastSun 2:00s   1:00-
+Rule   ATAQ19691971-   Mar Sun=8  2:00s   0   -
+Rule   ATAQ1972only-   Feb lastSun 2:00s   0   -
+Rule   ATAQ19731981-   Mar Sun=1  2:00s   0   -
+Rule   ATAQ19821983-   Mar lastSun 2:00s   0   -
+Rule   ATAQ19841986-   Mar Sun=1  2:00s   0   -
+Rule   ATAQ1986only-   Oct Sun=15 2:00s   1:00-
+Rule   ATAQ19871990-   Mar Sun=15 2:00s   0   -
+Rule   ATAQ1987only-   Oct Sun=22 2:00s   1:00-
+Rule   ATAQ19881990-   Oct lastSun 2:00s   1:00-
+Rule   ATAQ19911999-   Oct Sun=1  2:00s   1:00-
+Rule   ATAQ19912005-   Mar lastSun 2:00s   0   -
+Rule   ATAQ2000only-   Aug lastSun 2:00s   1:00-
+Rule   ATAQ2001max -   Oct Sun=1  2:00s   1:00-
+Rule   ATAQ2006only-   Apr Sun=1  2:00s   0   -
+Rule   ATAQ2007only-   Mar lastSun 2:00s   0   -
+Rule   ATAQ2008max -   Apr Sun=1  2:00s   0   -
 
 # Argentina - year-round bases
 # Belgrano II, Confin Coast, -770227-0343737, since 1972-02-05
@@ -98,20 +125,52 @@ Rule   ChileAQ 2000max -   Mar Sun=9  
3:00u
 # http://www.timeanddate.com/news/time/antarctica-new-times.html
 # /a
 
+# From Steffen Thorsen (2010-03-10):
+# We got these changes from the Australian Antarctic Division:
+# - Macquarie Island will stay on UTC+11 for winter and therefore not
+# switch back from daylight savings time when other parts of Australia do
+# on 4 April.
+#
+# - Casey station reverted to its normal time of UTC+8 on 5 March 2010.
+# The change to UTC+11 is being considered as a regular summer thing but
+# has not been decided yet.
+#
+# - Davis station will revert to its normal time of UTC+7 at 10 March 2010
+# 20:00 UTC.
+#
+# - Mawson station stays on UTC+5.
+#
+# In addition to the Rule changes for Casey/Davis, it means that Macquarie
+# will no longer be like Hobart and will have to have its own Zone created.
+#
+# Background:
+# a 
href=http://www.timeanddate.com/news/time/antartica-time-changes-2010.html;
+# http://www.timeanddate.com/news/time/antartica-time-changes-2010.html
+# /a
+
 # Zone NAMEGMTOFF  RULES   FORMAT  [UNTIL]
 Zone Antarctica/Casey  0   -   zzz 1969
8:00-   WST 2009 Oct 18 2:00
# Western (Aus) Standard Time
-   11:00   -   CAST# Casey Time
+   11:00   -   CAST2010 Mar 5 2:00
+  

svn commit: r205474 - vendor/tzdata/tzdata2010f

2010-03-22 Thread Edwin Groothuis
Author: edwin
Date: Mon Mar 22 21:26:12 2010
New Revision: 205474
URL: http://svn.freebsd.org/changeset/base/205474

Log:
  Tag of tzdata2010f

Added:
  vendor/tzdata/tzdata2010f/
 - copied from r205473, vendor/tzdata/dist/
___
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: r205475 - head/contrib/tzdata

2010-03-22 Thread Edwin Groothuis
Author: edwin
Date: Mon Mar 22 21:27:51 2010
New Revision: 205475
URL: http://svn.freebsd.org/changeset/base/205475

Log:
  MFV of tzdata2010f:
  
  The Australian Antartic Division:
  - Macquarie Island will stay on UTC+11 for winter and not switch back from 
DST.
  - Casey station reverted to its normal time of UTC+8 on 5 March 2010.
  - Davis station will revert to its normal time of UTC+7 at 10 March 2010
  - Mawson station stays on UTC+5.
  
  Syria will start DST on Thursday 1 April 2010 at midnight.
  
  Correct Samao DST start date (26 Sep vs 24 Oct)

Modified:
  head/contrib/tzdata/antarctica
  head/contrib/tzdata/asia
  head/contrib/tzdata/australasia
  head/contrib/tzdata/zone.tab
Directory Properties:
  head/contrib/tzdata/   (props changed)

Modified: head/contrib/tzdata/antarctica
==
--- head/contrib/tzdata/antarctica  Mon Mar 22 21:26:12 2010
(r205474)
+++ head/contrib/tzdata/antarctica  Mon Mar 22 21:27:51 2010
(r205475)
@@ -1,5 +1,5 @@
 # pre
-# @(#)antarctica   8.7
+# @(#)antarctica   8.8
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -57,6 +57,33 @@ Rule ChileAQ 1999only-   Apr  4  3:00u   
0   
 Rule   ChileAQ 1999max -   Oct Sun=9  4:00u   1:00S
 Rule   ChileAQ 2000max -   Mar Sun=9  3:00u   0   -
 
+# These rules are stolen from the `australasia' file.
+Rule   AusAQ   1917only-   Jan  1  0:011:00-
+Rule   AusAQ   1917only-   Mar 25  2:000   -
+Rule   AusAQ   1942only-   Jan  1  2:001:00-
+Rule   AusAQ   1942only-   Mar 29  2:000   -
+Rule   AusAQ   1942only-   Sep 27  2:001:00-
+Rule   AusAQ   19431944-   Mar lastSun 2:000   -
+Rule   AusAQ   1943only-   Oct  3  2:001:00-
+Rule   ATAQ1967only-   Oct Sun=1  2:00s   1:00-
+Rule   ATAQ1968only-   Mar lastSun 2:00s   0   -
+Rule   ATAQ19681985-   Oct lastSun 2:00s   1:00-
+Rule   ATAQ19691971-   Mar Sun=8  2:00s   0   -
+Rule   ATAQ1972only-   Feb lastSun 2:00s   0   -
+Rule   ATAQ19731981-   Mar Sun=1  2:00s   0   -
+Rule   ATAQ19821983-   Mar lastSun 2:00s   0   -
+Rule   ATAQ19841986-   Mar Sun=1  2:00s   0   -
+Rule   ATAQ1986only-   Oct Sun=15 2:00s   1:00-
+Rule   ATAQ19871990-   Mar Sun=15 2:00s   0   -
+Rule   ATAQ1987only-   Oct Sun=22 2:00s   1:00-
+Rule   ATAQ19881990-   Oct lastSun 2:00s   1:00-
+Rule   ATAQ19911999-   Oct Sun=1  2:00s   1:00-
+Rule   ATAQ19912005-   Mar lastSun 2:00s   0   -
+Rule   ATAQ2000only-   Aug lastSun 2:00s   1:00-
+Rule   ATAQ2001max -   Oct Sun=1  2:00s   1:00-
+Rule   ATAQ2006only-   Apr Sun=1  2:00s   0   -
+Rule   ATAQ2007only-   Mar lastSun 2:00s   0   -
+Rule   ATAQ2008max -   Apr Sun=1  2:00s   0   -
 
 # Argentina - year-round bases
 # Belgrano II, Confin Coast, -770227-0343737, since 1972-02-05
@@ -98,20 +125,52 @@ Rule   ChileAQ 2000max -   Mar Sun=9  
3:00u
 # http://www.timeanddate.com/news/time/antarctica-new-times.html
 # /a
 
+# From Steffen Thorsen (2010-03-10):
+# We got these changes from the Australian Antarctic Division:
+# - Macquarie Island will stay on UTC+11 for winter and therefore not
+# switch back from daylight savings time when other parts of Australia do
+# on 4 April.
+#
+# - Casey station reverted to its normal time of UTC+8 on 5 March 2010.
+# The change to UTC+11 is being considered as a regular summer thing but
+# has not been decided yet.
+#
+# - Davis station will revert to its normal time of UTC+7 at 10 March 2010
+# 20:00 UTC.
+#
+# - Mawson station stays on UTC+5.
+#
+# In addition to the Rule changes for Casey/Davis, it means that Macquarie
+# will no longer be like Hobart and will have to have its own Zone created.
+#
+# Background:
+# a 
href=http://www.timeanddate.com/news/time/antartica-time-changes-2010.html;
+# http://www.timeanddate.com/news/time/antartica-time-changes-2010.html
+# /a
+
 # Zone NAMEGMTOFF  RULES   FORMAT  [UNTIL]
 Zone Antarctica/Casey  0   -   zzz 1969
8:00-   WST 2009 Oct 18 2:00
# Western (Aus) Standard Time
-   11:00   -   CAST# Casey Time
+   11:00   -   CAST2010 Mar 5 2:00
+

svn commit: r205476 - stable/8/share/zoneinfo

2010-03-22 Thread Edwin Groothuis
Author: edwin
Date: Mon Mar 22 21:35:54 2010
New Revision: 205476
URL: http://svn.freebsd.org/changeset/base/205476

Log:
  MFC of r205475, tzdata2010f:
  
  The Australian Antartic Division:
  - Macquarie Island will stay on UTC+11 for winter and not switch back from 
DST.
  - Casey station reverted to its normal time of UTC+8 on 5 March 2010.
  - Davis station will revert to its normal time of UTC+7 at 10 March 2010
  - Mawson station stays on UTC+5.
  
  Syria will start DST on Thursday 1 April 2010 at midnight.
  
  Correct Samao DST start date (26 Sep vs 24 Oct)

Modified:
  stable/8/share/zoneinfo/antarctica
  stable/8/share/zoneinfo/asia
  stable/8/share/zoneinfo/australasia
  stable/8/share/zoneinfo/zone.tab
Directory Properties:
  stable/8/share/zoneinfo/   (props changed)

Modified: stable/8/share/zoneinfo/antarctica
==
--- stable/8/share/zoneinfo/antarctica  Mon Mar 22 21:27:51 2010
(r205475)
+++ stable/8/share/zoneinfo/antarctica  Mon Mar 22 21:35:54 2010
(r205476)
@@ -1,5 +1,5 @@
 # pre
-# @(#)antarctica   8.7
+# @(#)antarctica   8.8
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -57,6 +57,33 @@ Rule ChileAQ 1999only-   Apr  4  3:00u   
0   
 Rule   ChileAQ 1999max -   Oct Sun=9  4:00u   1:00S
 Rule   ChileAQ 2000max -   Mar Sun=9  3:00u   0   -
 
+# These rules are stolen from the `australasia' file.
+Rule   AusAQ   1917only-   Jan  1  0:011:00-
+Rule   AusAQ   1917only-   Mar 25  2:000   -
+Rule   AusAQ   1942only-   Jan  1  2:001:00-
+Rule   AusAQ   1942only-   Mar 29  2:000   -
+Rule   AusAQ   1942only-   Sep 27  2:001:00-
+Rule   AusAQ   19431944-   Mar lastSun 2:000   -
+Rule   AusAQ   1943only-   Oct  3  2:001:00-
+Rule   ATAQ1967only-   Oct Sun=1  2:00s   1:00-
+Rule   ATAQ1968only-   Mar lastSun 2:00s   0   -
+Rule   ATAQ19681985-   Oct lastSun 2:00s   1:00-
+Rule   ATAQ19691971-   Mar Sun=8  2:00s   0   -
+Rule   ATAQ1972only-   Feb lastSun 2:00s   0   -
+Rule   ATAQ19731981-   Mar Sun=1  2:00s   0   -
+Rule   ATAQ19821983-   Mar lastSun 2:00s   0   -
+Rule   ATAQ19841986-   Mar Sun=1  2:00s   0   -
+Rule   ATAQ1986only-   Oct Sun=15 2:00s   1:00-
+Rule   ATAQ19871990-   Mar Sun=15 2:00s   0   -
+Rule   ATAQ1987only-   Oct Sun=22 2:00s   1:00-
+Rule   ATAQ19881990-   Oct lastSun 2:00s   1:00-
+Rule   ATAQ19911999-   Oct Sun=1  2:00s   1:00-
+Rule   ATAQ19912005-   Mar lastSun 2:00s   0   -
+Rule   ATAQ2000only-   Aug lastSun 2:00s   1:00-
+Rule   ATAQ2001max -   Oct Sun=1  2:00s   1:00-
+Rule   ATAQ2006only-   Apr Sun=1  2:00s   0   -
+Rule   ATAQ2007only-   Mar lastSun 2:00s   0   -
+Rule   ATAQ2008max -   Apr Sun=1  2:00s   0   -
 
 # Argentina - year-round bases
 # Belgrano II, Confin Coast, -770227-0343737, since 1972-02-05
@@ -98,20 +125,52 @@ Rule   ChileAQ 2000max -   Mar Sun=9  
3:00u
 # http://www.timeanddate.com/news/time/antarctica-new-times.html
 # /a
 
+# From Steffen Thorsen (2010-03-10):
+# We got these changes from the Australian Antarctic Division:
+# - Macquarie Island will stay on UTC+11 for winter and therefore not
+# switch back from daylight savings time when other parts of Australia do
+# on 4 April.
+#
+# - Casey station reverted to its normal time of UTC+8 on 5 March 2010.
+# The change to UTC+11 is being considered as a regular summer thing but
+# has not been decided yet.
+#
+# - Davis station will revert to its normal time of UTC+7 at 10 March 2010
+# 20:00 UTC.
+#
+# - Mawson station stays on UTC+5.
+#
+# In addition to the Rule changes for Casey/Davis, it means that Macquarie
+# will no longer be like Hobart and will have to have its own Zone created.
+#
+# Background:
+# a 
href=http://www.timeanddate.com/news/time/antartica-time-changes-2010.html;
+# http://www.timeanddate.com/news/time/antartica-time-changes-2010.html
+# /a
+
 # Zone NAMEGMTOFF  RULES   FORMAT  [UNTIL]
 Zone Antarctica/Casey  0   -   zzz 1969
8:00-   WST 2009 Oct 18 2:00
# Western (Aus) Standard Time
-   11:00   -   CAST# Casey Time
+   11:00   -   CAST

svn commit: r205477 - stable/7/share/zoneinfo

2010-03-22 Thread Edwin Groothuis
Author: edwin
Date: Mon Mar 22 21:35:56 2010
New Revision: 205477
URL: http://svn.freebsd.org/changeset/base/205477

Log:
  MFC of r205475, tzdata2010f:
  
  The Australian Antartic Division:
  - Macquarie Island will stay on UTC+11 for winter and not switch back from 
DST.
  - Casey station reverted to its normal time of UTC+8 on 5 March 2010.
  - Davis station will revert to its normal time of UTC+7 at 10 March 2010
  - Mawson station stays on UTC+5.
  
  Syria will start DST on Thursday 1 April 2010 at midnight.
  
  Correct Samao DST start date (26 Sep vs 24 Oct)

Modified:
  stable/7/share/zoneinfo/antarctica
  stable/7/share/zoneinfo/asia
  stable/7/share/zoneinfo/australasia
  stable/7/share/zoneinfo/zone.tab
Directory Properties:
  stable/7/share/zoneinfo/   (props changed)

Modified: stable/7/share/zoneinfo/antarctica
==
--- stable/7/share/zoneinfo/antarctica  Mon Mar 22 21:35:54 2010
(r205476)
+++ stable/7/share/zoneinfo/antarctica  Mon Mar 22 21:35:56 2010
(r205477)
@@ -1,5 +1,5 @@
 # pre
-# @(#)antarctica   8.7
+# @(#)antarctica   8.8
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -57,6 +57,33 @@ Rule ChileAQ 1999only-   Apr  4  3:00u   
0   
 Rule   ChileAQ 1999max -   Oct Sun=9  4:00u   1:00S
 Rule   ChileAQ 2000max -   Mar Sun=9  3:00u   0   -
 
+# These rules are stolen from the `australasia' file.
+Rule   AusAQ   1917only-   Jan  1  0:011:00-
+Rule   AusAQ   1917only-   Mar 25  2:000   -
+Rule   AusAQ   1942only-   Jan  1  2:001:00-
+Rule   AusAQ   1942only-   Mar 29  2:000   -
+Rule   AusAQ   1942only-   Sep 27  2:001:00-
+Rule   AusAQ   19431944-   Mar lastSun 2:000   -
+Rule   AusAQ   1943only-   Oct  3  2:001:00-
+Rule   ATAQ1967only-   Oct Sun=1  2:00s   1:00-
+Rule   ATAQ1968only-   Mar lastSun 2:00s   0   -
+Rule   ATAQ19681985-   Oct lastSun 2:00s   1:00-
+Rule   ATAQ19691971-   Mar Sun=8  2:00s   0   -
+Rule   ATAQ1972only-   Feb lastSun 2:00s   0   -
+Rule   ATAQ19731981-   Mar Sun=1  2:00s   0   -
+Rule   ATAQ19821983-   Mar lastSun 2:00s   0   -
+Rule   ATAQ19841986-   Mar Sun=1  2:00s   0   -
+Rule   ATAQ1986only-   Oct Sun=15 2:00s   1:00-
+Rule   ATAQ19871990-   Mar Sun=15 2:00s   0   -
+Rule   ATAQ1987only-   Oct Sun=22 2:00s   1:00-
+Rule   ATAQ19881990-   Oct lastSun 2:00s   1:00-
+Rule   ATAQ19911999-   Oct Sun=1  2:00s   1:00-
+Rule   ATAQ19912005-   Mar lastSun 2:00s   0   -
+Rule   ATAQ2000only-   Aug lastSun 2:00s   1:00-
+Rule   ATAQ2001max -   Oct Sun=1  2:00s   1:00-
+Rule   ATAQ2006only-   Apr Sun=1  2:00s   0   -
+Rule   ATAQ2007only-   Mar lastSun 2:00s   0   -
+Rule   ATAQ2008max -   Apr Sun=1  2:00s   0   -
 
 # Argentina - year-round bases
 # Belgrano II, Confin Coast, -770227-0343737, since 1972-02-05
@@ -98,20 +125,52 @@ Rule   ChileAQ 2000max -   Mar Sun=9  
3:00u
 # http://www.timeanddate.com/news/time/antarctica-new-times.html
 # /a
 
+# From Steffen Thorsen (2010-03-10):
+# We got these changes from the Australian Antarctic Division:
+# - Macquarie Island will stay on UTC+11 for winter and therefore not
+# switch back from daylight savings time when other parts of Australia do
+# on 4 April.
+#
+# - Casey station reverted to its normal time of UTC+8 on 5 March 2010.
+# The change to UTC+11 is being considered as a regular summer thing but
+# has not been decided yet.
+#
+# - Davis station will revert to its normal time of UTC+7 at 10 March 2010
+# 20:00 UTC.
+#
+# - Mawson station stays on UTC+5.
+#
+# In addition to the Rule changes for Casey/Davis, it means that Macquarie
+# will no longer be like Hobart and will have to have its own Zone created.
+#
+# Background:
+# a 
href=http://www.timeanddate.com/news/time/antartica-time-changes-2010.html;
+# http://www.timeanddate.com/news/time/antartica-time-changes-2010.html
+# /a
+
 # Zone NAMEGMTOFF  RULES   FORMAT  [UNTIL]
 Zone Antarctica/Casey  0   -   zzz 1969
8:00-   WST 2009 Oct 18 2:00
# Western (Aus) Standard Time
-   11:00   -   CAST# Casey Time
+   11:00   -   CAST

svn commit: r205478 - stable/6/share/zoneinfo

2010-03-22 Thread Edwin Groothuis
Author: edwin
Date: Mon Mar 22 21:35:57 2010
New Revision: 205478
URL: http://svn.freebsd.org/changeset/base/205478

Log:
  MFC of r205475, tzdata2010f:
  
  The Australian Antartic Division:
  - Macquarie Island will stay on UTC+11 for winter and not switch back from 
DST.
  - Casey station reverted to its normal time of UTC+8 on 5 March 2010.
  - Davis station will revert to its normal time of UTC+7 at 10 March 2010
  - Mawson station stays on UTC+5.
  
  Syria will start DST on Thursday 1 April 2010 at midnight.
  
  Correct Samao DST start date (26 Sep vs 24 Oct)

Modified:
  stable/6/share/zoneinfo/antarctica
  stable/6/share/zoneinfo/asia
  stable/6/share/zoneinfo/australasia
  stable/6/share/zoneinfo/zone.tab
Directory Properties:
  stable/6/share/zoneinfo/   (props changed)

Modified: stable/6/share/zoneinfo/antarctica
==
--- stable/6/share/zoneinfo/antarctica  Mon Mar 22 21:35:56 2010
(r205477)
+++ stable/6/share/zoneinfo/antarctica  Mon Mar 22 21:35:57 2010
(r205478)
@@ -1,5 +1,5 @@
 # pre
-# @(#)antarctica   8.7
+# @(#)antarctica   8.8
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -57,6 +57,33 @@ Rule ChileAQ 1999only-   Apr  4  3:00u   
0   
 Rule   ChileAQ 1999max -   Oct Sun=9  4:00u   1:00S
 Rule   ChileAQ 2000max -   Mar Sun=9  3:00u   0   -
 
+# These rules are stolen from the `australasia' file.
+Rule   AusAQ   1917only-   Jan  1  0:011:00-
+Rule   AusAQ   1917only-   Mar 25  2:000   -
+Rule   AusAQ   1942only-   Jan  1  2:001:00-
+Rule   AusAQ   1942only-   Mar 29  2:000   -
+Rule   AusAQ   1942only-   Sep 27  2:001:00-
+Rule   AusAQ   19431944-   Mar lastSun 2:000   -
+Rule   AusAQ   1943only-   Oct  3  2:001:00-
+Rule   ATAQ1967only-   Oct Sun=1  2:00s   1:00-
+Rule   ATAQ1968only-   Mar lastSun 2:00s   0   -
+Rule   ATAQ19681985-   Oct lastSun 2:00s   1:00-
+Rule   ATAQ19691971-   Mar Sun=8  2:00s   0   -
+Rule   ATAQ1972only-   Feb lastSun 2:00s   0   -
+Rule   ATAQ19731981-   Mar Sun=1  2:00s   0   -
+Rule   ATAQ19821983-   Mar lastSun 2:00s   0   -
+Rule   ATAQ19841986-   Mar Sun=1  2:00s   0   -
+Rule   ATAQ1986only-   Oct Sun=15 2:00s   1:00-
+Rule   ATAQ19871990-   Mar Sun=15 2:00s   0   -
+Rule   ATAQ1987only-   Oct Sun=22 2:00s   1:00-
+Rule   ATAQ19881990-   Oct lastSun 2:00s   1:00-
+Rule   ATAQ19911999-   Oct Sun=1  2:00s   1:00-
+Rule   ATAQ19912005-   Mar lastSun 2:00s   0   -
+Rule   ATAQ2000only-   Aug lastSun 2:00s   1:00-
+Rule   ATAQ2001max -   Oct Sun=1  2:00s   1:00-
+Rule   ATAQ2006only-   Apr Sun=1  2:00s   0   -
+Rule   ATAQ2007only-   Mar lastSun 2:00s   0   -
+Rule   ATAQ2008max -   Apr Sun=1  2:00s   0   -
 
 # Argentina - year-round bases
 # Belgrano II, Confin Coast, -770227-0343737, since 1972-02-05
@@ -98,20 +125,52 @@ Rule   ChileAQ 2000max -   Mar Sun=9  
3:00u
 # http://www.timeanddate.com/news/time/antarctica-new-times.html
 # /a
 
+# From Steffen Thorsen (2010-03-10):
+# We got these changes from the Australian Antarctic Division:
+# - Macquarie Island will stay on UTC+11 for winter and therefore not
+# switch back from daylight savings time when other parts of Australia do
+# on 4 April.
+#
+# - Casey station reverted to its normal time of UTC+8 on 5 March 2010.
+# The change to UTC+11 is being considered as a regular summer thing but
+# has not been decided yet.
+#
+# - Davis station will revert to its normal time of UTC+7 at 10 March 2010
+# 20:00 UTC.
+#
+# - Mawson station stays on UTC+5.
+#
+# In addition to the Rule changes for Casey/Davis, it means that Macquarie
+# will no longer be like Hobart and will have to have its own Zone created.
+#
+# Background:
+# a 
href=http://www.timeanddate.com/news/time/antartica-time-changes-2010.html;
+# http://www.timeanddate.com/news/time/antartica-time-changes-2010.html
+# /a
+
 # Zone NAMEGMTOFF  RULES   FORMAT  [UNTIL]
 Zone Antarctica/Casey  0   -   zzz 1969
8:00-   WST 2009 Oct 18 2:00
# Western (Aus) Standard Time
-   11:00   -   CAST# Casey Time
+   11:00   -   CAST

svn commit: r205480 - in vendor/tzcode/dist: unused zic

2010-03-22 Thread Edwin Groothuis
Author: edwin
Date: Mon Mar 22 21:48:40 2010
New Revision: 205480
URL: http://svn.freebsd.org/changeset/base/205480

Log:
  Vendor import of tzcode2010f:
  
  - Updated quotes and links.
  - Put warning about case insensitivity of names, but not always in
abbreviations.

Modified:
  vendor/tzcode/dist/unused/tz-art.htm
  vendor/tzcode/dist/unused/tz-link.htm
  vendor/tzcode/dist/unused/zic.8.txt
  vendor/tzcode/dist/zic/zic.8

Modified: vendor/tzcode/dist/unused/tz-art.htm
==
--- vendor/tzcode/dist/unused/tz-art.htmMon Mar 22 21:40:00 2010
(r205479)
+++ vendor/tzcode/dist/unused/tz-art.htmMon Mar 22 21:48:40 2010
(r205480)
@@ -9,7 +9,7 @@ PUBLIC -//W3C//DTD HTML 4.01//EN
 body
 h1Time and the Arts/h1
 address
-@(#)tz-art.htm 8.16
+@(#)tz-art.htm 8.17
 /address
 p
 This file is in the public domain, so clarified as of
@@ -417,6 +417,18 @@ Now that's pretty near 100 years, daylig
 as noted by Will Fitzerald)
 /li
 li
+Brady: ...[Bishop Usher] determined that the Lord began the Creation
+on the 23rd of October in the Year 4004 B.C. at -- uh, at 9 A.M.!
+br
+Drummond: That Eastern Standard Time? (Laughter)  Or Rocky Mountain
+Time? (More laughter)  It wasn't daylight-saving time, was it?  Because
+the Lord didn't make the sun until the fourth day!
+br
+(From the play Inherit the Wind by Jerome Lawrence and Robert E. Lee,
+filmed in 1960 with Spencer Tracy as Drummond and Fredric March as
+Brady, and several other times. Thanks to Mark Brader.)
+/li
+li
 Good news.
 What did they do? Extend Daylight Saving Time year round?
 (Professional tanner George Hamilton, in dialog from a

Modified: vendor/tzcode/dist/unused/tz-link.htm
==
--- vendor/tzcode/dist/unused/tz-link.htm   Mon Mar 22 21:40:00 2010
(r205479)
+++ vendor/tzcode/dist/unused/tz-link.htm   Mon Mar 22 21:48:40 2010
(r205480)
@@ -18,7 +18,7 @@
 body
 h1Sources for Time Zone and Daylight Saving Time Data/h1
 address
-@(#)tz-link.htm8.24
+@(#)tz-link.htm8.26
 /address
 p
 This file is in the public domain, so clarified as of
@@ -40,8 +40,8 @@ href=http://en.wikipedia.org/wiki/Coord
 title=Coordinated Universal TimeUTC/abbr/a offsets, and
 a href=http://en.wikipedia.org/wiki/Daylight_saving;daylight-saving/a
 rules.
-This database (often called codetz/code or a
-href=http://en.wikipedia.org/wiki/Zoneinfo;codezoneinfo/code/a)
+This database (often called codezoneinfo/code or a
+href=http://en.wikipedia.org/wiki/TZ_database;codetz/code/a)
 is used by several implementations,
 including
 a href=http://www.gnu.org/software/libc/;the

Modified: vendor/tzcode/dist/unused/zic.8.txt
==
--- vendor/tzcode/dist/unused/zic.8.txt Mon Mar 22 21:40:00 2010
(r205479)
+++ vendor/tzcode/dist/unused/zic.8.txt Mon Mar 22 21:48:40 2010
(r205480)
@@ -68,6 +68,10 @@ DESCRIPTION
  expected to be of one of three types: rule lines, zone
  lines, and link lines.
 
+ Names (such as month names) must be in English and are case
+ insensitive.  Abbreviations, if used, must be unambiguous in
+ context.
+
  A rule line has the form
 
   Rule  NAME  FROM  TOTYPE  IN   ON   ATSAVE  LETTER/S
@@ -122,6 +126,7 @@ DESCRIPTION
  Names of days of the week may be abbreviated or
  spelled out in full.  Note that there must be no
  spaces within the ON field.
+
  AT  Gives the time of day at which the rule takes
  effect.  Recognized forms include:
 

Modified: vendor/tzcode/dist/zic/zic.8
==
--- vendor/tzcode/dist/zic/zic.8Mon Mar 22 21:40:00 2010
(r205479)
+++ vendor/tzcode/dist/zic/zic.8Mon Mar 22 21:48:40 2010
(r205480)
@@ -109,6 +109,9 @@ Any line that is blank (after comment st
 Non-blank lines are expected to be of one of three types:
 rule lines, zone lines, and link lines.
 .PP
+Names (such as month names) must be in English and are case insensitive.
+Abbreviations, if used, must be unambiguous in context.
+.PP
 A rule line has the form
 .nf
 .ti +.5i
@@ -490,6 +493,6 @@ specifying transition instants using uni
 /usr/local/etc/zoneinfostandard directory used for created files
 .SH SEE ALSO
 newctime(3), tzfile(5), zdump(8)
-.\ @(#)zic.8  8.5
+.\ @(#)zic.8  8.6
 .\ This file is in the public domain, so clarified as of
 .\ 2009-05-17 by Arthur David Olson.
___
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: r205481 - vendor/tzcode/tzcode2010f

2010-03-22 Thread Edwin Groothuis
Author: edwin
Date: Mon Mar 22 21:49:53 2010
New Revision: 205481
URL: http://svn.freebsd.org/changeset/base/205481

Log:
  Tag of tzdata2010f.

Added:
  vendor/tzcode/tzcode2010f/
 - copied from r205480, vendor/tzcode/dist/
___
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: r205481 - vendor/tzcode/tzcode2010f

2010-03-22 Thread Edwin Groothuis
On Mon, Mar 22, 2010 at 09:49:53PM +, Edwin Groothuis wrote:
 Log:
   Tag of tzdata2010f.

tzcode2010f.

-- 
Edwin Groothuis Website: http://www.mavetju.org/
ed...@mavetju.org   Weblog:  http://www.mavetju.org/weblog/
___
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: r205482 - vendor/libz/dist/contrib/inflate86

2010-03-22 Thread Xin LI
Author: delphij
Date: Mon Mar 22 22:02:24 2010
New Revision: 205482
URL: http://svn.freebsd.org/changeset/base/205482

Log:
  Remove unused part of contributed code.

Deleted:
  vendor/libz/dist/contrib/inflate86/
___
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: r205483 - vendor/libz/1.2.4/contrib/inflate86

2010-03-22 Thread Xin LI
Author: delphij
Date: Mon Mar 22 22:03:54 2010
New Revision: 205483
URL: http://svn.freebsd.org/changeset/base/205483

Log:
  Retag 1.2.4 tree after removal of the unused contributed code.

Deleted:
  vendor/libz/1.2.4/contrib/inflate86/
Modified:
Directory Properties:
  vendor/libz/1.2.4/   (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


svn commit: r205484 - head/lib/libz

2010-03-22 Thread Xin LI
Author: delphij
Date: Mon Mar 22 22:05:58 2010
New Revision: 205484
URL: http://svn.freebsd.org/changeset/base/205484

Log:
  Note that we are the same with the vendor tree.

Modified:
Directory Properties:
  head/lib/libz/   (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


svn commit: r205485 - stable/8/sys/net

2010-03-22 Thread Hiroki Sato
Author: hrs
Date: Mon Mar 22 22:07:19 2010
New Revision: 205485
URL: http://svn.freebsd.org/changeset/base/205485

Log:
  MFC r203272:
  
  - Fix a bug when adding an interface with an invalid MTU sets the
bridge's MTU if it is the firstly-added one while the addition
itself fails.
  
  - Allow SIOCSIFMTU only when all members have the same MTU.
  
  - Remove IFT_GIF check when defining the brige MTU by the
firstly-added interface's one.  The MTU of the gif interface
has to be the same as the bridge's one.

Modified:
  stable/8/sys/net/if_bridge.c
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/net/if_bridge.c
==
--- stable/8/sys/net/if_bridge.cMon Mar 22 22:05:58 2010
(r205484)
+++ stable/8/sys/net/if_bridge.cMon Mar 22 22:07:19 2010
(r205485)
@@ -682,6 +682,8 @@ static int
 bridge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
 {
struct bridge_softc *sc = ifp-if_softc;
+   struct ifreq *ifr = (struct ifreq *)data;
+   struct bridge_iflist *bif;
struct thread *td = curthread;
union {
struct ifbreq ifbreq;
@@ -771,10 +773,29 @@ bridge_ioctl(struct ifnet *ifp, u_long c
break;
 
case SIOCSIFMTU:
-   /* Do not allow the MTU to be changed on the bridge */
-   error = EINVAL;
+   if (ifr-ifr_mtu  576) {
+   error = EINVAL;
+   break;
+   }
+   if (LIST_EMPTY(sc-sc_iflist)) {
+   sc-sc_ifp-if_mtu = ifr-ifr_mtu;
+   break;
+   }
+   BRIDGE_LOCK(sc);
+   LIST_FOREACH(bif, sc-sc_iflist, bif_next) {
+   if (bif-bif_ifp-if_mtu != ifr-ifr_mtu) {
+   log(LOG_NOTICE, %s: invalid MTU: %lu(%s)
+!= %d\n, sc-sc_ifp-if_xname,
+   bif-bif_ifp-if_mtu,
+   bif-bif_ifp-if_xname, ifr-ifr_mtu);
+   error = EINVAL;
+   break;
+   }
+   }
+   if (!error)
+   sc-sc_ifp-if_mtu = ifr-ifr_mtu;
+   BRIDGE_UNLOCK(sc);
break;
-
default:
/*
 * drop the lock as ether_ioctl() will call bridge_start() and
@@ -987,17 +1008,6 @@ bridge_ioctl_add(struct bridge_softc *sc
if (ifs == bif-bif_ifp)
return (EBUSY);
 
-   /* Allow the first Ethernet member to define the MTU */
-   if (ifs-if_type != IFT_GIF) {
-   if (LIST_EMPTY(sc-sc_iflist))
-   sc-sc_ifp-if_mtu = ifs-if_mtu;
-   else if (sc-sc_ifp-if_mtu != ifs-if_mtu) {
-   if_printf(sc-sc_ifp, invalid MTU for %s\n,
-   ifs-if_xname);
-   return (EINVAL);
-   }
-   }
-
if (ifs-if_bridge == sc)
return (EEXIST);
 
@@ -1023,6 +1033,16 @@ bridge_ioctl_add(struct bridge_softc *sc
goto out;
}
 
+   /* Allow the first Ethernet member to define the MTU */
+   if (LIST_EMPTY(sc-sc_iflist))
+   sc-sc_ifp-if_mtu = ifs-if_mtu;
+   else if (sc-sc_ifp-if_mtu != ifs-if_mtu) {
+   if_printf(sc-sc_ifp, invalid MTU: %lu(%s) != %lu\n,
+   ifs-if_mtu, ifs-if_xname, sc-sc_ifp-if_mtu);
+   error = EINVAL;
+   goto out;
+   }
+
/*
 * Assign the interface's MAC address to the bridge if it's the first
 * member and the MAC address of the bridge has not been changed from
___
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: r205486 - head/lib/libz

2010-03-22 Thread Xin LI
Author: delphij
Date: Mon Mar 22 22:12:27 2010
New Revision: 205486
URL: http://svn.freebsd.org/changeset/base/205486

Log:
  Expand $FreeBSD$.

Modified:
Directory Properties:
  head/lib/libz/Symbol.map   (props changed)
  head/lib/libz/Versions.def   (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


svn commit: r205487 - head/sys/vm

2010-03-22 Thread Kip Macy
Author: kmacy
Date: Mon Mar 22 22:39:32 2010
New Revision: 205487
URL: http://svn.freebsd.org/changeset/base/205487

Log:
  - enable alignment on amd64 only
  - only align pcpu caches and the volatile portion of uma_zone

Modified:
  head/sys/vm/uma_int.h

Modified: head/sys/vm/uma_int.h
==
--- head/sys/vm/uma_int.h   Mon Mar 22 22:12:27 2010(r205486)
+++ head/sys/vm/uma_int.h   Mon Mar 22 22:39:32 2010(r205487)
@@ -162,7 +162,11 @@ struct uma_hash {
 /*
  * align field or structure to cache line
  */
+#if defined(__amd64__)
+#define UMA_ALIGN  __aligned(CACHE_LINE_SIZE)
+#else
 #define UMA_ALIGN
+#endif
 
 /*
  * Structures for per cpu queues.
@@ -173,7 +177,7 @@ struct uma_bucket {
int16_t ub_cnt; /* Count of free items. */
int16_t ub_entries; /* Max items. */
void*ub_bucket[];   /* actual allocation storage */
-} UMA_ALIGN;
+};
 
 typedef struct uma_bucket * uma_bucket_t;
 
@@ -330,7 +334,7 @@ struct uma_zone {
 * This HAS to be the last item because we adjust the zone size
 * based on NCPU and then allocate the space for the zones.
 */
-   struct uma_cacheuz_cpu[1] UMA_ALIGN; /* Per cpu caches */
+   struct uma_cacheuz_cpu[1]; /* Per cpu caches */
 };
 
 /*
___
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: r205488 - in head/sys: net netinet

2010-03-22 Thread Kip Macy
Author: kmacy
Date: Mon Mar 22 23:04:12 2010
New Revision: 205488
URL: http://svn.freebsd.org/changeset/base/205488

Log:
  - boot-time size the ipv4 flowtable and the maximum number of flows
  - increase flow cleaning frequency and decrease flow caching time
when near the flow limit
  - stop allocating new flows when within 3% of maxflows don't start
allocating again until below 12.5%
  
  MFC after:7 days

Modified:
  head/sys/net/flowtable.c
  head/sys/netinet/ip_input.c

Modified: head/sys/net/flowtable.c
==
--- head/sys/net/flowtable.cMon Mar 22 22:39:32 2010(r205487)
+++ head/sys/net/flowtable.cMon Mar 22 23:04:12 2010(r205488)
@@ -155,30 +155,33 @@ struct flowtable_stats {
uint64_tft_frees;
uint64_tft_hits;
uint64_tft_lookups;
-} __aligned(128);
+} __aligned(CACHE_LINE_SIZE);
 
 struct flowtable {
struct  flowtable_stats ft_stats[MAXCPU];
int ft_size;
int ft_lock_count;
uint32_tft_flags;
-
-   uint32_tft_udp_idle;
-   uint32_tft_fin_wait_idle;
-   uint32_tft_syn_idle;
-   uint32_tft_tcp_idle;
-
char*ft_name;
fl_lock_t   *ft_lock;
fl_lock_t   *ft_unlock;
fl_rtalloc_t*ft_rtalloc;
+   /*
+* XXX need to pad out 
+*/ 
struct mtx  *ft_locks;
-
union flentryp  ft_table;
bitstr_t*ft_masks[MAXCPU];
bitstr_t*ft_tmpmask;
struct flowtable *ft_next;
-} __aligned(128);
+
+   uint32_tft_count __aligned(CACHE_LINE_SIZE);
+   uint32_tft_udp_idle __aligned(CACHE_LINE_SIZE);
+   uint32_tft_fin_wait_idle;
+   uint32_tft_syn_idle;
+   uint32_tft_tcp_idle;
+   boolean_t   ft_full;
+} __aligned(CACHE_LINE_SIZE);
 
 static struct proc *flowcleanerproc;
 static VNET_DEFINE(struct flowtable *, flow_list_head);
@@ -191,9 +194,11 @@ static VNET_DEFINE(uma_zone_t, flow_ipv6
 #defineV_flow_ipv4_zoneVNET(flow_ipv4_zone)
 #defineV_flow_ipv6_zoneVNET(flow_ipv6_zone)
 
+
 static struct cv   flowclean_cv;
 static struct mtx  flowclean_lock;
 static uint32_tflowclean_cycles;
+static uint32_tflowclean_freq;
 
 #ifdef FLOWTABLE_DEBUG
 #define FLDPRINTF(ft, flags, fmt, ...) \
@@ -230,7 +235,7 @@ static VNET_DEFINE(int, flowtable_syn_ex
 static VNET_DEFINE(int, flowtable_udp_expire) = UDP_IDLE;
 static VNET_DEFINE(int, flowtable_fin_wait_expire) = FIN_WAIT_IDLE;
 static VNET_DEFINE(int, flowtable_tcp_expire) = TCP_IDLE;
-static VNET_DEFINE(int, flowtable_nmbflows) = 4096;
+static VNET_DEFINE(int, flowtable_nmbflows);
 static VNET_DEFINE(int, flowtable_ready) = 0;
 
 #defineV_flowtable_enable  VNET(flowtable_enable)
@@ -905,6 +910,61 @@ flowtable_set_hashkey(struct flentry *fl
hashkey[i] = key[i];
 }
 
+static struct flentry *
+flow_alloc(struct flowtable *ft)
+{
+   struct flentry *newfle;
+   uma_zone_t zone;
+
+   newfle = NULL;
+   zone = (ft-ft_flags  FL_IPV6) ? V_flow_ipv6_zone : V_flow_ipv4_zone;
+
+   newfle = uma_zalloc(zone, M_NOWAIT | M_ZERO);
+   if (newfle != NULL)
+   atomic_add_int(ft-ft_count, 1);
+   return (newfle);
+}
+
+static void
+flow_free(struct flentry *fle, struct flowtable *ft)
+{
+   uma_zone_t zone;
+
+   zone = (ft-ft_flags  FL_IPV6) ? V_flow_ipv6_zone : V_flow_ipv4_zone;
+   atomic_add_int(ft-ft_count, -1);
+   uma_zfree(zone, fle);
+}
+
+static int
+flow_full(struct flowtable *ft)
+{
+   boolean_t full;
+   uint32_t count;
+   
+   full = ft-ft_full;
+   count = ft-ft_count;
+
+   if (full  (count  (V_flowtable_nmbflows - (V_flowtable_nmbflows  
3
+   ft-ft_full = FALSE;
+   else if (!full  (count  (V_flowtable_nmbflows - 
(V_flowtable_nmbflows  5
+   ft-ft_full = TRUE;
+   
+   if (full  !ft-ft_full) {
+   flowclean_freq = 4*hz;
+   if ((ft-ft_flags  FL_HASH_ALL) == 0)
+   ft-ft_udp_idle = ft-ft_fin_wait_idle =
+   ft-ft_syn_idle = ft-ft_tcp_idle = 5;
+   cv_broadcast(flowclean_cv);
+   } else if (!full  ft-ft_full) {
+   flowclean_freq = 20*hz;
+   if ((ft-ft_flags  FL_HASH_ALL) == 0)
+   ft-ft_udp_idle = ft-ft_fin_wait_idle =
+   ft-ft_syn_idle = ft-ft_tcp_idle = 30;
+   }
+
+   return (ft-ft_full);
+}
+
 static int
 flowtable_insert(struct flowtable *ft, uint32_t hash, uint32_t *key,
 uint32_t fibnum, struct route *ro, uint16_t flags)
@@ -912,12 +972,10 @@ flowtable_insert(struct flowtable *ft, u
struct flentry *fle, 

svn commit: r205489 - stable/7/sys/dev/pci

2010-03-22 Thread Pyun YongHyeon
Author: yongari
Date: Mon Mar 22 23:15:19 2010
New Revision: 205489
URL: http://svn.freebsd.org/changeset/base/205489

Log:
  MFC r203528:
Add pci_get|set_max_read_req() helper functions to control maximum PCIe
read request size.

Modified:
  stable/7/sys/dev/pci/pci.c
  stable/7/sys/dev/pci/pcivar.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/pci/pci.c
==
--- stable/7/sys/dev/pci/pci.c  Mon Mar 22 23:04:12 2010(r205488)
+++ stable/7/sys/dev/pci/pci.c  Mon Mar 22 23:15:19 2010(r205489)
@@ -1564,6 +1564,40 @@ pci_ht_map_msi(device_t dev, uint64_t ad
}
 }
 
+int
+pci_get_max_read_req(device_t dev)
+{
+   int cap;
+   uint16_t val;
+
+   if (pci_find_extcap(dev, PCIY_EXPRESS, cap) != 0)
+   return (0);
+   val = pci_read_config(dev, cap + PCIR_EXPRESS_DEVICE_CTL, 2);
+   val = PCIM_EXP_CTL_MAX_READ_REQUEST;
+   val = 12;
+   return (1  (val + 7));
+}
+
+int
+pci_set_max_read_req(device_t dev, int size)
+{
+   int cap;
+   uint16_t val;
+
+   if (pci_find_extcap(dev, PCIY_EXPRESS, cap) != 0)
+   return (0);
+   if (size  128)
+   size = 128;
+   if (size  4096)
+   size = 4096;
+   size = (1  (fls(size) - 1));
+   val = pci_read_config(dev, cap + PCIR_EXPRESS_DEVICE_CTL, 2);
+   val = ~PCIM_EXP_CTL_MAX_READ_REQUEST;
+   val |= (fls(size) - 8)  12;
+   pci_write_config(dev, cap + PCIR_EXPRESS_DEVICE_CTL, val, 2);
+   return (size);
+}
+
 /*
  * Support for MSI message signalled interrupts.
  */

Modified: stable/7/sys/dev/pci/pcivar.h
==
--- stable/7/sys/dev/pci/pcivar.h   Mon Mar 22 23:04:12 2010
(r205488)
+++ stable/7/sys/dev/pci/pcivar.h   Mon Mar 22 23:15:19 2010
(r205489)
@@ -465,6 +465,9 @@ int pci_msi_device_blacklisted(device_t 
 
 void   pci_ht_map_msi(device_t dev, uint64_t addr);
 
+intpci_get_max_read_req(device_t dev);
+intpci_set_max_read_req(device_t dev, int size);
+
 #endif /* _SYS_BUS_H_ */
 
 /*
___
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: r205490 - stable/8/sys/net

2010-03-22 Thread Pyun YongHyeon
Author: yongari
Date: Mon Mar 22 23:23:47 2010
New Revision: 205490
URL: http://svn.freebsd.org/changeset/base/205490

Log:
  MFC r204156:
Add __FBSDID.

Modified:
  stable/8/sys/net/if_vlan.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)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/net/if_vlan.c
==
--- stable/8/sys/net/if_vlan.c  Mon Mar 22 23:15:19 2010(r205489)
+++ stable/8/sys/net/if_vlan.c  Mon Mar 22 23:23:47 2010(r205490)
@@ -25,8 +25,6 @@
  * 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$
  */
 
 /*
@@ -41,6 +39,9 @@
  * and ask it to send them.
  */
 
+#include sys/cdefs.h
+__FBSDID($FreeBSD$);
+
 #include opt_vlan.h
 
 #include sys/param.h
___
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: r205491 - stable/7/sys/net

2010-03-22 Thread Pyun YongHyeon
Author: yongari
Date: Mon Mar 22 23:27:08 2010
New Revision: 205491
URL: http://svn.freebsd.org/changeset/base/205491

Log:
  MFC r204156:
Add __FBSDID.

Modified:
  stable/7/sys/net/if_vlan.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/net/if_vlan.c
==
--- stable/7/sys/net/if_vlan.c  Mon Mar 22 23:23:47 2010(r205490)
+++ stable/7/sys/net/if_vlan.c  Mon Mar 22 23:27:08 2010(r205491)
@@ -25,8 +25,6 @@
  * 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$
  */
 
 /*
@@ -41,6 +39,9 @@
  * and ask it to send them.
  */
 
+#include sys/cdefs.h
+__FBSDID($FreeBSD$);
+
 #include opt_vlan.h
 
 #include sys/param.h
___
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: r205493 - in stable/8/usr.sbin: . dumpcis makefs makefs/ffs mfiutil ppp

2010-03-22 Thread Qing Li
Author: qingli
Date: Mon Mar 22 23:33:40 2010
New Revision: 205493
URL: http://svn.freebsd.org/changeset/base/205493

Log:
  MFC   r205272
  
  Need to set the proper flag bit when inserting ARP
  entries into the kernel.

Modified:
  stable/8/usr.sbin/ppp/arp.c
Directory Properties:
  stable/8/usr.sbin/   (props changed)
  stable/8/usr.sbin/Makefile   (props changed)
  stable/8/usr.sbin/acpi/   (props changed)
  stable/8/usr.sbin/arp/   (props changed)
  stable/8/usr.sbin/bsnmpd/   (props changed)
  stable/8/usr.sbin/burncd/   (props changed)
  stable/8/usr.sbin/cdcontrol/   (props changed)
  stable/8/usr.sbin/cpucontrol/   (props changed)
  stable/8/usr.sbin/crashinfo/   (props changed)
  stable/8/usr.sbin/cron/   (props changed)
  stable/8/usr.sbin/diskinfo/   (props changed)
  stable/8/usr.sbin/dumpcis/cardinfo.h   (props changed)
  stable/8/usr.sbin/dumpcis/cis.h   (props changed)
  stable/8/usr.sbin/faithd/   (props changed)
  stable/8/usr.sbin/freebsd-update/   (props changed)
  stable/8/usr.sbin/inetd/   (props changed)
  stable/8/usr.sbin/iostat/   (props changed)
  stable/8/usr.sbin/jail/   (props changed)
  stable/8/usr.sbin/jls/   (props changed)
  stable/8/usr.sbin/lpr/   (props changed)
  stable/8/usr.sbin/makefs/ffs/ffs_bswap.c   (props changed)
  stable/8/usr.sbin/makefs/ffs/ffs_subr.c   (props changed)
  stable/8/usr.sbin/makefs/ffs/ufs_bswap.h   (props changed)
  stable/8/usr.sbin/makefs/getid.c   (props changed)
  stable/8/usr.sbin/mergemaster/   (props changed)
  stable/8/usr.sbin/mfiutil/mfiutil.8   (props changed)
  stable/8/usr.sbin/mptutil/   (props changed)
  stable/8/usr.sbin/ndp/   (props changed)
  stable/8/usr.sbin/newsyslog/   (props changed)
  stable/8/usr.sbin/ntp/   (props changed)
  stable/8/usr.sbin/pmcstat/   (props changed)
  stable/8/usr.sbin/powerd/   (props changed)
  stable/8/usr.sbin/ppp/   (props changed)
  stable/8/usr.sbin/pstat/   (props changed)
  stable/8/usr.sbin/rpc.umntall/   (props changed)
  stable/8/usr.sbin/rtsold/   (props changed)
  stable/8/usr.sbin/service/   (props changed)
  stable/8/usr.sbin/sysinstall/   (props changed)
  stable/8/usr.sbin/syslogd/   (props changed)
  stable/8/usr.sbin/traceroute/   (props changed)
  stable/8/usr.sbin/traceroute6/   (props changed)
  stable/8/usr.sbin/usbconfig/   (props changed)
  stable/8/usr.sbin/wpa/   (props changed)
  stable/8/usr.sbin/ypserv/   (props changed)
  stable/8/usr.sbin/zic/   (props changed)

Modified: stable/8/usr.sbin/ppp/arp.c
==
--- stable/8/usr.sbin/ppp/arp.c Mon Mar 22 23:31:48 2010(r205492)
+++ stable/8/usr.sbin/ppp/arp.c Mon Mar 22 23:33:40 2010(r205493)
@@ -119,7 +119,7 @@ arp_ProxySub(struct bundle *bundle, stru
 return 0;
   }
   arpmsg.hdr.rtm_type = add ? RTM_ADD : RTM_DELETE;
-  arpmsg.hdr.rtm_flags = RTF_ANNOUNCE | RTF_HOST | RTF_STATIC;
+  arpmsg.hdr.rtm_flags = RTF_ANNOUNCE | RTF_HOST | RTF_STATIC | RTF_LLDATA;
   arpmsg.hdr.rtm_version = RTM_VERSION;
   arpmsg.hdr.rtm_seq = ++bundle-routing_seq;
   arpmsg.hdr.rtm_addrs = RTA_DST | RTA_GATEWAY;
___
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: r205495 - head/sys/powerpc/booke

2010-03-22 Thread Marcel Moolenaar
Author: marcel
Date: Tue Mar 23 01:07:30 2010
New Revision: 205495
URL: http://svn.freebsd.org/changeset/base/205495

Log:
  Actually pass a pointer to the trapframe to powerpc_extr_interrupt().

Modified:
  head/sys/powerpc/booke/trap_subr.S

Modified: head/sys/powerpc/booke/trap_subr.S
==
--- head/sys/powerpc/booke/trap_subr.S  Tue Mar 23 00:31:56 2010
(r205494)
+++ head/sys/powerpc/booke/trap_subr.S  Tue Mar 23 01:07:30 2010
(r205495)
@@ -441,6 +441,7 @@ INTERRUPT(int_instr_storage)
 INTERRUPT(int_external_input)
STANDARD_PROLOG(SPR_SPRG1, PC_TEMPSAVE, SPR_SRR0, SPR_SRR1)
FRAME_SETUP(SPR_SPRG1, PC_TEMPSAVE, EXC_EXI)
+   addi%r3, %r1, 8
bl  CNAME(powerpc_extr_interrupt)
b   trapexit
 
___
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: r205496 - in head/sys: dev/ofw powerpc/ofw

2010-03-22 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Tue Mar 23 01:09:45 2010
New Revision: 205496
URL: http://svn.freebsd.org/changeset/base/205496

Log:
  Do not declare the various OFW command buffers static. It does not
  appear to be necessary on either sparc64 or powerpc, and is a
  concurrency nightmare.
  
  Reviewed by:  marius

Modified:
  head/sys/dev/ofw/ofw_standard.c
  head/sys/powerpc/ofw/ofw_real.c

Modified: head/sys/dev/ofw/ofw_standard.c
==
--- head/sys/dev/ofw/ofw_standard.c Tue Mar 23 01:07:30 2010
(r205495)
+++ head/sys/dev/ofw/ofw_standard.c Tue Mar 23 01:09:45 2010
(r205496)
@@ -165,7 +165,7 @@ ofw_std_init(ofw_t ofw, void *openfirm)
 static int
 ofw_std_test(ofw_t ofw, const char *name)
 {
-   static struct {
+   struct {
cell_t name;
cell_t nargs;
cell_t nreturns;
@@ -187,7 +187,7 @@ static int
 ofw_std_interpret(ofw_t ofw, const char *cmd, int nreturns,
 unsigned long *returns)
 {
-   static struct {
+   struct {
cell_t name;
cell_t nargs;
cell_t nreturns;
@@ -217,7 +217,7 @@ ofw_std_interpret(ofw_t ofw, const char 
 static phandle_t
 ofw_std_peer(ofw_t ofw, phandle_t node)
 {
-   static struct {
+   struct {
cell_t name;
cell_t nargs;
cell_t nreturns;
@@ -239,7 +239,7 @@ ofw_std_peer(ofw_t ofw, phandle_t node)
 static phandle_t
 ofw_std_child(ofw_t ofw, phandle_t node)
 {
-   static struct {
+   struct {
cell_t name;
cell_t nargs;
cell_t nreturns;
@@ -261,7 +261,7 @@ ofw_std_child(ofw_t ofw, phandle_t node)
 static phandle_t
 ofw_std_parent(ofw_t ofw, phandle_t node)
 {
-   static struct {
+   struct {
cell_t name;
cell_t nargs;
cell_t nreturns;
@@ -283,7 +283,7 @@ ofw_std_parent(ofw_t ofw, phandle_t node
 static phandle_t
 ofw_std_instance_to_package(ofw_t ofw, ihandle_t instance)
 {
-   static struct {
+   struct {
cell_t name;
cell_t nargs;
cell_t nreturns;
@@ -305,7 +305,7 @@ ofw_std_instance_to_package(ofw_t ofw, i
 static ssize_t
 ofw_std_getproplen(ofw_t ofw, phandle_t package, const char *propname)
 {
-   static struct {
+   struct {
cell_t name;
cell_t nargs;
cell_t nreturns;
@@ -330,7 +330,7 @@ static ssize_t
 ofw_std_getprop(ofw_t ofw, phandle_t package, const char *propname, void *buf,
 size_t buflen)
 {
-   static struct {
+   struct {
cell_t name;
cell_t nargs;
cell_t nreturns;
@@ -359,7 +359,7 @@ static int
 ofw_std_nextprop(ofw_t ofw, phandle_t package, const char *previous, char *buf,
 size_t size)
 {
-   static struct {
+   struct {
cell_t name;
cell_t nargs;
cell_t nreturns;
@@ -387,7 +387,7 @@ static int
 ofw_std_setprop(ofw_t ofw, phandle_t package, const char *propname,
 const void *buf, size_t len)
 {
-   static struct {
+   struct {
cell_t name;
cell_t nargs;
cell_t nreturns;
@@ -415,7 +415,7 @@ ofw_std_setprop(ofw_t ofw, phandle_t pac
 static ssize_t
 ofw_std_canon(ofw_t ofw, const char *device, char *buf, size_t len)
 {
-   static struct {
+   struct {
cell_t name;
cell_t nargs;
cell_t nreturns;
@@ -441,7 +441,7 @@ ofw_std_canon(ofw_t ofw, const char *dev
 static phandle_t
 ofw_std_finddevice(ofw_t ofw, const char *device)
 {
-   static struct {
+   struct {
cell_t name;
cell_t nargs;
cell_t nreturns;
@@ -463,7 +463,7 @@ ofw_std_finddevice(ofw_t ofw, const char
 static ssize_t
 ofw_std_instance_to_path(ofw_t ofw, ihandle_t instance, char *buf, size_t len)
 {
-   static struct {
+   struct {
cell_t name;
cell_t nargs;
cell_t nreturns;
@@ -489,7 +489,7 @@ ofw_std_instance_to_path(ofw_t ofw, ihan
 static ssize_t
 ofw_std_package_to_path(ofw_t ofw, phandle_t package, char *buf, size_t len)
 {
-   static struct {
+   struct {
cell_t name;
cell_t nargs;
cell_t nreturns;
@@ -516,7 +516,7 @@ static int
 ofw_std_call_method(ofw_t ofw, ihandle_t instance, const char *method,
 int nargs, int nreturns, unsigned long *args_and_returns)
 {
-   static struct {
+   struct {
cell_t name;
cell_t nargs;
cell_t nreturns;
@@ -559,7 +559,7 @@ ofw_std_call_method(ofw_t ofw, ihandle_t
 static ihandle_t
 ofw_std_open(ofw_t ofw, const char *device)
 {
-   static struct {
+   struct {
cell_t name;
cell_t nargs;
   

svn commit: r205497 - head/sys/powerpc/aim

2010-03-22 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Tue Mar 23 01:11:10 2010
New Revision: 205497
URL: http://svn.freebsd.org/changeset/base/205497

Log:
  Open Firmware on powerpc is generally non-reetrant, so serialize all
  OF calls with a mutex.

Modified:
  head/sys/powerpc/aim/ofw_machdep.c

Modified: head/sys/powerpc/aim/ofw_machdep.c
==
--- head/sys/powerpc/aim/ofw_machdep.c  Tue Mar 23 01:09:45 2010
(r205496)
+++ head/sys/powerpc/aim/ofw_machdep.c  Tue Mar 23 01:11:10 2010
(r205497)
@@ -63,6 +63,8 @@ __FBSDID($FreeBSD$);
 static struct mem_region OFmem[OFMEM_REGIONS + 1], OFavail[OFMEM_REGIONS + 3];
 static struct mem_region OFfree[OFMEM_REGIONS + 3];
 
+static struct mtx ofw_mutex;
+
 struct mem_region64 {
 vm_offset_t mr_start_hi;
 vm_offset_t mr_start_lo;
@@ -281,6 +283,8 @@ OF_bootstrap()
 {
boolean_t status = FALSE;
 
+   mtx_init(ofw_mutex, open firmware, NULL, MTX_DEF);
+
if (ofwcall != NULL) {
if (ofw_real_mode)
status = OF_install(OFW_STD_REAL, 0);
@@ -314,6 +318,8 @@ openfirmware(void *args)
if (pmap_bootstrapped  ofw_real_mode)
args = (void *)pmap_kextract((vm_offset_t)args);
 
+   mtx_lock(ofw_mutex);
+
__asm __volatile(   \t
sync\n\t
mfmsr  %0\n\t
@@ -366,6 +372,8 @@ openfirmware(void *args)
: : r (oldmsr)
);
 
+   mtx_unlock(ofw_mutex);
+
return (result);
 }
 
___
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: r205502 - head/sys/netinet

2010-03-22 Thread Randall Stewart
Author: rrs
Date: Tue Mar 23 01:36:50 2010
New Revision: 205502
URL: http://svn.freebsd.org/changeset/base/205502

Log:
  Fixes a bug where SACKs in the face of
  mapping_array expansion would break. Basically
  once we expanded the array we no longer had both
  mapping arrays in sync which the sack processing code depends on.
  This would mean we were randomly referring to memory that was probably
  not there. This mostly just gave us bad sack results going back to the peer.
  If INVARIENTS was on of course we would hit the panic routine in the 
sack_check
  call.
  
  We also add a print routine for the place where one would panic in
  invarients so one can see what the main mapping array holds.
  
  Reviewed by: tue...@freebsd.org
  MFC after:2 weeks

Modified:
  head/sys/netinet/sctp_indata.c
  head/sys/netinet/sctputil.c
  head/sys/netinet/sctputil.h

Modified: head/sys/netinet/sctp_indata.c
==
--- head/sys/netinet/sctp_indata.c  Tue Mar 23 01:35:46 2010
(r205501)
+++ head/sys/netinet/sctp_indata.c  Tue Mar 23 01:36:50 2010
(r205502)
@@ -2540,15 +2540,7 @@ sctp_sack_check(struct sctp_tcb *stcb, i
/* int nr_at; */
/* int nr_last_all_ones = 0; */
/* int nr_slide_from, nr_slide_end, nr_lgap, nr_distance; */
-
uint32_t old_cumack, old_base, old_highest;
-   unsigned char aux_array[64];
-
-   /*
-* EY! Don't think this is required but I am immitating the code for
-* map just to make sure
-*/
-   unsigned char nr_aux_array[64];
 
asoc = stcb-asoc;
at = 0;
@@ -2556,33 +2548,6 @@ sctp_sack_check(struct sctp_tcb *stcb, i
old_cumack = asoc-cumulative_tsn;
old_base = asoc-mapping_array_base_tsn;
old_highest = asoc-highest_tsn_inside_map;
-   if (asoc-mapping_array_size  64)
-   memcpy(aux_array, asoc-mapping_array,
-   asoc-mapping_array_size);
-   else
-   memcpy(aux_array, asoc-mapping_array, 64);
-   /* EY do the same for nr_mapping_array */
-   if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off)  
asoc-peer_supports_nr_sack) {
-   if (asoc-nr_mapping_array_size != asoc-mapping_array_size) {
-   /*
-* printf(\nEY-IN sack_check method: \nEY- The
-* size of map and nr_map are inconsitent)
-*/ ;
-   }
-   if (asoc-nr_mapping_array_base_tsn != 
asoc-mapping_array_base_tsn) {
-   /*
-* printf(\nEY-IN sack_check method VERY CRUCIAL
-* error: \nEY- The base tsns of map and nr_map
-* are inconsitent)
-*/ ;
-   }
-   /* EY! just immitating the above code */
-   if (asoc-nr_mapping_array_size  64)
-   memcpy(nr_aux_array, asoc-nr_mapping_array,
-   asoc-nr_mapping_array_size);
-   else
-   memcpy(aux_array, asoc-nr_mapping_array, 64);
-   }
/*
 * We could probably improve this a small bit by calculating the
 * offset of the current cum-ack as the starting point.
@@ -2618,6 +2583,7 @@ sctp_sack_check(struct sctp_tcb *stcb, i
 #else
SCTP_PRINTF(huh, cumack 0x%x greater than high-tsn 0x%x in map 
- should panic?\n,
asoc-cumulative_tsn, asoc-highest_tsn_inside_map);
+   sctp_print_mapping_array(asoc);
if (SCTP_BASE_SYSCTL(sctp_logging_level)  
SCTP_MAP_LOGGING_ENABLE) {
sctp_log_map(0, 6, asoc-highest_tsn_inside_map, 
SCTP_MAP_SLIDE_RESULT);
}

Modified: head/sys/netinet/sctputil.c
==
--- head/sys/netinet/sctputil.c Tue Mar 23 01:35:46 2010(r205501)
+++ head/sys/netinet/sctputil.c Tue Mar 23 01:36:50 2010(r205502)
@@ -1180,6 +1180,25 @@ sctp_init_asoc(struct sctp_inpcb *m, str
return (0);
 }
 
+void
+sctp_print_mapping_array(struct sctp_association *asoc)
+{
+   int i;
+
+   printf(Mapping size:%d baseTSN:%8.8x cumAck:%8.8x highestTSN:%8.8x\n,
+   asoc-mapping_array_size,
+   asoc-mapping_array_base_tsn,
+   asoc-cumulative_tsn,
+   asoc-highest_tsn_inside_map
+   );
+   for (i = 0; i  asoc-mapping_array_size; i++) {
+   printf(%8.8x , asoc-mapping_array[i]);
+   if (((i + 1) % 8) == 0)
+   printf(\n);
+   }
+   printf(\n);
+}
+
 int
 sctp_expand_mapping_array(struct sctp_association *asoc, uint32_t needed)
 {
@@ -1187,7 +1206,9 @@ sctp_expand_mapping_array(struct sctp_as
uint8_t *new_array;
uint32_t new_size;
 
+
new_size = asoc-mapping_array_size + ((needed + 7) / 

svn commit: r205506 - in head/sys/powerpc: aim powermac

2010-03-22 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Tue Mar 23 03:14:44 2010
New Revision: 205506
URL: http://svn.freebsd.org/changeset/base/205506

Log:
  Get nexus(4) out of the RTC business. The interface used by nexus(4)
  in Open Firmware was Apple-specific, and we have complete coverage of Apple
  system controllers, so move RTC responsibilities into the system controller
  drivers. This avoids interesting problems from manipulating these devices
  through Open Firmware behind the backs of their drivers.
  
  Obtained from:NetBSD
  MFC after:2 weeks

Modified:
  head/sys/powerpc/aim/nexus.c
  head/sys/powerpc/powermac/cuda.c
  head/sys/powerpc/powermac/cudavar.h
  head/sys/powerpc/powermac/pmu.c
  head/sys/powerpc/powermac/smu.c

Modified: head/sys/powerpc/aim/nexus.c
==
--- head/sys/powerpc/aim/nexus.cTue Mar 23 02:18:12 2010
(r205505)
+++ head/sys/powerpc/aim/nexus.cTue Mar 23 03:14:44 2010
(r205506)
@@ -60,7 +60,6 @@
 #include sys/systm.h
 #include sys/module.h
 #include sys/bus.h
-#include sys/clock.h
 #include sys/cons.h
 #include sys/kernel.h
 #include sys/malloc.h
@@ -74,7 +73,6 @@
 
 #include sys/rman.h
 
-#include clock_if.h
 #include ofw_bus_if.h
 #include pic_if.h
 
@@ -143,12 +141,6 @@ static const char  *nexus_ofw_get_type(de
 static const char  *nexus_ofw_get_compat(device_t, device_t);
 
 /*
- * Clock interface.
- */
-static int nexus_gettime(device_t, struct timespec *);
-static int nexus_settime(device_t, struct timespec *);
-
-/*
  * Local routines
  */
 static device_tnexus_device_from_node(device_t, phandle_t);
@@ -181,10 +173,6 @@ static device_method_t nexus_methods[] =
DEVMETHOD(ofw_bus_get_type, nexus_ofw_get_type),
DEVMETHOD(ofw_bus_get_compat, nexus_ofw_get_compat),
 
-   /* Clock interface */
-   DEVMETHOD(clock_gettime,nexus_gettime),
-   DEVMETHOD(clock_settime,nexus_settime),
-
{ 0, 0 }
 };
 
@@ -240,7 +228,6 @@ nexus_attach(device_t dev)
 
}
 
-   clock_register(dev, 1000);
return (bus_generic_attach(dev));
 }
 
@@ -512,50 +499,3 @@ nexus_ofw_get_compat(device_t bus, devic
return (dinfo-ndi_compatible);
 }
 
-#defineDIFF190419702082844800
-
-static int
-nexus_gettime(device_t dev, struct timespec *ts)
-{
-   char path[128];
-   ihandle_t ih;
-   phandle_t ph;
-   u_int rtc;
-
-   ph = OF_finddevice(rtc);
-   if (ph == -1)
-   return (ENOENT);
-
-   OF_package_to_path(ph, path, sizeof(path));
-   ih = OF_open(path);
-   if (ih == -1)
-   return (ENXIO);
-
-   if (OF_call_method(read-rtc, ih, 0, 1, rtc))
-   return (EIO);
-
-   ts-tv_sec = rtc - DIFF19041970;
-   ts-tv_nsec = 0;
-   return (0);
-}
-
-static int
-nexus_settime(device_t dev, struct timespec *ts)
-{
-   char path[128];
-   ihandle_t ih;
-   phandle_t ph; 
-   u_int rtc;
-
-   ph = OF_finddevice(rtc); 
-   if (ph == -1) 
-   return (ENOENT);
-
-   OF_package_to_path(ph, path, sizeof(path));   
-   ih = OF_open(path);
-   if (ih == -1)
-   return (ENXIO);
-
-   rtc = ts-tv_sec + DIFF19041970;
-   return ((OF_call_method(write-rtc, ih, 1, 0, rtc) != 0) ? EIO : 0);
-}

Modified: head/sys/powerpc/powermac/cuda.c
==
--- head/sys/powerpc/powermac/cuda.cTue Mar 23 02:18:12 2010
(r205505)
+++ head/sys/powerpc/powermac/cuda.cTue Mar 23 03:14:44 2010
(r205506)
@@ -37,6 +37,7 @@ __FBSDID($FreeBSD$);
 #include sys/bus.h
 #include sys/conf.h
 #include sys/kernel.h
+#include sys/clock.h
 
 #include dev/ofw/ofw_bus.h
 #include dev/ofw/openfirm.h
@@ -55,6 +56,7 @@ __FBSDID($FreeBSD$);
 
 #include dev/adb/adb.h
 
+#include clock_if.h
 #include cudavar.h
 #include viareg.h
 
@@ -72,6 +74,12 @@ static u_int cuda_poll(device_t dev);
 static voidcuda_send_inbound(struct cuda_softc *sc);
 static voidcuda_send_outbound(struct cuda_softc *sc);
 
+/*
+ * Clock interface
+ */
+static int cuda_gettime(device_t dev, struct timespec *ts);
+static int cuda_settime(device_t dev, struct timespec *ts);
+
 static device_method_t  cuda_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, cuda_probe),
@@ -90,6 +98,10 @@ static device_method_t  cuda_methods[] =
DEVMETHOD(adb_hb_controller_poll,   cuda_poll),
DEVMETHOD(adb_hb_set_autopoll_mask, cuda_adb_autopoll),
 
+   /* Clock interface */
+   DEVMETHOD(clock_gettime,cuda_gettime),
+   DEVMETHOD(clock_settime,cuda_settime),
+
{ 0, 0 },
 };
 
@@ -173,6 +185,7 @@ cuda_attach(device_t dev)
sc-sc_polling = 0;
sc-sc_state = CUDA_NOTREADY;
sc-sc_autopoll = 0;
+   sc-sc_rtc = -1;