Re: svn commit: r238563 - head/gnu/usr.bin/groff/tmac

2012-09-14 Thread Simon J. Gerraty

On Sat, 15 Sep 2012 00:36:31 +0200, Jilles Tjoelker writes:
>POSIX make command lines are executed as if by the shell, and if the
>make implementation wants to optimize by not executing sh for every
>command line, the burden is on it to make it behave the same.

IIRC the man page mentions the exception, putting something similar in
NetBSDs man page would seem a good idea.
Will do so.
___
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: r240527 - head/bin/df

2012-09-14 Thread Eitan Adler
Author: eadler
Date: Fri Sep 14 23:47:23 2012
New Revision: 240527
URL: http://svn.freebsd.org/changeset/base/240527

Log:
  Free memory before exiting in order to
  help tools understand that we're not leaking it.
  
  PR:   bin/171634
  Submitted by: Erik Cederstrand 
  Approved by:  cperciva
  MFC after:3 days

Modified:
  head/bin/df/df.c

Modified: head/bin/df/df.c
==
--- head/bin/df/df.cFri Sep 14 22:53:47 2012(r240526)
+++ head/bin/df/df.cFri Sep 14 23:47:23 2012(r240527)
@@ -290,6 +290,7 @@ main(int argc, char *argv[])
prtstat(&mntbuf[i], &maxwidths);
if (cflag)
prtstat(&totalbuf, &maxwidths);
+   free(mntbuf);
return (rv);
 }
 
___
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: r238563 - head/gnu/usr.bin/groff/tmac

2012-09-14 Thread Jilles Tjoelker
On Wed, Aug 22, 2012 at 05:36:03PM -0700, Simon J. Gerraty wrote:
> 
> On Thu, 23 Aug 2012 00:30:02 +0200, Jilles Tjoelker writes:
> >I think the most important reason is to reduce special cases. The POSIX
> >developers did not want to create a second subset of utilities that are
> >not available via execve() (the first subset is the special builtins).
> >The burden on implementations is very low (see src/usr.bin/alias), and
> >there are some possible use cases:

> The burden may be low, but so is the functionality ;-)
> 'cd' makes little sense in a child process.

> >'cd' will fail if the directory does not exist.

> so will 'test -d', and without giving the false impression that
> something useful will result if the directory does exist.

> >If it avoids the need to add semicolons for mysterious reasons, that may
> >be enough reason.

> I think everyone agrees that re-writing the target to remove the
> spurious 'cd' would have been better.

> That aside, I would disagree, at least for the case of 'cd'.
> It is only the fact that there is probably no way to construct a harmful
> example that did not involve a shell meta char (hence rendering the
> existance of /usr/bin/cd irrelevant).  'cd /tmp/dir && rm -rf *'
> would be rather dangerous if the && (or ;) didn't trigger use of a
> shell, and since as previously noted just 'cd /tmp/dir' is pretty
> pointless,  the functionality is very low.

> In over 25 years of writing makefiles, I don't recall seeing this before.

OK, but then you should document the conditions when shell builtins are
or are not allowed.

POSIX make command lines are executed as if by the shell, and if the
make implementation wants to optimize by not executing sh for every
command line, the burden is on it to make it behave the same.

The bmake (NetBSD make) man page gives the same impression. It does not
mention the optimization of bypassing the shell at all.

The FreeBSD make man page mentions the optimization implicitly when it
describes the meta and builtins keys of the .SHELL special target but
still gives the impression that these are correct (which they mostly
are, but not entirely).

-- 
Jilles Tjoelker
___
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: r240524 - head/share/man/man3

2012-09-14 Thread Jilles Tjoelker
Author: jilles
Date: Fri Sep 14 22:12:04 2012
New Revision: 240524
URL: http://svn.freebsd.org/changeset/base/240524

Log:
  siginfo(3): Document TRAP_DTRACE signal code.
  
  MFC after:1 week

Modified:
  head/share/man/man3/siginfo.3

Modified: head/share/man/man3/siginfo.3
==
--- head/share/man/man3/siginfo.3   Fri Sep 14 22:10:01 2012
(r240523)
+++ head/share/man/man3/siginfo.3   Fri Sep 14 22:12:04 2012
(r240524)
@@ -154,6 +154,8 @@ object-specific hardware error
 process breakpoint
 .It Ta Dv TRAP_TRACE Ta
 process trace trap
+.It Ta Dv TRAP_DTRACE Ta
+DTrace induced trap
 .It Dv SIGCHLD Ta Dv CLD_EXITED Ta
 child has exited
 .It Ta Dv CLD_KILLED Ta
___
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: r240523 - head/share/man/man3

2012-09-14 Thread Jilles Tjoelker
Author: jilles
Date: Fri Sep 14 22:10:01 2012
New Revision: 240523
URL: http://svn.freebsd.org/changeset/base/240523

Log:
  siginfo(3): Document SI_LWP signal code.
  
  Describe SI_LWP as being generated by pthread_kill() because thr_kill() is
  a private undocumented function.
  
  MFC after:1 week

Modified:
  head/share/man/man3/siginfo.3

Modified: head/share/man/man3/siginfo.3
==
--- head/share/man/man3/siginfo.3   Fri Sep 14 22:05:09 2012
(r240522)
+++ head/share/man/man3/siginfo.3   Fri Sep 14 22:10:01 2012
(r240523)
@@ -197,6 +197,9 @@ signal generated by completion of an asy
 signal generated by arrival of a message on an empty message queue
 .It Ta Dv SI_KERNEL Ta
 signal generated by miscellaneous parts of the kernel
+.It Ta Dv SI_LWP Ta
+signal sent by
+.Xr pthread_kill 3
 .El
 .Pp
 In addition, the following signal-specific information is available:
@@ -273,6 +276,10 @@ the value passed to
 system call
 .It Ta Va si_mqd Ta
 the ID of the message queue which generated the signal
+.It Dv SI_LWP Ta Va si_pid Ta
+the process ID that sent the signal
+.It Ta Va si_uid Ta
+real user ID of the process that sent the signal
 .El
 .Sh NOTES
 Currently, the kernel never generates the
@@ -284,9 +291,10 @@ signal is queued when a process changed 
 Realtime Extensions like aio, timer, and message queue also queue
 signals.
 Signals with code
-.Dv SI_USER
-or
+.Dv SI_USER ,
 .Dv SI_KERNEL
+or
+.Dv SI_LWP
 are only queued if there are sufficient resources;
 otherwise,
 .Dv SI_NOINFO
@@ -321,6 +329,10 @@ and
 .Dv SI_KERNEL
 can be generated as of
 .Fx 8.1 .
+The code
+.Dv SI_LWP
+can be generated as of
+.Fx 9.0 .
 .Sh AUTHORS
 This manual page was written by
 .An "David Xu" Aq davi...@freebsd.org .
___
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: r240522 - head/share/man/man3

2012-09-14 Thread Jilles Tjoelker
Author: jilles
Date: Fri Sep 14 22:05:09 2012
New Revision: 240522
URL: http://svn.freebsd.org/changeset/base/240522

Log:
  siginfo(3): Document SI_USER and SI_KERNEL signal codes.
  
  MFC after:1 week

Modified:
  head/share/man/man3/siginfo.3

Modified: head/share/man/man3/siginfo.3
==
--- head/share/man/man3/siginfo.3   Fri Sep 14 22:00:03 2012
(r240521)
+++ head/share/man/man3/siginfo.3   Fri Sep 14 22:05:09 2012
(r240522)
@@ -27,7 +27,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 8, 2005
+.Dd September 14, 2012
 .Dt SIGINFO 3
 .Os
 .Sh NAME
@@ -195,6 +195,8 @@ signal generated by expiration of a time
 signal generated by completion of an asynchronous I/O request
 .It Ta Dv SI_MESGQ Ta
 signal generated by arrival of a message on an empty message queue
+.It Ta Dv SI_KERNEL Ta
+signal generated by miscellaneous parts of the kernel
 .El
 .Pp
 In addition, the following signal-specific information is available:
@@ -235,6 +237,10 @@ or
 Finally, the following code-specific information is available:
 .Bl -column ".Dv SI_QUEUE" ".Va si_overrun"
 .It Sy "Code   Member  Value"
+.It Dv SI_USER Ta Va si_pid Ta
+the process ID that sent the signal
+.It Ta Va si_uid Ta
+real user ID of the process that sent the signal
 .It Dv SI_QUEUE Ta Va si_value Ta
 the value passed to
 .Xr sigqueue 2
@@ -277,6 +283,14 @@ signal is queued when a process changed 
 .Tn POSIX
 Realtime Extensions like aio, timer, and message queue also queue
 signals.
+Signals with code
+.Dv SI_USER
+or
+.Dv SI_KERNEL
+are only queued if there are sufficient resources;
+otherwise,
+.Dv SI_NOINFO
+results.
 For some hardware architectures, the exact value of
 .Va si_addr
 might not be available.
@@ -289,7 +303,8 @@ might not be available.
 .Xr sigwaitinfo 2 ,
 .Xr timer_create 2 ,
 .Xr timer_settime 2 ,
-.Xr waitpid 2
+.Xr waitpid 2 ,
+.Xr pthread_kill 3
 .Sh STANDARDS
 The
 .Vt siginfo_t
@@ -300,6 +315,12 @@ Full support for
 .Tn POSIX
 signal information first appeared in
 .Fx 7.0 .
+The codes
+.Dv SI_USER
+and
+.Dv SI_KERNEL
+can be generated as of
+.Fx 8.1 .
 .Sh AUTHORS
 This manual page was written by
 .An "David Xu" Aq davi...@freebsd.org .
___
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: r240520 - in head/sys: dev/isci/scil dev/vxge/include i386/include/xen netinet

2012-09-14 Thread Eitan Adler
Author: eadler
Date: Fri Sep 14 21:59:55 2012
New Revision: 240520
URL: http://svn.freebsd.org/changeset/base/240520

Log:
  s/teh/the/g
  
  Approved by:  cperciva
  MFC after:3 days

Modified:
  head/sys/dev/isci/scil/scic_io_request.h
  head/sys/dev/vxge/include/vxgehal-ll.h
  head/sys/i386/include/xen/xen-os.h
  head/sys/netinet/sctp_input.c

Modified: head/sys/dev/isci/scil/scic_io_request.h
==
--- head/sys/dev/isci/scil/scic_io_request.hFri Sep 14 21:36:01 2012
(r240519)
+++ head/sys/dev/isci/scil/scic_io_request.hFri Sep 14 21:59:55 2012
(r240520)
@@ -706,7 +706,7 @@ void * scic_stp_io_request_get_h2d_reg_a
  * @brief This method will return the address of the device to host register
  *fis region for the io request object.
  *
- * @param[in] scic_io_request This parameter specifies teh handle to the io
+ * @param[in] scic_io_request This parameter specifies the handle to the io
  *   request object from which to get the device to host register fis
  *   buffer.
  *

Modified: head/sys/dev/vxge/include/vxgehal-ll.h
==
--- head/sys/dev/vxge/include/vxgehal-ll.h  Fri Sep 14 21:36:01 2012
(r240519)
+++ head/sys/dev/vxge/include/vxgehal-ll.h  Fri Sep 14 21:59:55 2012
(r240520)
@@ -3095,7 +3095,7 @@ typedef struct vxge_hal_device_pmd_info_
  * @mac_addr_masks: Mac address masks for each vpath
  *
  * Returns the vpath mask that has the bits set for each vpath allocated
