svn commit: r248411 - head/sys/modules/uart

2013-03-17 Thread Andrew Turner
Author: andrew
Date: Sun Mar 17 06:33:49 2013
New Revision: 248411
URL: http://svnweb.freebsd.org/changeset/base/248411

Log:
  In the uart module build ofw_bus_if.h on arm along with sparc64 as LINT
  fails when built locally without it.

Modified:
  head/sys/modules/uart/Makefile

Modified: head/sys/modules/uart/Makefile
==
--- head/sys/modules/uart/Makefile  Sun Mar 17 03:09:08 2013
(r248410)
+++ head/sys/modules/uart/Makefile  Sun Mar 17 06:33:49 2013
(r248411)
@@ -4,6 +4,9 @@
 
 .if ${MACHINE_CPUARCH} == sparc64
 uart_bus_ebus= uart_bus_ebus.c
+.endif
+
+.if ${MACHINE_CPUARCH} == arm || ${MACHINE_CPUARCH} == sparc64
 ofw_bus_if=ofw_bus_if.h
 .endif
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r248412 - head/usr.bin/renice

2013-03-17 Thread Joel Dahl
Author: joel (doc committer)
Date: Sun Mar 17 06:36:04 2013
New Revision: 248412
URL: http://svnweb.freebsd.org/changeset/base/248412

Log:
  Move example to EXAMPLES.

Modified:
  head/usr.bin/renice/renice.8

Modified: head/usr.bin/renice/renice.8
==
--- head/usr.bin/renice/renice.8Sun Mar 17 06:33:49 2013
(r248411)
+++ head/usr.bin/renice/renice.8Sun Mar 17 06:36:04 2013
(r248412)
@@ -85,13 +85,6 @@ Reset the
 interpretation to be (the default) process ID's.
 .El
 .Pp
-For example,
-.Pp
-.Dl renice +1 987 -u daemon root -p 32
-.Pp
-would change the priority of process ID's 987 and 32, and
-all processes owned by users daemon and root.
-.Pp
 Users other than the super-user may only alter the priority of
 processes they own,
 and can only monotonically increase their ``nice value''
