svn commit: r250040 - stable/9/libexec/rtld-elf

2013-04-28 Thread Konstantin Belousov
Author: kib
Date: Mon Apr 29 06:54:01 2013
New Revision: 250040
URL: http://svnweb.freebsd.org/changeset/base/250040

Log:
  MFC r249525:
  Rewrite origin_subst_one() to get rid of the wrong limit on the length
  of the resulting string.

Modified:
  stable/9/libexec/rtld-elf/rtld.c
Directory Properties:
  stable/9/libexec/rtld-elf/   (props changed)

Modified: stable/9/libexec/rtld-elf/rtld.c
==
--- stable/9/libexec/rtld-elf/rtld.cMon Apr 29 06:11:19 2013
(r250039)
+++ stable/9/libexec/rtld-elf/rtld.cMon Apr 29 06:54:01 2013
(r250040)
@@ -145,9 +145,8 @@ static void unlink_object(Obj_Entry *);
 static void unload_object(Obj_Entry *);
 static void unref_dag(Obj_Entry *);
 static void ref_dag(Obj_Entry *);
-static int origin_subst_one(char **, const char *, const char *,
-  const char *, char *);
-static char *origin_subst(const char *, const char *);
+static char *origin_subst_one(char *, const char *, const char *, bool);
+static char *origin_subst(char *, const char *);
 static void preinit_main(void);
 static int  rtld_verify_versions(const Objlist *);
 static int  rtld_verify_object_versions(Obj_Entry *);
@@ -748,79 +747,80 @@ basename(const char *name)
 
 static struct utsname uts;
 
-static int
-origin_subst_one(char **res, const char *real, const char *kw, const char 
*subst,
-char *may_free)
+static char *
+origin_subst_one(char *real, const char *kw, const char *subst,
+bool may_free)
 {
-const char *p, *p1;
-char *res1;
-int subst_len;
-int kw_len;
-
-res1 = *res = NULL;
-p = real;
-subst_len = kw_len = 0;
-for (;;) {
-p1 = strstr(p, kw);
-if (p1 != NULL) {
-if (subst_len == 0) {
-subst_len = strlen(subst);
-kw_len = strlen(kw);
-}
-if (*res == NULL) {
-*res = xmalloc(PATH_MAX);
-res1 = *res;
-}
-if ((res1 - *res) + subst_len + (p1 - p) >= PATH_MAX) {
-_rtld_error("Substitution of %s in %s cannot be performed",
-kw, real);
-if (may_free != NULL)
-free(may_free);
-free(res);
-return (false);
-}
-memcpy(res1, p, p1 - p);
-res1 += p1 - p;
-memcpy(res1, subst, subst_len);
-res1 += subst_len;
-p = p1 + kw_len;
-} else {
-   if (*res == NULL) {
-   if (may_free != NULL)
-   *res = may_free;
-   else
-   *res = xstrdup(real);
-   return (true);
-   }
-   *res1 = '\0';
-   if (may_free != NULL)
-   free(may_free);
-   if (strlcat(res1, p, PATH_MAX - (res1 - *res)) >= PATH_MAX) {
-   free(res);
-   return (false);
-   }
-   return (true);
-}
-}
+   char *p, *p1, *res, *resp;
+   int subst_len, kw_len, subst_count, old_len, new_len;
+
+   kw_len = strlen(kw);
+
+   /*
+* First, count the number of the keyword occurences, to
+* preallocate the final string.
+*/
+   for (p = real, subst_count = 0;; p = p1 + kw_len, subst_count++) {
+   p1 = strstr(p, kw);
+   if (p1 == NULL)
+   break;
+   }
+
+   /*
+* If the keyword is not found, just return.
+*/
+   if (subst_count == 0)
+   return (may_free ? real : xstrdup(real));
+
+   /*
+* There is indeed something to substitute.  Calculate the
+* length of the resulting string, and allocate it.
+*/
+   subst_len = strlen(subst);
+   old_len = strlen(real);
+   new_len = old_len + (subst_len - kw_len) * subst_count;
+   res = xmalloc(new_len + 1);
+
+   /*
+* Now, execute the substitution loop.
+*/
+   for (p = real, resp = res;;) {
+   p1 = strstr(p, kw);
+   if (p1 != NULL) {
+   /* Copy the prefix before keyword. */
+   memcpy(resp, p, p1 - p);
+   resp += p1 - p;
+   /* Keyword replacement. */
+   memcpy(resp, subst, subst_len);
+   resp += subst_len;
+   p = p1 + kw_len;
+   } else
+   break;
+   }
+
+   /* Copy to the end of string and finish. */
+   strcat(resp, p);
+   if (may_free)
+   free(real);
+   return (res);
 }
 
 static char *