- * for the driver and teh first mac addresse for each vpath
+ * for the driver and the first mac addresse for each vpath
  */
 typedef struct vxge_hal_device_hw_info_t {
u32  host_type;

Modified: head/sys/i386/include/xen/xen-os.h
==
--- head/sys/i386/include/xen/xen-os.h  Fri Sep 14 21:36:01 2012
(r240519)
+++ head/sys/i386/include/xen/xen-os.h  Fri Sep 14 21:59:55 2012
(r240520)
@@ -99,7 +99,7 @@ void trap_init(void);
 
 /*
  * STI/CLI equivalents. These basically set and clear the virtual
- * event_enable flag in teh shared_info structure. Note that when
+ * event_enable flag in the shared_info structure. Note that when
  * the enable bit is set, there may be pending events to be handled.
  * We may therefore call into do_hypervisor_callback() directly.
  */

Modified: head/sys/netinet/sctp_input.c
==
--- head/sys/netinet/sctp_input.c   Fri Sep 14 21:36:01 2012
(r240519)
+++ head/sys/netinet/sctp_input.c   Fri Sep 14 21:59:55 2012
(r240520)
@@ -3122,7 +3122,7 @@ sctp_handle_ecn_cwr(struct sctp_cwr_chun
 {
/*
 * Here we get a CWR from the peer. We must look in the outqueue and
-* make sure that we have a covered ECNE in teh control chunk part.
+* make sure that we have a covered ECNE in the control chunk part.
 * If so remove it.
 */
struct sctp_tmit_chunk *chk;
___
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: r240521 - in head/sys: cam/scsi dev/isci/scil dev/xen/netback libkern net80211

2012-09-14 Thread Eitan Adler
Author: eadler
Date: Fri Sep 14 22:00:03 2012
New Revision: 240521
URL: http://svn.freebsd.org/changeset/base/240521

Log:
  s/ is is / is /g
  s/ a a / a /g
  
  Approved by:  cperciva
  MFC after:3 days

Modified:
  head/sys/cam/scsi/scsi_enc.c
  head/sys/dev/isci/scil/scic_sds_remote_device.h
  head/sys/dev/xen/netback/netback_unit_tests.c
  head/sys/libkern/jenkins_hash.c
  head/sys/net80211/ieee80211_mesh.c

Modified: head/sys/cam/scsi/scsi_enc.c
==
--- head/sys/cam/scsi/scsi_enc.cFri Sep 14 21:59:55 2012
(r240520)
+++ head/sys/cam/scsi/scsi_enc.cFri Sep 14 22:00:03 2012
(r240521)
@@ -627,7 +627,7 @@ enc_log(struct enc_softc *enc, const cha
 /*
  * Is this a device that supports enclosure services?
  *
- * It's a a pretty simple ruleset- if it is device type
+ * It's a pretty simple ruleset- if it is device type
  * 0x0D (13), it's an ENCLOSURE device.
  */
 

Modified: head/sys/dev/isci/scil/scic_sds_remote_device.h
==
--- head/sys/dev/isci/scil/scic_sds_remote_device.h Fri Sep 14 21:59:55 
2012(r240520)
+++ head/sys/dev/isci/scil/scic_sds_remote_device.h Fri Sep 14 22:00:03 
2012(r240521)
@@ -121,7 +121,7 @@ enum SCIC_SDS_STP_REMOTE_DEVICE_READY_SU
 {
/**
 * This is the idle substate for the stp remote device.  When there are no
-* active IO for the device it is is in this state.
+* active IO for the device it is in this state.
 */
SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_IDLE,
 

Modified: head/sys/dev/xen/netback/netback_unit_tests.c
==
--- head/sys/dev/xen/netback/netback_unit_tests.c   Fri Sep 14 21:59:55 
2012(r240520)
+++ head/sys/dev/xen/netback/netback_unit_tests.c   Fri Sep 14 22:00:03 
2012(r240521)
@@ -1478,7 +1478,7 @@ xnb_mbufc2pkt_1cluster(char *buffer, siz
safe_m_freem(&mbuf);
 }
 
-/** xnb_mbufc2pkt on a a two-mbuf chain with short data regions */
+/** xnb_mbufc2pkt on a two-mbuf chain with short data regions */
 static void
 xnb_mbufc2pkt_2short(char *buffer, size_t buflen) {
struct xnb_pkt pkt;
@@ -1521,7 +1521,7 @@ xnb_mbufc2pkt_2short(char *buffer, size_
safe_m_freem(&mbufc2);
 }
 
-/** xnb_mbufc2pkt on a a mbuf chain with >1 mbuf cluster */
+/** xnb_mbufc2pkt on a mbuf chain with >1 mbuf cluster */
 static void
 xnb_mbufc2pkt_long(char *buffer, size_t buflen) {
struct xnb_pkt pkt;
@@ -1560,7 +1560,7 @@ xnb_mbufc2pkt_long(char *buffer, size_t 
safe_m_freem(&mbufc);
 }
 
-/** xnb_mbufc2pkt on a a mbuf chain with >1 mbuf cluster and extra info */
+/** xnb_mbufc2pkt on a mbuf chain with >1 mbuf cluster and extra info */
 static void
 xnb_mbufc2pkt_extra(char *buffer, size_t buflen) {
struct xnb_pkt pkt;

Modified: head/sys/libkern/jenkins_hash.c
==
--- head/sys/libkern/jenkins_hash.c Fri Sep 14 21:59:55 2012
(r240520)
+++ head/sys/libkern/jenkins_hash.c Fri Sep 14 22:00:03 2012
(r240521)
@@ -17,7 +17,7 @@ if SELF_TEST is defined.  You can use th
 the public domain.  It has no warranty.
 
 You probably want to use hashlittle().  hashlittle() and hashbig()
-hash byte arrays.  hashlittle() is is faster than hashbig() on
+hash byte arrays.  hashlittle() is faster than hashbig() on
 little-endian machines.  Intel and AMD are little-endian machines.
 On second thought, you probably want hashlittle2(), which is identical to
 hashlittle() except it returns two 32-bit hashes for the price of one.  

Modified: head/sys/net80211/ieee80211_mesh.c
==
--- head/sys/net80211/ieee80211_mesh.c  Fri Sep 14 21:59:55 2012
(r240520)
+++ head/sys/net80211/ieee80211_mesh.c  Fri Sep 14 22:00:03 2012
(r240521)
@@ -1178,7 +1178,7 @@ mesh_recv_indiv_data_to_fwrd(struct ieee
 
 /*
  * Verifies transmitter, updates lifetime, precursor list and process data
- * locally, if data is is proxy with AE = 10 it could mean data should go
+ * locally, if data is proxy with AE = 10 it could mean data should go
  * on another mesh path or data should be forwarded to the DS.
  *
  * > 0 means we have forwarded data and no need to process locally
___
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: r240519 - in head/release/doc/fr_FR.ISO8859-1: early-adopter errata hardware/alpha hardware/common hardware/i386 hardware/ia64 hardware/pc98 hardware/sparc64 installation/alpha installa...

2012-09-14 Thread Gabor Kovesdan
Author: gabor
Date: Fri Sep 14 21:36:01 2012
New Revision: 240519
URL: http://svn.freebsd.org/changeset/base/240519

Log:
  - Fix build of French release notes with the XMLified doc tree

Modified:
  head/release/doc/fr_FR.ISO8859-1/early-adopter/article.sgml
  head/release/doc/fr_FR.ISO8859-1/errata/article.sgml
  head/release/doc/fr_FR.ISO8859-1/hardware/alpha/article.sgml
  head/release/doc/fr_FR.ISO8859-1/hardware/common/dev.sgml
  head/release/doc/fr_FR.ISO8859-1/hardware/i386/article.sgml
  head/release/doc/fr_FR.ISO8859-1/hardware/ia64/article.sgml
  head/release/doc/fr_FR.ISO8859-1/hardware/pc98/article.sgml
  head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/article.sgml
  head/release/doc/fr_FR.ISO8859-1/installation/alpha/article.sgml
  head/release/doc/fr_FR.ISO8859-1/installation/common/install.sgml
  head/release/doc/fr_FR.ISO8859-1/installation/common/layout.sgml
  head/release/doc/fr_FR.ISO8859-1/installation/common/trouble.sgml
  head/release/doc/fr_FR.ISO8859-1/installation/common/upgrade.sgml
  head/release/doc/fr_FR.ISO8859-1/installation/i386/article.sgml
  head/release/doc/fr_FR.ISO8859-1/installation/pc98/article.sgml
  head/release/doc/fr_FR.ISO8859-1/installation/sparc64/article.sgml
  head/release/doc/fr_FR.ISO8859-1/installation/sparc64/install.sgml
  head/release/doc/fr_FR.ISO8859-1/relnotes/alpha/article.sgml
  head/release/doc/fr_FR.ISO8859-1/relnotes/common/new.sgml
  head/release/doc/fr_FR.ISO8859-1/relnotes/i386/article.sgml

Modified: head/release/doc/fr_FR.ISO8859-1/early-adopter/article.sgml
==
--- head/release/doc/fr_FR.ISO8859-1/early-adopter/article.sgml Fri Sep 14 
21:28:56 2012(r240518)
+++ head/release/doc/fr_FR.ISO8859-1/early-adopter/article.sgml Fri Sep 14 
21:36:01 2012(r240519)
@@ -1,3 +1,14 @@
+
+
+%entities;
+
+%release;
+
+X">
+X">
+]>
+
 
-
-%man;
-
-
-%freebsd;
-
-
-%authors;
-
-
-%teams;
-
-
-%mailing-lists;
-
-
-%release;
-X">
-X">
-
-]>
 
 
   

Modified: head/release/doc/fr_FR.ISO8859-1/errata/article.sgml
==
--- head/release/doc/fr_FR.ISO8859-1/errata/article.sgmlFri Sep 14 
21:28:56 2012(r240518)
+++ head/release/doc/fr_FR.ISO8859-1/errata/article.sgmlFri Sep 14 
21:36:01 2012(r240519)
@@ -1,3 +1,11 @@
+
+
+%entities;
+
+%release;
+]>
+
 
 
-
-%man;
-
-%authors;
-
-%mlists;
-
-%release;
-]>
-
 
   
 

Modified: head/release/doc/fr_FR.ISO8859-1/hardware/alpha/article.sgml
==
--- head/release/doc/fr_FR.ISO8859-1/hardware/alpha/article.sgmlFri Sep 
14 21:28:56 2012(r240518)
+++ head/release/doc/fr_FR.ISO8859-1/hardware/alpha/article.sgmlFri Sep 
14 21:36:01 2012(r240519)
@@ -1,31 +1,26 @@
-
-
-
-
-%man;
-
-%authors;
-
-%mlists;
+
+
+%entities;
 
 %release;
- %sections;
+ %sections
 
 
 
 
 
-
 ]>
 
+
+
 
   &artheader;
   §.intro;

Modified: head/release/doc/fr_FR.ISO8859-1/hardware/common/dev.sgml
==
--- head/release/doc/fr_FR.ISO8859-1/hardware/common/dev.sgml   Fri Sep 14 
21:28:56 2012(r240518)
+++ head/release/doc/fr_FR.ISO8859-1/hardware/common/dev.sgml   Fri Sep 14 
21:36:01 2012(r240519)
@@ -833,7 +833,7 @@
  Carte RAID ATA Promise SuperTrak SX6000

   
-
+
 
 Cartes LSI Logic Fusion/MP
architecture Fiber Channel (gestionnaire mpt)
@@ -857,6 +857,7 @@
 Tekram DC315U
   
 
+
 
 
 Sur toutes les cartes SCSI supportées, le support total
@@ -1375,7 +1376,7 @@

  NetGear FA310-TX Rev. D1
 
-  
 
 
 Cartes Macronix 98713, 98713A, 98715,
@@ -1747,7 +1748,7 @@
  ELECOM LD-PCI2T, LD-PCITS (PCI)


- Corega FastEther PCI-TX (PCI)
+ Corega FastEther PCI-TX (PCI)

   
 

Modified: head/release/doc/fr_FR.ISO8859-1/hardware/i386/article.sgml
==
--- head/release/doc/fr_FR.ISO8859-1/hardware/i386/article.sgml Fri Sep 14 
21:28:56 2012(r240518)
+++ head/release/doc/fr_FR.ISO8859-1/hardware/i386/article.sgml Fri Sep 14 
21:36:01 2012(r240519)
@@ -1,31 +1,26 @@
-
-
-
-
-%man;
-
-%authors;
-
-%mlists;
+
+
+%entities;
 
 %release;
- %sections;
+ %sections
 
 
 
 
 
-
 ]>
 
+
+
 
   &artheader;
   §.intro;

Modified: head/release/doc/fr_FR.ISO8859-1/hardware/ia64/article.sgml
==
--- head/release/doc/fr_FR.ISO8859-1/hardware/ia64/article.sgml Fri Sep 14 
21:28:56 2012(r240518)
+++ head/release/doc/fr_FR.ISO8859-1/hardware/ia64/article.sgml Fri Sep 14 
21:36:01 2012(r240519)
@@ -1,30 +1,26 @@
-
-
-
-%man;
-
-%authors;
-
-%mlists;
+
+
+%entitie

svn commit: r240518 - in head: lib/libc/stdio share/examples/diskless sys/arm/ti sys/dev/altera/jtag_uart sys/dev/buslogic sys/dev/e1000 sys/dev/isci/scil sys/dev/isp sys/dev/mps sys/kern sys/sparc...

2012-09-14 Thread Eitan Adler
Author: eadler
Date: Fri Sep 14 21:28:56 2012
New Revision: 240518
URL: http://svn.freebsd.org/changeset/base/240518

Log:
  Correct double "the the"
  
  Approved by:  cperciva
  MFC after:3 days

Modified:
  head/lib/libc/stdio/scanf_l.3
  head/share/examples/diskless/README.BOOTP
  head/sys/arm/ti/ti_scm.c
  head/sys/dev/altera/jtag_uart/altera_jtag_uart_cons.c
  head/sys/dev/buslogic/bt.c
  head/sys/dev/e1000/e1000_82575.c
  head/sys/dev/e1000/e1000_ich8lan.c
  head/sys/dev/isci/scil/sati.c
  head/sys/dev/isci/scil/sati_callbacks.h
  head/sys/dev/isci/scil/sci_base_controller.h
  head/sys/dev/isci/scil/sci_base_domain.h
  head/sys/dev/isci/scil/sci_base_phy.h
  head/sys/dev/isci/scil/sci_base_remote_device.h
  head/sys/dev/isci/scil/scic_io_request.h
  head/sys/dev/isci/scil/scic_sds_phy.c
  head/sys/dev/isci/scil/scic_sds_port.h
  head/sys/dev/isci/scil/scic_sds_remote_node_context.h
  head/sys/dev/isci/scil/scic_sds_request.c
  head/sys/dev/isci/scil/scu_bios_definitions.h
  head/sys/dev/isp/isp_freebsd.c
  head/sys/dev/mps/mps_sas.c
  head/sys/kern/subr_unit.c
  head/sys/sparc64/sparc64/ata_machdep.c
  head/sys/vm/vm_pageout.c
  head/tools/kerneldoc/subsys/common-Doxyfile
  head/usr.bin/lex/NEWS
  head/usr.sbin/bsdconfig/networking/include/media.subr
  head/usr.sbin/tcpdump/tcpdump/tcpdump.1

Modified: head/lib/libc/stdio/scanf_l.3
==
--- head/lib/libc/stdio/scanf_l.3   Fri Sep 14 21:17:53 2012
(r240517)
+++ head/lib/libc/stdio/scanf_l.3   Fri Sep 14 21:28:56 2012
(r240518)
@@ -57,7 +57,7 @@ The above functions scan input according
 in the locale
 .Fa loc .
 They behave in the same way as the versions without the _l suffix, but use
-the specific locale rather than the the global or per-thread locale.
+the specific locale rather than the global or per-thread locale.
 See the specific manual pages for more information.
 .Sh SEE ALSO
 .Xr scanf 3 ,

Modified: head/share/examples/diskless/README.BOOTP
==
--- head/share/examples/diskless/README.BOOTP   Fri Sep 14 21:17:53 2012
(r240517)
+++ head/share/examples/diskless/README.BOOTP   Fri Sep 14 21:28:56 2012
(r240518)
@@ -85,7 +85,7 @@ options   NULLFS  # nullfs to map 
/var/t
 
BOOTP SERVER SETUP
 
-The BOOTP server must be running on the same logical LAN as the the
+The BOOTP server must be running on the same logical LAN as the
 BOOTP client(s).  You need to setup two things:
 
 (1) You need to NFS-export /, /usr, and /var.

Modified: head/sys/arm/ti/ti_scm.c
==
--- head/sys/arm/ti/ti_scm.cFri Sep 14 21:17:53 2012(r240517)
+++ head/sys/arm/ti/ti_scm.cFri Sep 14 21:28:56 2012(r240518)
@@ -202,7 +202,7 @@ ti_scm_padconf_set(const char *padname, 
  * ti_scm_padconf_get - gets the muxmode and state for a pad/pin
  * @padname: the name of the pad, i.e. "c12"
  * @muxmode: upon return will contain the name of the muxmode of the pin
- * @state: upon return will contain the state of the the pad/pin
+ * @state: upon return will contain the state of the pad/pin
  * 
  *
  * LOCKING:

Modified: head/sys/dev/altera/jtag_uart/altera_jtag_uart_cons.c
==
--- head/sys/dev/altera/jtag_uart/altera_jtag_uart_cons.c   Fri Sep 14 
21:17:53 2012(r240517)
+++ head/sys/dev/altera/jtag_uart/altera_jtag_uart_cons.c   Fri Sep 14 
21:28:56 2012(r240518)
@@ -82,7 +82,7 @@ static cn_ungrab_taju_cnungrab;
 
 /*
  * I/O routines lifted from Deimos.  This is not only MIPS-specific, but also
- * BERI-specific, as we're hard coding the the address at which we expect to
+ * BERI-specific, as we're hard coding the address at which we expect to
  * find the Altera JTAG UART and using it unconditionally.  We use these
  * low-level routines so that we can perform console I/O long before newbus
  * has initialised and devices have attached.  The TTY layer of the driver

Modified: head/sys/dev/buslogic/bt.c
==
--- head/sys/dev/buslogic/bt.c  Fri Sep 14 21:17:53 2012(r240517)
+++ head/sys/dev/buslogic/bt.c  Fri Sep 14 21:28:56 2012(r240518)
@@ -1945,7 +1945,7 @@ bt_cmd(struct bt_softc *bt, bt_op_t opco
bt_outb(bt, COMMAND_REG, opcode);
 
/*
-* Wait for up to 1sec for each byte of the the
+* Wait for up to 1sec for each byte of the
 * parameter list sent to be sent.
 */
timeout = 1;

Modified: head/sys/dev/e1000/e1000_82575.c
==
--- head/sys/dev/e1000/e1000_82575.cFri Sep

svn commit: r240517 - in head/contrib/byacc: . package package/debian

2012-09-14 Thread Baptiste Daroussin
Author: bapt
Date: Fri Sep 14 21:17:53 2012
New Revision: 240517
URL: http://svn.freebsd.org/changeset/base/240517

Log:
  update to version 20120526

Modified:
  head/contrib/byacc/CHANGES
  head/contrib/byacc/VERSION
  head/contrib/byacc/defs.h
  head/contrib/byacc/lr0.c
  head/contrib/byacc/main.c
  head/contrib/byacc/mkpar.c
  head/contrib/byacc/output.c
  head/contrib/byacc/package/byacc.spec
  head/contrib/byacc/package/debian/changelog
  head/contrib/byacc/reader.c
  head/contrib/byacc/symtab.c
  head/contrib/byacc/verbose.c
Directory Properties:
  head/contrib/byacc/   (props changed)

Modified: head/contrib/byacc/CHANGES
==
--- head/contrib/byacc/CHANGES  Fri Sep 14 21:12:41 2012(r240516)
+++ head/contrib/byacc/CHANGES  Fri Sep 14 21:17:53 2012(r240517)
@@ -1,3 +1,37 @@
+2012-05-26  Thomas E. Dickey  
+
+   * package/debian/changelog, package/byacc.spec, VERSION: bump
+
+   * reader.c:
+   some versions of gcc may warn that bp is not set in mark_symbol, e.g.,
+   if GCC_NORETURN is not handled; appease the compiler.
+
+   * reader.c:
+   use the declared types Assoc_t and Value_t in some places where 
compiler only
+   cared about char versus short.
+
+   * reader.c:
+   use TMALLOC() and TREALLOC() macros to simplify allocation/reallocation
+   (no object change)
+
+   * defs.h:
+   add fallbacks for GCC_NORETURN and GCC_UNUSED to make it simpler for 
*BSD
+   packagers to build without configure script.  Also remove duplicate 
declaration
+   of pure_parser variable (prompted by patch by Baptiste Daroussin).
+
+   Also define new TMALLOC and TREALLOC macros to simplify/replace MALLOC 
and
+   REALLOC macros.
+
+   * symtab.c:
+   use TMALLOC() and TREALLOC() macros to simplify allocation/reallocation
+   (no object change)
+
+2012-05-25  Thomas E. Dickey  
+
+   * output.c, main.c, verbose.c, mkpar.c, lr0.c:
+   use TMALLOC() and TREALLOC() macros to simplify allocation/reallocation
+   (no object change)
+
 2012-01-15  Thomas E. Dickey  
 
* package/debian/copyright: bump

Modified: head/contrib/byacc/VERSION
==
--- head/contrib/byacc/VERSION  Fri Sep 14 21:12:41 2012(r240516)
+++ head/contrib/byacc/VERSION  Fri Sep 14 21:17:53 2012(r240517)
@@ -1 +1 @@
-20120115
+20120526

Modified: head/contrib/byacc/defs.h
==
--- head/contrib/byacc/defs.h   Fri Sep 14 21:12:41 2012(r240516)
+++ head/contrib/byacc/defs.h   Fri Sep 14 21:17:53 2012(r240517)
@@ -1,4 +1,4 @@
-/* $Id: defs.h,v 1.36 2011/12/20 01:31:16 tom Exp $ */
+/* $Id: defs.h,v 1.37 2012/05/26 15:23:00 tom Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include 
@@ -11,6 +11,10 @@
 #include 
 #include 
 
+#if defined(__cplusplus)   /* __cplusplus, etc. */
+#define class myClass
+#endif
+
 #define YYMAJOR 1
 #define YYMINOR 9
 
@@ -132,9 +136,11 @@
 #define CALLOC(k,n)(calloc((size_t)(k),(size_t)(n)))
 #defineFREE(x) (free((char*)(x)))
 #define MALLOC(n)  (malloc((size_t)(n)))
+#define TMALLOC(t,n)   ((t*) malloc((size_t)(n) * sizeof(t)))
 #defineNEW(t)  ((t*)allocate(sizeof(t)))
 #defineNEW2(n,t)   ((t*)allocate(((size_t)(n)*sizeof(t
 #define REALLOC(p,n)   (realloc((char*)(p),(size_t)(n)))
+#define TREALLOC(t,p,n)((t*)realloc((char*)(p), (size_t)(n) * 
sizeof(t)))
 
 #define DO_FREE(x) if (x) { FREE(x); x = 0; }
 
@@ -241,6 +247,7 @@ extern char *line;
 extern int lineno;
 extern int outline;
 extern int exit_code;
+extern int pure_parser;
 
 extern const char *const banner[];
 extern const char *const xdecls[];
@@ -301,7 +308,6 @@ extern char *nullable;
 extern bucket *first_symbol;
 extern bucket *last_symbol;
 
-extern int pure_parser;
 extern int nstates;
 extern core *first_state;
 extern shifts *first_shift;
@@ -342,12 +348,22 @@ extern bucket *lookup(const char *);
 extern bucket *make_bucket(const char *);
 
 #ifndef GCC_NORETURN
+#if defined(__dead2)
+#define GCC_NORETURN   __dead2
+#elif defined(__dead)
+#define GCC_NORETURN   __dead
+#else
 #define GCC_NORETURN   /* nothing */
 #endif
+#endif
 
 #ifndef GCC_UNUSED
+#if defined(__unused)
+#define GCC_UNUSED __unused
+#else
 #define GCC_UNUSED /* nothing */
 #endif
+#endif
 
 /* closure.c */
 extern void closure(Value_t * nucleus, int n);
@@ -421,7 +437,7 @@ extern void output(void);
 extern void reader(void);
 
 /* skeleton.c */
-extern void write_section(FILE *fp, const char *const section[]);
+extern void write_section(FILE * fp, const char *const section[]);
 
 /* verbose.c */
 extern void verbose(void);

Modified: head/contrib/byacc/lr0.c
==

svn commit: r240516 - in head/release/doc/de_DE.ISO8859-1: early-adopter errata hardware/alpha hardware/i386 hardware/ia64 hardware/pc98 hardware/sparc64 installation/alpha installation/common inst...

2012-09-14 Thread Gabor Kovesdan
Author: gabor
Date: Fri Sep 14 21:12:41 2012
New Revision: 240516
URL: http://svn.freebsd.org/changeset/base/240516

Log:
  - Fix build of the German release notes with the XMLified doc tree

Modified:
  head/release/doc/de_DE.ISO8859-1/early-adopter/article.sgml
  head/release/doc/de_DE.ISO8859-1/errata/article.sgml
  head/release/doc/de_DE.ISO8859-1/hardware/alpha/article.sgml
  head/release/doc/de_DE.ISO8859-1/hardware/i386/article.sgml
  head/release/doc/de_DE.ISO8859-1/hardware/ia64/article.sgml
  head/release/doc/de_DE.ISO8859-1/hardware/pc98/article.sgml
  head/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.sgml
  head/release/doc/de_DE.ISO8859-1/installation/alpha/article.sgml
  head/release/doc/de_DE.ISO8859-1/installation/common/install.sgml
  head/release/doc/de_DE.ISO8859-1/installation/common/layout.sgml
  head/release/doc/de_DE.ISO8859-1/installation/i386/article.sgml
  head/release/doc/de_DE.ISO8859-1/installation/ia64/article.sgml
  head/release/doc/de_DE.ISO8859-1/installation/pc98/article.sgml
  head/release/doc/de_DE.ISO8859-1/installation/sparc64/article.sgml
  head/release/doc/de_DE.ISO8859-1/readme/article.sgml
  head/release/doc/de_DE.ISO8859-1/relnotes/alpha/article.sgml
  head/release/doc/de_DE.ISO8859-1/relnotes/i386/article.sgml
  head/release/doc/de_DE.ISO8859-1/relnotes/ia64/article.sgml
  head/release/doc/de_DE.ISO8859-1/relnotes/pc98/article.sgml
  head/release/doc/de_DE.ISO8859-1/relnotes/sparc64/article.sgml

Modified: head/release/doc/de_DE.ISO8859-1/early-adopter/article.sgml
==
--- head/release/doc/de_DE.ISO8859-1/early-adopter/article.sgml Fri Sep 14 
20:51:35 2012(r240515)
+++ head/release/doc/de_DE.ISO8859-1/early-adopter/article.sgml Fri Sep 14 
21:12:41 2012(r240516)
@@ -1,3 +1,14 @@
+
+
+%entities;
+
+%release;
+
+X">
+X">
+]>
+
 
 
-
-%man;
-
-
-%freebsd;
-
-
-%authors;
-
-
-%teams;
-
-
-%mailing-lists;
-
-
-%release;
-
-X">
-X">
-
-]>
-
 
   
 Hinweise für die ersten Anwender von &os;

Modified: head/release/doc/de_DE.ISO8859-1/errata/article.sgml
==
--- head/release/doc/de_DE.ISO8859-1/errata/article.sgmlFri Sep 14 
20:51:35 2012(r240515)
+++ head/release/doc/de_DE.ISO8859-1/errata/article.sgmlFri Sep 14 
21:12:41 2012(r240516)
@@ -1,3 +1,11 @@
+
+
+%entities;
+
+%release;
+]>
+
 
 
-
-%man;
-
-%authors;
-
-%translators;
-
-%mlists;
-
-%release;
-]>
-
 
   
 

Modified: head/release/doc/de_DE.ISO8859-1/hardware/alpha/article.sgml
==
--- head/release/doc/de_DE.ISO8859-1/hardware/alpha/article.sgmlFri Sep 
14 20:51:35 2012(r240515)
+++ head/release/doc/de_DE.ISO8859-1/hardware/alpha/article.sgmlFri Sep 
14 21:12:41 2012(r240516)
@@ -1,29 +1,23 @@
-
-
-
-%man;
-
-%authors;
-
-%translators;
-
-%mlists;
+
+
+%entities;
 
 %release;
- %sections;
+ %sections
 
 
 
 
 
-
 ]>
 
+
+
 
   &artheader;
   §.intro;

Modified: head/release/doc/de_DE.ISO8859-1/hardware/i386/article.sgml
==
--- head/release/doc/de_DE.ISO8859-1/hardware/i386/article.sgml Fri Sep 14 
20:51:35 2012(r240515)
+++ head/release/doc/de_DE.ISO8859-1/hardware/i386/article.sgml Fri Sep 14 
21:12:41 2012(r240516)
@@ -1,27 +1,23 @@
-
-
-
-%man;
-
-%authors;
-
-%mlists;
+
+
+%entities;
 
 %release;
- %sections;
+ %sections
 
 
 
 
 
-
 ]>
 
+
+
 
   &artheader;
   §.intro;

Modified: head/release/doc/de_DE.ISO8859-1/hardware/ia64/article.sgml
==
--- head/release/doc/de_DE.ISO8859-1/hardware/ia64/article.sgml Fri Sep 14 
20:51:35 2012(r240515)
+++ head/release/doc/de_DE.ISO8859-1/hardware/ia64/article.sgml Fri Sep 14 
21:12:41 2012(r240516)
@@ -1,27 +1,23 @@
-
-
-
-%man;
-
-%authors;
-
-%mlists;
+
+
+%entities;
 
 %release;
- %sections;
+ %sections
 
 
 
 
 
-
 ]>
 