@@ -116,6 +109,11 @@ anything negative (to make things go ver
 .It Pa /etc/passwd
 to map user names to user ID's
 .El
+.Sh EXAMPLES
+Change the priority of process ID's 987 and 32, and
+all processes owned by users daemon and root.
+.Pp
+.Dl renice +1 987 -u daemon root -p 32
 .Sh SEE ALSO
 .Xr nice 1 ,
 .Xr rtprio 1 ,
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r248413 - head/usr.sbin/ac

2013-03-17 Thread Joel Dahl
Author: joel (doc committer)
Date: Sun Mar 17 06:54:04 2013
New Revision: 248413
URL: http://svnweb.freebsd.org/changeset/base/248413

Log:
  Move example to EXAMPLES.

Modified:
  head/usr.sbin/ac/ac.8

Modified: head/usr.sbin/ac/ac.8
==
--- head/usr.sbin/ac/ac.8   Sun Mar 17 06:36:04 2013(r248412)
+++ head/usr.sbin/ac/ac.8   Sun Mar 17 06:54:04 2013(r248413)
@@ -105,17 +105,6 @@ hand.
 No login or connect time accounting is performed if
 .Pa /var/log/utx.log
 does not exist.
-.Pp
-For example,
-.Bd -literal -offset indent
-ac -p -t ttyd*  modems
-ac -p -t !ttyd*  other
-.Ed
-.Pp
-allows times recorded in
-.Pa modems
-to be charged out at a different rate than
-.Pa other .
 .Sh FILES
 .Bl -tag -width /var/log/utx.log -compact
 .It Pa /var/log/utx.log
@@ -123,6 +112,15 @@ connect time accounting file
 .El
 .Sh EXIT STATUS
 .Ex -std
+.Sh EXAMPLES
+Allow times recorded in
+.Pa modems
+to be charged out at a different rate than
+.Pa other :
+.Bd -literal -offset indent
+ac -p -t ttyd*  modems
+ac -p -t !ttyd*  other
+.Ed
 .Sh SEE ALSO
 .Xr login 1 ,
 .Xr getutxent 3 ,
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r248414 - in head/usr.bin: head tail

2013-03-17 Thread Joel Dahl
Author: joel (doc committer)
Date: Sun Mar 17 06:57:25 2013
New Revision: 248414
URL: http://svnweb.freebsd.org/changeset/base/248414

Log:
  Remove EOL whitespace accidentally introduced in r248393.

Modified:
  head/usr.bin/head/head.1
  head/usr.bin/tail/tail.1

Modified: head/usr.bin/head/head.1
==
--- head/usr.bin/head/head.1Sun Mar 17 06:54:04 2013(r248413)
+++ head/usr.bin/head/head.1Sun Mar 17 06:57:25 2013(r248414)
@@ -28,7 +28,7 @@
 .\@(#)head.1  8.1 (Berkeley) 6/6/93
 .\ $FreeBSD$
 .\
-.Dd March 16, 2013 
+.Dd March 16, 2013
 .Dt HEAD 1
 .Os
 .Sh NAME

Modified: head/usr.bin/tail/tail.1
==
--- head/usr.bin/tail/tail.1Sun Mar 17 06:54:04 2013(r248413)
+++ head/usr.bin/tail/tail.1Sun Mar 17 06:57:25 2013(r248414)
@@ -31,7 +31,7 @@
 .\@(#)tail.1  8.1 (Berkeley) 6/6/93
 .\ $FreeBSD$
 .\
-.Dd March 16, 2013 
+.Dd March 16, 2013
 .Dt TAIL 1
 .Os
 .Sh NAME
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


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

2013-03-17 Thread Rui Paulo
Author: rpaulo
Date: Sun Mar 17 07:28:17 2013
New Revision: 248415
URL: http://svnweb.freebsd.org/changeset/base/248415

Log:
  Fix a typo in a comment.

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

Modified: head/sys/dev/acpica/acpi_powerres.c
==
--- head/sys/dev/acpica/acpi_powerres.c Sun Mar 17 06:57:25 2013
(r248414)
+++ head/sys/dev/acpica/acpi_powerres.c Sun Mar 17 07:28:17 2013
(r248415)
@@ -47,7 +47,7 @@ __FBSDID($FreeBSD$);
  * resource, and only deactivate it when there are no powered devices.
  *
  * Note that this only manages resources for known devices.  There is an
- * ugly case where we may turn of power to a device which is in use because
+ * ugly case where we may turn off power to a device which is in use because
  * we don't know that it depends on a given resource.  We should perhaps
  * try to be smarter about this, but a more complete solution would involve
  * scanning all of the ACPI namespace to find devices we're not currently
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r248416 - head/sys/netinet/libalias

2013-03-17 Thread Gleb Smirnoff
Author: glebius
Date: Sun Mar 17 07:37:10 2013
New Revision: 248416
URL: http://svnweb.freebsd.org/changeset/base/248416

Log:
  In m_megapullup() instead of reserving some space at the end of packet,
  m_align() it, reserving space to prepend data.
  
  Reviewed by:  mav

Modified:
  head/sys/netinet/libalias/alias.c

Modified: head/sys/netinet/libalias/alias.c
==
--- head/sys/netinet/libalias/alias.c   Sun Mar 17 07:28:17 2013
(r248415)
+++ head/sys/netinet/libalias/alias.c   Sun Mar 17 07:37:10 2013
(r248416)
@@ -1749,26 +1749,22 @@ LibAliasUnLoadAllModule(void)
 struct mbuf *
 m_megapullup(struct mbuf *m, int len) {
struct mbuf *mcl;
-   
+
if (len  m-m_pkthdr.len)
goto bad;
-   
-   /* Do not reallocate packet if it is sequentional,
-* writable and has some extra space for expansion.
-* XXX: Constant 100bytes is completely empirical. */
-#defineRESERVE 100
-   if (m-m_next == NULL  M_WRITABLE(m)  M_TRAILINGSPACE(m) = RESERVE)
+
+   if (m-m_next == NULL  M_WRITABLE(m))
return (m);
 
-   mcl = m_get2(len + RESERVE, M_NOWAIT, MT_DATA, M_PKTHDR);
+   mcl = m_get2(len, M_NOWAIT, MT_DATA, M_PKTHDR);
if (mcl == NULL)
goto bad;
- 
+   m_align(mcl, len);
m_move_pkthdr(mcl, m);
m_copydata(m, 0, len, mtod(mcl, caddr_t));
mcl-m_len = mcl-m_pkthdr.len = len;
m_freem(m);
- 
+
return (mcl);
 bad:
m_freem(m);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r248417 - head/sys/sys

2013-03-17 Thread Gleb Smirnoff
Author: glebius
Date: Sun Mar 17 07:39:45 2013
New Revision: 248417
URL: http://svnweb.freebsd.org/changeset/base/248417

Log:
  Add MEXT_ALIGN() macro, similar to M_ALIGN() and MH_ALIGN(), but for
  mbufs with external buffer.

Modified:
  head/sys/sys/mbuf.h

Modified: head/sys/sys/mbuf.h
==
--- head/sys/sys/mbuf.h Sun Mar 17 07:37:10 2013(r248416)
+++ head/sys/sys/mbuf.h Sun Mar 17 07:39:45 2013(r248417)
@@ -195,7 +195,7 @@ struct mbuf {
 #defineM_FIRSTFRAG 0x1000 /* packet is first fragment */
 #defineM_LASTFRAG  0x2000 /* packet is last fragment */
 #defineM_SKIP_FIREWALL 0x4000 /* skip firewall processing */
-#defineM_FREELIST  0x8000 /* mbuf is on the free list */
+/* 0x8000free */
 #defineM_VLANTAG   0x0001 /* ether_vtag is valid */
 #defineM_PROMISC   0x0002 /* packet was not for us */
 #defineM_NOFREE0x0004 /* do not free mbuf, embedded in 
cluster */
@@ -708,6 +708,18 @@ m_last(struct mbuf *m)
 } while (0)
 
 /*
+ * As above, for mbuf with external storage.
+ */
+#defineMEXT_ALIGN(m, len) do { 
\
+   KASSERT((m)-m_flags  M_EXT,   \
+   (%s: MEXT_ALIGN not an M_EXT mbuf, __func__));\
+   KASSERT((m)-m_data == (m)-m_ext.ext_buf,  \
+   (%s: MEXT_ALIGN not a virgin mbuf, __func__));\
+   (m)-m_data += ((m)-m_ext.ext_size - (len))   \
+   ~(sizeof(long) - 1);\
+} while (0)
+
+/*
  * Compute the amount of space available before the current start of data in
  * an mbuf.
  *
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r248418 - head/sys/kern

2013-03-17 Thread Gleb Smirnoff
Author: glebius
Date: Sun Mar 17 07:41:14 2013
New Revision: 248418
URL: http://svnweb.freebsd.org/changeset/base/248418

Log:
  In m_align() add assertions that mbuf is virgin, similar to assertions
  in M_ALIGN(), MH_ALIGN, MEXT_ALIGN() macros.

Modified:
  head/sys/kern/uipc_mbuf.c

Modified: head/sys/kern/uipc_mbuf.c
==
--- head/sys/kern/uipc_mbuf.c   Sun Mar 17 07:39:45 2013(r248417)
+++ head/sys/kern/uipc_mbuf.c   Sun Mar 17 07:41:14 2013(r248418)
@@ -395,7 +395,7 @@ m_demote(struct mbuf *m0, int all)
m_freem(m-m_nextpkt);
m-m_nextpkt = NULL;
}
-   m-m_flags = m-m_flags  (M_EXT|M_RDONLY|M_FREELIST|M_NOFREE);
+   m-m_flags = m-m_flags  (M_EXT|M_RDONLY|M_NOFREE);
}
 }
 
@@ -1877,14 +1877,22 @@ m_mbuftouio(struct uio *uio, struct mbuf
 void
 m_align(struct mbuf *m, int len)
 {
+#ifdef INVARIANTS
+   const char *msg = %s: not a virgin mbuf;
+#endif
int adjust;
 
-   if (m-m_flags  M_EXT)
+   if (m-m_flags  M_EXT) {
+   KASSERT(m-m_data == m-m_ext.ext_buf, (msg, __func__));
adjust = m-m_ext.ext_size - len;
-   else if (m-m_flags  M_PKTHDR)
+   } else if (m-m_flags  M_PKTHDR) {
+   KASSERT(m-m_data == m-m_pktdat, (msg, __func__));
adjust = MHLEN - len;
-   else
+   } else {
+   KASSERT(m-m_data == m-m_dat, (msg, __func__));
adjust = MLEN - len;
+   }
+
m-m_data += adjust ~ (sizeof(long)-1);
 }
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r248418 - head/sys/kern

2013-03-17 Thread Gleb Smirnoff
  In r248418 and r248417 another change from my tree leaked:

- Removing M_FREELIST flag, that comes from historical mbuf
  allocator predating FreeBSD 5.x.

On Sun, Mar 17, 2013 at 07:41:14AM +, Gleb Smirnoff wrote:
T Author: glebius
T Date: Sun Mar 17 07:41:14 2013
T New Revision: 248418
T URL: http://svnweb.freebsd.org/changeset/base/248418
T 
T Log:
T   In m_align() add assertions that mbuf is virgin, similar to assertions
T   in M_ALIGN(), MH_ALIGN, MEXT_ALIGN() macros.
T 
T Modified:
T   head/sys/kern/uipc_mbuf.c
T 
T Modified: head/sys/kern/uipc_mbuf.c
T 
==
T --- head/sys/kern/uipc_mbuf.cSun Mar 17 07:39:45 2013
(r248417)
T +++ head/sys/kern/uipc_mbuf.cSun Mar 17 07:41:14 2013
(r248418)
T @@ -395,7 +395,7 @@ m_demote(struct mbuf *m0, int all)
T  m_freem(m-m_nextpkt);
T  m-m_nextpkt = NULL;
T  }
T -m-m_flags = m-m_flags  (M_EXT|M_RDONLY|M_FREELIST|M_NOFREE);
T +m-m_flags = m-m_flags  (M_EXT|M_RDONLY|M_NOFREE);
T  }
T  }
T  
T @@ -1877,14 +1877,22 @@ m_mbuftouio(struct uio *uio, struct mbuf
T  void
T  m_align(struct mbuf *m, int len)
T  {
T +#ifdef INVARIANTS
T +const char *msg = %s: not a virgin mbuf;
T +#endif
T  int adjust;
T  
T -if (m-m_flags  M_EXT)
T +if (m-m_flags  M_EXT) {
T +KASSERT(m-m_data == m-m_ext.ext_buf, (msg, __func__));
T  adjust = m-m_ext.ext_size - len;
T -else if (m-m_flags  M_PKTHDR)
T +} else if (m-m_flags  M_PKTHDR) {
T +KASSERT(m-m_data == m-m_pktdat, (msg, __func__));
T  adjust = MHLEN - len;
T -else
T +} else {
T +KASSERT(m-m_data == m-m_dat, (msg, __func__));
T  adjust = MLEN - len;
T +}
T +
T  m-m_data += adjust ~ (sizeof(long)-1);
T  }
T  

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


Re: svn commit: r248417 - head/sys/sys

2013-03-17 Thread Gleb Smirnoff
On Sun, Mar 17, 2013 at 10:02:09AM +0100, Andre Oppermann wrote:
A On 17.03.2013 08:39, Gleb Smirnoff wrote:
A  Author: glebius
A  Date: Sun Mar 17 07:39:45 2013
A  New Revision: 248417
A  URL: http://svnweb.freebsd.org/changeset/base/248417
A 
A  Log:
A Add MEXT_ALIGN() macro, similar to M_ALIGN() and MH_ALIGN(), but for
A mbufs with external buffer.
A 
A While you are cleaning up the mbuf usage wouldn't it make sense to remove
A these macros, instead of adding new ones, and use m_align() which handles
A all these cases internally?

I'm thinking about this. Maybe it is worth to request tail alignment as
a flag to the allocating function itself?


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


Re: svn commit: r248417 - head/sys/sys

2013-03-17 Thread Andre Oppermann

On 17.03.2013 10:33, Gleb Smirnoff wrote:

On Sun, Mar 17, 2013 at 10:02:09AM +0100, Andre Oppermann wrote:
A On 17.03.2013 08:39, Gleb Smirnoff wrote:
A  Author: glebius
A  Date: Sun Mar 17 07:39:45 2013
A  New Revision: 248417
A  URL: http://svnweb.freebsd.org/changeset/base/248417
A 
A  Log:
A Add MEXT_ALIGN() macro, similar to M_ALIGN() and MH_ALIGN(), but for
A mbufs with external buffer.
A
A While you are cleaning up the mbuf usage wouldn't it make sense to remove
A these macros, instead of adding new ones, and use m_align() which handles
A all these cases internally?

I'm thinking about this. Maybe it is worth to request tail alignment as
a flag to the allocating function itself?


IMHO that would overload the allocation function(s).  The explicit step of
doing m_align() for those who need it is fine and alerts the reader of what
is going on.  I'm all for simplification and unification, on the other hand
it shouldn't be taken too far creating new complexity on the other side.

--
Andre

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


svn commit: r248422 - in head/sys: fs/tmpfs ufs/ufs

2013-03-17 Thread Konstantin Belousov
Author: kib
Date: Sun Mar 17 15:11:37 2013
New Revision: 248422
URL: http://svnweb.freebsd.org/changeset/base/248422

Log:
  Remove negative name cache entry pointing to the target name, which
  could be instantiated while tdvp was unlocked.
  
  Reported by:  Rick Miller vmiller at hostileadmin com
  Tested by:pho
  MFC after:1 week

Modified:
  head/sys/fs/tmpfs/tmpfs_vnops.c
  head/sys/ufs/ufs/ufs_vnops.c

Modified: head/sys/fs/tmpfs/tmpfs_vnops.c
==
--- head/sys/fs/tmpfs/tmpfs_vnops.c Sun Mar 17 10:57:04 2013
(r248421)
+++ head/sys/fs/tmpfs/tmpfs_vnops.c Sun Mar 17 15:11:37 2013
(r248422)
@@ -1297,6 +1297,7 @@ tmpfs_rename(struct vop_rename_args *v)
cache_purge(fvp);
if (tvp != NULL)
cache_purge(tvp);
+   cache_purge_negative(tdvp);
 
error = 0;
 

Modified: head/sys/ufs/ufs/ufs_vnops.c
==
--- head/sys/ufs/ufs/ufs_vnops.cSun Mar 17 10:57:04 2013
(r248421)
+++ head/sys/ufs/ufs/ufs_vnops.cSun Mar 17 15:11:37 2013
(r248422)
@@ -1554,6 +1554,7 @@ relock:
cache_purge(fvp);
if (tvp)
cache_purge(tvp);
+   cache_purge_negative(tdvp);
 
 unlockout:
vput(fdvp);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r248426 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2013-03-17 Thread Martin Matuska
Author: mm
Date: Sun Mar 17 15:53:27 2013
New Revision: 248426
URL: http://svnweb.freebsd.org/changeset/base/248426

Log:
  Fix typo in sysctl description
  
  Reported by:  Jeremy Chadwick
  MFC after:3 days

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c  Sun Mar 
17 15:35:23 2013(r248425)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c  Sun Mar 
17 15:53:27 2013(r248426)
@@ -271,7 +271,7 @@ uint64_t zfs_deadman_synctime = 1000ULL;
 TUNABLE_QUAD(vfs.zfs.deadman_synctime, zfs_deadman_synctime);
 SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, deadman_synctime, CTLFLAG_RDTUN,
 zfs_deadman_synctime, 0,
-Stalled ZFS I/O expiration time in units of vfs.zfs.txg_synctime_ms);
+Stalled ZFS I/O expiration time in units of vfs.zfs.txg.synctime_ms);
 
 /*
  * Default value of -1 for zfs_deadman_enabled is resolved in
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r248430 - head/sys/arm/broadcom/bcm2835

2013-03-17 Thread Ian Lepore
Author: ian
Date: Sun Mar 17 16:31:09 2013
New Revision: 248430
URL: http://svnweb.freebsd.org/changeset/base/248430

Log:
  Eliminate an intermediate buffer and some memcpy() operations, and do
  DMA directly to/from the buffers passed in from higher layer drivers.
  
  Reviewed by:  gonzo

Modified:
  head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c

Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
==
--- head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c   Sun Mar 17 16:23:19 
2013(r248429)
+++ head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c   Sun Mar 17 16:31:09 
2013(r248430)
@@ -122,9 +122,7 @@ struct bcm_sdhci_softc {
int sc_dma_ch;
bus_dma_tag_t   sc_dma_tag;
bus_dmamap_tsc_dma_map;
-   void*sc_dma_buffer;
-   vm_paddr_t  sc_dma_buffer_phys;
-   vm_paddr_t  sc_sdhci_buffer_phys;;
+   vm_paddr_t  sc_sdhci_buffer_phys;
 };
 
 static int bcm_sdhci_probe(device_t);
@@ -171,8 +169,6 @@ bcm_sdhci_attach(device_t dev)
phandle_t node;
pcell_t cell;
int default_freq;
-   void *buffer;
-   vm_paddr_t buffer_phys;
 
sc-sc_dev = dev;
sc-sc_req = NULL;
@@ -209,7 +205,7 @@ bcm_sdhci_attach(device_t dev)
goto fail;
}
 
-   if (bus_setup_intr(dev, sc-sc_irq_res, INTR_TYPE_MISC | INTR_MPSAFE,
+   if (bus_setup_intr(dev, sc-sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE,
NULL, bcm_sdhci_intr, sc, sc-sc_intrhand))
{
bus_release_resource(dev, SYS_RES_MEMORY, 0, sc-sc_mem_res);
@@ -242,7 +238,7 @@ bcm_sdhci_attach(device_t dev)
 
bcm_dma_setup_intr(sc-sc_dma_ch, bcm_sdhci_dma_intr, sc);
 
-   /* Allocate DMA buffers */
+   /* Allocate bus_dma resources. */
err = bus_dma_tag_create(bus_get_dma_tag(dev),
1, 0, BUS_SPACE_MAXADDR_32BIT,
BUS_SPACE_MAXADDR, NULL, NULL,
@@ -255,34 +251,12 @@ bcm_sdhci_attach(device_t dev)
goto fail;
}
 
-   err = bus_dmamem_alloc(sc-sc_dma_tag, buffer,
-   BUS_DMA_WAITOK | BUS_DMA_COHERENT| BUS_DMA_ZERO,
-   sc-sc_dma_map);
-
-   if (err) {
-   device_printf(dev, cannot allocate DMA memory\n);
-   goto fail;
-   }
-
-   err = bus_dmamap_load(sc-sc_dma_tag, sc-sc_dma_map, buffer,
-   BCM_SDHCI_BUFFER_SIZE, bcm_dmamap_cb, buffer_phys,
-   BUS_DMA_WAITOK);
+   err = bus_dmamap_create(sc-sc_dma_tag, 0, sc-sc_dma_map);
if (err) {
-   device_printf(dev, cannot load DMA memory\n);
-   goto fail;
-   }
-
-   /* 
-* Sanity check: two least bits of address should be zero
-*/
-   if ((uintptr_t)buffer  3) {
-   device_printf(dev,
-   DMA address is not word-aligned\n);
+   device_printf(dev, bus_dmamap_create failed\n);
goto fail;
}
 
-   sc-sc_dma_buffer = buffer;
-   sc-sc_dma_buffer_phys = buffer_phys;
sc-sc_sdhci_buffer_phys = BUS_SPACE_PHYSADDR(sc-sc_mem_res, 
SDHCI_BUFFER);
 
@@ -445,27 +419,23 @@ bcm_sdhci_dma_intr(int ch, void *arg)
struct bcm_sdhci_softc *sc = (struct bcm_sdhci_softc *)arg;
struct sdhci_slot *slot = sc-sc_slot;
uint32_t reg, mask;
-   void *buffer;
+   bus_addr_t pmem;
+   vm_paddr_t pdst, psrc;
size_t len;
-   int left;
+   int left, sync_op;
 
mtx_lock(slot-mtx);
 
-   /* copy DMA buffer to VA if READ */
len = bcm_dma_length(sc-sc_dma_ch);
if (slot-curcmd-data-flags  MMC_DATA_READ) {
-   bus_dmamap_sync(sc-sc_dma_tag, sc-sc_dma_map,
-   BUS_DMASYNC_POSTREAD);
-
+   sync_op = BUS_DMASYNC_POSTREAD;
mask = SDHCI_INT_DATA_AVAIL;
-   /* all dma data in single or contiguous page */
-   buffer = (uint8_t*)(slot-curcmd-data-data) + slot-offset;
-   memcpy(buffer, sc-sc_dma_buffer, len);
} else {
-   bus_dmamap_sync(sc-sc_dma_tag, sc-sc_dma_map,
-   BUS_DMASYNC_POSTWRITE);
+   sync_op = BUS_DMASYNC_POSTWRITE;
mask = SDHCI_INT_SPACE_AVAIL;
}
+   bus_dmamap_sync(sc-sc_dma_tag, sc-sc_dma_map, sync_op);
+   bus_dmamap_unload(sc-sc_dma_tag, sc-sc_dma_map);
 
slot-offset += len;
sc-sc_dma_inuse = 0;
@@ -499,27 +469,22 @@ bcm_sdhci_dma_intr(int ch, void *arg)
SDHCI_INT_STATUS, mask);
 
/* continue next DMA transfer */
+   bus_dmamap_load(sc-sc_dma_tag, sc-sc_dma_map, 
+   (uint8_t *)slot-curcmd-data-data + 
+   slot-offset, left, bcm_dmamap_cb, pmem, 0);
if 

svn commit: r248446 - head/usr.bin/find

2013-03-17 Thread Jilles Tjoelker
Author: jilles
Date: Sun Mar 17 22:51:58 2013
New Revision: 248446
URL: http://svnweb.freebsd.org/changeset/base/248446

Log:
  find: Include nanoseconds when comparing timestamps of files.
  
  When comparing to the timestamp of a given file using -newer, -Xnewer and
  -newerXY (where X and Y are one of m, c, a, B), include nanoseconds in the
  comparison.
  
  The primaries that compare a timestamp of a file to a given value (-Xmin,
  -Xtime, -newerXt) continue to compare times in whole seconds.
  
  Note that the default value 0 of vfs.timestamp_precision almost always
  causes the nanoseconds part to be 0. However, touch -d can set a timestamp
  to the microsecond regardless of that sysctl.
  
  MFC after:1 week

Modified:
  head/usr.bin/find/find.h
  head/usr.bin/find/function.c

Modified: head/usr.bin/find/find.h
==
--- head/usr.bin/find/find.hSun Mar 17 22:24:08 2013(r248445)
+++ head/usr.bin/find/find.hSun Mar 17 22:51:58 2013(r248446)
@@ -88,7 +88,7 @@ typedef struct _plandata {
nlink_t _l_data;/* link count */
short _d_data;  /* level depth (-1 to N) */
off_t _o_data;  /* file size */
-   time_t _t_data; /* time value */
+   struct timespec _t_data;/* time value */
uid_t _u_data;  /* uid */
short _mt_data; /* mount flags */
struct _plandata *_p_data[2];   /* PLAN trees */

Modified: head/usr.bin/find/function.c
==
--- head/usr.bin/find/function.cSun Mar 17 22:24:08 2013
(r248445)
+++ head/usr.bin/find/function.cSun Mar 17 22:51:58 2013
(r248446)
@@ -238,7 +238,7 @@ nextarg(OPTION *option, char ***argvp)
  */
 #defineTIME_CORRECT(p) \
if (((p)-flags  F_ELG_MASK) == F_LESSTHAN) \
-   ++((p)-t_data);
+   ++((p)-t_data.tv_sec);
 
 /*
  * -[acm]min n functions --
@@ -255,16 +255,16 @@ f_Xmin(PLAN *plan, FTSENT *entry)
 {
if (plan-flags  F_TIME_C) {
COMPARE((now - entry-fts_statp-st_ctime +
-   60 - 1) / 60, plan-t_data);
+   60 - 1) / 60, plan-t_data.tv_sec);
} else if (plan-flags  F_TIME_A) {
COMPARE((now - entry-fts_statp-st_atime +
-   60 - 1) / 60, plan-t_data);
+   60 - 1) / 60, plan-t_data.tv_sec);
} else if (plan-flags  F_TIME_B) {
COMPARE((now - entry-fts_statp-st_birthtime +
-   60 - 1) / 60, plan-t_data);
+   60 - 1) / 60, plan-t_data.tv_sec);
} else {
COMPARE((now - entry-fts_statp-st_mtime +
-   60 - 1) / 60, plan-t_data);
+   60 - 1) / 60, plan-t_data.tv_sec);
}
 }
 
@@ -278,7 +278,8 @@ c_Xmin(OPTION *option, char ***argvp)
ftsoptions = ~FTS_NOSTAT;
 
new = palloc(option);
-   new-t_data = find_parsenum(new, option-name, nmins, NULL);
+   new-t_data.tv_sec = find_parsenum(new, option-name, nmins, NULL);
+   new-t_data.tv_nsec = 0;
TIME_CORRECT(new);
return new;
 }
@@ -309,9 +310,9 @@ f_Xtime(PLAN *plan, FTSENT *entry)
xtime = entry-fts_statp-st_mtime;
 
if (plan-flags  F_EXACTTIME)
-   COMPARE(now - xtime, plan-t_data);
+   COMPARE(now - xtime, plan-t_data.tv_sec);
else
-   COMPARE((now - xtime + 86400 - 1) / 86400, plan-t_data);
+   COMPARE((now - xtime + 86400 - 1) / 86400, plan-t_data.tv_sec);
 }
 
 PLAN *
@@ -324,7 +325,8 @@ c_Xtime(OPTION *option, char ***argvp)
ftsoptions = ~FTS_NOSTAT;
 
new = palloc(option);
-   new-t_data = find_parsetime(new, option-name, value);
+   new-t_data.tv_sec = find_parsetime(new, option-name, value);
+   new-t_data.tv_nsec = 0;
if (!(new-flags  F_EXACTTIME))
TIME_CORRECT(new);
return new;
@@ -1152,14 +1154,19 @@ c_name(OPTION *option, char ***argvp)
 int
 f_newer(PLAN *plan, FTSENT *entry)
 {
+   struct timespec ft;
+
if (plan-flags  F_TIME_C)
-   return entry-fts_statp-st_ctime  plan-t_data;
+   ft = entry-fts_statp-st_ctim;
else if (plan-flags  F_TIME_A)
-   return entry-fts_statp-st_atime  plan-t_data;
+   ft = entry-fts_statp-st_atim;
else if (plan-flags  F_TIME_B)
-   return entry-fts_statp-st_birthtime  plan-t_data;
+   ft = entry-fts_statp-st_birthtim;
else
-   return entry-fts_statp-st_mtime  plan-t_data;
+   ft = entry-fts_statp-st_mtim;
+   return (ft.tv_sec  plan-t_data.tv_sec ||
+   (ft.tv_sec == plan-t_data.tv_sec 
+   

svn commit: r248449 - in head/sys: amd64/amd64 amd64/include conf i386/i386 i386/include i386/xen vm

2013-03-17 Thread Attilio Rao
Author: attilio
Date: Mon Mar 18 00:25:02 2013
New Revision: 248449
URL: http://svnweb.freebsd.org/changeset/base/248449

Log:
  Sync back vmcontention branch into HEAD:
  Replace the per-object resident and cached pages splay tree with a
  path-compressed multi-digit radix trie.
  Along with this, switch also the x86-specific handling of idle page
  tables to using the radix trie.
  
  This change is supposed to do the following:
  - Allowing the acquisition of read locking for lookup operations of the
resident/cached pages collections as the per-vm_page_t splay iterators
are now removed.
  - Increase the scalability of the operations on the page collections.
  
  The radix trie does rely on the consumers locking to ensure atomicity of
  its operations.  In order to avoid deadlocks the bisection nodes are
  pre-allocated in the UMA zone.  This can be done safely because the
  algorithm needs at maximum one new node per insert which means the
  maximum number of the desired nodes is the number of available physical
  frames themselves.  However, not all the times a new bisection node is
  really needed.
  
  The radix trie implements path-compression because UFS indirect blocks
  can lead to several objects with a very sparse trie, increasing the number
  of levels to usually scan.  It also helps in the nodes pre-fetching by
  introducing the single node per-insert property.
  
  This code is not generalized (yet) because of the possible loss of
  performance by having much of the sizes in play configurable.
  However, efforts to make this code more general and then reusable in
  further different consumers might be really done.
  
  The only KPI change is the removal of the function vm_page_splay() which
  is now reaped.
  The only KBI change, instead, is the removal of the left/right iterators
  from struct vm_page, which are now reaped.
  
  Further technical notes broken into mealpieces can be retrieved from the
  svn branch:
  http://svn.freebsd.org/base/user/attilio/vmcontention/
  
  Sponsored by: EMC / Isilon storage division
  In collaboration with:alc, jeff
  Tested by:flo, pho, jhb, davide
  Tested by:ian (arm)
  Tested by:andreast (powerpc)

Added:
  head/sys/vm/_vm_radix.h
 - copied unchanged from r248448, 
user/attilio/vmcontention/sys/vm/_vm_radix.h
  head/sys/vm/vm_radix.c
 - copied unchanged from r248448, 
user/attilio/vmcontention/sys/vm/vm_radix.c
  head/sys/vm/vm_radix.h
 - copied unchanged from r248448, 
user/attilio/vmcontention/sys/vm/vm_radix.h
Modified:
  head/sys/amd64/amd64/pmap.c
  head/sys/amd64/include/pmap.h
  head/sys/conf/files
  head/sys/i386/i386/pmap.c
  head/sys/i386/include/pmap.h
  head/sys/i386/xen/pmap.c
  head/sys/vm/vm_object.c
  head/sys/vm/vm_object.h
  head/sys/vm/vm_page.c
  head/sys/vm/vm_page.h
  head/sys/vm/vm_reserv.c

Modified: head/sys/amd64/amd64/pmap.c
==
--- head/sys/amd64/amd64/pmap.c Sun Mar 17 23:53:06 2013(r248448)
+++ head/sys/amd64/amd64/pmap.c Mon Mar 18 00:25:02 2013(r248449)
@@ -131,6 +131,7 @@ __FBSDID($FreeBSD$);
 #include vm/vm_extern.h
 #include vm/vm_pageout.h
 #include vm/vm_pager.h
+#include vm/vm_radix.h
 #include vm/vm_reserv.h
 #include vm/uma.h
 
@@ -1497,7 +1498,8 @@ pmap_free_zero_pages(vm_page_t free)
 
while (free != NULL) {
m = free;
-   free = m-right;
+   free = (void *)m-object;
+   m-object = NULL;
/* Preserve the page's PG_ZERO setting. */
vm_page_free_toq(m);
}
@@ -1516,7 +1518,7 @@ pmap_add_delayed_free_list(vm_page_t m, 
m-flags |= PG_ZERO;
else
m-flags = ~PG_ZERO;
-   m-right = *free;
+   m-object = (void *)*free;
*free = m;
 }

@@ -1526,31 +1528,12 @@ pmap_add_delayed_free_list(vm_page_t m, 
  * for mapping a distinct range of virtual addresses.  The pmap's collection is
  * ordered by this virtual address range.
  */
-static void
+static __inline void
 pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte)
 {
-   vm_page_t root;
 
PMAP_LOCK_ASSERT(pmap, MA_OWNED);
-   root = pmap-pm_root;
-   if (root == NULL) {
-   mpte-left = NULL;
-   mpte-right = NULL;
-   } else {
-   root = vm_page_splay(mpte-pindex, root);
-   if (mpte-pindex  root-pindex) {
-   mpte-left = root-left;
-   mpte-right = root;
-   root-left = NULL;
-   } else if (mpte-pindex == root-pindex)
-   panic(pmap_insert_pt_page: pindex already inserted);
-   else {
-   mpte-right = root-right;
-   mpte-left = root;
-   root-right = NULL;
-   }
-   }
-   pmap-pm_root = mpte;
+   vm_radix_insert(pmap-pm_root, 

svn commit: r248450 - head/sys/dev/ath

2013-03-17 Thread Adrian Chadd
Author: adrian
Date: Mon Mar 18 01:11:52 2013
New Revision: 248450
URL: http://svnweb.freebsd.org/changeset/base/248450

Log:
  Log some more information when the RX buffer allocation failed.

Modified:
  head/sys/dev/ath/if_ath_rx_edma.c

Modified: head/sys/dev/ath/if_ath_rx_edma.c
==
--- head/sys/dev/ath/if_ath_rx_edma.c   Mon Mar 18 00:25:02 2013
(r248449)
+++ head/sys/dev/ath/if_ath_rx_edma.c   Mon Mar 18 01:11:52 2013
(r248450)
@@ -661,9 +661,12 @@ ath_edma_rxfifo_alloc(struct ath_softc *
bf = ath_edma_rxbuf_alloc(sc);
/* XXX should ensure the FIFO is not NULL? */
if (bf == NULL) {
-   device_printf(sc-sc_dev, %s: Q%d: alloc failed?\n,
+   device_printf(sc-sc_dev,
+   %s: Q%d: alloc failed: i=%d, nbufs=%d?\n,
__func__,
-   qtype);
+   qtype,
+   i,
+   nbufs);
break;
}
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r248451 - head/sys/dev/ath

2013-03-17 Thread Adrian Chadd
Author: adrian
Date: Mon Mar 18 01:12:36 2013
New Revision: 248451
URL: http://svnweb.freebsd.org/changeset/base/248451

Log:
  Dump out information about the RX descriptor free list and FIFO information.

Modified:
  head/sys/dev/ath/if_ath_sysctl.c

Modified: head/sys/dev/ath/if_ath_sysctl.c
==
--- head/sys/dev/ath/if_ath_sysctl.cMon Mar 18 01:11:52 2013
(r248450)
+++ head/sys/dev/ath/if_ath_sysctl.cMon Mar 18 01:12:36 2013
(r248451)
@@ -397,6 +397,22 @@ ath_sysctl_txagg(SYSCTL_HANDLER_ARGS)
printf(Total mgmt TX buffers: %d; Total mgmt TX buffers busy: %d\n,
t, i);
 
+   ATH_RX_LOCK(sc);
+   for (i = 0; i  2; i++) {
+   printf(%d: fifolen: %d; head=%d; tail=%d\n,
+   i,
+   sc-sc_rxedma[i].m_fifolen,
+   sc-sc_rxedma[i].m_fifo_head,
+   sc-sc_rxedma[i].m_fifo_tail);
+   }
+   i = 0;
+   TAILQ_FOREACH(bf, sc-sc_rxbuf, bf_list) {
+   i++;
+   }
+   printf(Total RX buffers in free list: %d buffers\n,
+   i);
+   ATH_RX_UNLOCK(sc);
+
return 0;
 }
 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


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

2013-03-17 Thread Kevin Lo
Author: kevlo
Date: Mon Mar 18 01:22:28 2013
New Revision: 248453
URL: http://svnweb.freebsd.org/changeset/base/248453

Log:
  Add restrict keyword to realpath manpage.

Modified:
  head/lib/libc/stdlib/realpath.3

Modified: head/lib/libc/stdlib/realpath.3
==
--- head/lib/libc/stdlib/realpath.3 Mon Mar 18 01:20:11 2013
(r248452)
+++ head/lib/libc/stdlib/realpath.3 Mon Mar 18 01:22:28 2013
(r248453)
@@ -42,7 +42,7 @@
 .Sh SYNOPSIS
 .In stdlib.h
 .Ft char *
-.Fn realpath const char *pathname char *resolved_path
+.Fn realpath const char * restrict pathname char * restrict resolved_path
 .Sh DESCRIPTION
 The
 .Fn realpath
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r248455 - head/sys/dev/ath

2013-03-17 Thread Adrian Chadd
Author: adrian
Date: Mon Mar 18 02:29:57 2013
New Revision: 248455
URL: http://svnweb.freebsd.org/changeset/base/248455

Log:
  Print out the current fifo queue depth correctly - not just the max
  queue depth.
  
  Silly hat to me.

Modified:
  head/sys/dev/ath/if_ath_sysctl.c

Modified: head/sys/dev/ath/if_ath_sysctl.c
==
--- head/sys/dev/ath/if_ath_sysctl.cMon Mar 18 01:30:54 2013
(r248454)
+++ head/sys/dev/ath/if_ath_sysctl.cMon Mar 18 02:29:57 2013
(r248455)
@@ -399,8 +399,9 @@ ath_sysctl_txagg(SYSCTL_HANDLER_ARGS)
 
ATH_RX_LOCK(sc);
for (i = 0; i  2; i++) {
-   printf(%d: fifolen: %d; head=%d; tail=%d\n,
+   printf(%d: fifolen: %d/%d; head=%d; tail=%d\n,
i,
+   sc-sc_rxedma[i].m_fifo_depth,
sc-sc_rxedma[i].m_fifolen,
sc-sc_rxedma[i].m_fifo_head,
sc-sc_rxedma[i].m_fifo_tail);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r248456 - head/sys/dev/sis

2013-03-17 Thread Pyun YongHyeon
Author: yongari
Date: Mon Mar 18 04:46:17 2013
New Revision: 248456
URL: http://svnweb.freebsd.org/changeset/base/248456

Log:
  r119712 introduced SIS_TYPE_83816 but it was not actually set in
  driver such that checking against the type was always false.
  To detect NS DP83816, driver should have checked silicon revision
  register for NS controllers. While here, remove SIS_TYPE_83816 to
  not make the similar mistake again.
  
  Reported by:  Brad Smith ( brad@openbsd )

Modified:
  head/sys/dev/sis/if_sis.c
  head/sys/dev/sis/if_sisreg.h

Modified: head/sys/dev/sis/if_sis.c
==
--- head/sys/dev/sis/if_sis.c   Mon Mar 18 02:29:57 2013(r248455)
+++ head/sys/dev/sis/if_sis.c   Mon Mar 18 04:46:17 2013(r248456)
@@ -625,7 +625,7 @@ sis_miibus_statchg(device_t dev)
SIS_CLRBIT(sc, SIS_RX_CFG, SIS_RXCFG_RX_TXPKTS);
}
 
-   if (sc-sis_type == SIS_TYPE_83816) {
+   if (sc-sis_type == SIS_TYPE_83815  sc-sis_srr = NS_SRR_16A) {
/*
 * MPII03.D: Half Duplex Excessive Collisions.
 * Also page 49 in 83816 manual
@@ -1989,7 +1989,7 @@ sis_initl(struct sis_softc *sc)
return;
}
 
-   if (sc-sis_type == SIS_TYPE_83815 || sc-sis_type == SIS_TYPE_83816) {
+   if (sc-sis_type == SIS_TYPE_83815) {
if (sc-sis_manual_pad != 0)
sc-sis_flags |= SIS_FLAG_MANUAL_PAD;
else

Modified: head/sys/dev/sis/if_sisreg.h
==
--- head/sys/dev/sis/if_sisreg.hMon Mar 18 02:29:57 2013
(r248455)
+++ head/sys/dev/sis/if_sisreg.hMon Mar 18 04:46:17 2013
(r248456)
@@ -439,7 +439,6 @@ struct sis_type {
 #define SIS_TYPE_900   1
 #define SIS_TYPE_7016  2
 #define SIS_TYPE_83815 3
-#define SIS_TYPE_83816 4
 
 struct sis_txdesc {
struct mbuf *tx_m;
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r248457 - in head/sys: cddl/contrib/opensolaris/uts/common/sys cddl/dev/dtrace/powerpc cddl/dev/fbt modules/dtrace modules/dtrace/dtraceall modules/dtrace/fbt powerpc/aim

2013-03-17 Thread Justin Hibbits
Author: jhibbits
Date: Mon Mar 18 05:30:18 2013
New Revision: 248457
URL: http://svnweb.freebsd.org/changeset/base/248457

Log:
  Add FBT for PowerPC DTrace.  Also, clean up the DTrace assembly code,
  much of which is not necessary for PowerPC.
  
  The FBT module can likely be factored into 3 separate files: common,
  intel, and powerpc, rather than duplicating most of the code between
  the x86 and PowerPC flavors.
  
  All DTrace modules for PowerPC will be MFC'd together once Fasttrap is
  completed.

Added:
  head/sys/cddl/dev/fbt/fbt_powerpc.c   (contents, props changed)
Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h
  head/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S
  head/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c
  head/sys/cddl/dev/dtrace/powerpc/dtrace_subr.c
  head/sys/modules/dtrace/Makefile
  head/sys/modules/dtrace/dtraceall/dtraceall.c
  head/sys/modules/dtrace/fbt/Makefile
  head/sys/powerpc/aim/trap.c
  head/sys/powerpc/aim/trap_subr32.S
  head/sys/powerpc/aim/trap_subr64.S

Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h
==
--- head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h   Mon Mar 18 
04:46:17 2013(r248456)
+++ head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h   Mon Mar 18 
05:30:18 2013(r248457)
@@ -2313,10 +2313,10 @@ extern int dtrace_mach_aframes(void);
 #if defined(__i386) || defined(__amd64)
 extern int dtrace_instr_size(uchar_t *instr);
 extern int dtrace_instr_size_isa(uchar_t *, model_t, int *);
-extern void dtrace_invop_add(int (*)(uintptr_t, uintptr_t *, uintptr_t));
-extern void dtrace_invop_remove(int (*)(uintptr_t, uintptr_t *, uintptr_t));
 extern void dtrace_invop_callsite(void);
 #endif
+extern void dtrace_invop_add(int (*)(uintptr_t, uintptr_t *, uintptr_t));
+extern void dtrace_invop_remove(int (*)(uintptr_t, uintptr_t *, uintptr_t));
 
 #ifdef __sparc
 extern int dtrace_blksuword32(uintptr_t, uint32_t *, int);
@@ -2349,6 +2349,15 @@ extern void dtrace_helpers_destroy(proc_
 #defineDTRACE_INVOP_NOP4
 #defineDTRACE_INVOP_RET5
 
+#elif defined(__powerpc__)
+
+#define DTRACE_INVOP_RET   1
+#define DTRACE_INVOP_BCTR  2
+#define DTRACE_INVOP_BLR   3
+#define DTRACE_INVOP_JUMP  4
+#define DTRACE_INVOP_MFLR_R0   5
+#define DTRACE_INVOP_NOP   6
+
 #endif
 
 #ifdef __cplusplus

Modified: head/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S
==
--- head/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S   Mon Mar 18 04:46:17 
2013(r248456)
+++ head/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S   Mon Mar 18 05:30:18 
2013(r248457)
@@ -85,10 +85,10 @@ ASENTRY_NOPROF(dtrace_cas32)
 1:
lwarx   %r0,0,%r3
cmpw%r4,%r0
-   bne 2f
+   bne 2f
stwcx.  %r5,0,%r3
-   bne 1b
-2: mr  %r3,%r0
+   bne 1b
+2: mr  %r3,%r0
blr
 END(dtrace_cas32)
 
@@ -100,22 +100,15 @@ ASENTRY_NOPROF(dtrace_casptr)
 1:
lwarx   %r0,0,%r3
cmpw%r4,%r0
-   bne 2f
+   bne 2f
stwcx.  %r5,0,%r3
-   bne 1b
-2: mr  %r3,%r0
+   bne 1b
+2: mr  %r3,%r0
blr
 END(dtrace_casptr)
 
 
 /*
-uintptr_t
-dtrace_fulword(void *addr)
-*/
-ASENTRY_NOPROF(dtrace_fulword)
-END(dtrace_fulword)
-
-/*
 XXX: unoptimized
 void
 dtrace_copy(uintptr_t src, uintptr_t dest, size_t size)
@@ -127,7 +120,7 @@ ASENTRY_NOPROF(dtrace_copy)
lbzu%r3,1(%r7)
stbu%r3,1(%r8)
addme   %r5,%r5
-   beq 2f
+   beq 2f
 2:
blr
 END(dtrace_copy)
@@ -144,42 +137,19 @@ ASENTRY_NOPROF(dtrace_copystr)
lbzu%r3,1(%r7)
stbu%r3,1(%r8)
addme   %r5,%r5
-   beq 2f
-   or  %r3,%r3,%r3
-   beq 2f
+   beq 2f
+   or  %r3,%r3,%r3
+   beq 2f
andi.   %r0,%r5,0x0fff
-   beq 2f
-   lwz %r0,0(%r6)
+   beq 2f
+   lwz %r0,0(%r6)
andi.   %r0,%r0,CPU_DTRACE_BADADDR
-   beq 1b
+   beq 1b
 2:
blr
 END(dtrace_copystr)
 
 /*
-void dtrace_invop_init(void)
-*/
-ASENTRY_NOPROF(dtrace_invop_init)
-   /* XXX: impement it properly -- implement dtrace_invop_start */
-   li  %r0,0
-   li  %r3,dtrace_invop_jump_addr@l
-   addis   %r3,%r3,dtrace_invop_jump_addr@ha
-   stw %r0,0(%r3)
-   blr
-END(dtrace_invop_init)
-
-/*
-void dtrace_invop_uninit(void)
-*/
-ASENTRY_NOPROF(dtrace_invop_uninit)
-   li  %r0,0
-   li  %r3,dtrace_invop_jump_addr@l
-   addis   %r3,%r3,dtrace_invop_jump_addr@ha
-   stw %r0,0(%r3)
-   blr