-origin_subst(const char *real, const char *origin_path)
+origin_subst(char *real, const char *origin_path)
 {
-char *res1, *res2, *res3, *res4;
+   char *res1, *res2, *res3, *res4;
 
-if (uts.sysname[0] == '\0') {
-   if (uname(&uts) != 0) {
-   _rtld_error("utsna

svn commit: r250039 - head/sys/netpfil/ipfw

2013-04-28 Thread Gleb Smirnoff
Author: glebius
Date: Mon Apr 29 06:11:19 2013
New Revision: 250039
URL: http://svnweb.freebsd.org/changeset/base/250039

Log:
  Remove useless ifdef KLD_MODULE from dummynet module unload path. This
  fixes panic on unload.
  
  Reported by:  pho

Modified:
  head/sys/netpfil/ipfw/ip_dummynet.c

Modified: head/sys/netpfil/ipfw/ip_dummynet.c
==
--- head/sys/netpfil/ipfw/ip_dummynet.c Mon Apr 29 04:38:43 2013
(r250038)
+++ head/sys/netpfil/ipfw/ip_dummynet.c Mon Apr 29 06:11:19 2013
(r250039)
@@ -2170,7 +2170,6 @@ ip_dn_init(void)
getmicrouptime(&dn_cfg.prev_t);
 }
 
-#ifdef KLD_MODULE
 static void
 ip_dn_destroy(int last)
 {
@@ -2194,7 +2193,6 @@ ip_dn_destroy(int last)
 
DN_LOCK_DESTROY();
 }
-#endif /* KLD_MODULE */
 
 static int
 dummynet_modevent(module_t mod, int type, void *data)
@@ -2210,13 +2208,8 @@ dummynet_modevent(module_t mod, int type
ip_dn_io_ptr = dummynet_io;
return 0;
} else if (type == MOD_UNLOAD) {
-#if !defined(KLD_MODULE)
-   printf("dummynet statically compiled, cannot unload\n");
-   return EINVAL ;
-#else
ip_dn_destroy(1 /* last */);
return 0;
-#endif
} else
return EOPNOTSUPP;
 }
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r249611 - in stable/9/sys/cam: ata scsi

2013-04-28 Thread Alexander Motin

On 29.04.2013 04:29, Peter Wemm wrote:

On Sat, Apr 27, 2013 at 5:56 PM, Peter Wemm  wrote:

On Fri, Apr 26, 2013 at 11:00 AM, Alexander Motin  wrote:

On 26.04.2013 19:47, Peter Wemm wrote:


On Thu, Apr 18, 2013 at 2:44 AM, Alexander Motin  wrote:


Author: mav
Date: Thu Apr 18 09:44:00 2013
New Revision: 249611
URL: http://svnweb.freebsd.org/changeset/base/249611

[..]

This breaks a number of machines in the freebsd.org cluster.  I have
to back out both of these changes to get them to reboot.



I've made a search though the base system and found only two drivers
affected by this change: mpt and hptmv. I've patched both at head r249849
and going to merge fix to stable/9 tomorrow unless objected. Have you tried
that patch instead of reverting?


I'm testing this on ns1.freebsd.org and ns2.freebsd.org as we speak.
If the cluster goes dark, that's why :)


The machines have survived multiple reboots with > r249849.


Thank you.


I do wonder if perhaps "post_sync" isn't the ideal name.  Perhaps add
a "quiesce_hardware" eventhandler chain and make it clear that this is
the hook for what things like mpt were doing.


It is only one specific case, but I am not sure that mpt is doing the 
right thing. According to the commit log, interrupts are disabled to 
prevent new incoming target commands. But may be it could/should be 
blocked in some other way.


What worries me more is that I've just rediscovered that post_sync 
handlers are called even in case of panic, when no FS sync happens at 
all. Is it wise to touch random subsystems is state when nothing can be 
trusted? I've recalled that earlier I've even added checks to CAM ATA 
disk driver to not recurse lock in case of panic, but that IMO is a 
dirty hack.


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


svn commit: r250038 - stable/9/sys/dev/hwpmc

2013-04-28 Thread Hiren Panchasara
Author: hiren
Date: Mon Apr 29 04:38:43 2013
New Revision: 250038
URL: http://svnweb.freebsd.org/changeset/base/250038

Log:
  MFC: r249069
  Trailing whitespace cleanup along with 80 column enforcemnt.
  MFC: r249428
  Cosmetic change: Fix a comment reference for Ivy Bridge *Xeon*
  MFC: r249460
  Improve/correct a comment. We now support a lot more cpu types.
  
  Approved by:  sbruno (mentor)

Modified:
  stable/9/sys/dev/hwpmc/hwpmc_core.c
  stable/9/sys/dev/hwpmc/hwpmc_intel.c
  stable/9/sys/dev/hwpmc/hwpmc_uncore.c
  stable/9/sys/dev/hwpmc/pmc_events.h
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/hwpmc/hwpmc_core.c
==
--- stable/9/sys/dev/hwpmc/hwpmc_core.c Sun Apr 28 22:52:43 2013
(r250037)
+++ stable/9/sys/dev/hwpmc/hwpmc_core.c Mon Apr 29 04:38:43 2013
(r250038)
@@ -25,7 +25,7 @@
  */
 
 /*
- * Intel Core, Core 2 and Atom PMCs.
+ * Intel Core PMCs.
  */
 
 #include 
@@ -560,7 +560,7 @@ struct iap_event_descr {
 #defineIAP_F_SB(1 << 6)/* CPU: Sandy Bridge */
 #defineIAP_F_IB(1 << 7)/* CPU: Ivy Bridge */
 #defineIAP_F_SBX   (1 << 8)/* CPU: Sandy Bridge Xeon */
-#defineIAP_F_IBX   (1 << 9)/* CPU: Ivy Bridge */
+#defineIAP_F_IBX   (1 << 9)/* CPU: Ivy Bridge Xeon */
 #defineIAP_F_HW(1 << 10)   /* CPU: Haswell */
 #defineIAP_F_FM(1 << 11)   /* Fixed mask */
 
@@ -604,7 +604,7 @@ static struct iap_event_descr iap_events
 IAPDESCR(03H_00H, 0x03, 0x00, IAP_F_FM | IAP_F_CC),
 IAPDESCR(03H_01H, 0x03, 0x01, IAP_F_FM | IAP_F_I7O | IAP_F_SB |
IAP_F_SBX),
-IAPDESCR(03H_02H, 0x03, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | 
+IAPDESCR(03H_02H, 0x03, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 |
IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW),
 IAPDESCR(03H_04H, 0x03, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O),
 IAPDESCR(03H_08H, 0x03, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SB |
@@ -622,8 +622,8 @@ static struct iap_event_descr iap_events
 IAPDESCR(05H_00H, 0x05, 0x00, IAP_F_FM | IAP_F_CC),
 IAPDESCR(05H_01H, 0x05, 0x01, IAP_F_FM | IAP_F_I7O | IAP_F_SB | IAP_F_IB |
IAP_F_SBX | IAP_F_IBX | IAP_F_HW),
-IAPDESCR(05H_02H, 0x05, 0x02, IAP_F_FM | IAP_F_I7O | IAP_F_WM | IAP_F_SB | 
IAP_F_IB |
-   IAP_F_SBX | IAP_F_IBX | IAP_F_HW),
+IAPDESCR(05H_02H, 0x05, 0x02, IAP_F_FM | IAP_F_I7O | IAP_F_WM | IAP_F_SB |
+   IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW),
 IAPDESCR(05H_03H, 0x05, 0x03, IAP_F_FM | IAP_F_I7O),
 
 IAPDESCR(06H_00H, 0x06, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2 |
@@ -635,7 +635,7 @@ static struct iap_event_descr iap_events
 IAPDESCR(06H_0FH, 0x06, 0x0F, IAP_F_FM | IAP_F_I7O),
 
 IAPDESCR(07H_00H, 0x07, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2),
-IAPDESCR(07H_01H, 0x07, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | 
+IAPDESCR(07H_01H, 0x07, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 |
IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX |
IAP_F_HW),
 IAPDESCR(07H_02H, 0x07, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2),
@@ -683,8 +683,8 @@ static struct iap_event_descr iap_events
 IAPDESCR(0DH_03H, 0x0D, 0x03, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_HW),
 IAPDESCR(0DH_40H, 0x0D, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_SBX),
 
-IAPDESCR(0EH_01H, 0x0E, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | 
IAP_F_IB |
-   IAP_F_SBX | IAP_F_IBX | IAP_F_HW),
+IAPDESCR(0EH_01H, 0x0E, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB |
+   IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW),
 IAPDESCR(0EH_02H, 0x0E, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM),
 IAPDESCR(0EH_10H, 0x0E, 0x10, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW),
 IAPDESCR(0EH_20H, 0x0E, 0x20, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW),
@@ -698,7 +698,7 @@ static struct iap_event_descr iap_events
 IAPDESCR(0FH_80H, 0x0F, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM),
 
 IAPDESCR(10H_00H, 0x10, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2),
-IAPDESCR(10H_01H, 0x10, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | 
+IAPDESCR(10H_01H, 0x10, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 |
IAP_F_WM | IAP_F_SB | IAP_F_SBX),
 IAPDESCR(10H_02H, 0x10, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM),
 IAPDESCR(10H_04H, 0x10, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM),
@@ -737,7 +737,7 @@ static struct iap_event_descr iap_events
 IAPDESCR(13H_81H, 0x13, 0x81, IAP_F_FM | IAP_F_CA),
 
 IAPDESCR(14H_00H, 0x14, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2),
-IAPDESCR(14H_01H, 0x14, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | 
+IAPDESCR(14H_01H, 0x14, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 |
 IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX),
 IAPDESCR(14H_02H, 0x14, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM),
 
@@ -764,

Re: svn commit: r249611 - in stable/9/sys/cam: ata scsi

2013-04-28 Thread Peter Wemm
On Sat, Apr 27, 2013 at 5:56 PM, Peter Wemm  wrote:
> On Fri, Apr 26, 2013 at 11:00 AM, Alexander Motin  wrote:
>> On 26.04.2013 19:47, Peter Wemm wrote:
>>>
>>> On Thu, Apr 18, 2013 at 2:44 AM, Alexander Motin  wrote:

 Author: mav
 Date: Thu Apr 18 09:44:00 2013
 New Revision: 249611
 URL: http://svnweb.freebsd.org/changeset/base/249611
> [..]
>>> This breaks a number of machines in the freebsd.org cluster.  I have
>>> to back out both of these changes to get them to reboot.
>>
>>
>> I've made a search though the base system and found only two drivers
>> affected by this change: mpt and hptmv. I've patched both at head r249849
>> and going to merge fix to stable/9 tomorrow unless objected. Have you tried
>> that patch instead of reverting?
>
> I'm testing this on ns1.freebsd.org and ns2.freebsd.org as we speak.
> If the cluster goes dark, that's why :)

The machines have survived multiple reboots with > r249849.

I do wonder if perhaps "post_sync" isn't the ideal name.  Perhaps add
a "quiesce_hardware" eventhandler chain and make it clear that this is
the hook for what things like mpt were doing.

-- 
Peter Wemm - pe...@wemm.org; pe...@freebsd.org; pe...@yahoo-inc.com; KI6FJV
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r249800 - head/sys/dev/bwn

2013-04-28 Thread hiren panchasara
On Tue, Apr 23, 2013 at 9:46 AM, hiren panchasara  wrote:
> On Tue, Apr 23, 2013 at 9:34 AM, Eitan Adler  wrote:
>> On 23 April 2013 12:19, Adrian Chadd  wrote:
>>> ... you know, even though it doesn't have an active maintainer, do you
>>> have test hardware, and why didn't you just bounce a patch to
>>> -wireless for review?
>
> My bad. I proposed this change initially.
>>>
>>> We don't bite you know!
>>
>> that you need to emphasize this does not comfort me. ;)
>>
>> reverted in 249812.
>
> Will look at john's suggestions and fix it correctly.

John,

Does this look okay?

% svn diff
Index: if_bwn.c
===
--- if_bwn.c(revision 250036)
+++ if_bwn.c(working copy)
@@ -9240,9 +9240,9 @@
BUS_DMASYNC_PREWRITE);

/*
-* Setup RX buf descriptor
+* Restore RX buf descriptor
 */
-   dr->setdesc(dr, desc, paddr, meta->mt_m->m_len -
+   dr->setdesc(dr, desc, meta->mt_paddr, meta->mt_m->m_len -
sizeof(*hdr), 0, 0, 0);
return (error);
 }

Thanks,
Hiren
>
> Hiren
>>
>> --
>> Eitan Adler
>> Source, Ports, Doc committer
>> Bugmeister, Ports Security teams
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r250034 - head/tools/tools/nanobsd

2013-04-28 Thread Garrett Cooper
On Apr 28, 2013, at 2:44 PM, Nick Hibma  wrote:

> Author: n_hibma
> Date: Sun Apr 28 21:44:44 2013
> New Revision: 250034
> URL: http://svnweb.freebsd.org/changeset/base/250034
> 
> Log:
>  Doing a cpio from /var/empty if dir was not specified or non-existent
>  copies its mode to the destination. This is not desirable.
>  Rephrase this code to be more sensible.
> 
>  PR:173483
>  MFC after:1 week
> 
> Modified:
>  head/tools/tools/nanobsd/nanobsd.sh
> 
> Modified: head/tools/tools/nanobsd/nanobsd.sh
> ==
> --- head/tools/tools/nanobsd/nanobsd.shSun Apr 28 21:14:23 2013
> (r250033)
> +++ head/tools/tools/nanobsd/nanobsd.shSun Apr 28 21:44:44 2013
> (r250034)
> @@ -413,12 +413,13 @@ populate_slice ( ) (
>dir=$2
>mnt=$3
>lbl=$4
> -test -z $2 && dir=${NANO_WORLDDIR}/var/empty
> -test -d $dir || dir=${NANO_WORLDDIR}/var/empty
> -echo "Creating ${dev} with ${dir} (mounting on ${mnt})"
> -newfs_part $dev $mnt $lbl
> -cd ${dir}
> -find . -print | grep -Ev '/(CVS|\.svn)' | cpio -dumpv ${mnt}
> +echo "Creating ${dev} (mounting on ${mnt})"
> +newfs_part ${dev} ${mnt} ${lbl}
> +if [ -n "${dir}" -a -d "${dir}" ]; then
> +echo "Populating ${lbl} from ${dir}"
> +cd ${dir}
> +find . -print | grep -Ev '/(CVS|\.svn)' | cpio -dumpv ${mnt}
> +fi
>df -i ${mnt}
>umount ${mnt}
> )

Awesome! Would you be interested in ushering in some of the nanobsd PRs in the 
queue, perhaps?
Thanks!
-Garrett
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r250037 - head/bin/hostname

2013-04-28 Thread Eitan Adler
Author: eadler
Date: Sun Apr 28 22:52:43 2013
New Revision: 250037
URL: http://svnweb.freebsd.org/changeset/base/250037

Log:
  Mark usage() __dead2

Modified:
  head/bin/hostname/hostname.c

Modified: head/bin/hostname/hostname.c
==
--- head/bin/hostname/hostname.cSun Apr 28 22:12:40 2013
(r250036)
+++ head/bin/hostname/hostname.cSun Apr 28 22:52:43 2013
(r250037)
@@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-static void usage(void);
+static void usage(void) __dead2;
 
 int
 main(int argc, char *argv[])
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r250036 - head/tools/tools/nanobsd

2013-04-28 Thread Nick Hibma
Author: n_hibma
Date: Sun Apr 28 22:12:40 2013
New Revision: 250036
URL: http://svnweb.freebsd.org/changeset/base/250036

Log:
  Replace a silly command sequence with a proper if-then-else.
  Generate images sparsely. This saves space and time, especially when
  generating images inside a VM (PR 173482).
  Add a 'true' statement to last_orders to prevent some version of sh from
  tripping over an empty function.

Modified:
  head/tools/tools/nanobsd/nanobsd.sh

Modified: head/tools/tools/nanobsd/nanobsd.sh
==
--- head/tools/tools/nanobsd/nanobsd.sh Sun Apr 28 22:05:01 2013
(r250035)
+++ head/tools/tools/nanobsd/nanobsd.sh Sun Apr 28 22:12:40 2013
(r250036)
@@ -359,8 +359,7 @@ setup_nanobsd ( ) (
echo "mount -o ro /dev/${NANO_DRIVE}s3" > conf/default/etc/remount
 
# Put /tmp on the /var ramdisk (could be symlink already)
-   rmdir tmp || true
-   rm tmp || true
+   test -d tmp && rmdir tmp || rm -f tmp
ln -s var/tmp tmp
 
) > ${NANO_OBJ}/_.dl 2>&1
@@ -541,7 +540,7 @@ create_i386_diskimage ( ) (
if [ $NANO_IMAGES -gt 1 -a $NANO_INIT_IMG2 -gt 0 ] ; then
# Duplicate to second image (if present)
echo "Duplicating to second image..."
-   dd if=/dev/${MD}s1 of=/dev/${MD}s2 bs=64k
+   dd conv=sparse if=/dev/${MD}s1 of=/dev/${MD}s2 bs=64k
mount /dev/${MD}s2a ${MNT}
for f in ${MNT}/etc/fstab ${MNT}/conf/base/etc/fstab
do
@@ -565,12 +564,12 @@ create_i386_diskimage ( ) (
 
if [ "${NANO_MD_BACKING}" = "swap" ] ; then
echo "Writing out ${NANO_IMGNAME}..."
-   dd if=/dev/${MD} of=${IMG} bs=64k
+   dd conv=sparse if=/dev/${MD} of=${IMG} bs=64k
fi
 
if ${do_copyout_partition} ; then
echo "Writing out _.disk.image..."
-   dd if=/dev/${MD}s1 of=${NANO_DISKIMGDIR}/_.disk.image bs=64k
+   dd conv=sparse if=/dev/${MD}s1 
of=${NANO_DISKIMGDIR}/_.disk.image bs=64k
fi
mdconfig -d -u $MD
 
@@ -589,6 +588,7 @@ last_orders () (
# after the build completed, for instance to copy the finished
# image to a more convenient place:
# cp ${NANO_DISKIMGDIR}/_.disk.image /home/ftp/pub/nanobsd.disk
+   true
 )
 
 ###
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r250035 - head/bin/kill

2013-04-28 Thread Eitan Adler
Author: eadler
Date: Sun Apr 28 22:05:01 2013
New Revision: 250035
URL: http://svnweb.freebsd.org/changeset/base/250035

Log:
  Remove cast that was only required for K&R C.
  
  Reviewed by:  jilles

Modified:
  head/bin/kill/kill.c

Modified: head/bin/kill/kill.c
==
--- head/bin/kill/kill.cSun Apr 28 21:44:44 2013(r250034)
+++ head/bin/kill/kill.cSun Apr 28 22:05:01 2013(r250035)
@@ -156,7 +156,7 @@ signame_to_signum(const char *sig)
 {
int n;
 
-   if (!strncasecmp(sig, "SIG", (size_t)3))
+   if (strncasecmp(sig, "SIG", 3) == 0)
sig += 3;
for (n = 1; n < sys_nsig; n++) {
if (!strcasecmp(sys_signame[n], sig))
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r250034 - head/tools/tools/nanobsd

2013-04-28 Thread Nick Hibma
Author: n_hibma
Date: Sun Apr 28 21:44:44 2013
New Revision: 250034
URL: http://svnweb.freebsd.org/changeset/base/250034

Log:
  Doing a cpio from /var/empty if dir was not specified or non-existent
  copies its mode to the destination. This is not desirable.
  Rephrase this code to be more sensible.
  
  PR:   173483
  MFC after:1 week

Modified:
  head/tools/tools/nanobsd/nanobsd.sh

Modified: head/tools/tools/nanobsd/nanobsd.sh
==
--- head/tools/tools/nanobsd/nanobsd.sh Sun Apr 28 21:14:23 2013
(r250033)
+++ head/tools/tools/nanobsd/nanobsd.sh Sun Apr 28 21:44:44 2013
(r250034)
@@ -413,12 +413,13 @@ populate_slice ( ) (
dir=$2
mnt=$3
lbl=$4
-   test -z $2 && dir=${NANO_WORLDDIR}/var/empty
-   test -d $dir || dir=${NANO_WORLDDIR}/var/empty
-   echo "Creating ${dev} with ${dir} (mounting on ${mnt})"
-   newfs_part $dev $mnt $lbl
-   cd ${dir}
-   find . -print | grep -Ev '/(CVS|\.svn)' | cpio -dumpv ${mnt}
+   echo "Creating ${dev} (mounting on ${mnt})"
+   newfs_part ${dev} ${mnt} ${lbl}
+   if [ -n "${dir}" -a -d "${dir}" ]; then
+   echo "Populating ${lbl} from ${dir}"
+   cd ${dir}
+   find . -print | grep -Ev '/(CVS|\.svn)' | cpio -dumpv ${mnt}
+   fi
df -i ${mnt}
umount ${mnt}
 )
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r250033 - in head/sys/cam: ata scsi

2013-04-28 Thread Steven Hartland
Author: smh
Date: Sun Apr 28 21:14:23 2013
New Revision: 250033
URL: http://svnweb.freebsd.org/changeset/base/250033

Log:
  Correct comment typo's
  Add missing comment
  
  Reviewed by:  pjd (mentor)
  Approved by:  pjd (mentor)
  MFC after:2 weeks

Modified:
  head/sys/cam/ata/ata_da.c
  head/sys/cam/scsi/scsi_da.c

Modified: head/sys/cam/ata/ata_da.c
==
--- head/sys/cam/ata/ata_da.c   Sun Apr 28 20:55:45 2013(r250032)
+++ head/sys/cam/ata/ata_da.c   Sun Apr 28 21:14:23 2013(r250033)
@@ -1147,7 +1147,7 @@ adaregister(struct cam_periph *periph, v
snprintf(announce_buf, sizeof(announce_buf),
"kern.cam.ada.%d.write_cache", periph->unit_number);
TUNABLE_INT_FETCH(announce_buf, &softc->write_cache);
-   /* Disable queue sorting for non-rotatational media by default */
+   /* Disable queue sorting for non-rotational media by default. */
if (cgd->ident_data.media_rotation_rate == 1)
softc->sort_io_queue = 0;
else

Modified: head/sys/cam/scsi/scsi_da.c
==
--- head/sys/cam/scsi/scsi_da.c Sun Apr 28 20:55:45 2013(r250032)
+++ head/sys/cam/scsi/scsi_da.c Sun Apr 28 21:14:23 2013(r250033)
@@ -3058,6 +3058,10 @@ dadone(struct cam_periph *periph, union 
bdc = (struct scsi_vpd_block_characteristics *)csio->data_ptr;
 
if ((csio->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) {
+   /*
+* Disable queue sorting for non-rotational media
+* by default.
+*/
if (scsi_2btoul(bdc->medium_rotation_rate) ==
SVPD_BDC_RATE_NONE_ROTATING)
softc->sort_io_queue = 0;
@@ -3106,8 +3110,8 @@ dadone(struct cam_periph *periph, union 
  ATA_DSM_BLK_RANGES);
}
/*
-* Disable queue sorting for non-rotatational media
-* by default
+* Disable queue sorting for non-rotational media
+* by default.
 */
if (ata_params->media_rotation_rate == 1)
softc->sort_io_queue = 0;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r250032 - head/sys/dev/hptrr

2013-04-28 Thread Sean Bruno
Author: sbruno
Date: Sun Apr 28 20:55:45 2013
New Revision: 250032
URL: http://svnweb.freebsd.org/changeset/base/250032

Log:
  Silence warning from clang:
  
  /home/sbruno/bsd/head/sys/dev/hptrr/hptrr_osm_bsd.c:178:66: warning: for loop 
has empty body [-Wempty-body]
  for (order=0, size=PAGE_SIZE; sizesize; order++, 
size<<=1) ;

 ^
  /home/sbruno/bsd/head/sys/dev/hptrr/hptrr_osm_bsd.c:178:66: note: put the 
semicolon on a separate line to silence this warning
  
  Obtained from:Yahoo! Inc.
  MFC after:2 weeks

Modified:
  head/sys/dev/hptrr/hptrr_osm_bsd.c

Modified: head/sys/dev/hptrr/hptrr_osm_bsd.c
==
--- head/sys/dev/hptrr/hptrr_osm_bsd.c  Sun Apr 28 20:46:32 2013
(r250031)
+++ head/sys/dev/hptrr/hptrr_osm_bsd.c  Sun Apr 28 20:55:45 2013
(r250032)
@@ -175,7 +175,8 @@ static int hpt_alloc_mem(PVBUS_EXT vbus_
 
HPT_ASSERT((f->size & (f->alignment-1))==0);
 
-   for (order=0, size=PAGE_SIZE; sizesize; order++, size<<=1) ;
+   for (order=0, size=PAGE_SIZE; sizesize; order++, size<<=1)
+   ;
 
KdPrint(("%s: %d*%d=%d bytes, order %d",
f->tag, f->count, f->size, f->count*f->size, order));
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r250031 - head/sys/dev/ciss

2013-04-28 Thread Sean Bruno
Author: sbruno
Date: Sun Apr 28 20:46:32 2013
New Revision: 250031
URL: http://svnweb.freebsd.org/changeset/base/250031

Log:
  The controller does not zero this data structure, ever.
  
  Zero it out here so we do not misinterpret the data error.
  
  Obtained from:Yahoo! Inc.
  MFC after:2 weeks

Modified:
  head/sys/dev/ciss/ciss.c

Modified: head/sys/dev/ciss/ciss.c
==
--- head/sys/dev/ciss/ciss.cSun Apr 28 19:38:59 2013(r250030)
+++ head/sys/dev/ciss/ciss.cSun Apr 28 20:46:32 2013(r250031)
@@ -2487,6 +2487,7 @@ ciss_preen_command(struct ciss_request *
 cc->header.sg_total = 0;
 cc->header.host_tag = cr->cr_tag << 2;
 cc->header.host_tag_zeroes = 0;
+bzero(&(cc->sg[0]), CISS_COMMAND_ALLOC_SIZE - sizeof(struct ciss_command));
 cmdphys = cr->cr_ccphys;
 cc->error_info.error_info_address = cmdphys + sizeof(struct ciss_command);
 cc->error_info.error_info_length = CISS_COMMAND_ALLOC_SIZE - sizeof(struct 
ciss_command);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r250030 - in head/sys: fs/tmpfs vm

2013-04-28 Thread Konstantin Belousov
Author: kib
Date: Sun Apr 28 19:38:59 2013
New Revision: 250030
URL: http://svnweb.freebsd.org/changeset/base/250030

Log:
  Rework the handling of the tmpfs node backing swap object and tmpfs
  vnode v_object to avoid double-buffering.  Use the same object both as
  the backing store for tmpfs node and as the v_object.
  
  Besides reducing memory use up to 2x times for situation of mapping
  files from tmpfs, it also makes tmpfs read and write operations copy
  twice bytes less.
  
  VM subsystem was already slightly adapted to tolerate OBJT_SWAP object
  as v_object. Now the vm_object_deallocate() is modified to not
  reinstantiate OBJ_ONEMAPPING flag and help the VFS to correctly handle
  VV_TEXT flag on the last dereference of the tmpfs backing object.
  
  Reviewed by:  alc
  Tested by:pho, bf
  MFC after:1 month

Modified:
  head/sys/fs/tmpfs/tmpfs_subr.c
  head/sys/fs/tmpfs/tmpfs_vnops.c
  head/sys/vm/vm_object.c
  head/sys/vm/vm_object.h

Modified: head/sys/fs/tmpfs/tmpfs_subr.c
==
--- head/sys/fs/tmpfs/tmpfs_subr.c  Sun Apr 28 19:25:09 2013
(r250029)
+++ head/sys/fs/tmpfs/tmpfs_subr.c  Sun Apr 28 19:38:59 2013
(r250030)
@@ -166,6 +166,7 @@ tmpfs_alloc_node(struct tmpfs_mount *tmp
 char *target, dev_t rdev, struct tmpfs_node **node)
 {
struct tmpfs_node *nnode;
+   vm_object_t obj;
 
/* If the root directory of the 'tmp' file system is not yet
 * allocated, this must be the request to do it. */
@@ -227,9 +228,14 @@ tmpfs_alloc_node(struct tmpfs_mount *tmp
break;
 
case VREG:
-   nnode->tn_reg.tn_aobj =
+   obj = nnode->tn_reg.tn_aobj =
vm_pager_allocate(OBJT_SWAP, NULL, 0, VM_PROT_DEFAULT, 0,
NULL /* XXXKIB - tmpfs needs swap reservation */);
+   VM_OBJECT_WLOCK(obj);
+   /* OBJ_TMPFS is set together with the setting of vp->v_object */
+   vm_object_set_flag(obj, OBJ_NOSPLIT);
+   vm_object_clear_flag(obj, OBJ_ONEMAPPING);
+   VM_OBJECT_WUNLOCK(obj);
break;
 
default:
@@ -434,9 +440,11 @@ int
 tmpfs_alloc_vp(struct mount *mp, struct tmpfs_node *node, int lkflag,
 struct vnode **vpp)
 {
-   int error = 0;
struct vnode *vp;
+   vm_object_t object;
+   int error;
 
+   error = 0;
 loop:
TMPFS_NODE_LOCK(node);
if ((vp = node->tn_vnode) != NULL) {
@@ -506,13 +514,22 @@ loop:
/* FALLTHROUGH */
case VLNK:
/* FALLTHROUGH */
-   case VREG:
-   /* FALLTHROUGH */
case VSOCK:
break;
case VFIFO:
vp->v_op = &tmpfs_fifoop_entries;
break;
+   case VREG:
+   object = node->tn_reg.tn_aobj;
+   VM_OBJECT_WLOCK(object);
+   VI_LOCK(vp);
+   KASSERT(vp->v_object == NULL, ("Not NULL v_object in tmpfs"));
+   vp->v_object = object;
+   object->un_pager.swp.swp_tmpfs = vp;
+   vm_object_set_flag(object, OBJ_TMPFS);
+   VI_UNLOCK(vp);
+   VM_OBJECT_WUNLOCK(object);
+   break;
case VDIR:
MPASS(node->tn_dir.tn_parent != NULL);
if (node->tn_dir.tn_parent == node)
@@ -523,7 +540,6 @@ loop:
panic("tmpfs_alloc_vp: type %p %d", node, (int)node->tn_type);
}
 
-   vnode_pager_setsize(vp, node->tn_size);
error = insmntque(vp, mp);
if (error)
vp = NULL;
@@ -1343,7 +1359,6 @@ retry:
TMPFS_UNLOCK(tmp);
 
node->tn_size = newsize;
-   vnode_pager_setsize(vp, newsize);
return (0);
 }
 

Modified: head/sys/fs/tmpfs/tmpfs_vnops.c
==
--- head/sys/fs/tmpfs/tmpfs_vnops.c Sun Apr 28 19:25:09 2013
(r250029)
+++ head/sys/fs/tmpfs/tmpfs_vnops.c Sun Apr 28 19:38:59 2013
(r250030)
@@ -278,8 +278,6 @@ tmpfs_close(struct vop_close_args *v)
 {
struct vnode *vp = v->a_vp;
 
-   MPASS(VOP_ISLOCKED(vp));
-
/* Update node times. */
tmpfs_update(vp);
 
@@ -439,7 +437,6 @@ tmpfs_setattr(struct vop_setattr_args *v
return error;
 }
 
-/* - */
 static int
 tmpfs_nocacheread(vm_object_t tobj, vm_pindex_t idx,
 vm_offset_t offset, size_t tlen, struct uio *uio)
@@ -448,12 +445,35 @@ tmpfs_nocacheread(vm_object_t tobj, vm_p
int error, rv;
 
VM_OBJECT_WLOCK(tobj);
-   m = vm_page_grab(tobj, idx, VM_ALLOC_WIRED |
-   VM_ALLOC_NORMAL | VM_ALLOC_RETRY);
+
+   /*
+* The kern_sendfile() code calls vn_rdwr() with the page
+* soft-busied.  Ignore the soft-busy state here. Parallel
+*

svn commit: r250029 - head/sys/vm

2013-04-28 Thread Konstantin Belousov
Author: kib
Date: Sun Apr 28 19:25:09 2013
New Revision: 250029
URL: http://svnweb.freebsd.org/changeset/base/250029

Log:
  Make vm_object_page_clean() and vm_mmap_vnode() tolerate the vnode'
  v_object of non OBJT_VNODE type.
  
  For vm_object_page_clean(), simply do not assert that object type must
  be OBJT_VNODE, and add a comment explaining how the check for
  OBJ_MIGHTBEDIRTY prevents the rest of function from operating on such
  objects.
  
  For vm_mmap_vnode(), if the object type is not OBJT_VNODE, require it
  to be for swap pager (or default), handle the bypass filesystems, and
  correctly acquire the object reference in this case.
  
  Reviewed by:  alc
  Tested by:pho, bf
  MFC after:1 week

Modified:
  head/sys/vm/vm_mmap.c
  head/sys/vm/vm_object.c

Modified: head/sys/vm/vm_mmap.c
==
--- head/sys/vm/vm_mmap.c   Sun Apr 28 19:19:26 2013(r250028)
+++ head/sys/vm/vm_mmap.c   Sun Apr 28 19:25:09 2013(r250029)
@@ -1284,7 +1284,7 @@ vm_mmap_vnode(struct thread *td, vm_size
error = EINVAL;
goto done;
}
-   if (obj->handle != vp) {
+   if (obj->type == OBJT_VNODE && obj->handle != vp) {
vput(vp);
vp = (struct vnode *)obj->handle;
/*
@@ -1333,7 +1333,14 @@ vm_mmap_vnode(struct thread *td, vm_size
objsize = round_page(va.va_size);
if (va.va_nlink == 0)
flags |= MAP_NOSYNC;
-   obj = vm_pager_allocate(OBJT_VNODE, vp, objsize, prot, foff, cred);
+   if (obj->type == OBJT_VNODE)
+   obj = vm_pager_allocate(OBJT_VNODE, vp, objsize, prot, foff,
+   cred);
+   else {
+   KASSERT(obj->type == OBJT_DEFAULT || obj->type == OBJT_SWAP,
+   ("wrong object type"));
+   vm_object_reference(obj);
+   }
if (obj == NULL) {
error = ENOMEM;
goto done;

Modified: head/sys/vm/vm_object.c
==
--- head/sys/vm/vm_object.c Sun Apr 28 19:19:26 2013(r250028)
+++ head/sys/vm/vm_object.c Sun Apr 28 19:25:09 2013(r250029)
@@ -820,7 +820,12 @@ vm_object_page_clean(vm_object_t object,
boolean_t clearobjflags, eio, res;
 
VM_OBJECT_ASSERT_WLOCKED(object);
-   KASSERT(object->type == OBJT_VNODE, ("Not a vnode object"));
+
+   /*
+* The OBJ_MIGHTBEDIRTY flag is only set for OBJT_VNODE
+* objects.  The check below prevents the function from
+* operating on non-vnode objects.
+*/
if ((object->flags & OBJ_MIGHTBEDIRTY) == 0 ||
object->resident_page_count == 0)
return (TRUE);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r250028 - head/sys/vm

2013-04-28 Thread Konstantin Belousov
Author: kib
Date: Sun Apr 28 19:19:26 2013
New Revision: 250028
URL: http://svnweb.freebsd.org/changeset/base/250028

Log:
  Assert that the object type for the vnode' non-NULL v_object, passed
  to vnode_pager_setsize(), is either OBJT_VNODE, or, if vnode was
  already reclaimed, OBJT_DEAD.  Note that the later is only possible
  due to some filesystems, in particular, nfsiods from nfs clients, call
  vnode_pager_setsize() with unlocked vnode.
  
  More, if the object is terminated, do not perform the resizing
  operation.
  
  Reviewed by:  alc
  Tested by:pho, bf
  MFC after:1 week

Modified:
  head/sys/vm/vnode_pager.c

Modified: head/sys/vm/vnode_pager.c
==
--- head/sys/vm/vnode_pager.c   Sun Apr 28 19:12:09 2013(r250027)
+++ head/sys/vm/vnode_pager.c   Sun Apr 28 19:19:26 2013(r250028)
@@ -380,6 +380,12 @@ vnode_pager_setsize(vp, nsize)
return;
 /* ASSERT_VOP_ELOCKED(vp, "vnode_pager_setsize and not locked vnode"); */
VM_OBJECT_WLOCK(object);
+   if (object->type == OBJT_DEAD) {
+   VM_OBJECT_WUNLOCK(object);
+   return;
+   }
+   KASSERT(object->type == OBJT_VNODE,
+   ("not vnode-backed object %p", object));
if (nsize == object->un_pager.vnp.vnp_size) {
/*
 * Hasn't changed size
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r250027 - head/sys/kern

2013-04-28 Thread Konstantin Belousov
Author: kib
Date: Sun Apr 28 19:12:09 2013
New Revision: 250027
URL: http://svnweb.freebsd.org/changeset/base/250027

Log:
  Eliminate the layering violation in the kern_sendfile().  When quering
  the file size, use VOP_GETATTR() instead of accessing vnode vm_object
  un_pager.vnp.vnp_size.
  
  Take the shared vnode lock earlier to cover the added VOP_GETATTR()
  call and, as consequence, the whole internal sendfile loop.  Reduce vm
  object lock scope to not protect the local calculations.
  
  Note that this is the last misuse of the vnp_size in the tree, the
  others were removed from the ELF image activator by r230246.
  
  Reviewed by:  alc
  Tested by:pho, bf (previous version)
  MFC after:1 week

Modified:
  head/sys/kern/uipc_syscalls.c

Modified: head/sys/kern/uipc_syscalls.c
==
--- head/sys/kern/uipc_syscalls.c   Sun Apr 28 18:40:55 2013
(r250026)
+++ head/sys/kern/uipc_syscalls.c   Sun Apr 28 19:12:09 2013
(r250027)
@@ -1902,8 +1902,10 @@ kern_sendfile(struct thread *td, struct 
struct mbuf *m = NULL;
struct sf_buf *sf;
struct vm_page *pg;
+   struct vattr va;
off_t off, xfsize, fsbytes = 0, sbytes = 0, rem = 0;
int error, hdrlen = 0, mnw = 0;
+   int bsize;
struct sendfile_sync *sfs = NULL;
 
/*
@@ -2102,6 +2104,16 @@ retry_space:
 */
space -= hdrlen;
 
+   error = vn_lock(vp, LK_SHARED);
+   if (error != 0)
+   goto done;
+   error = VOP_GETATTR(vp, &va, td->td_ucred);
+   if (error != 0) {
+   VOP_UNLOCK(vp, 0);
+   goto done;
+   }
+   bsize = vp->v_mount->mnt_stat.f_iosize;
+
/*
 * Loop and construct maximum sized mbuf chain to be bulk
 * dumped into socket buffer.
@@ -2111,7 +2123,6 @@ retry_space:
vm_offset_t pgoff;
struct mbuf *m0;
 
-   VM_OBJECT_WLOCK(obj);
/*
 * Calculate the amount to transfer.
 * Not to exceed a page, the EOF,
@@ -2121,12 +2132,11 @@ retry_space:
if (uap->nbytes)
rem = (uap->nbytes - fsbytes - loopbytes);
else
-   rem = obj->un_pager.vnp.vnp_size -
+   rem = va.va_size -
uap->offset - fsbytes - loopbytes;
xfsize = omin(PAGE_SIZE - pgoff, rem);
xfsize = omin(space - loopbytes, xfsize);
if (xfsize <= 0) {
-   VM_OBJECT_WUNLOCK(obj);
done = 1;   /* all data sent */
break;
}
@@ -2136,7 +2146,6 @@ retry_space:
 * Let the outer loop figure out how to handle it.
 */
if (space <= loopbytes) {
-   VM_OBJECT_WUNLOCK(obj);
done = 0;
break;
}
@@ -2146,6 +2155,7 @@ retry_space:
 * if not found or wait and loop if busy.
 */
pindex = OFF_TO_IDX(off);
+   VM_OBJECT_WLOCK(obj);
pg = vm_page_grab(obj, pindex, VM_ALLOC_NOBUSY |
VM_ALLOC_NORMAL | VM_ALLOC_WIRED | VM_ALLOC_RETRY);
 
@@ -2163,7 +2173,6 @@ retry_space:
else if (uap->flags & SF_NODISKIO)
error = EBUSY;
else {
-   int bsize;
ssize_t resid;
 
/*
@@ -2175,13 +2184,6 @@ retry_space:
 
/*
 * Get the page from backing store.
-*/
-   error = vn_lock(vp, LK_SHARED);
-   if (error != 0)
-   goto after_read;
-   bsize = vp->v_mount->mnt_stat.f_iosize;
-
-   /*
 * XXXMAC: Because we don't have fp->f_cred
 * here, we pass in NOCRED.  This is probably
 * wrong, but is consistent with our original
@@ -2191,8 +2193,6 @@ retry_space:
trunc_page(off), UIO_NOCOPY, IO_NODELOCKED |
IO_VMIO | ((MAXBSIZE / bsize) << 
IO_SEQSHIFT),
   

svn commit: r250026 - head/sys/vm

2013-04-28 Thread Konstantin Belousov
Author: kib
Date: Sun Apr 28 18:40:55 2013
New Revision: 250026
URL: http://svnweb.freebsd.org/changeset/base/250026

Log:
  Convert panic() into KASSERT().
  
  Reviewed by:  alc
  MFC after:1 week

Modified:
  head/sys/vm/vnode_pager.c

Modified: head/sys/vm/vnode_pager.c
==
--- head/sys/vm/vnode_pager.c   Sun Apr 28 18:12:43 2013(r250025)
+++ head/sys/vm/vnode_pager.c   Sun Apr 28 18:40:55 2013(r250026)
@@ -214,8 +214,7 @@ retry:
VM_OBJECT_SLEEP(object, object, PDROP | PVM, "vadead", 0);
}
 
-   if (vp->v_usecount == 0)
-   panic("vnode_pager_alloc: no vnode reference");
+   KASSERT(vp->v_usecount != 0, ("vnode_pager_alloc: no vnode reference"));
 
if (object == NULL) {
/*
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r250025 - head/sys/cam/scsi

2013-04-28 Thread Alexander Motin
Author: mav
Date: Sun Apr 28 18:12:43 2013
New Revision: 250025
URL: http://svnweb.freebsd.org/changeset/base/250025

Log:
  Add some cam_freeze_devq()'s missed at r249466.
  This makes number of freezes match the number of releases.
  
  Reported by:  dim

Modified:
  head/sys/cam/scsi/scsi_xpt.c

Modified: head/sys/cam/scsi/scsi_xpt.c
==
--- head/sys/cam/scsi/scsi_xpt.cSun Apr 28 17:58:11 2013
(r250024)
+++ head/sys/cam/scsi/scsi_xpt.cSun Apr 28 18:12:43 2013
(r250025)
@@ -883,6 +883,7 @@ again:
 * routine finish up for us.
 */
start_ccb->csio.data_ptr = NULL;
+   cam_freeze_devq(periph->path);
probedone(periph, start_ccb);
return;
}
@@ -913,6 +914,7 @@ again:
 * routine finish up for us.
 */
start_ccb->csio.data_ptr = NULL;
+   cam_freeze_devq(periph->path);
probedone(periph, start_ccb);
return;
}
@@ -952,6 +954,7 @@ again:
 * routine finish up for us.
 */
start_ccb->csio.data_ptr = NULL;
+   cam_freeze_devq(periph->path);
probedone(periph, start_ccb);
return;
}
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r250024 - in head: tools/build/mk usr.bin

2013-04-28 Thread Eitan Adler
Author: eadler
Date: Sun Apr 28 17:58:11 2013
New Revision: 250024
URL: http://svnweb.freebsd.org/changeset/base/250024

Log:
  When the world is built WITHOUT_OPENSSH also don't
  install ssh-copy-id.
  
  PR:   misc/177590
  Submitted by: Oleg Ginzburg 
  Reviewed by:  imp

Modified:
  head/tools/build/mk/OptionalObsoleteFiles.inc
  head/usr.bin/Makefile

Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
==
--- head/tools/build/mk/OptionalObsoleteFiles.inc   Sun Apr 28 16:35:24 
2013(r250023)
+++ head/tools/build/mk/OptionalObsoleteFiles.inc   Sun Apr 28 17:58:11 
2013(r250024)
@@ -3674,9 +3674,9 @@ OLD_FILES+=usr/share/man/man8/ntptime.8.
 # to be filled in
 #.endif
 
-#.if ${MK_OPENSSH} == no
-# to be filled in
-#.endif
+.if ${MK_OPENSSH} == no
+OLD_FILES+=usr.bin/ssh-copy-id
+.endif
 
 #.if ${MK_OPENSSL} == no
 # to be filled in

Modified: head/usr.bin/Makefile
==
--- head/usr.bin/Makefile   Sun Apr 28 16:35:24 2013(r250023)
+++ head/usr.bin/Makefile   Sun Apr 28 17:58:11 2013(r250024)
@@ -148,7 +148,6 @@ SUBDIR= alias \
sockstat \
sort \
split \
-   ssh-copy-id \
stat \
stdbuf \
su \
@@ -303,6 +302,10 @@ SUBDIR+=   ypmatch
 SUBDIR+=   ypwhich
 .endif
 
+.if ${MK_OPENSSH} != "no"
+SUBDIR+=   ssh-copy-id
+.endif
+
 .if ${MK_OPENSSL} != "no"
 SUBDIR+=   bc
 SUBDIR+=   chkey
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r250023 - head/lib/libstand

2013-04-28 Thread Robert Watson
Author: rwatson
Date: Sun Apr 28 16:35:24 2013
New Revision: 250023
URL: http://svnweb.freebsd.org/changeset/base/250023

Log:
  Enable building string functions as part of libstand on mips; the Makefile
  is a bit obfuscated here, as ia64 adds string source files elsewhere, so
  simply exclude it here.
  
  Reviewed by:  imp
  MFC after:3 days
  Sponsored by: DARPA, AFRL

Modified:
  head/lib/libstand/Makefile

Modified: head/lib/libstand/Makefile
==
--- head/lib/libstand/Makefile  Sun Apr 28 16:35:23 2013(r250022)
+++ head/lib/libstand/Makefile  Sun Apr 28 16:35:24 2013(r250023)
@@ -54,9 +54,7 @@ SRCS+= ntoh.c
 
 # string functions from libc
 .PATH: ${.CURDIR}/../libc/string
-.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "powerpc" || \
-   ${MACHINE_CPUARCH} == "sparc64" || ${MACHINE_CPUARCH} == "amd64" || \
-   ${MACHINE_CPUARCH} == "arm"
+.if ${MACHINE_CPUARCH} != "ia64"
 SRCS+= bcmp.c bcopy.c bzero.c ffs.c memccpy.c memchr.c memcmp.c memcpy.c \
memmove.c memset.c qdivrem.c strcat.c strchr.c strcmp.c strcpy.c \
strcspn.c strlen.c strncat.c strncmp.c strncpy.c strpbrk.c \
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r250022 - head/sys/dev/ciss

2013-04-28 Thread Sean Bruno
Author: sbruno
Date: Sun Apr 28 16:35:23 2013
New Revision: 250022
URL: http://svnweb.freebsd.org/changeset/base/250022

Log:
  Let's align correctly by setting to 17.
  
  OpenCISS states that if the value is 0, then the driver should try a value
  of 31.  That's just silly.  Set to 17 so that the subtraction for maxio
  becomes 16 and aligns nicely.
  
  Reviewed by:  scottl
  Obtained from:Yahoo! Inc.
  MFC after:2 weeks

Modified:
  head/sys/dev/ciss/ciss.c

Modified: head/sys/dev/ciss/ciss.c
==
--- head/sys/dev/ciss/ciss.cSun Apr 28 16:20:09 2013(r250021)
+++ head/sys/dev/ciss/ciss.cSun Apr 28 16:35:23 2013(r250022)
@@ -3007,7 +3007,7 @@ ciss_cam_action(struct cam_sim *sim, uni
cpi->protocol = PROTO_SCSI;
cpi->protocol_version = SCSI_REV_2;
if (sc->ciss_cfg->max_sg_length == 0) {
-   sg_length = 16;
+   sg_length = 17;
} else {
/* XXX Fix for ZMR cards that advertise max_sg_length == 32
 * Confusing bit here. max_sg_length is usually a power of 2. We always
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r250021 - head/sys/dev/ciss

2013-04-28 Thread Sean Bruno
Author: sbruno
Date: Sun Apr 28 16:20:09 2013
New Revision: 250021
URL: http://svnweb.freebsd.org/changeset/base/250021

Log:
  Its time to retire COMPAQ.  I don't think that its coming back.  :-)
  
  Obtained from:Yahoo! Inc.
  MFC after:2 weeks

Modified:
  head/sys/dev/ciss/ciss.c

Modified: head/sys/dev/ciss/ciss.c
==
--- head/sys/dev/ciss/ciss.cSun Apr 28 14:40:29 2013(r250020)
+++ head/sys/dev/ciss/ciss.cSun Apr 28 16:20:09 2013(r250021)
@@ -3375,7 +3375,7 @@ ciss_cam_complete_fixup(struct ciss_soft
 
cl = &sc->ciss_logical[bus][target];
 
-   padstr(inq->vendor, "COMPAQ",
+   padstr(inq->vendor, "HP",
   SID_VENDOR_SIZE);
padstr(inq->product,
   ciss_name_ldrive_org(cl->cl_ldrive->fault_tolerance),
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r250020 - head/lib/libstand/mips

2013-04-28 Thread Robert Watson
Author: rwatson
Date: Sun Apr 28 14:40:29 2013
New Revision: 250020
URL: http://svnweb.freebsd.org/changeset/base/250020

Log:
  Merge @228176 from Perforce to fix a bug introduced in r249553:
  
Trim two now-unneeded (and likely harmful) lines from the libstand
setjmp/longjmp for MIPS.
  
Spotted by:   jmallett
  
  MFC after:  3 days
  Sponsored by: DARPA, AFRL

Modified:
  head/lib/libstand/mips/_setjmp.S

Modified: head/lib/libstand/mips/_setjmp.S
==
--- head/lib/libstand/mips/_setjmp.SSun Apr 28 09:29:44 2013
(r250019)
+++ head/lib/libstand/mips/_setjmp.SSun Apr 28 14:40:29 2013
(r250020)
@@ -72,7 +72,6 @@ LEAF(_setjmp)
REG_S   s7, ((S7 + 3) * SZREG)(a0)
REG_S   sp, ((SP + 3) * SZREG)(a0)
REG_S   s8, ((S8 + 3) * SZREG)(a0)
-   REG_S   v0, ((32 + 38) * SZREG)(a0)
j   ra
movev0, zero
 END(_setjmp)
@@ -96,7 +95,6 @@ LEAF(_longjmp)
REG_L   s5, ((S5 + 3) * SZREG)(a0)
REG_L   s6, ((S6 + 3) * SZREG)(a0)
REG_L   s7, ((S7 + 3) * SZREG)(a0)
-   REG_L   v0, ((32 + 38) * SZREG)(a0) # get fpu status
REG_L   sp, ((SP + 3) * SZREG)(a0)
REG_L   s8, ((S8 + 3) * SZREG)(a0)
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r250019 - head/usr.bin/biff

2013-04-28 Thread Joel Dahl
Author: joel (doc committer)
Date: Sun Apr 28 09:29:44 2013
New Revision: 250019
URL: http://svnweb.freebsd.org/changeset/base/250019

Log:
  Fix EXIT STATUS. biff reports its status when it was invoked.
  
  Submitted by: Ryan Kavanagh,
Jason McIntyre 
  Obtained from:OpenBSD

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

Modified: head/usr.bin/biff/biff.1
==
--- head/usr.bin/biff/biff.1Sun Apr 28 08:29:00 2013(r250018)
+++ head/usr.bin/biff/biff.1Sun Apr 28 09:29:44 2013(r250019)
@@ -28,7 +28,7 @@
 .\" @(#)biff.1 8.1 (Berkeley) 6/6/93
 .\" $FreeBSD$
 .\"
-.Dd March 20, 2010
+.Dd April 28, 2013
 .Dt BIFF 1
 .Os
 .Sh NAME
@@ -97,9 +97,9 @@ The
 utility exits with one of the following values:
 .Bl -tag -width indent
 .It 0
-Notification is enabled.
+Notification was enabled at the time of invocation.
 .It 1
-Notification is disabled.
+Notification was disabled at the time of invocation.
 .It >1
 An error occurred.
 .El
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r250018 - head/sys/vm

2013-04-28 Thread Alan Cox
Author: alc
Date: Sun Apr 28 08:29:00 2013
New Revision: 250018
URL: http://svnweb.freebsd.org/changeset/base/250018

Log:
  Eliminate an unneeded call to vm_radix_trimkey() from vm_radix_lookup_le().
  This call is clearing bits from the key that will be set again by the next
  line.
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/vm/vm_radix.c

Modified: head/sys/vm/vm_radix.c
==
--- head/sys/vm/vm_radix.c  Sun Apr 28 07:52:46 2013(r250017)
+++ head/sys/vm/vm_radix.c  Sun Apr 28 08:29:00 2013(r250018)
@@ -666,7 +666,6 @@ restart:
 */
if (slot > 0) {
inc = VM_RADIX_UNITLEVEL(rnode->rn_clev);
-   index = vm_radix_trimkey(index, rnode->rn_clev);
index |= inc - 1;
do {
index -= inc;
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r250017 - vendor-sys/illumos/dist/uts/common/fs/zfs

2013-04-28 Thread Martin Matuska
Author: mm
Date: Sun Apr 28 07:52:46 2013
New Revision: 250017
URL: http://svnweb.freebsd.org/changeset/base/250017

Log:
  Update vendor-sys/illumos/dist to illumos-gate 14020:3843f7c5f635
  
  Illumos ZFS issues:
3705 stack overflow due to zfs lz4 compression

Modified:
  vendor-sys/illumos/dist/uts/common/fs/zfs/lz4.c

Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/lz4.c
==
--- vendor-sys/illumos/dist/uts/common/fs/zfs/lz4.c Sun Apr 28 07:48:53 
2013(r250016)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/lz4.c Sun Apr 28 07:52:46 
2013(r250017)
@@ -197,20 +197,17 @@ lz4_decompress(void *s_start, void *d_st
 defined(__amd64) || defined(__ppc64__) || defined(_WIN64) || \
 defined(__LP64__) || defined(_LP64))
 #defineLZ4_ARCH64 1
-/*
- * Illumos: On amd64 we have 20k of stack and 24k on sun4u and sun4v, so we
- * can spend 16k on the algorithm
- */
-#defineSTACKLIMIT 12
 #else
 #defineLZ4_ARCH64 0
+#endif
+
 /*
- * Illumos: On i386 we only have 12k of stack, so in order to maintain the
- * same COMPRESSIONLEVEL we have to use heap allocation. Performance will
- * suck, but alas, it's ZFS on 32-bit we're talking about, so...
+ * Limits the amount of stack space that the algorithm may consume to hold
+ * the compression lookup table. The value `9' here means we'll never use
+ * more than 2k of stack (see above for a description of COMPRESSIONLEVEL).
+ * If more memory is needed, it is allocated from the heap.
  */
-#defineSTACKLIMIT 11
-#endif
+#defineSTACKLIMIT 9
 
 /*
  * Little Endian or Big Endian?
@@ -240,11 +237,7 @@ lz4_decompress(void *s_start, void *d_st
 #defineLZ4_FORCE_UNALIGNED_ACCESS 1
 #endif
 
-/*
- * Illumos: we can't use GCC's __builtin_ctz family of builtins in the
- * kernel
- */
-#defineLZ4_FORCE_SW_BITCOUNT
+/* #define LZ4_FORCE_SW_BITCOUNT */
 
 /*
  * Compiler Options
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r250016 - stable/9/cddl/contrib/opensolaris/lib/libzfs/common

2013-04-28 Thread Martin Matuska
Author: mm
Date: Sun Apr 28 07:48:53 2013
New Revision: 250016
URL: http://svnweb.freebsd.org/changeset/base/250016

Log:
  MFC r249883:
  Respect the enoent_ok flag if reporting error for holding an non-existing
  snapshot.
  
  Related illumos ZFS issue:
3699 zfs hold or release of a non-existent snapshot does not output error
  
  Reported by:  Steven Hartland 

Modified:
  stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
Directory Properties:
  stable/9/cddl/contrib/opensolaris/   (props changed)
  stable/9/cddl/contrib/opensolaris/lib/libzfs/   (props changed)

Modified: stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
==
--- stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
Sun Apr 28 07:00:36 2013(r250015)
+++ stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
Sun Apr 28 07:48:53 2013(r250016)
@@ -4207,10 +4207,13 @@ zfs_hold(zfs_handle_t *zhp, const char *
if (nvlist_next_nvpair(ha.nvl, NULL) == NULL) {
fnvlist_free(ha.nvl);
ret = ENOENT;
-   (void) snprintf(errbuf, sizeof (errbuf),
-   dgettext(TEXT_DOMAIN, "cannot hold snapshot '%s@%s'"),
-   zhp->zfs_name, snapname);
-   (void) zfs_standard_error(hdl, ret, errbuf);
+   if (!enoent_ok) {
+   (void) snprintf(errbuf, sizeof (errbuf),
+   dgettext(TEXT_DOMAIN,
+   "cannot hold snapshot '%s@%s'"),
+   zhp->zfs_name, snapname);
+   (void) zfs_standard_error(hdl, ret, errbuf);
+   }
return (ret);
}
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r250015 - in head/sys: arm/xilinx dev/cadence

2013-04-28 Thread Wojciech A. Koszek
Author: wkoszek
Date: Sun Apr 28 07:00:36 2013
New Revision: 250015
URL: http://svnweb.freebsd.org/changeset/base/250015

Log:
  Bring copyright changes with the agreement of Thomas Skibo.
  
  Communication on src-commiters, Sat, 27 Apr 2013 22:09:06 -0700,
  Subject was: "Re: svn commit: r249997"
  
  As I'm here, fix the style main block comments in files' headers.

Modified:
  head/sys/arm/xilinx/zy7_devcfg.c
  head/sys/arm/xilinx/zy7_ehci.c
  head/sys/arm/xilinx/zy7_gpio.c
  head/sys/arm/xilinx/zy7_l2cache.c
  head/sys/arm/xilinx/zy7_machdep.c
  head/sys/arm/xilinx/zy7_reg.h
  head/sys/arm/xilinx/zy7_slcr.c
  head/sys/arm/xilinx/zy7_slcr.h
  head/sys/dev/cadence/if_cgem.c
  head/sys/dev/cadence/if_cgem_hw.h

Modified: head/sys/arm/xilinx/zy7_devcfg.c
==
--- head/sys/arm/xilinx/zy7_devcfg.cSun Apr 28 06:15:56 2013
(r250014)
+++ head/sys/arm/xilinx/zy7_devcfg.cSun Apr 28 07:00:36 2013
(r250015)
@@ -1,32 +1,33 @@
 /*-
- * Copyright (C) 2013, Thomas Skibo.
+ * Copyright (c) 2013 Thomas Skibo
  * All rights reserved.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * * The names of contributors may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- * 
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL AUTHORS OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
  *
+ * $FreeBSD$
  */
 
-/* Zynq-7000 Devcfg driver.  This allows programming the PL (FPGA) section
+/* 
+ * Zynq-7000 Devcfg driver.  This allows programming the PL (FPGA) section
  * of Zynq.
  *
  * Reference: Zynq-7000 All Programmable SoC Technical Reference Manual.

Modified: head/sys/arm/xilinx/zy7_ehci.c
==
--- head/sys/arm/xilinx/zy7_ehci.c  Sun Apr 28 06:15:56 2013
(r250014)
+++ head/sys/arm/xilinx/zy7_ehci.c  Sun Apr 28 07:00:36 2013
(r250015)
@@ -1,31 +1,33 @@
 /*-
- * Copyright (C) 2012-2013, Thomas Skibo.
+ * Copyright (c) 2012-2013 Thomas Skibo
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * * The names of contributors may not be used to endorse or promote products
- *   derived from this software without