+
+
 
   &artheader;
 

Modified: head/release/doc/de_DE.ISO8859-1/hardware/pc98/article.sgml
==
--- head/release/doc/de_DE.ISO8859-1/hardware/pc98/article.sgml Fri Sep 14 
20:51:35 2012(r240515)
+++ head/release/doc/de_DE.ISO8859-1/hardware/pc98/article.sgml Fri Sep 14 
21:12:41 2012(r240516)
@@ -1,27 +1,23 @@
-
-
-
-%man;
-
-%authors;
-
-%mlists;
+
+
+%entities;
 
 %release;
- %sections;
+ %sections
 
 
 
 
 
-
 ]>
 
+
+
 
   &artheader;
   §.intro;

Modified: head/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.sgml
==
--- head/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.sgml  Fri Sep 
14 20:51:35 2012(r240515)
+++ head/release/doc/de_DE.ISO8859-1/hardware/sparc6

svn commit: r240515 - head/release/doc/share/misc

2012-09-14 Thread Glen Barber
Author: gjb (doc,ports committer)
Date: Fri Sep 14 20:51:35 2012
New Revision: 240515
URL: http://svn.freebsd.org/changeset/base/240515

Log:
  Revert previous commit...
  
  Pointyhat to: gjb (myself)

Modified:
  head/release/doc/share/misc/man2hwnotes.pl

Modified: head/release/doc/share/misc/man2hwnotes.pl
==
--- head/release/doc/share/misc/man2hwnotes.pl  Fri Sep 14 20:05:38 2012
(r240514)
+++ head/release/doc/share/misc/man2hwnotes.pl  Fri Sep 14 20:51:35 2012
(r240515)
@@ -102,8 +102,8 @@ EOT
 
 if ($only_list_out) {
 # Print the default device preamble entities
-print "The\n";
-print "driver supports:\n";
+print "\n";
+print "\n";
 }
 
 foreach my $page (@ARGV) {
___
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: r240514 - head/sys/dev/isci/scil

2012-09-14 Thread Jim Harris
Author: jimharris
Date: Fri Sep 14 20:05:38 2012
New Revision: 240514
URL: http://svn.freebsd.org/changeset/base/240514

Log:
  isci(4): Fix SCSI/ATA translation for SCSI_WRITE_BUFFER w/ mode==0x7
  (download microcode with offsets, save, and activate).
  
  SATI translation layer was incorrectly using allocation length instead
  of blocks, and was constructing the ATA command incorrectly.
  
  Also change #define to specify that the 512 block size here is
  specific for DOWNLOAD_MICROCODE, and does not relate to the device's
  logical block size.
  
  Submitted by: scottl (with small modifications)
  MFC after: 3 days

Modified:
  head/sys/dev/isci/scil/sati_util.c
  head/sys/dev/isci/scil/sati_write_buffer.c

Modified: head/sys/dev/isci/scil/sati_util.c
==
--- head/sys/dev/isci/scil/sati_util.c  Fri Sep 14 19:55:28 2012
(r240513)
+++ head/sys/dev/isci/scil/sati_util.c  Fri Sep 14 20:05:38 2012
(r240514)
@@ -1976,6 +1976,8 @@ void sati_ata_download_microcode_constru
 )
 {
U8 * register_fis = sati_cb_get_h2d_register_fis_address(ata_io);
+   U32 allocation_blocks = allocation_length >> 9;
+   U32 buffer_blkoffset = buffer_offset >> 9;
 
sati_set_ata_command(register_fis, ATA_DOWNLOAD_MICROCODE);
sati_set_ata_features(register_fis, mode);
@@ -1987,9 +1989,10 @@ void sati_ata_download_microcode_constru
}
else //mode == 0x03
{
-  sati_set_ata_sector_count(register_fis, (U8) (allocation_length >> 9));
-  sati_set_ata_lba_low(register_fis, (U8) (allocation_length >> 17));
-  sati_set_ata_lba_high(register_fis, (U8) (buffer_offset >> 9));
+  sati_set_ata_sector_count(register_fis, (U8) (allocation_blocks & 0xff));
+  sati_set_ata_lba_low(register_fis, (U8) ((allocation_blocks >> 8) & 
0xff));
+  sati_set_ata_lba_mid(register_fis, (U8) (buffer_blkoffset & 0xff));
+  sati_set_ata_lba_high(register_fis, (U8) ((buffer_blkoffset >> 8) & 
0xff));
}
 
if((allocation_length == 0) && (buffer_offset == 0))

Modified: head/sys/dev/isci/scil/sati_write_buffer.c
==
--- head/sys/dev/isci/scil/sati_write_buffer.c  Fri Sep 14 19:55:28 2012
(r240513)
+++ head/sys/dev/isci/scil/sati_write_buffer.c  Fri Sep 14 20:05:38 2012
(r240514)
@@ -66,7 +66,7 @@ __FBSDID("$FreeBSD$");
 #define WRITE_BUFFER_WRITE_DATA  0x02
 #define WRITE_BUFFER_DOWNLOAD_SAVE   0x05
 #define WRITE_BUFFER_OFFSET_DOWNLOAD_SAVE0x07
-#define BLOCK_SIZE   512
+#define DOWNLOAD_MICROCODE_BLOCK_SIZE512
 
 /**
 * @brief This method will translate the SCSI Write Buffer command
@@ -89,6 +89,7 @@ SATI_STATUS sati_write_buffer_translate_
U8 * cdb = sati_cb_get_cdb_address(scsi_io);
SATI_STATUS status = SATI_FAILURE;
U32 allocation_length;
+   U32 allocation_blocks;
U32 buffer_offset;
 
allocation_length = ((sati_get_cdb_byte(cdb, 6) << 16) |
@@ -100,11 +101,13 @@ SATI_STATUS sati_write_buffer_translate_
 (sati_get_cdb_byte(cdb, 5)));
 
sequence->allocation_length = allocation_length;
+   allocation_blocks = allocation_length / DOWNLOAD_MICROCODE_BLOCK_SIZE;
 
switch(sati_get_cdb_byte(cdb, 1))
{
   case WRITE_BUFFER_WRITE_DATA:
- if((allocation_length == BLOCK_SIZE) && (buffer_offset == 0) &&
+ if((allocation_length == DOWNLOAD_MICROCODE_BLOCK_SIZE) && 
+(buffer_offset == 0) &&
 (sati_get_cdb_byte(cdb, 2) == 0))
  {
 sati_ata_write_buffer_construct(ata_io, sequence);
@@ -146,8 +149,9 @@ SATI_STATUS sati_write_buffer_translate_
   case WRITE_BUFFER_OFFSET_DOWNLOAD_SAVE:
  if(((allocation_length & 0x01FF) == 0) && //Bits 08:00 need to be 
zero per SAT2v7
 ((buffer_offset & 0x01FF) == 0) &&
-(allocation_length <= 
sequence->device->max_blocks_per_microcode_command) &&
-(allocation_length >= 
sequence->device->min_blocks_per_microcode_command))
+(allocation_blocks <= 
sequence->device->max_blocks_per_microcode_command) &&
+((allocation_blocks >= 
sequence->device->min_blocks_per_microcode_command) ||
+(allocation_length == 0)))
  {
 sati_ata_download_microcode_construct(
ata_io,
___
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: r240513 - head/sys/kern

2012-09-14 Thread Andriy Gapon
Author: avg
Date: Fri Sep 14 19:55:28 2012
New Revision: 240513
URL: http://svn.freebsd.org/changeset/base/240513

Log:
  sched_ule: fix inverted condition in reporting of priority lending via ktr
  
  Reviewed by:  kan
  MFC after:1 week

Modified:
  head/sys/kern/sched_ule.c

Modified: head/sys/kern/sched_ule.c
==
--- head/sys/kern/sched_ule.c   Fri Sep 14 19:52:33 2012(r240512)
+++ head/sys/kern/sched_ule.c   Fri Sep 14 19:55:28 2012(r240513)
@@ -1639,7 +1639,7 @@ sched_thread_priority(struct thread *td,
"prio:%d", td->td_priority, "new prio:%d", prio,
KTR_ATTR_LINKED, sched_tdname(curthread));
SDT_PROBE3(sched, , , change_pri, td, td->td_proc, prio);
-   if (td != curthread && prio > td->td_priority) {
+   if (td != curthread && prio < td->td_priority) {
KTR_POINT3(KTR_SCHED, "thread", sched_tdname(curthread),
"lend prio", "prio:%d", td->td_priority, "new prio:%d",
prio, KTR_ATTR_LINKED, sched_tdname(td));
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r240512 - head/release/doc/share/misc

2012-09-14 Thread Glen Barber
Author: gjb (doc,ports committer)
Date: Fri Sep 14 19:52:33 2012
New Revision: 240512
URL: http://svn.freebsd.org/changeset/base/240512

Log:
  Fix man2hwnotes.pl script, which should fix the RELNOTES build.

Modified:
  head/release/doc/share/misc/man2hwnotes.pl

Modified: head/release/doc/share/misc/man2hwnotes.pl
==
--- head/release/doc/share/misc/man2hwnotes.pl  Fri Sep 14 18:57:07 2012
(r240511)
+++ head/release/doc/share/misc/man2hwnotes.pl  Fri Sep 14 19:52:33 2012
(r240512)
@@ -102,8 +102,8 @@ EOT
 
 if ($only_list_out) {
 # Print the default device preamble entities
-print "\n";
-print "\n";
+print "The\n";
+print "driver supports:\n";
 }
 
 foreach my $page (@ARGV) {
___
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: r240496 - in head: lib/libfetch usr.bin/fetch

2012-09-14 Thread Dag-Erling Smørgrav
Baptiste Daroussin  writes:
> Do you plan to push it to 9.1, that will help having pkgng linked
> against libmd.

That's not really up to me.  I'll ask re@.

DES
-- 
Dag-Erling Smørgrav - d...@des.no
___
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: r240507 - head/sys/netinet

2012-09-14 Thread Michael Tuexen
Author: tuexen
Date: Fri Sep 14 18:32:20 2012
New Revision: 240507
URL: http://svn.freebsd.org/changeset/base/240507

Log:
  Small cleanups. No functional change.
  
  MFC after:10 days

Modified:
  head/sys/netinet/sctputil.c

Modified: head/sys/netinet/sctputil.c
==
--- head/sys/netinet/sctputil.c Fri Sep 14 17:50:42 2012(r240506)
+++ head/sys/netinet/sctputil.c Fri Sep 14 18:32:20 2012(r240507)
@@ -58,8 +58,7 @@ extern struct sctp_cc_functions sctp_cc_
 extern struct sctp_ss_functions sctp_ss_functions[];
 
 void
-sctp_sblog(struct sockbuf *sb,
-struct sctp_tcb *stcb, int from, int incr)
+sctp_sblog(struct sockbuf *sb, struct sctp_tcb *stcb, int from, int incr)
 {
struct sctp_cwnd_log sctp_clog;
 
@@ -103,7 +102,6 @@ sctp_log_closing(struct sctp_inpcb *inp,
sctp_clog.x.misc.log4);
 }
 
-
 void
 rto_logging(struct sctp_nets *net, int from)
 {
@@ -198,8 +196,7 @@ sctp_log_map(uint32_t map, uint32_t cum,
 }
 
 void
-sctp_log_fr(uint32_t biggest_tsn, uint32_t biggest_new_tsn, uint32_t tsn,
-int from)
+sctp_log_fr(uint32_t biggest_tsn, uint32_t biggest_new_tsn, uint32_t tsn, int 
from)
 {
struct sctp_cwnd_log sctp_clog;
 
@@ -242,8 +239,7 @@ sctp_log_mb(struct mbuf *m, int from)
 }
 
 void
-sctp_log_strm_del(struct sctp_queued_to_read *control, struct 
sctp_queued_to_read *poschk,
-int from)
+sctp_log_strm_del(struct sctp_queued_to_read *control, struct 
sctp_queued_to_read *poschk, int from)
 {
struct sctp_cwnd_log sctp_clog;
 
@@ -4215,7 +4211,6 @@ sctp_print_address(struct sockaddr *sa)
 #ifdef INET6
char ip6buf[INET6_ADDRSTRLEN];
 
-   ip6buf[0] = 0;
 #endif
 
switch (sa->sa_family) {
___
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: r240506 - in head: lib/libpam/modules/pam_lastlog libexec/comsat libexec/ftpd share/man/man3 share/man/man7 usr.bin/finger usr.bin/last usr.bin/ncplist usr.bin/talk usr.bin/users usr.bi...

2012-09-14 Thread Eitan Adler
Author: eadler
Date: Fri Sep 14 17:50:42 2012
New Revision: 240506
URL: http://svn.freebsd.org/changeset/base/240506

Log:
  Bump date missed in r202756
  
  PR:   docs/171624
  Submitted by: bdrewery
  Approved by:  gabor
  MFC after:3 days

Modified:
  head/lib/libpam/modules/pam_lastlog/pam_lastlog.8
  head/libexec/comsat/comsat.8
  head/libexec/ftpd/ftpd.8
  head/share/man/man3/sysexits.3
  head/share/man/man7/hier.7
  head/usr.bin/finger/finger.1
  head/usr.bin/last/last.1
  head/usr.bin/ncplist/ncplist.1
  head/usr.bin/talk/talk.1
  head/usr.bin/users/users.1
  head/usr.bin/w/w.1
  head/usr.sbin/ac/ac.8
  head/usr.sbin/rwhod/rwhod.8

Modified: head/lib/libpam/modules/pam_lastlog/pam_lastlog.8
==
--- head/lib/libpam/modules/pam_lastlog/pam_lastlog.8   Fri Sep 14 15:22:15 
2012(r240505)
+++ head/lib/libpam/modules/pam_lastlog/pam_lastlog.8   Fri Sep 14 17:50:42 
2012(r240506)
@@ -34,7 +34,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd January 24, 2002
+.Dd January 21, 2010
 .Dt PAM_LASTLOG 8
 .Os
 .Sh NAME

Modified: head/libexec/comsat/comsat.8
==
--- head/libexec/comsat/comsat.8Fri Sep 14 15:22:15 2012
(r240505)
+++ head/libexec/comsat/comsat.8Fri Sep 14 17:50:42 2012
(r240506)
@@ -32,7 +32,7 @@
 .\" @(#)comsat.8   8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd July 9, 2002
+.Dd January 21, 2010
 .Dt COMSAT 8
 .Os
 .Sh NAME

Modified: head/libexec/ftpd/ftpd.8
==
--- head/libexec/ftpd/ftpd.8Fri Sep 14 15:22:15 2012(r240505)
+++ head/libexec/ftpd/ftpd.8Fri Sep 14 17:50:42 2012(r240506)
@@ -32,7 +32,7 @@
 .\" @(#)ftpd.8 8.2 (Berkeley) 4/19/94
 .\" $FreeBSD$
 .\"
-.Dd April 20, 2007
+.Dd January 21, 2010
 .Dt FTPD 8
 .Os
 .Sh NAME

Modified: head/share/man/man3/sysexits.3
==
--- head/share/man/man3/sysexits.3  Fri Sep 14 15:22:15 2012
(r240505)
+++ head/share/man/man3/sysexits.3  Fri Sep 14 17:50:42 2012
(r240506)
@@ -26,7 +26,7 @@
 .\" $FreeBSD$
 .\"
 .\" "
-.Dd March 31, 1996
+.Dd January 21, 2010
 .Dt SYSEXITS 3
 .Os
 .Sh NAME

Modified: head/share/man/man7/hier.7
==
--- head/share/man/man7/hier.7  Fri Sep 14 15:22:15 2012(r240505)
+++ head/share/man/man7/hier.7  Fri Sep 14 17:50:42 2012(r240506)
@@ -32,7 +32,7 @@
 .\"@(#)hier.7  8.1 (Berkeley) 6/5/93
 .\" $FreeBSD$
 .\"
-.Dd May 25, 2008
+.Dd January 21, 2010
 .Dt HIER 7
 .Os
 .Sh NAME

Modified: head/usr.bin/finger/finger.1
==
--- head/usr.bin/finger/finger.1Fri Sep 14 15:22:15 2012
(r240505)
+++ head/usr.bin/finger/finger.1Fri Sep 14 17:50:42 2012
(r240506)
@@ -28,7 +28,7 @@
 .\"@(#)finger.18.3 (Berkeley) 5/5/94
 .\" $FreeBSD$
 .\"
-.Dd April 11, 2007
+.Dd January 21, 2010
 .Dt FINGER 1
 .Os
 .Sh NAME

Modified: head/usr.bin/last/last.1
==
--- head/usr.bin/last/last.1Fri Sep 14 15:22:15 2012(r240505)
+++ head/usr.bin/last/last.1Fri Sep 14 17:50:42 2012(r240506)
@@ -28,7 +28,7 @@
 .\" @(#)last.1 8.1 (Berkeley) 6/6/93
 .\" $FreeBSD$
 .\"
-.Dd July 27, 2003
+.Dd January 21, 2010
 .Dt LAST 1
 .Os
 .Sh NAME

Modified: head/usr.bin/ncplist/ncplist.1
==
--- head/usr.bin/ncplist/ncplist.1  Fri Sep 14 15:22:15 2012
(r240505)
+++ head/usr.bin/ncplist/ncplist.1  Fri Sep 14 17:50:42 2012
(r240506)
@@ -1,5 +1,5 @@
 .\" $FreeBSD$
-.Dd June 24, 1999
+.Dd January 21, 2010
 .Dt NCPLIST 1
 .Os
 .Sh NAME

Modified: head/usr.bin/talk/talk.1
==
--- head/usr.bin/talk/talk.1Fri Sep 14 15:22:15 2012(r240505)
+++ head/usr.bin/talk/talk.1Fri Sep 14 17:50:42 2012(r240506)
@@ -28,7 +28,7 @@
 .\" @(#)talk.1 8.1 (Berkeley) 6/6/93
 .\" $FreeBSD$
 .\"
-.Dd July 3, 2004
+.Dd January 21, 2010
 .Dt TALK 1
 .Os
 .Sh NAME

Modified: head/usr.bin/users/users.1
==
--- head/usr.bin/users/users.1  Fri Sep 14 15:22:15 2012(r240505)
+++ head/usr.bin/users/users.1  Fri Sep 14 17:50:42 2012(r240506)
@@ -28,7 +28,7 @@
 .\" @(#)users.18.1 (Berkeley) 6/6/93
 .\" $FreeBSD$
 .\"
-.Dd June 6, 1993
+.Dd January 21, 2010
 .Dt USERS 1
 .Os
 .Sh NAME

Modified: head/usr.bin/w/w.1
==
--- head/usr.bin/w/w.

svn commit: r240505 - head/bin/sh

2012-09-14 Thread Jilles Tjoelker
Author: jilles
Date: Fri Sep 14 15:22:15 2012
New Revision: 240505
URL: http://svn.freebsd.org/changeset/base/240505

Log:
  sh: Reduce code duplication: use setinputfile instead of open/setinputfd
  combination.
  
  MFC after:2 weeks

Modified:
  head/bin/sh/main.c

Modified: head/bin/sh/main.c
==
--- head/bin/sh/main.c  Fri Sep 14 15:09:59 2012(r240504)
+++ head/bin/sh/main.c  Fri Sep 14 15:22:15 2012(r240505)
@@ -266,14 +266,7 @@ read_profile(char *name)
 void
 readcmdfile(const char *name)
 {
-   int fd;
-
-   INTOFF;
-   if ((fd = open(name, O_RDONLY)) >= 0)
-   setinputfd(fd, 1);
-   else
-   error("cannot open %s: %s", name, strerror(errno));
-   INTON;
+   setinputfile(name, 1);
cmdloop(0);
popfile();
 }
___
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: r240496 - in head: lib/libfetch usr.bin/fetch

2012-09-14 Thread Baptiste Daroussin
On Fri, Sep 14, 2012 at 01:00:43PM +, Dag-Erling Sm�rgrav wrote:
> Author: des
> Date: Fri Sep 14 13:00:43 2012
> New Revision: 240496
> URL: http://svn.freebsd.org/changeset/base/240496
> 
> Log:
>   Use libmd if and only if OpenSSL is not available.
>   
>   PR: bin/171402
>   MFC after:  3 days
> 
> Modified:
>   head/lib/libfetch/Makefile
>   head/lib/libfetch/http.c
>   head/usr.bin/fetch/Makefile
> 
> Modified: head/lib/libfetch/Makefile
> ==
> --- head/lib/libfetch/MakefileFri Sep 14 12:15:13 2012
> (r240495)
> +++ head/lib/libfetch/MakefileFri Sep 14 13:00:43 2012
> (r240496)
> @@ -16,8 +16,8 @@ CFLAGS+=-DINET6
>  
>  .if ${MK_OPENSSL} != "no"
>  CFLAGS+= -DWITH_SSL
> -DPADD=   ${LIBSSL} ${LIBCRYPTO} ${LIBMD}
> -LDADD=   -lssl -lcrypto -lmd
> +DPADD=   ${LIBSSL} ${LIBCRYPTO}
> +LDADD=   -lssl -lcrypto
>  .else
>  DPADD=   ${LIBMD}
>  LDADD=   -lmd
> 
> Modified: head/lib/libfetch/http.c
> ==
> --- head/lib/libfetch/http.c  Fri Sep 14 12:15:13 2012(r240495)
> +++ head/lib/libfetch/http.c  Fri Sep 14 13:00:43 2012(r240496)
> @@ -76,7 +76,15 @@ __FBSDID("$FreeBSD$");
>  #include 
>  #include 
>  #include 
> +
> +#ifdef WITH_SSL
> +#include 
> +#define MD5Init(c) MD5_Init(c)
> +#define MD5Update(c, data, len) MD5_Update(c, data, len)
> +#define MD5Final(md, c) MD5_Final(md, c)
> +#else
>  #include 
> +#endif
>  
>  #include 
>  #include 
> 
> Modified: head/usr.bin/fetch/Makefile
> ==
> --- head/usr.bin/fetch/Makefile   Fri Sep 14 12:15:13 2012
> (r240495)
> +++ head/usr.bin/fetch/Makefile   Fri Sep 14 13:00:43 2012
> (r240496)
> @@ -4,11 +4,12 @@
>  
>  PROG=fetch
>  CSTD?=   c99
> +.if ${MK_OPENSSL} != "no"
> +DPADD=   ${LIBFETCH} ${LIBSSL} ${LIBCRYPTO}
> +LDADD=   -lfetch -lssl -lcrypto
> +.else
>  DPADD=   ${LIBFETCH} ${LIBMD}
>  LDADD=   -lfetch -lmd
> -.if ${MK_OPENSSL} != "no"
> -DPADD+=  ${LIBSSL} ${LIBCRYPTO}
> -LDADD+=  -lssl -lcrypto
>  .endif
>  
>  .include 

Do you plan to push it to 9.1, that will help having pkgng linked against libmd.

regards,
Bapt


pgp9davHeHdEE.pgp
Description: PGP signature


Re: svn commit: r240484 - head/sys/dev/fdt

2012-09-14 Thread Grzegorz Bernacki

On 09/14/12 16:16, Aleksandr Rybalko wrote:

On Fri, 14 Sep 2012 09:33:35 + (UTC)
Grzegorz Bernacki  wrote:


Author: gber
Date: Fri Sep 14 09:33:35 2012
New Revision: 240484
URL: http://svn.freebsd.org/changeset/base/240484

Log:
   Set busaddr and bussize to 0 when fdt_get_range() fails.


Why bussize is 0?


I though that setting it to 0 makes sense, since we do not use
this variable in this function and setting it to some value could be 
confused. I could skip setting it, but I also thought it could cause 
confusion :). If you think that setting it to other value or remove it 
will be better please let me know and I will change it.


thanks
grzesiek
___
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: r240427 - head/sys/dev/virtio

2012-09-14 Thread Bryan Venteicher
Hi,


- Original Message -
> From: "John Baldwin" 
> To: "Konstantin Belousov" 
> Cc: "Bryan Venteicher" , 
> svn-src-head@freebsd.org, svn-src-...@freebsd.org,
> src-committ...@freebsd.org, "Peter Grehan" 
> Sent: Friday, September 14, 2012 7:17:54 AM
> Subject: Re: svn commit: r240427 - head/sys/dev/virtio
> 
> On Friday, September 14, 2012 3:55:20 am Konstantin Belousov wrote:
> > On Fri, Sep 14, 2012 at 12:47:52AM -0500, Bryan Venteicher wrote:
> > > > > I also found myself wanting an atomic_load_rel_*() type
> > > > > function.
> > > > 
> > > > That would be odd I think.  _rel barriers only affect stores,
> > > > so
> > > > there would be no defined ordering between the load and the
> > > > subsequent stores.  (With our current definitions of _acq and
> > > > _rel.)  If you need a full fence for some reason, than a plain
> > > > mb() may be the best thing in that case.
> > > > 
> > > 
> > > I'm able to batch add descriptors (via vq_ring_update_avail()),
> > > but when checking if I must notify the host, I need to make sure
> > > the latest avail->idx is visible before checking the flag from
> > > the host on whether notifications are disabled. Gratuitous
> > > notifications are fine, but skipping one is not.
> > > 
> > > In the patch, I kludge this with:
> > > atomic_add_rel_16(&flags, 0);
> > > foo = flags;
> > Don't you need
> > atomic_store_rel_16(&foo, flags);
> > instead ?
> > 
> > You might do a cas_rel over the containing 32bit word as well.
> 
> Yes, the right barrier here would be to use the barrier on the
> assignment
> to foo.  That ensures all other writes post before the write to
> 'foo'.

>From reading between the lines of atomic(9), I wasn't totally sure
where the load of flags is guaranteed to occur with respect to the
previous loads/stores.

Bryan

> 
> --
> John Baldwin
> 
___
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: r240484 - head/sys/dev/fdt

2012-09-14 Thread Aleksandr Rybalko
On Fri, 14 Sep 2012 09:33:35 + (UTC)
Grzegorz Bernacki  wrote:

> Author: gber
> Date: Fri Sep 14 09:33:35 2012
> New Revision: 240484
> URL: http://svn.freebsd.org/changeset/base/240484
> 
> Log:
>   Set busaddr and bussize to 0 when fdt_get_range() fails.

Why bussize is 0?

>   
>   Obtained from:  Semihalf
> 
> Modified:
>   head/sys/dev/fdt/fdt_common.c
> 
> Modified: head/sys/dev/fdt/fdt_common.c
> ==
> --- head/sys/dev/fdt/fdt_common.c Fri Sep 14 08:11:59
> 2012  (r240483) +++ head/sys/dev/fdt/fdt_common.c Fri
> Sep 14 09:33:35 2012  (r240484) @@ -431,7 +431,10 @@
> fdt_reg_to_rl(phandle_t node, struct res 
>   if (fdt_addrsize_cells(OF_parent(node), &addr_cells,
> &size_cells) != 0) return (ENXIO);
> - fdt_get_range(OF_parent(node), 0, &busaddr, &bussize);
> + if (fdt_get_range(OF_parent(node), 0, &busaddr, &bussize)) {
> + busaddr = 0;
> + bussize = 0;
> + }
>  
>   tuple_size = sizeof(pcell_t) * (addr_cells + size_cells);
>   tuples = OF_getprop_alloc(node, "reg", tuple_size, (void
> **)®);


-- 
Aleksandr Rybalko 
___
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: r240475 - in head/sys: dev/hwpmc kern

2012-09-14 Thread Attilio Rao
On Fri, Sep 14, 2012 at 2:38 PM, Konstantin Belousov
 wrote:
> On Fri, Sep 14, 2012 at 01:03:13PM +0100, Attilio Rao wrote:
>> On 9/14/12, Konstantin Belousov  wrote:
>> > On Thu, Sep 13, 2012 at 10:26:22PM +, Attilio Rao wrote:
>> >> Author: attilio
>> >> Date: Thu Sep 13 22:26:22 2012
>> >> New Revision: 240475
>> >> URL: http://svn.freebsd.org/changeset/base/240475
>> >>
>> >> Log:
>> >>   Remove all the checks on curthread != NULL with the exception of some
>> >> MD
>> >>   trap checks (eg. printtrap()).
>> >>
>> >>   Generally this check is not needed anymore, as there is not a
>> >> legitimate
>> >>   case where curthread != NULL, after pcpu 0 area has been properly
>> >>   initialized.
>> > I do not disagree with the patch, but I do with this statement.
>> > During the AP startup, there is indeed a window while curthread is NULL.
>> > Unfortunately, trying to panic there is worse then not panic.
>>
>> Yes and why do you disagree then? That is what I wanted to say --
>> before pcpu->curthread is initialized you can get curthread == NULL.
>
> I disagree with the statement that curthread is always non-NULL after pcpu 0
> area has been initialized.

Ah, I understand what you mean, the "0" part is wrong really, it is
any pcpu area infact.

Thanks,
Attilio


-- 
Peace can only be achieved by understanding - A. Einstein
___
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: r240475 - in head/sys: dev/hwpmc kern

2012-09-14 Thread Konstantin Belousov
On Fri, Sep 14, 2012 at 01:03:13PM +0100, Attilio Rao wrote:
> On 9/14/12, Konstantin Belousov  wrote:
> > On Thu, Sep 13, 2012 at 10:26:22PM +, Attilio Rao wrote:
> >> Author: attilio
> >> Date: Thu Sep 13 22:26:22 2012
> >> New Revision: 240475
> >> URL: http://svn.freebsd.org/changeset/base/240475
> >>
> >> Log:
> >>   Remove all the checks on curthread != NULL with the exception of some
> >> MD
> >>   trap checks (eg. printtrap()).
> >>
> >>   Generally this check is not needed anymore, as there is not a
> >> legitimate
> >>   case where curthread != NULL, after pcpu 0 area has been properly
> >>   initialized.
> > I do not disagree with the patch, but I do with this statement.
> > During the AP startup, there is indeed a window while curthread is NULL.
> > Unfortunately, trying to panic there is worse then not panic.
> 
> Yes and why do you disagree then? That is what I wanted to say --
> before pcpu->curthread is initialized you can get curthread == NULL.

I disagree with the statement that curthread is always non-NULL after pcpu 0
area has been initialized.


pgpHx3k7uxDHj.pgp
Description: PGP signature


svn commit: r240497 - head/sbin/pfctl

2012-09-14 Thread Joel Dahl
Author: joel (doc committer)
Date: Fri Sep 14 13:14:48 2012
New Revision: 240497
URL: http://svn.freebsd.org/changeset/base/240497

Log:
  Minor mdoc fix.

Modified:
  head/sbin/pfctl/pfctl.8

Modified: head/sbin/pfctl/pfctl.8
==
--- head/sbin/pfctl/pfctl.8 Fri Sep 14 13:00:43 2012(r240496)
+++ head/sbin/pfctl/pfctl.8 Fri Sep 14 13:14:48 2012(r240497)
@@ -53,8 +53,8 @@
 .Xo
 .Oo Fl t Ar table
 .Fl T Ar command
-.Op Ar address ... Oc
-.Xc
+.Op Ar address ...
+.Oc Xc
 .Op Fl x Ar level
 .Ek
 .Sh DESCRIPTION
___
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: r240496 - in head: lib/libfetch usr.bin/fetch

2012-09-14 Thread Dag-Erling Sm�rgrav
Author: des
Date: Fri Sep 14 13:00:43 2012
New Revision: 240496
URL: http://svn.freebsd.org/changeset/base/240496

Log:
  Use libmd if and only if OpenSSL is not available.
  
  PR:   bin/171402
  MFC after:3 days

Modified:
  head/lib/libfetch/Makefile
  head/lib/libfetch/http.c
  head/usr.bin/fetch/Makefile

Modified: head/lib/libfetch/Makefile
==
--- head/lib/libfetch/Makefile  Fri Sep 14 12:15:13 2012(r240495)
+++ head/lib/libfetch/Makefile  Fri Sep 14 13:00:43 2012(r240496)
@@ -16,8 +16,8 @@ CFLAGS+=  -DINET6
 
 .if ${MK_OPENSSL} != "no"
 CFLAGS+=   -DWITH_SSL
-DPADD= ${LIBSSL} ${LIBCRYPTO} ${LIBMD}
-LDADD= -lssl -lcrypto -lmd
+DPADD= ${LIBSSL} ${LIBCRYPTO}
+LDADD= -lssl -lcrypto
 .else
 DPADD= ${LIBMD}
 LDADD= -lmd

Modified: head/lib/libfetch/http.c
==
--- head/lib/libfetch/http.cFri Sep 14 12:15:13 2012(r240495)
+++ head/lib/libfetch/http.cFri Sep 14 13:00:43 2012(r240496)
@@ -76,7 +76,15 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+
+#ifdef WITH_SSL
+#include 
+#define MD5Init(c) MD5_Init(c)
+#define MD5Update(c, data, len) MD5_Update(c, data, len)
+#define MD5Final(md, c) MD5_Final(md, c)
+#else
 #include 
+#endif
 
 #include 
 #include 

Modified: head/usr.bin/fetch/Makefile
==
--- head/usr.bin/fetch/Makefile Fri Sep 14 12:15:13 2012(r240495)
+++ head/usr.bin/fetch/Makefile Fri Sep 14 13:00:43 2012(r240496)
@@ -4,11 +4,12 @@
 
 PROG=  fetch
 CSTD?= c99
+.if ${MK_OPENSSL} != "no"
+DPADD= ${LIBFETCH} ${LIBSSL} ${LIBCRYPTO}
+LDADD= -lfetch -lssl -lcrypto
+.else
 DPADD= ${LIBFETCH} ${LIBMD}
 LDADD= -lfetch -lmd
-.if ${MK_OPENSSL} != "no"
-DPADD+=${LIBSSL} ${LIBCRYPTO}
-LDADD+=-lssl -lcrypto
 .endif
 
 .include 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r240475 - in head/sys: dev/hwpmc kern

2012-09-14 Thread John Baldwin
On Friday, September 14, 2012 12:20:31 am Konstantin Belousov wrote:
> On Thu, Sep 13, 2012 at 10:26:22PM +, Attilio Rao wrote:
> > Author: attilio
> > Date: Thu Sep 13 22:26:22 2012
> > New Revision: 240475
> > URL: http://svn.freebsd.org/changeset/base/240475
> > 
> > Log:
> >   Remove all the checks on curthread != NULL with the exception of some MD
> >   trap checks (eg. printtrap()).
> >   
> >   Generally this check is not needed anymore, as there is not a legitimate
> >   case where curthread != NULL, after pcpu 0 area has been properly
> >   initialized.
> I do not disagree with the patch, but I do with this statement.
> During the AP startup, there is indeed a window while curthread is NULL.
> Unfortunately, trying to panic there is worse then not panic.

Also during early BSP startup.  On x86 very early faults actually result in a 
BTX fault rather than a panic since we run with BTX's IDT for a bit in locore, 
etc.

-- 
John Baldwin
___
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: r240427 - head/sys/dev/virtio

2012-09-14 Thread John Baldwin
On Friday, September 14, 2012 3:55:20 am Konstantin Belousov wrote:
> On Fri, Sep 14, 2012 at 12:47:52AM -0500, Bryan Venteicher wrote:
> > > > I also found myself wanting an atomic_load_rel_*() type function.
> > > 
> > > That would be odd I think.  _rel barriers only affect stores, so
> > > there would be no defined ordering between the load and the
> > > subsequent stores.  (With our current definitions of _acq and
> > > _rel.)  If you need a full fence for some reason, than a plain
> > > mb() may be the best thing in that case.
> > > 
> > 
> > I'm able to batch add descriptors (via vq_ring_update_avail()),
> > but when checking if I must notify the host, I need to make sure
> > the latest avail->idx is visible before checking the flag from
> > the host on whether notifications are disabled. Gratuitous
> > notifications are fine, but skipping one is not.
> > 
> > In the patch, I kludge this with:
> > atomic_add_rel_16(&flags, 0);
> > foo = flags;
> Don't you need
>   atomic_store_rel_16(&foo, flags);
> instead ?
> 
> You might do a cas_rel over the containing 32bit word as well.

Yes, the right barrier here would be to use the barrier on the assignment
to foo.  That ensures all other writes post before the write to 'foo'.

-- 
John Baldwin
___
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: r240495 - head/lib/libfetch

2012-09-14 Thread Eitan Adler
Author: eadler
Date: Fri Sep 14 12:15:13 2012
New Revision: 240495
URL: http://svn.freebsd.org/changeset/base/240495

Log:
  Adding missing return statements during error conditions.
  
  PR:   kern/171187
  Submitted by: Mark Johnston 
  Reviewed by:  des
  Approved by:  cperciva
  MFC after:2 weeks

Modified:
  head/lib/libfetch/file.c

Modified: head/lib/libfetch/file.c
==
--- head/lib/libfetch/file.cFri Sep 14 11:51:49 2012(r240494)
+++ head/lib/libfetch/file.cFri Sep 14 12:15:13 2012(r240495)
@@ -50,12 +50,15 @@ fetchXGetFile(struct url *u, struct url_
 
f = fopen(u->doc, "r");
 
-   if (f == NULL)
+   if (f == NULL) {
fetch_syserr();
+   return (NULL);
+   }
 
if (u->offset && fseeko(f, u->offset, SEEK_SET) == -1) {
fclose(f);
fetch_syserr();
+   return (NULL);
}
 
fcntl(fileno(f), F_SETFD, FD_CLOEXEC);
@@ -78,12 +81,15 @@ fetchPutFile(struct url *u, const char *
else
f = fopen(u->doc, "w+");
 
-   if (f == NULL)
+   if (f == NULL) {
fetch_syserr();
+   return (NULL);
+   }
 
if (u->offset && fseeko(f, u->offset, SEEK_SET) == -1) {
fclose(f);
fetch_syserr();
+   return (NULL);
}
 
fcntl(fileno(f), F_SETFD, FD_CLOEXEC);
___
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: r240475 - in head/sys: dev/hwpmc kern

2012-09-14 Thread Attilio Rao
On 9/14/12, Konstantin Belousov  wrote:
> On Thu, Sep 13, 2012 at 10:26:22PM +, Attilio Rao wrote:
>> Author: attilio
>> Date: Thu Sep 13 22:26:22 2012
>> New Revision: 240475
>> URL: http://svn.freebsd.org/changeset/base/240475
>>
>> Log:
>>   Remove all the checks on curthread != NULL with the exception of some
>> MD
>>   trap checks (eg. printtrap()).
>>
>>   Generally this check is not needed anymore, as there is not a
>> legitimate
>>   case where curthread != NULL, after pcpu 0 area has been properly
>>   initialized.
> I do not disagree with the patch, but I do with this statement.
> During the AP startup, there is indeed a window while curthread is NULL.
> Unfortunately, trying to panic there is worse then not panic.

Yes and why do you disagree then? That is what I wanted to say --
before pcpu->curthread is initialized you can get curthread == NULL.

Attilio


-- 
Peace can only be achieved by understanding - A. Einstein
___
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: r240494 - in head: contrib/pf/man contrib/pf/pfctl include sbin/pfctl sbin/pfctl/missing share/man/man4 share/man/man5 sys/conf sys/contrib/pf sys/modules/dummynet sys/modules/ipfw sys/...

2012-09-14 Thread Gleb Smirnoff
Author: glebius
Date: Fri Sep 14 11:51:49 2012
New Revision: 240494
URL: http://svn.freebsd.org/changeset/base/240494

Log:
  o Create directory sys/netpfil, where all packet filters should
reside, and move there ipfw(4) and pf(4).
  
  o Move most modified parts of pf out of contrib.
  
  Actual movements:
  
  sys/contrib/pf/net/*.c-> sys/netpfil/pf/
  sys/contrib/pf/net/*.h-> sys/net/
  contrib/pf/pfctl/*.c  -> sbin/pfctl
  contrib/pf/pfctl/*.h  -> sbin/pfctl
  contrib/pf/pfctl/pfctl.8  -> sbin/pfctl
  contrib/pf/pfctl/*.4  -> share/man/man4
  contrib/pf/pfctl/*.5  -> share/man/man5
  
  sys/netinet/ipfw  -> sys/netpfil/ipfw
  
  The arguable movement is pf/net/*.h -> sys/net. There are
  future plans to refactor pf includes, so I decided not to
  break things twice.
  
  Not modified bits of pf left in contrib: authpf, ftp-proxy,
  tftp-proxy, pflogd.
  
  The ipfw(4) movement is planned to be merged to stable/9,
  to make head and stable match.
  
  Discussed with:   bz, luigi

Added:
  head/sbin/pfctl/parse.y
 - copied unchanged from r240390, head/contrib/pf/pfctl/parse.y
  head/sbin/pfctl/pf_print_state.c
 - copied unchanged from r240390, head/contrib/pf/pfctl/pf_print_state.c
  head/sbin/pfctl/pfctl.8
 - copied unchanged from r240390, head/contrib/pf/pfctl/pfctl.8
  head/sbin/pfctl/pfctl.c
 - copied unchanged from r240390, head/contrib/pf/pfctl/pfctl.c
  head/sbin/pfctl/pfctl.h
 - copied unchanged from r240390, head/contrib/pf/pfctl/pfctl.h
  head/sbin/pfctl/pfctl_altq.c
 - copied unchanged from r240390, head/contrib/pf/pfctl/pfctl_altq.c
  head/sbin/pfctl/pfctl_optimize.c
 - copied unchanged from r240390, head/contrib/pf/pfctl/pfctl_optimize.c
  head/sbin/pfctl/pfctl_osfp.c
 - copied unchanged from r240390, head/contrib/pf/pfctl/pfctl_osfp.c
  head/sbin/pfctl/pfctl_parser.c
 - copied unchanged from r240390, head/contrib/pf/pfctl/pfctl_parser.c
  head/sbin/pfctl/pfctl_parser.h
 - copied unchanged from r240390, head/contrib/pf/pfctl/pfctl_parser.h
  head/sbin/pfctl/pfctl_qstats.c
 - copied unchanged from r240390, head/contrib/pf/pfctl/pfctl_qstats.c
  head/sbin/pfctl/pfctl_radix.c
 - copied unchanged from r240390, head/contrib/pf/pfctl/pfctl_radix.c
  head/sbin/pfctl/pfctl_table.c
 - copied unchanged from r240390, head/contrib/pf/pfctl/pfctl_table.c
  head/share/man/man4/pf.4
 - copied unchanged from r240390, head/contrib/pf/man/pf.4
  head/share/man/man4/pflog.4
 - copied unchanged from r240390, head/contrib/pf/man/pflog.4
  head/share/man/man4/pfsync.4
 - copied unchanged from r240390, head/contrib/pf/man/pfsync.4
  head/share/man/man5/pf.conf.5
 - copied unchanged from r240390, head/contrib/pf/man/pf.conf.5
  head/share/man/man5/pf.os.5
 - copied unchanged from r240390, head/contrib/pf/man/pf.os.5
  head/sys/net/if_pflog.h
 - copied unchanged from r240390, head/sys/contrib/pf/net/if_pflog.h
  head/sys/net/if_pfsync.h
 - copied unchanged from r240390, head/sys/contrib/pf/net/if_pfsync.h
  head/sys/net/pf_mtag.h
 - copied unchanged from r240390, head/sys/contrib/pf/net/pf_mtag.h
  head/sys/net/pfvar.h
 - copied unchanged from r240390, head/sys/contrib/pf/net/pfvar.h
  head/sys/netpfil/
  head/sys/netpfil/ipfw/
 - copied from r240390, head/sys/netinet/ipfw/
  head/sys/netpfil/pf/
  head/sys/netpfil/pf/if_pflog.c
 - copied unchanged from r240390, head/sys/contrib/pf/net/if_pflog.c
  head/sys/netpfil/pf/if_pfsync.c
 - copied unchanged from r240390, head/sys/contrib/pf/net/if_pfsync.c
  head/sys/netpfil/pf/in4_cksum.c
 - copied unchanged from r240390, head/sys/contrib/pf/netinet/in4_cksum.c
  head/sys/netpfil/pf/pf.c
 - copied, changed from r240390, head/sys/contrib/pf/net/pf.c
  head/sys/netpfil/pf/pf_if.c
 - copied unchanged from r240390, head/sys/contrib/pf/net/pf_if.c
  head/sys/netpfil/pf/pf_ioctl.c
 - copied unchanged from r240390, head/sys/contrib/pf/net/pf_ioctl.c
  head/sys/netpfil/pf/pf_lb.c
 - copied unchanged from r240390, head/sys/contrib/pf/net/pf_lb.c
  head/sys/netpfil/pf/pf_norm.c
 - copied unchanged from r240390, head/sys/contrib/pf/net/pf_norm.c
  head/sys/netpfil/pf/pf_osfp.c
 - copied unchanged from r240390, head/sys/contrib/pf/net/pf_osfp.c
  head/sys/netpfil/pf/pf_ruleset.c
 - copied unchanged from r240390, head/sys/contrib/pf/net/pf_ruleset.c
  head/sys/netpfil/pf/pf_table.c
 - copied unchanged from r240390, head/sys/contrib/pf/net/pf_table.c
Deleted:
  head/contrib/pf/man/
  head/contrib/pf/pfctl/
  head/sbin/pfctl/missing/
  head/sys/contrib/pf/
  head/sys/netinet/ipfw/
Modified:
  head/include/Makefile
  head/sbin/pfctl/Makefile
  head/share/man/man4/Makefile
  head/share/man/man5/Makefile
  head/sys/conf/files
  head/sys/conf/kern.pre.mk
  head/sys/modules/dummynet/Makefile
  head/sys/modules/ipfw/Makefile
  head/sys/modules/ipfw_nat/Makefile
  he

svn commit: r240493 - head/sys/arm/mv

2012-09-14 Thread Grzegorz Bernacki
Author: gber
Date: Fri Sep 14 10:06:56 2012
New Revision: 240493
URL: http://svn.freebsd.org/changeset/base/240493

Log:
  Implement MSI support.
  
  MSI are implemented via Inbound Shared Doorbell 1 interrupts. Interrupts
  are triggered by writing to Software Triggered Interrupt registeri (PCIe
  card using physical address of this register in BAR0 space). There are 32
  interrupts available. It can be increased by using Doorbell 2 and
  Doorbell 3 registers to 96 interrupts.
  
  Obtained from:Marvell, Semihalf

Modified:
  head/sys/arm/mv/mv_pci.c

Modified: head/sys/arm/mv/mv_pci.c
==
--- head/sys/arm/mv/mv_pci.cFri Sep 14 10:05:01 2012(r240492)
+++ head/sys/arm/mv/mv_pci.cFri Sep 14 10:06:56 2012(r240493)
@@ -53,6 +53,8 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#include 
+
 #include 
 #include 
 
@@ -73,6 +75,12 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#ifdef DEBUG
+#define debugf(fmt, args...) do { printf(fmt,##args); } while (0)
+#else
+#define debugf(fmt, args...)
+#endif
+
 #define PCI_CFG_ENA(1 << 31)
 #define PCI_CFG_BUS(bus)   (((bus) & 0xff) << 16)
 #define PCI_CFG_DEV(dev)   (((dev) & 0x1f) << 11)
@@ -81,7 +89,6 @@ __FBSDID("$FreeBSD$");
 
 #define PCI_REG_CFG_ADDR   0x0C78
 #define PCI_REG_CFG_DATA   0x0C7C
-#define PCI_REG_P2P_CONF   0x1D14
 
 #define PCIE_REG_CFG_ADDR  0x18F8
 #define PCIE_REG_CFG_DATA  0x18FC
@@ -127,6 +134,9 @@ struct mv_pcib_softc {
bus_space_tag_t sc_bst;
int sc_rid;
 
+   struct mtx  sc_msi_mtx;
+   uint32_tsc_msi_bitmap;
+
int sc_busnr;   /* Host bridge bus number */
int sc_devnr;   /* Host bridge device number */
int sc_type;
@@ -166,6 +176,11 @@ static uint32_t mv_pcib_read_config(devi
 static void mv_pcib_write_config(device_t, u_int, u_int, u_int, u_int,
 uint32_t, int);
 static int mv_pcib_route_interrupt(device_t, device_t, int);
+#if defined(SOC_MV_ARMADAXP)
+static int mv_pcib_alloc_msi(device_t, device_t, int, int, int *);
+static int mv_pcib_map_msi(device_t, device_t, int, uint64_t *, uint32_t *);
+static int mv_pcib_release_msi(device_t, device_t, int, int *);
+#endif
 
 /*
  * Bus interface definitions.
@@ -190,7 +205,13 @@ static device_method_t mv_pcib_methods[]
DEVMETHOD(pcib_read_config, mv_pcib_read_config),
DEVMETHOD(pcib_write_config,mv_pcib_write_config),
DEVMETHOD(pcib_route_interrupt, mv_pcib_route_interrupt),
-   
+
+#if defined(SOC_MV_ARMADAXP)
+   DEVMETHOD(pcib_alloc_msi,   mv_pcib_alloc_msi),
+   DEVMETHOD(pcib_release_msi, mv_pcib_release_msi),
+   DEVMETHOD(pcib_map_msi, mv_pcib_map_msi),
+#endif
+
/* OFW bus interface */
DEVMETHOD(ofw_bus_get_compat,   ofw_bus_gen_get_compat),
DEVMETHOD(ofw_bus_get_model,ofw_bus_gen_get_model),
@@ -318,6 +339,7 @@ mv_pcib_attach(device_t self)
device_add_child(self, "pci_ep", -1);
}
 
+   mtx_init(&sc->sc_msi_mtx, "msi_mtx", NULL, MTX_DEF);
return (bus_generic_attach(self));
 
 error:
@@ -927,3 +949,80 @@ mv_pcib_intr_info(phandle_t node, struct
return (0);
 }
 
+#if defined(SOC_MV_ARMADAXP)
+static int
+mv_pcib_map_msi(device_t dev, device_t child, int irq, uint64_t *addr,
+uint32_t *data)
+{
+   struct mv_pcib_softc *sc;
+
+   sc = device_get_softc(dev);
+   irq = irq - MSI_IRQ;
+
+   /* validate parameters */
+   if (isclr(&sc->sc_msi_bitmap, irq)) {
+   device_printf(dev, "invalid MSI 0x%x\n", irq);
+   return (EINVAL);
+   }
+
+   mv_msi_data(irq, addr, data);
+
+   debugf("%s: irq: %d addr: %jx data: %x\n",
+   __func__, irq, *addr, *data);
+
+   return (0);
+}
+
+static int
+mv_pcib_alloc_msi(device_t dev, device_t child, int count,
+int maxcount __unused, int *irqs)
+{
+   struct mv_pcib_softc *sc;
+   u_int start = 0, i;
+
+   if (powerof2(count) == 0 || count > MSI_IRQ_NUM)
+   return (EINVAL);
+
+   sc = device_get_softc(dev);
+   mtx_lock(&sc->sc_msi_mtx);
+
+   for (start = 0; (start + count) < MSI_IRQ_NUM; start++) {
+   for (i = start; i < start + count; i++) {
+   if (isset(&sc->sc_msi_bitmap, i))
+   break;
+   }
+   if (i == start + count)
+   break;
+   }
+
+   if ((start + count) == MSI_IRQ_NUM) {
+   mtx_unlock(&sc->sc_msi_mtx);
+   return (ENXIO);
+   }
+
+   for (i = start; i < start + count; i++) {
+   setbit(&sc->sc_msi_bitmap, i);
+   irqs[i] = MSI_IRQ + i;
+   }
+   debugf("%s: start: %x count: %x\n", __func__, sta

svn commit: r240492 - in head/sys: arm/include arm/mv boot/fdt/dts

2012-09-14 Thread Grzegorz Bernacki
Author: gber
Date: Fri Sep 14 10:05:01 2012
New Revision: 240492
URL: http://svn.freebsd.org/changeset/base/240492

Log:
  Add support for MSI in interrupt controlller.
  
  MSI are implemented via software interrupt. PCIe cards will write
  into software interrupt register which will cause inbound shared
  interrupt which will be interpreted as a MSI.
  
  Obtained from:Marvell, Semihalf

Modified:
  head/sys/arm/include/intr.h
  head/sys/arm/mv/mpic.c
  head/sys/arm/mv/mvvar.h
  head/sys/boot/fdt/dts/db78460.dts

Modified: head/sys/arm/include/intr.h
==
--- head/sys/arm/include/intr.h Fri Sep 14 10:01:52 2012(r240491)
+++ head/sys/arm/include/intr.h Fri Sep 14 10:05:01 2012(r240492)
@@ -55,7 +55,12 @@
 #elif defined(CPU_ARM11)
 #define NIRQ   128
 #elif defined(SOC_MV_ARMADAXP)
-#define NIRQ   148
+#define MAIN_IRQ_NUM   116
+#define ERR_IRQ_NUM32
+#define ERR_IRQ(MAIN_IRQ_NUM)
+#define MSI_IRQ_NUM32
+#define MSI_IRQ(ERR_IRQ + ERR_IRQ_NUM)
+#define NIRQ   (MAIN_IRQ_NUM + ERR_IRQ_NUM + MSI_IRQ_NUM)
 #else
 #define NIRQ   32
 #endif

Modified: head/sys/arm/mv/mpic.c
==
--- head/sys/arm/mv/mpic.c  Fri Sep 14 10:01:52 2012(r240491)
+++ head/sys/arm/mv/mpic.c  Fri Sep 14 10:05:01 2012(r240492)
@@ -1,6 +1,7 @@
 /*-
  * Copyright (c) 2006 Benno Rice.
  * Copyright (C) 2007-2011 MARVELL INTERNATIONAL LTD.
+ * Copyright (c) 2012 Semihalf.
  * All rights reserved.
  *
  * Developed by Semihalf.
@@ -46,23 +47,34 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#include 
+
 #include 
 #include 
+#include 
+
+#ifdef DEBUG
+#define debugf(fmt, args...) do { printf("%s(): ", __func__);  \
+printf(fmt,##args); } while (0)
+#else
+#define debugf(fmt, args...)
+#endif
 
-#define IRQ_ERR4
-#define MAIN_IRQS  116
+#define MPIC_INT_ERR   4
+#define MPIC_INT_MSI   96
 
 #define IRQ_MASK   0x3ff
 
 #define MPIC_CTRL  0x0
 #define MPIC_SOFT_INT  0x4
+#define MPIC_SOFT_INT_DRBL1(1 << 5)
 #define MPIC_ERR_CAUSE 0x20
 #define MPIC_ISE   0x30
 #define MPIC_ICE   0x34
 
 
-#define MPIC_IN_DOORBELL   0x78
-#define MPIC_IN_DOORBELL_MASK  0x7c
+#define MPIC_IN_DRBL   0x78
+#define MPIC_IN_DRBL_MASK  0x7c
 #define MPIC_CTP   0xb0
 #define MPIC_CTP   0xb0
 #define MPIC_IIACK 0xb4
@@ -71,16 +83,20 @@ __FBSDID("$FreeBSD$");
 #define MPIC_ERR_MASK  0xec0
 
 struct mv_mpic_softc {
-   struct resource *   mpic_res[2];
+   device_tsc_dev;
+   struct resource *   mpic_res[3];
bus_space_tag_t mpic_bst;
bus_space_handle_t  mpic_bsh;
bus_space_tag_t cpu_bst;
bus_space_handle_t  cpu_bsh;
+   bus_space_tag_t drbl_bst;
+   bus_space_handle_t  drbl_bsh;
 };
 
 static struct resource_spec mv_mpic_spec[] = {
{ SYS_RES_MEMORY,   0,  RF_ACTIVE },
{ SYS_RES_MEMORY,   1,  RF_ACTIVE },
+   { SYS_RES_MEMORY,   2,  RF_ACTIVE },
{ -1, 0 }
 };
 
@@ -92,14 +108,21 @@ static int mv_mpic_probe(device_t);
 static int mv_mpic_attach(device_t);
 uint32_t   mv_mpic_get_cause(void);
 uint32_t   mv_mpic_get_cause_err(void);
+uint32_t   mv_mpic_get_msi(void);
 static voidarm_mask_irq_err(uintptr_t);
 static voidarm_unmask_irq_err(uintptr_t);
+static voidarm_unmask_msi(void);
 
 #define MPIC_CPU_WRITE(softc, reg, val) \
 bus_space_write_4((softc)->cpu_bst, (softc)->cpu_bsh, (reg), (val))
 #define MPIC_CPU_READ(softc, reg) \
 bus_space_read_4((softc)->cpu_bst, (softc)->cpu_bsh, (reg))
 
+#define MPIC_DRBL_WRITE(softc, reg, val) \
+bus_space_write_4((softc)->drbl_bst, (softc)->drbl_bsh, (reg), (val))
+#define MPIC_DRBL_READ(softc, reg) \
+bus_space_read_4((softc)->drbl_bst, (softc)->drbl_bsh, (reg))
+
 static int
 mv_mpic_probe(device_t dev)
 {
@@ -123,6 +146,8 @@ mv_mpic_attach(device_t dev)
return (ENXIO);
mv_mpic_sc = sc;
 
+   sc->sc_dev = dev;
+
error = bus_alloc_resources(dev, mv_mpic_spec, sc->mpic_res);
if (error) {
device_printf(dev, "could not allocate resources\n");
@@ -135,10 +160,15 @@ mv_mpic_attach(device_t dev)
sc->cpu_bst = rman_get_bustag(sc->mpic_res[1]);
sc->cpu_bsh = rman_get_bushandle(sc->mpic_res[1]);
 
+   sc->drbl_bst = rman_get_bustag(sc->mpic_res[2]);
+   sc->drbl_bsh = rman_get_bushandle(sc->mpic_res[2]);
+
bus_space_write_4(mv_mpic_sc->mpic_bst, mv_mpic_sc->mpic_bsh,
MPIC_CTRL, 1);
MPIC_CPU_WRITE(mv_mpic_sc, MPIC_CTP, 0)

svn commit: r240491 - head/sys/arm/mv

2012-09-14 Thread Grzegorz Bernacki
Author: gber
Date: Fri Sep 14 10:01:52 2012
New Revision: 240491
URL: http://svn.freebsd.org/changeset/base/240491

Log:
  Remove unused structure fields
  
  Obtained from:Semihalf

Modified:
  head/sys/arm/mv/mpic.c

Modified: head/sys/arm/mv/mpic.c
==
--- head/sys/arm/mv/mpic.c  Fri Sep 14 09:59:27 2012(r240490)
+++ head/sys/arm/mv/mpic.c  Fri Sep 14 10:01:52 2012(r240491)
@@ -76,8 +76,6 @@ struct mv_mpic_softc {
bus_space_handle_t  mpic_bsh;
bus_space_tag_t cpu_bst;
bus_space_handle_t  cpu_bsh;
-   int mpic_high_regs;
-   int mpic_error_regs;
 };
 
 static struct resource_spec mv_mpic_spec[] = {
___
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: r240490 - in head/sys/arm: conf mv/armadaxp

2012-09-14 Thread Grzegorz Bernacki
Author: gber
Date: Fri Sep 14 09:59:27 2012
New Revision: 240490
URL: http://svn.freebsd.org/changeset/base/240490

Log:
  Enable PCI for Armada XP
  
  Obtained from:Semihalf

Modified:
  head/sys/arm/conf/ARMADAXP
  head/sys/arm/mv/armadaxp/armadaxp.c

Modified: head/sys/arm/conf/ARMADAXP
==
--- head/sys/arm/conf/ARMADAXP  Fri Sep 14 09:57:41 2012(r240489)
+++ head/sys/arm/conf/ARMADAXP  Fri Sep 14 09:59:27 2012(r240490)
@@ -96,6 +96,9 @@ options   HZ=1000
 optionsDEVICE_POLLING
 device vlan
 
+#PCI/PCIE
+device pci
+
 #FDT
 optionsFDT
 optionsFDT_DTB_STATIC

Modified: head/sys/arm/mv/armadaxp/armadaxp.c
==
--- head/sys/arm/mv/armadaxp/armadaxp.c Fri Sep 14 09:57:41 2012
(r240489)
+++ head/sys/arm/mv/armadaxp/armadaxp.c Fri Sep 14 09:59:27 2012
(r240490)
@@ -160,11 +160,3 @@ get_l2clk(void)
return (l2clk_freq);
 }
 
-int
-fdt_pci_devmap(phandle_t node, struct pmap_devmap *devmap, vm_offset_t io_va,
-vm_offset_t mem_va)
-{
-
-   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: r240489 - head/sys/arm/mv

2012-09-14 Thread Grzegorz Bernacki
Author: gber
Date: Fri Sep 14 09:57:41 2012
New Revision: 240489
URL: http://svn.freebsd.org/changeset/base/240489

Log:
  pci: Implement new memory and io space allocator for PCI.
  
  Cleanup code and move initializing bridge into separate function.
  Add checking of PCI mode (RC or endpoint).
  
  Obtained from:Semihalf

Modified:
  head/sys/arm/mv/mv_pci.c
  head/sys/arm/mv/mvwin.h

Modified: head/sys/arm/mv/mv_pci.c
==
--- head/sys/arm/mv/mv_pci.cFri Sep 14 09:55:19 2012(r240488)
+++ head/sys/arm/mv/mv_pci.cFri Sep 14 09:57:41 2012(r240489)
@@ -1,6 +1,7 @@
 /*-
  * Copyright (c) 2008 MARVELL INTERNATIONAL LTD.
  * Copyright (c) 2010 The FreeBSD Foundation
+ * Copyright (c) 2010-2012 Semihalf
  * All rights reserved.
  *
  * Developed by Semihalf.
@@ -89,18 +90,19 @@ __FBSDID("$FreeBSD$");
 #define PCIE_REG_STATUS0x1A04
 #define PCIE_REG_IRQ_MASK  0x1910
 
-#define STATUS_LINK_DOWN   1
-#define STATUS_BUS_OFFS8
-#define STATUS_BUS_MASK(0xFF << STATUS_BUS_OFFS)
-#define STATUS_DEV_OFFS16
-#define STATUS_DEV_MASK(0x1F << STATUS_DEV_OFFS)
-
-#define P2P_CONF_BUS_OFFS  16
-#define P2P_CONF_BUS_MASK  (0xFF << P2P_CONF_BUS_OFFS)
-#define P2P_CONF_DEV_OFFS  24
-#define P2P_CONF_DEV_MASK  (0x1F << P2P_CONF_DEV_OFFS)
+#define PCIE_CONTROL_ROOT_CMPLX(1 << 1)
+#define PCIE_CONTROL_HOT_RESET (1 << 24)
 
-#define PCI_VENDORID_MRVL  0x11AB
+#define PCIE_LINK_TIMEOUT  100
+
+#define PCIE_STATUS_LINK_DOWN  1
+#define PCIE_STATUS_DEV_OFFS   16
+
+/* Minimum PCI Memory and I/O allocations taken from PCI spec (in bytes) */
+#define PCI_MIN_IO_ALLOC   4
+#define PCI_MIN_MEM_ALLOC  16
+
+#define BITS_PER_UINT32(NBBY * sizeof(uint32_t))
 
 struct mv_pcib_softc {
device_tsc_dev;
@@ -108,15 +110,16 @@ struct mv_pcib_softc {
struct rman sc_mem_rman;
bus_addr_t  sc_mem_base;
bus_addr_t  sc_mem_size;
-   bus_addr_t  sc_mem_alloc;   /* Next allocation. */
-   int sc_mem_win_target;
+   uint32_tsc_mem_map[MV_PCI_MEM_SLICE_SIZE /
+   (PCI_MIN_MEM_ALLOC * BITS_PER_UINT32)];
+   int sc_win_target;
int sc_mem_win_attr;
 
struct rman sc_io_rman;
bus_addr_t  sc_io_base;
bus_addr_t  sc_io_size;
-   bus_addr_t  sc_io_alloc;/* Next allocation. */
-   int sc_io_win_target;
+   uint32_tsc_io_map[MV_PCI_IO_SLICE_SIZE /
+   (PCI_MIN_IO_ALLOC * BITS_PER_UINT32)];
int sc_io_win_attr;
 
struct resource *sc_res;
@@ -127,6 +130,7 @@ struct mv_pcib_softc {
int sc_busnr;   /* Host bridge bus number */
int sc_devnr;   /* Host bridge device number */
int sc_type;
+   int sc_mode;/* Endpoint / Root Complex */
 
struct fdt_pci_intr sc_intr_info;
 };
@@ -143,7 +147,8 @@ static int mv_pcib_init_all_bars(struct 
 static void mv_pcib_init_bridge(struct mv_pcib_softc *, int, int, int);
 static int mv_pcib_intr_info(phandle_t, struct mv_pcib_softc *);
 static inline void pcib_write_irq_mask(struct mv_pcib_softc *, uint32_t);
-
+static void mv_pcib_enable(struct mv_pcib_softc *, uint32_t);
+static int mv_pcib_mem_init(struct mv_pcib_softc *);
 
 /* Forward prototypes */
 static int mv_pcib_probe(device_t);
@@ -185,7 +190,7 @@ static device_method_t mv_pcib_methods[]
DEVMETHOD(pcib_read_config, mv_pcib_read_config),
DEVMETHOD(pcib_write_config,mv_pcib_write_config),
DEVMETHOD(pcib_route_interrupt, mv_pcib_route_interrupt),
-
+   
/* OFW bus interface */
DEVMETHOD(ofw_bus_get_compat,   ofw_bus_gen_get_compat),
DEVMETHOD(ofw_bus_get_model,ofw_bus_gen_get_model),
@@ -230,40 +235,30 @@ mv_pcib_attach(device_t self)
 {
struct mv_pcib_softc *sc;
phandle_t node, parnode;
-   uint32_t val;
+   uint32_t val, unit;
int err;
 
sc = device_get_softc(self);
sc->sc_dev = self;
+   unit = fdt_get_unit(self);
+
 
node = ofw_bus_get_node(self);
parnode = OF_parent(node);
if (fdt_is_compatible(node, "mrvl,pcie")) {
sc->sc_type = MV_TYPE_PCIE;
-   sc->sc_mem_win_target = MV_WIN_PCIE_TARGET(0);
-   sc->sc_mem_win_attr = MV_WIN_PCIE_MEM_ATTR(0);
-   sc->sc_io_win_target = MV_WIN_PCIE_TARGET(0);
-   sc->sc_io_win_attr = MV_WIN_PCIE_IO_ATTR(0);
-#ifdef SOC_MV_ORION
+   sc->sc_win_target = MV_WIN_PCIE_TARGET(unit);
+   sc->sc_mem_win_attr = MV_WIN_PCIE_MEM_ATTR(unit);
+   sc->sc_io_win_attr = MV

svn commit: r240488 - in head/sys: arm/conf arm/include arm/mv arm/mv/armadaxp boot/fdt/dts

2012-09-14 Thread Grzegorz Bernacki
Author: gber
Date: Fri Sep 14 09:55:19 2012
New Revision: 240488
URL: http://svn.freebsd.org/changeset/base/240488

Log:
  Add support for Armada XP A0.
  
  - Add functions to calculate clocks instead using hardcoded values
  - Update reset and timers functions
  - Update number of interrupts
  - Change name of platform from db88f78100 to db78460
  - Correct DRAM size and PCI IRQ routing in dts file.
  
  Obtained from:Semihalf

Added:
  head/sys/boot/fdt/dts/db78460.dts   (contents, props changed)
Deleted:
  head/sys/boot/fdt/dts/db88f78160.dts
Modified:
  head/sys/arm/conf/ARMADAXP
  head/sys/arm/include/intr.h
  head/sys/arm/mv/armadaxp/armadaxp.c
  head/sys/arm/mv/common.c
  head/sys/arm/mv/mvreg.h
  head/sys/arm/mv/mvvar.h
  head/sys/arm/mv/mvwin.h
  head/sys/arm/mv/timer.c

Modified: head/sys/arm/conf/ARMADAXP
==
--- head/sys/arm/conf/ARMADAXP  Fri Sep 14 09:45:13 2012(r240487)
+++ head/sys/arm/conf/ARMADAXP  Fri Sep 14 09:55:19 2012(r240488)
@@ -99,4 +99,4 @@ devicevlan
 #FDT
 optionsFDT
 optionsFDT_DTB_STATIC
-makeoptionsFDT_DTS_FILE=db88f78160.dts
+makeoptionsFDT_DTS_FILE=db78460.dts

Modified: head/sys/arm/include/intr.h
==
--- head/sys/arm/include/intr.h Fri Sep 14 09:45:13 2012(r240487)
+++ head/sys/arm/include/intr.h Fri Sep 14 09:55:19 2012(r240488)
@@ -54,6 +54,8 @@
 #define NIRQ   128
 #elif defined(CPU_ARM11)
 #define NIRQ   128
+#elif defined(SOC_MV_ARMADAXP)
+#define NIRQ   148
 #else
 #define NIRQ   32
 #endif

Modified: head/sys/arm/mv/armadaxp/armadaxp.c
==
--- head/sys/arm/mv/armadaxp/armadaxp.c Fri Sep 14 09:45:13 2012
(r240487)
+++ head/sys/arm/mv/armadaxp/armadaxp.c Fri Sep 14 09:55:19 2012
(r240488)
@@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$");
 #include 
 
 #include 
+#include 
 
 #include 
 #include 
@@ -43,24 +44,120 @@ __FBSDID("$FreeBSD$");
 
 #include 
 
+#define CPU_FREQ_FIELD(sar)(((0x01 & (sar >> 52)) << 3) | \
+   (0x07 & (sar >> 21)))
+#define FAB_FREQ_FIELD(sar)(((0x01 & (sar >> 51)) << 4) | \
+   (0x0F & (sar >> 24)))
+
+static uint32_t count_l2clk(void);
+
+/* XXX Make gpio driver optional and remove it */
 struct resource_spec mv_gpio_res[] = {
{ SYS_RES_MEMORY,   0,  RF_ACTIVE },
{ SYS_RES_IRQ,  0,  RF_ACTIVE },
{ -1, 0 }
 };
 
+struct vco_freq_ratio {
+   uint8_t vco_cpu;/* VCO to CLK0(CPU) clock ratio */
+   uint8_t vco_l2c;/* VCO to NB(L2 cache) clock ratio */
+   uint8_t vco_hcl;/* VCO to HCLK(DDR controller) clock ratio */
+   uint8_t vco_ddr;/* VCO to DR(DDR memory) clock ratio */
+};
+
+static struct vco_freq_ratio freq_conf_table[] = {
+/*00*/ { 1, 1,  4,  2 },
+/*01*/ { 1, 2,  2,  2 },
+/*02*/ { 2, 2,  6,  3 },
+/*03*/ { 2, 2,  3,  3 },
+/*04*/ { 1, 2,  3,  3 },
+/*05*/ { 1, 2,  4,  2 },
+/*06*/ { 1, 1,  2,  2 },
+/*07*/ { 2, 3,  6,  6 },
+/*08*/ { 2, 3,  5,  5 },
+/*09*/ { 1, 2,  6,  3 },
+/*10*/ { 2, 4, 10,  5 },
+/*11*/ { 1, 3,  6,  6 },
+/*12*/ { 1, 2,  5,  5 },
+/*13*/ { 1, 3,  6,  3 },
+/*14*/ { 1, 2,  5,  5 },
+/*15*/ { 2, 2,  5,  5 },
+/*16*/ { 1, 1,  3,  3 },
+/*17*/ { 2, 5, 10, 10 },
+/*18*/ { 1, 3,  8,  4 },
+/*19*/ { 1, 1,  2,  1 },
+/*20*/ { 2, 3,  6,  3 },
+/*21*/ { 1, 2,  8,  4 },
+/*22*/ { 2, 5, 10,  5 }
+};
+
+static uint16_tcpu_clock_table[] = {
+1000, 1066, 1200, 1333, 1500, 1666, 1800, 2000, 600,  667,  800,  1600,
+2133, 2200, 2400 };
+
 uint32_t
 get_tclk(void)
 {
+   uint32_t cputype;
 
-   return (TCLK_200MHZ);
+   cputype = cpufunc_id();
+   cputype &= CPU_ID_CPU_MASK;
+
+   if (cputype == CPU_ID_MV88SV584X_V7)
+   return (TCLK_250MHZ);
+   else
+   return (TCLK_200MHZ);
+}
+
+static uint32_t
+count_l2clk(void)
+{
+   uint64_t sar_reg;
+   uint32_t freq_vco, freq_l2clk;
+   uint8_t  sar_cpu_freq, sar_fab_freq, array_size;
+
+   /* Get value of the SAR register and process it */
+   sar_reg = get_sar_value();
+   sar_cpu_freq = CPU_FREQ_FIELD(sar_reg);
+   sar_fab_freq = FAB_FREQ_FIELD(sar_reg);
+
+   /* Check if CPU frequency field has correct value */
+   array_size = sizeof(cpu_clock_table) / sizeof(cpu_clock_table[0]);
+   if (sar_cpu_freq >= array_size)
+   panic("Reserved value in cpu frequency configuration field: "
+   "%d", sar_cpu_freq);
+
+   /* Check if fabric frequency field has correct value */
+   array_size = sizeof(freq_conf_table) / sizeof(freq_conf_table[0]);
+   if (sar_fab_freq >= array_size)
+   panic("Reserved value in fabric frequency configuration 

svn commit: r240487 - head/sys/dev/fdt

2012-09-14 Thread Grzegorz Bernacki
Author: gber
Date: Fri Sep 14 09:45:13 2012
New Revision: 240487
URL: http://svn.freebsd.org/changeset/base/240487

Log:
  If virtual addresses are not set use one to one mapping.
  Do not map memory and IO space at address 0.
  
  Obtained from: Semihalf

Modified:
  head/sys/dev/fdt/fdt_pci.c

Modified: head/sys/dev/fdt/fdt_pci.c
==
--- head/sys/dev/fdt/fdt_pci.c  Fri Sep 14 09:38:54 2012(r240486)
+++ head/sys/dev/fdt/fdt_pci.c  Fri Sep 14 09:45:13 2012(r240487)
@@ -341,14 +341,14 @@ fdt_pci_devmap(phandle_t node, struct pm
if ((error = fdt_pci_ranges_decode(node, &io_space, &mem_space)) != 0)
return (error);
 
-   devmap->pd_va = io_va;
+   devmap->pd_va = (io_va ? io_va : io_space.base_parent);
devmap->pd_pa = io_space.base_parent;
devmap->pd_size = io_space.len;
devmap->pd_prot = VM_PROT_READ | VM_PROT_WRITE;
devmap->pd_cache = PTE_NOCACHE;
devmap++;
 
-   devmap->pd_va = mem_va;
+   devmap->pd_va = (mem_va ? mem_va : mem_space.base_parent);
devmap->pd_pa = mem_space.base_parent;
devmap->pd_size = mem_space.len;
devmap->pd_prot = VM_PROT_READ | VM_PROT_WRITE;
___
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: r240486 - in head/sys/arm: arm include

2012-09-14 Thread Grzegorz Bernacki
Author: gber
Date: Fri Sep 14 09:38:54 2012
New Revision: 240486
URL: http://svn.freebsd.org/changeset/base/240486

Log:
  Support identification of new PJ4B cores.
  
  Obtained from:Semihalf

Modified:
  head/sys/arm/arm/cpufunc.c
  head/sys/arm/arm/identcpu.c
  head/sys/arm/include/armreg.h

Modified: head/sys/arm/arm/cpufunc.c
==
--- head/sys/arm/arm/cpufunc.c  Fri Sep 14 09:36:35 2012(r240485)
+++ head/sys/arm/arm/cpufunc.c  Fri Sep 14 09:38:54 2012(r240486)
@@ -1415,6 +1415,7 @@ set_cpufuncs()
 #if defined(CPU_MV_PJ4B)
if (cputype == CPU_ID_MV88SV581X_V6 ||
cputype == CPU_ID_MV88SV581X_V7 ||
+   cputype == CPU_ID_MV88SV584X_V7 ||
cputype == CPU_ID_ARM_88SV581X_V6 ||
cputype == CPU_ID_ARM_88SV581X_V7) {
if (cpu_pfr(0) & ARM_PFR0_THUMBEE_MASK)
@@ -1425,8 +1426,8 @@ set_cpufuncs()
get_cachetype_cp15();
pmap_pte_init_mmu_v6();
goto out;
-   } else if (cputype == CPU_ID_ARM_88SV584X ||
-   cputype == CPU_ID_MV88SV584X) {
+   } else if (cputype == CPU_ID_ARM_88SV584X_V6 ||
+   cputype == CPU_ID_MV88SV584X_V6) {
cpufuncs = pj4bv6_cpufuncs;
get_cachetype_cp15();
pmap_pte_init_mmu_v6();

Modified: head/sys/arm/arm/identcpu.c
==
--- head/sys/arm/arm/identcpu.c Fri Sep 14 09:36:35 2012(r240485)
+++ head/sys/arm/arm/identcpu.c Fri Sep 14 09:38:54 2012(r240486)
@@ -321,9 +321,11 @@ const struct cpuidtab cpuids[] = {
  generic_steppings },
{ CPU_ID_ARM_88SV581X_V7, CPU_CLASS_MARVELL,"Sheeva 88SV581x",
  generic_steppings },
-   { CPU_ID_MV88SV584X,CPU_CLASS_MARVELL,  "Sheeva 88SV584x",
+   { CPU_ID_MV88SV584X_V6, CPU_CLASS_MARVELL,  "Sheeva 88SV584x",
  generic_steppings },
-   { CPU_ID_ARM_88SV584X,  CPU_CLASS_MARVELL,  "Sheeva 88SV584x",
+   { CPU_ID_ARM_88SV584X_V6, CPU_CLASS_MARVELL,"Sheeva 88SV584x",
+ generic_steppings },
+   { CPU_ID_MV88SV584X_V7, CPU_CLASS_MARVELL,  "Sheeva 88SV584x",
  generic_steppings },
 
{ 0, CPU_CLASS_NONE, NULL, NULL }

Modified: head/sys/arm/include/armreg.h
==
--- head/sys/arm/include/armreg.h   Fri Sep 14 09:36:35 2012
(r240485)
+++ head/sys/arm/include/armreg.h   Fri Sep 14 09:38:54 2012
(r240486)
@@ -170,11 +170,12 @@
 
 #define CPU_ID_MV88SV581X_V6   0x560F5810 /* Marvell Sheeva 88SV581x 
v6 Core */
 #define CPU_ID_MV88SV581X_V7   0x561F5810 /* Marvell Sheeva 88SV581x 
v7 Core */
-#define CPU_ID_MV88SV584X  0x561F5840 /* Marvell Sheeva 88SV584x 
v6 Core */
+#define CPU_ID_MV88SV584X_V6   0x561F5840 /* Marvell Sheeva 88SV584x 
v6 Core */
+#define CPU_ID_MV88SV584X_V7   0x562F5840 /* Marvell Sheeva 88SV584x 
v7 Core */
 /* Marvell's CPUIDs with ARM ID in implementor field */
 #define CPU_ID_ARM_88SV581X_V6 0x410fb760 /* Marvell Sheeva 88SV581x 
v6 Core */
 #define CPU_ID_ARM_88SV581X_V7 0x413FC080 /* Marvell Sheeva 88SV581x 
v7 Core */
-#define CPU_ID_ARM_88SV584X0x410FB024 /* Marvell Sheeva 88SV584x 
v6 Core */
+#define CPU_ID_ARM_88SV584X_V6 0x410FB020 /* Marvell Sheeva 88SV584x 
v6 Core */
 
 #defineCPU_ID_FA5260x66015260
 #defineCPU_ID_FA626TE  0x66056260
___
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: r240485 - head/sys/dev/fdt

2012-09-14 Thread Grzegorz Bernacki
Author: gber
Date: Fri Sep 14 09:36:35 2012
New Revision: 240485
URL: http://svn.freebsd.org/changeset/base/240485

Log:
  Add fdt_get_unit() function.
  
  Obtained from:Semihalf

Modified:
  head/sys/dev/fdt/fdt_common.c
  head/sys/dev/fdt/fdt_common.h

Modified: head/sys/dev/fdt/fdt_common.c
==
--- head/sys/dev/fdt/fdt_common.c   Fri Sep 14 09:33:35 2012
(r240484)
+++ head/sys/dev/fdt/fdt_common.c   Fri Sep 14 09:36:35 2012
(r240485)
@@ -697,3 +697,14 @@ fdt_get_mem_regions(struct mem_region *m
 out:
return (rv);
 }
+
+int
+fdt_get_unit(device_t dev)
+{
+   const char * name;
+
+   name = ofw_bus_get_name(dev);
+   name = strchr(name, '@') + 1;
+
+   return (strtol(name,NULL,0));
+}

Modified: head/sys/dev/fdt/fdt_common.h
==
--- head/sys/dev/fdt/fdt_common.h   Fri Sep 14 09:33:35 2012
(r240484)
+++ head/sys/dev/fdt/fdt_common.h   Fri Sep 14 09:36:35 2012
(r240485)
@@ -110,5 +110,6 @@ int fdt_pci_route_intr(int, int, int, in
 int fdt_ranges_verify(pcell_t *, int, int, int, int);
 int fdt_reg_to_rl(phandle_t, struct resource_list *);
 int fdt_pm(phandle_t);
+int fdt_get_unit(device_t);
 
 #endif /* _FDT_COMMON_H_ */
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r240484 - head/sys/dev/fdt

2012-09-14 Thread Grzegorz Bernacki
Author: gber
Date: Fri Sep 14 09:33:35 2012
New Revision: 240484
URL: http://svn.freebsd.org/changeset/base/240484

Log:
  Set busaddr and bussize to 0 when fdt_get_range() fails.
  
  Obtained from:Semihalf

Modified:
  head/sys/dev/fdt/fdt_common.c

Modified: head/sys/dev/fdt/fdt_common.c
==
--- head/sys/dev/fdt/fdt_common.c   Fri Sep 14 08:11:59 2012
(r240483)
+++ head/sys/dev/fdt/fdt_common.c   Fri Sep 14 09:33:35 2012
(r240484)
@@ -431,7 +431,10 @@ fdt_reg_to_rl(phandle_t node, struct res
 
if (fdt_addrsize_cells(OF_parent(node), &addr_cells, &size_cells) != 0)
return (ENXIO);
-   fdt_get_range(OF_parent(node), 0, &busaddr, &bussize);
+   if (fdt_get_range(OF_parent(node), 0, &busaddr, &bussize)) {
+   busaddr = 0;
+   bussize = 0;
+   }
 
tuple_size = sizeof(pcell_t) * (addr_cells + size_cells);
tuples = OF_getprop_alloc(node, "reg", tuple_size, (void **)®);
___
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: r240483 - head/sys/arm/conf

2012-09-14 Thread Hans Petter Selasky
Author: hselasky
Date: Fri Sep 14 08:11:59 2012
New Revision: 240483
URL: http://svn.freebsd.org/changeset/base/240483

Log:
  Add basic USB support to Raspberry PI target.

Modified:
  head/sys/arm/conf/RPI-B

Modified: head/sys/arm/conf/RPI-B
==
--- head/sys/arm/conf/RPI-B Fri Sep 14 07:52:57 2012(r240482)
+++ head/sys/arm/conf/RPI-B Fri Sep 14 08:11:59 2012(r240483)
@@ -59,6 +59,7 @@ options   SYSVMSG #SYSV-style message q
 optionsSYSVSEM #SYSV-style semaphores
 options_KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions
 optionsKBD_INSTALL_CDEV# install a CDEV entry in /dev
+#options   ROOTDEVNAME=\"ufs:/dev/da0s1a\"
 
 optionsPREEMPTION
 
@@ -85,15 +86,20 @@ options INVARIANT_SUPPORT   #Extra sanity
 device md
 device random  # Entropy device
 
-# Not yet: USB support
-# device   usb
-# options  USB_DEBUG
-
-
-# Not yet: USB Ethernet support, requires miibus
-# device   mii
-# device   smc
-# device   smcphy
+# USB support
+device usb
+optionsUSB_DEBUG
+device dwcotg  #DWC OTG controller
+
+# USB storage support
+device scbus
+device da
+device umass
+
+# USB ethernet support
+device smcphy
+device mii
+device smsc
 
 # Flattened Device Tree
 options FDT
___
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: r240427 - head/sys/dev/virtio

2012-09-14 Thread Konstantin Belousov
On Fri, Sep 14, 2012 at 12:47:52AM -0500, Bryan Venteicher wrote:
> Hi
> 
> - Original Message -
> > From: "John Baldwin" 
> > To: "Bryan Venteicher" 
> > Cc: svn-src-head@freebsd.org, svn-src-...@freebsd.org, 
> > src-committ...@freebsd.org, "Peter Grehan"
> > 
> > Sent: Thursday, September 13, 2012 1:56:03 PM
> > Subject: Re: svn commit: r240427 - head/sys/dev/virtio
> > 
> > On Thursday, September 13, 2012 12:40:42 pm Bryan Venteicher wrote:
> > > > Would it be possible to use atomic_load/store() instead of direct
> > > > memory barriers?  For example:
> > > > 
> > > 
> > > I've been sitting on a (lightly tested) patch [1] for awhile that
> > > does just that, but am not very happy with it. A lot of the fields
> > > are 16-bit, which not all architectures have atomic(9) support for.
> > > And I think the atomic(9) behavior on UP kernels does not provide
> > > the same guarantees as on an SMP kernel (could have an UP kernel
> > > on an SMP host).
> > 
> > That is the one thing I was worried about (the fields being defined
> > to be 16-bit).  I presume that is required by the virtio de facto
> > standard?  Shame we can't clue-by-four people putting 16-bit fields
> > in these sort of things. :-P
> > 
> 
> Yes, the 16-bit fields are mandated by the VirtIO spec. The guest/host
> shared memory is rounded up to next full page, so there actually isn't
> any memory savings for typical queue sizes. Doubt it is any worse than
> actual hardware regardless.
> 
> > > I also found myself wanting an atomic_load_rel_*() type function.
> > 
> > That would be odd I think.  _rel barriers only affect stores, so
> > there would be no defined ordering between the load and the
> > subsequent stores.  (With our current definitions of _acq and
> > _rel.)  If you need a full fence for some reason, than a plain
> > mb() may be the best thing in that case.
> > 
> 
> I'm able to batch add descriptors (via vq_ring_update_avail()),
> but when checking if I must notify the host, I need to make sure
> the latest avail->idx is visible before checking the flag from
> the host on whether notifications are disabled. Gratuitous
> notifications are fine, but skipping one is not.
> 
> In the patch, I kludge this with:
> atomic_add_rel_16(&flags, 0);
> foo = flags;
Don't you need
atomic_store_rel_16(&foo, flags);
instead ?

You might do a cas_rel over the containing 32bit word as well.
> 
> Hoping the dependency would prevent the assignment to foo from
> floating above the atomic_add_rel(). 
> 
> I originally did the atomic(9) work just to see if there would be
> any performance difference between the two - I wasn't able to
> measure any, but I don't have the most modern hardware either.
> 
> Bryan
> 
> > --
> > John Baldwin
> > 


pgps19E1PjQWy.pgp
Description: PGP signature


svn commit: r240482 - head/sys/dev/usb/controller

2012-09-14 Thread Hans Petter Selasky
Author: hselasky
Date: Fri Sep 14 07:52:57 2012
New Revision: 240482
URL: http://svn.freebsd.org/changeset/base/240482

Log:
  DWC OTG improvements. Implement full support for SPLIT transactions, in other
  words FULL/LOW speed devices through HIGH speed HUBs. Improve support for
  suspend and resume in host mode.

Modified:
  head/sys/dev/usb/controller/dwc_otg.c
  head/sys/dev/usb/controller/dwc_otg.h
  head/sys/dev/usb/controller/dwc_otgreg.h

Modified: head/sys/dev/usb/controller/dwc_otg.c
==
--- head/sys/dev/usb/controller/dwc_otg.c   Fri Sep 14 05:24:06 2012
(r240481)
+++ head/sys/dev/usb/controller/dwc_otg.c   Fri Sep 14 07:52:57 2012
(r240482)
@@ -510,7 +510,7 @@ dwc_otg_host_channel_alloc(struct dwc_ot
}
 
for (; x != max_channel; x++) {
-   if (sc->sc_hcchar[x] == 0) {
+   if (sc->sc_chan_state[x].hcchar == 0) {
 
/* check if channel is enabled */
temp = DWC_OTG_READ_4(sc, DOTG_HCCHAR(x));
@@ -519,7 +519,8 @@ dwc_otg_host_channel_alloc(struct dwc_ot
continue;
}
 
-   sc->sc_hcchar[x] = td->hcchar;
+   sc->sc_chan_state[x].hcchar = td->hcchar;
+   sc->sc_chan_state[x].hcsplt = td->hcsplt;
 
DPRINTF("HCCHAR=0x%08x(0x%08x) HCSPLT=0x%08x\n",
td->hcchar, temp, td->hcsplt);
@@ -528,14 +529,14 @@ dwc_otg_host_channel_alloc(struct dwc_ot
temp = DWC_OTG_READ_4(sc, DOTG_HCINT(x));
DWC_OTG_WRITE_4(sc, DOTG_HCINT(x), temp);
 
-   /* enable interrupts */
-   DWC_OTG_WRITE_4(sc, DOTG_HCINTMSK(x),
-   HCINT_STALL | HCINT_BBLERR |
-   HCINT_AHBERR | HCINT_XACTERR |
-   HCINT_XFERCOMPL | HCINT_NAK);
+   /* clear buffered interrupts */
+   sc->sc_chan_state[x].hcint = 0;
+
+   /* clear state */
+   sc->sc_chan_state[x].state = 0;
 
-   DWC_OTG_WRITE_4(sc, DOTG_HCSPLT(x), td->hcsplt);
-   DWC_OTG_WRITE_4(sc, DOTG_HCTSIZ(x), 0);
+   /* we've requested SOF interrupt */
+   sc->sc_chan_state[x].sof_requested = 1;
 
/* set channel */
td->channel = x;
@@ -558,8 +559,6 @@ dwc_otg_host_setup_tx(struct dwc_otg_td 
struct usb_device_request req __aligned(4);
struct dwc_otg_softc *sc;
uint32_t temp;
-   uint32_t max_buffer;
-   uint8_t max_frames;
 
if (dwc_otg_host_channel_alloc(td))
return (1); /* busy */
@@ -567,57 +566,103 @@ dwc_otg_host_setup_tx(struct dwc_otg_td 
/* get pointer to softc */
sc = DWC_OTG_PC2SC(td->pc);
 
-   temp = DWC_OTG_READ_4(sc, DOTG_HCINT(td->channel));
-   DWC_OTG_WRITE_4(sc, DOTG_HCINT(td->channel), temp);
+   temp = sc->sc_chan_state[td->channel].hcint;
 
-   DPRINTF("CH=%d HCINT=0x%08x HCCHAR=0x%08x HCTSIZ=0x%08x\n",
-   td->channel,
-   temp, DWC_OTG_READ_4(sc, DOTG_HCCHAR(td->channel)),
+   DPRINTF("CH=%d ST=%d HCINT=0x%08x HCCHAR=0x%08x HCTSIZ=0x%08x\n",
+   td->channel, sc->sc_chan_state[td->channel].state, temp,
+   DWC_OTG_READ_4(sc, DOTG_HCCHAR(td->channel)),
DWC_OTG_READ_4(sc, DOTG_HCTSIZ(td->channel)));
 
-   if (temp & HCINT_NAK)
-   td->did_nak = 1;
-
if (temp & HCINT_STALL) {
td->error_stall = 1;
td->error_any = 1;
return (0); /* complete */
}
 
-   if (temp & (HCINT_BBLERR | HCINT_AHBERR | HCINT_XACTERR)) {
+   if (temp & (HCINT_BBLERR | HCINT_XACTERR)) {
td->error_any = 1;
return (0); /* complete */
}
 
-   if (temp & HCINT_XFERCOMPL)
-   td->did_complete = 1;
+   if (temp & HCINT_NAK) {
+   if ((sc->sc_sof_val & 1) != (td->sof_val & 1))
+   return (1); /* busy */
+   td->sof_val += 1;
+   }
+
+   /* channel must be disabled before we can complete the transfer */
+
+   if (temp & (HCINT_NAK | HCINT_ACK | HCINT_NYET)) {
+   uint32_t hcchar = DWC_OTG_READ_4(sc, DOTG_HCCHAR(td->channel));
+   if (hcchar & HCCHAR_CHENA) {
+   DWC_OTG_WRITE_4(sc, DOTG_HCCHAR(td->channel),
+   HCCHAR_CHENA | HCCHAR_CHDIS);
+   } else {
+   sc->sc_chan_state[td->channel].hcint |= HCINT_CHHLTD;
+   }
+   }
 
-   if (td->did_complete) {
-   if (td->did_nak == 0) {
+   switch (sc->sc_chan_s