svn commit: r261006 - head/sys/mips/atheros

2014-01-22 Thread Adrian Chadd
Author: adrian
Date: Wed Jan 22 08:02:07 2014
New Revision: 261006
URL: http://svnweb.freebsd.org/changeset/base/261006

Log:
  Use the correct bitshift operators for the GPIO definitions.
  
  Submitted by: Daan Vreeken 
  MFC after:1 week

Modified:
  head/sys/mips/atheros/ar724xreg.h

Modified: head/sys/mips/atheros/ar724xreg.h
==
--- head/sys/mips/atheros/ar724xreg.h   Wed Jan 22 07:48:39 2014
(r261005)
+++ head/sys/mips/atheros/ar724xreg.h   Wed Jan 22 08:02:07 2014
(r261006)
@@ -87,22 +87,22 @@
 #defineAR724X_PCI_INTR_MASK0x180f0050
 #defineAR724X_PCI_INTR_DEV0(1 << 14)
 
-#defineAR724X_GPIO_FUNC_GE0_MII_CLK_EN (1 >> 19)
-#defineAR724X_GPIO_FUNC_SPI_EN (1 >> 18)
-#defineAR724X_GPIO_FUNC_SPI_CS_EN2 (1 >> 14)
-#defineAR724X_GPIO_FUNC_SPI_CS_EN1 (1 >> 13)
-#defineAR724X_GPIO_FUNC_CLK_OBS5_EN(1 >> 12)
-#defineAR724X_GPIO_FUNC_CLK_OBS4_EN(1 >> 11)
-#defineAR724X_GPIO_FUNC_CLK_OBS3_EN(1 >> 10)
-#defineAR724X_GPIO_FUNC_CLK_OBS2_EN(1 >> 9)
-#defineAR724X_GPIO_FUNC_CLK_OBS1_EN(1 >> 8)
-#defineAR724X_GPIO_FUNC_ETH_SWITCH_LED4_EN (1 >> 7)
-#defineAR724X_GPIO_FUNC_ETH_SWITCH_LED3_EN (1 >> 6)
-#defineAR724X_GPIO_FUNC_ETH_SWITCH_LED2_EN (1 >> 5)
-#defineAR724X_GPIO_FUNC_ETH_SWITCH_LED1_EN (1 >> 4)
-#defineAR724X_GPIO_FUNC_ETH_SWITCH_LED0_EN (1 >> 3)
-#defineAR724X_GPIO_FUNC_UART_RTS_CTS_EN(1 >> 2)
-#defineAR724X_GPIO_FUNC_UART_EN(1 >> 1)
-#defineAR724X_GPIO_FUNC_JTAG_DISABLE   (1 >> 0)
+#defineAR724X_GPIO_FUNC_GE0_MII_CLK_EN (1 << 19)
+#defineAR724X_GPIO_FUNC_SPI_EN (1 << 18)
+#defineAR724X_GPIO_FUNC_SPI_CS_EN2 (1 << 14)
+#defineAR724X_GPIO_FUNC_SPI_CS_EN1 (1 << 13)
+#defineAR724X_GPIO_FUNC_CLK_OBS5_EN(1 << 12)
+#defineAR724X_GPIO_FUNC_CLK_OBS4_EN(1 << 11)
+#defineAR724X_GPIO_FUNC_CLK_OBS3_EN(1 << 10)
+#defineAR724X_GPIO_FUNC_CLK_OBS2_EN(1 << 9)
+#defineAR724X_GPIO_FUNC_CLK_OBS1_EN(1 << 8)
+#defineAR724X_GPIO_FUNC_ETH_SWITCH_LED4_EN (1 << 7)
+#defineAR724X_GPIO_FUNC_ETH_SWITCH_LED3_EN (1 << 6)
+#defineAR724X_GPIO_FUNC_ETH_SWITCH_LED2_EN (1 << 5)
+#defineAR724X_GPIO_FUNC_ETH_SWITCH_LED1_EN (1 << 4)
+#defineAR724X_GPIO_FUNC_ETH_SWITCH_LED0_EN (1 << 3)
+#defineAR724X_GPIO_FUNC_UART_RTS_CTS_EN(1 << 2)
+#defineAR724X_GPIO_FUNC_UART_EN(1 << 1)
+#defineAR724X_GPIO_FUNC_JTAG_DISABLE   (1 << 0)
 
 #endif
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r261006 - head/sys/mips/atheros

2014-01-22 Thread Daan Vreeken
Hi Adrian,

On Wednesday 22 January 2014 09:02:08 Adrian Chadd wrote:
> Author: adrian
> Date: Wed Jan 22 08:02:07 2014
> New Revision: 261006
> URL: http://svnweb.freebsd.org/changeset/base/261006
>
> Log:
>   Use the correct bitshift operators for the GPIO definitions.
>
>   Submitted by:   Daan Vreeken 
>   MFC after:  1 week
...

Thanks for the quick commit!


Regards,
-- 
Ing. Daan Vreeken
Vitsch Electronics
http://Vitsch.nl/
http://VitschVPN.nl/
tel: +31-(0)40-7113051
KvK nr: 17174380
--
Machines en netwerken op afstand beheren? Vitsch VPN oplossing!
Kijk voor meer informatie op: http://www.VitschVPN.nl/
___
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: r261014 - head/sys/dev/usb/wlan

2014-01-22 Thread Hans Petter Selasky
Author: hselasky
Date: Wed Jan 22 09:57:26 2014
New Revision: 261014
URL: http://svnweb.freebsd.org/changeset/base/261014

Log:
  - Fix some non-portable code with regard to endianness. Don't use memmove().
  - Fix a range check for maximum transmit length.
  - Fix read from missing field when transmitting data.
  
  MFC after:2 weeks

Modified:
  head/sys/dev/usb/wlan/if_run.c
  head/sys/dev/usb/wlan/if_runvar.h

Modified: head/sys/dev/usb/wlan/if_run.c
==
--- head/sys/dev/usb/wlan/if_run.c  Wed Jan 22 09:30:36 2014
(r261013)
+++ head/sys/dev/usb/wlan/if_run.c  Wed Jan 22 09:57:26 2014
(r261014)
@@ -1356,11 +1356,22 @@ run_efuse_read(struct run_softc *sc, uin
uint16_t reg;
int error, ntries;
 
+   switch (count) {
+   case 1:
+   *val = 0xff;/* address not found */
+   break;
+   case 2:
+   *val = 0x;  /* address not found */
+   addr *= 2;
+   break;
+   default:
+   *val = 0x;  /* address not found */
+   return (USB_ERR_INVAL);
+   }
+
if ((error = run_read(sc, RT3070_EFUSE_CTRL, &tmp)) != 0)
return (error);
 
-   if (count == 2)
-   addr *= 2;
/*-
 * Read one 16-byte block into registers EFUSE_DATA[0-3]:
 * DATA0: F E D C
@@ -1381,21 +1392,21 @@ run_efuse_read(struct run_softc *sc, uin
if (ntries == 100)
return (ETIMEDOUT);
 
-   if ((tmp & RT3070_EFUSE_AOUT_MASK) == RT3070_EFUSE_AOUT_MASK) {
-   *val = 0x;  /* address not found */
+   if ((tmp & RT3070_EFUSE_AOUT_MASK) == RT3070_EFUSE_AOUT_MASK)
return (0);
-   }
+
/* determine to which 32-bit register our 16-bit word belongs */
reg = RT3070_EFUSE_DATA3 - (addr & 0xc);
if ((error = run_read(sc, reg, &tmp)) != 0)
return (error);
 
-   if (count == 2)
-   *val = (addr & 2) ? tmp >> 16 : tmp & 0x;
-   else {
-   tmp >>= (8 *(addr & 0x3));
-   memmove(val, &tmp, sizeof(*val));
-   }
+   /* get correct bytes */
+   *val = (uint16_t)(tmp >> (8 * (addr & 0x3)));
+
+   /* mask for byte read, if any */
+   if (count == 1)
+   *val &= 0xff;
+
return (0);
 }
 
@@ -3083,10 +3094,9 @@ tr_setup:
STAILQ_REMOVE_HEAD(&pq->tx_qh, next);
 
m = data->m;
-   size = (sc->mac_ver == 0x5592) ? 
-   RUN_MAX_TXSZ + sizeof(uint32_t) : RUN_MAX_TXSZ;
-   if ((m->m_pkthdr.len +
-   sizeof(data->desc) + 3 + 8) > size) {
+   size = (sc->mac_ver == 0x5592) ?
+   sizeof(data->desc) + sizeof(uint32_t) : sizeof(data->desc);
+   if ((m->m_pkthdr.len + size + 3 + 8) > RUN_MAX_TXSZ) {
DPRINTF("data overflow, %u bytes\n",
m->m_pkthdr.len);
 
@@ -3098,8 +3108,6 @@ tr_setup:
}
 
pc = usbd_xfer_get_frame(xfer, 0);
-   size = (sc->mac_ver == 0x5592) ?
-   sizeof(data->desc) + sizeof(uint32_t) : sizeof(data->desc);
usbd_copy_in(pc, 0, &data->desc, size);
usbd_m_copy_in(pc, size, m, 0, m->m_pkthdr.len);
size += m->m_pkthdr.len;

Modified: head/sys/dev/usb/wlan/if_runvar.h
==
--- head/sys/dev/usb/wlan/if_runvar.h   Wed Jan 22 09:30:36 2014
(r261013)
+++ head/sys/dev/usb/wlan/if_runvar.h   Wed Jan 22 09:57:26 2014
(r261014)
@@ -89,6 +89,7 @@ struct run_tx_data {
uint32_t align[0];  /* dummy field */
uint8_t desc[sizeof(struct rt2870_txd) +
 sizeof(struct rt2860_txwi)];
+   uint8_t desc_extra[4];  /* used by v5592 */
uint8_t ridx;
 };
 STAILQ_HEAD(run_tx_data_head, run_tx_data);
___
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: r261024 - head/sys/netinet

2014-01-22 Thread Gleb Smirnoff
Author: glebius
Date: Wed Jan 22 10:57:42 2014
New Revision: 261024
URL: http://svnweb.freebsd.org/changeset/base/261024

Log:
  Fix fallout from r241923. Calculate length of payload in
  pim_input() properly.
  
  While here, remove extra variable and incorrect condition
  before m_pullup().
  
  Reported by:  Olivier Cochard-Labbé 
  Sponsored by: Nginx, Inc.

Modified:
  head/sys/netinet/ip_mroute.c

Modified: head/sys/netinet/ip_mroute.c
==
--- head/sys/netinet/ip_mroute.cWed Jan 22 10:45:16 2014
(r261023)
+++ head/sys/netinet/ip_mroute.cWed Jan 22 10:57:42 2014
(r261024)
@@ -2557,14 +2557,13 @@ pim_encapcheck(const struct mbuf *m, int
  * is passed to if_simloop().
  */
 void
-pim_input(struct mbuf *m, int off)
+pim_input(struct mbuf *m, int iphlen)
 {
 struct ip *ip = mtod(m, struct ip *);
 struct pim *pim;
 int minlen;
-int datalen = ntohs(ip->ip_len);
+int datalen = ntohs(ip->ip_len) - iphlen;
 int ip_tos;
-int iphlen = off;
 
 /* Keep statistics */
 PIMSTAT_INC(pims_rcv_total_msgs);
@@ -2594,8 +2593,7 @@ pim_input(struct mbuf *m, int off)
  * Get the IP and PIM headers in contiguous memory, and
  * possibly the PIM REGISTER header.
  */
-if ((m->m_flags & M_EXT || m->m_len < minlen) &&
-   (m = m_pullup(m, minlen)) == 0) {
+if (m->m_len < minlen && (m = m_pullup(m, minlen)) == 0) {
CTR1(KTR_IPMF, "%s: m_pullup() failed", __func__);
return;
 }
___
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: r261026 - head/share/misc

2014-01-22 Thread Steven Kreuzer
Author: skreuzer (doc,ports committer)
Date: Wed Jan 22 14:11:40 2014
New Revision: 261026
URL: http://svnweb.freebsd.org/changeset/base/261026

Log:
  add myself to committers-doc.dot
  
  Approved by:hrs (mentor)

Modified:
  head/share/misc/committers-doc.dot

Modified: head/share/misc/committers-doc.dot
==
--- head/share/misc/committers-doc.dot  Wed Jan 22 13:43:54 2014
(r261025)
+++ head/share/misc/committers-doc.dot  Wed Jan 22 14:11:40 2014
(r261026)
@@ -84,6 +84,7 @@ remko [label="Remko Lodder\nremko@FreeBS
 rene [label="Rene Ladan\nr...@freebsd.org\n2008/11/03"]
 ryusuke [label="Ryusuke Suzuki\nryus...@freebsd.org\n2009/12/21"]
 simon [label="Simon L. Nielsen\nsi...@freebsd.org\n2003/07/20"]
+skreuzer [label="Steven Kreuzer\skreu...@freebsd.org\n2014/01/15"]
 taras [label="Taras Korenko\nta...@freebsd.org\n2010/06/25"]
 trhodes [label="Tom Rhodes\ntrho...@freebsd.org\n2002/03/25"]
 wblock [label="Warren Block\nwbl...@freebsd.org\n2011/09/12"]
@@ -128,6 +129,7 @@ gjb -> crees
 
 hrs -> ryusuke
 hrs -> dru
+hrs -> skreuzer
 
 jesusr -> jcamou
 
___
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: r261027 - head/etc/defaults

2014-01-22 Thread Baptiste Daroussin
Author: bapt
Date: Wed Jan 22 14:22:44 2014
New Revision: 261027
URL: http://svnweb.freebsd.org/changeset/base/261027

Log:
  Remove pkg_* related info from periodic.conf
  
  Reported by:  Robin Brocks 
  MFC after:3 days

Modified:
  head/etc/defaults/periodic.conf

Modified: head/etc/defaults/periodic.conf
==
--- head/etc/defaults/periodic.conf Wed Jan 22 14:11:40 2014
(r261026)
+++ head/etc/defaults/periodic.conf Wed Jan 22 14:22:44 2014
(r261027)
@@ -140,10 +140,6 @@ daily_status_mail_rejects_shorten="NO" 
 # 480.status-ntpd
 daily_status_ntpd_enable="NO"  # Check NTP status
 
-# 490.status-pkg-changes
-daily_status_pkg_changes_enable="NO"   # Show package changes
-pkg_info="pkg_info"# Use this program
-
 # 500.queuerun
 daily_queuerun_enable="YES"# Run mail queue
 daily_submit_queuerun="YES"# Also submit queue
@@ -183,11 +179,6 @@ weekly_catman_enable="NO"  # 
Preformat
 weekly_noid_enable="NO"# Find unowned 
files
 weekly_noid_dirs="/"   # Look here
 
-# 400.status-pkg
-weekly_status_pkg_enable="NO"  # Find out-of-date pkgs
-pkg_version=pkg_version# Use this 
program
-pkg_version_index=/usr/ports/INDEX-11  # Use this index file
-
 # 450.status-security
 weekly_status_security_enable="YES"# Security check
 # See also "Security options" above for more options
___
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: r261028 - head/sys/netpfil/pf

2014-01-22 Thread Gleb Smirnoff
Author: glebius
Date: Wed Jan 22 15:44:38 2014
New Revision: 261028
URL: http://svnweb.freebsd.org/changeset/base/261028

Log:
  Fix resource leak and simplify code for DIOCCHANGEADDR.
  
  CID:  1007035

Modified:
  head/sys/netpfil/pf/pf_ioctl.c

Modified: head/sys/netpfil/pf/pf_ioctl.c
==
--- head/sys/netpfil/pf/pf_ioctl.c  Wed Jan 22 14:22:44 2014
(r261027)
+++ head/sys/netpfil/pf/pf_ioctl.c  Wed Jan 22 15:44:38 2014
(r261028)
@@ -2281,6 +2281,7 @@ DIOCGETSTATES_full:
bcopy(&pca->addr, newpa, sizeof(struct pf_pooladdr));
if (newpa->ifname[0])
kif = malloc(sizeof(*kif), PFI_MTYPE, M_WAITOK);
+   newpa->kif = NULL;
}
 
 #defineERROUT(x)   { error = (x); goto DIOCCHANGEADDR_error; }
@@ -2298,8 +2299,8 @@ DIOCGETSTATES_full:
if (newpa->ifname[0]) {
newpa->kif = pfi_kif_attach(kif, newpa->ifname);
pfi_kif_ref(newpa->kif);
-   } else
-   newpa->kif = NULL;
+   kif = NULL;
+   }
 
switch (newpa->addr.type) {
case PF_ADDR_DYNIFTL:
@@ -2313,32 +2314,24 @@ DIOCGETSTATES_full:
error = ENOMEM;
break;
}
-   if (error) {
-   if (newpa->kif)
-   pfi_kif_unref(newpa->kif);
-   PF_RULES_WUNLOCK();
-   free(newpa, M_PFRULE);
-   break;
-   }
+   if (error)
+   goto DIOCCHANGEADDR_error;
}
 
-   if (pca->action == PF_CHANGE_ADD_HEAD)
+   switch (pca->action) {
+   case PF_CHANGE_ADD_HEAD:
oldpa = TAILQ_FIRST(&pool->list);
-   else if (pca->action == PF_CHANGE_ADD_TAIL)
+   break;
+   case PF_CHANGE_ADD_TAIL:
oldpa = TAILQ_LAST(&pool->list, pf_palist);
-   else {
-   int i = 0;
-
+   break;
+   default:
oldpa = TAILQ_FIRST(&pool->list);
-   while ((oldpa != NULL) && (i < pca->nr)) {
+   for (int i = 0; oldpa && i < pca->nr; i++)
oldpa = TAILQ_NEXT(oldpa, entries);
-   i++;
-   }
-   if (oldpa == NULL) {
-   PF_RULES_WUNLOCK();
-   error = EINVAL;
-   break;
-   }
+
+   if (oldpa == NULL)
+   ERROUT(EINVAL);
}
 
if (pca->action == PF_CHANGE_REMOVE) {
@@ -2366,13 +2359,14 @@ DIOCGETSTATES_full:
}
 
pool->cur = TAILQ_FIRST(&pool->list);
-   PF_ACPY(&pool->counter, &pool->cur->addr.v.a.addr,
-   pca->af);
+   PF_ACPY(&pool->counter, &pool->cur->addr.v.a.addr, pca->af);
PF_RULES_WUNLOCK();
break;
 
 #undef ERROUT
 DIOCCHANGEADDR_error:
+   if (newpa->kif)
+   pfi_kif_unref(newpa->kif);
PF_RULES_WUNLOCK();
if (newpa != NULL)
free(newpa, M_PFRULE);
___
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: r261029 - head/sys/netpfil/pf

2014-01-22 Thread Gleb Smirnoff
Author: glebius
Date: Wed Jan 22 15:58:43 2014
New Revision: 261029
URL: http://svnweb.freebsd.org/changeset/base/261029

Log:
  Remove NULL pointer dereference.
  
  CID:  1009118

Modified:
  head/sys/netpfil/pf/pf.c

Modified: head/sys/netpfil/pf/pf.c
==
--- head/sys/netpfil/pf/pf.cWed Jan 22 15:44:38 2014(r261028)
+++ head/sys/netpfil/pf/pf.cWed Jan 22 15:58:43 2014(r261029)
@@ -5493,7 +5493,6 @@ pf_route(struct mbuf **m, struct pf_rule
PF_STATE_UNLOCK(s);
rt = rtalloc1_fib(sintosa(&dst), 0, 0, M_GETFIB(m0));
if (rt == NULL) {
-   RTFREE_LOCKED(rt);
KMOD_IPSTAT_INC(ips_noroute);
error = EHOSTUNREACH;
goto bad;
___
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: r261030 - head/usr.sbin/services_mkdb

2014-01-22 Thread John Baldwin
Author: jhb
Date: Wed Jan 22 16:50:18 2014
New Revision: 261030
URL: http://svnweb.freebsd.org/changeset/base/261030

Log:
  Similar to cap_mkdb(1), add endianness support to services_mkdb(1)
  to support cross-builds once this is invoked during releases.

Modified:
  head/usr.sbin/services_mkdb/extern.h
  head/usr.sbin/services_mkdb/services_mkdb.8
  head/usr.sbin/services_mkdb/services_mkdb.c

Modified: head/usr.sbin/services_mkdb/extern.h
==
--- head/usr.sbin/services_mkdb/extern.hWed Jan 22 15:58:43 2014
(r261029)
+++ head/usr.sbin/services_mkdb/extern.hWed Jan 22 16:50:18 2014
(r261030)
@@ -29,6 +29,6 @@
  * $FreeBSD$
  */
 
-extern const HASHINFO hinfo;
+extern HASHINFO hinfo;
 
 void uniq(const char *);

Modified: head/usr.sbin/services_mkdb/services_mkdb.8
==
--- head/usr.sbin/services_mkdb/services_mkdb.8 Wed Jan 22 15:58:43 2014
(r261029)
+++ head/usr.sbin/services_mkdb/services_mkdb.8 Wed Jan 22 16:50:18 2014
(r261030)
@@ -37,6 +37,7 @@
 .Nd generate the services database
 .Sh SYNOPSIS
 .Nm
+.Op Fl b | l
 .Op Fl q
 .Op Fl o Ar database
 .Op Ar file
@@ -61,6 +62,10 @@ The file must be in the correct format (
 .Pp
 The options are as follows:
 .Bl -tag -width indent
+.It Fl b
+Use big-endian byte order for database metadata.
+.It Fl l
+Use little-endian byte order for database metadata.
 .It Fl o Ar database
 Put the output databases in the named file.
 .It Fl q
@@ -70,6 +75,13 @@ Print the services file to stdout, omitt
 .El
 .Pp
 The databases are used by the C library services routines (see
+.Pp
+The
+.Fl b
+and
+.Fl l
+flags are mutually exclusive.
+The default byte ordering is the current host order.
 .Xr getservent 3 ) .
 .Sh FILES
 .Bl -tag -width ".Pa /var/db/services.db.tmp" -compact

Modified: head/usr.sbin/services_mkdb/services_mkdb.c
==
--- head/usr.sbin/services_mkdb/services_mkdb.c Wed Jan 22 15:58:43 2014
(r261029)
+++ head/usr.sbin/services_mkdb/services_mkdb.c Wed Jan 22 16:50:18 2014
(r261030)
@@ -67,7 +67,7 @@ static const char *getprotostr(StringLis
 static const char *mkaliases(StringList *, char *, size_t);
 static voidusage(void);
 
-const HASHINFO hinfo = {
+HASHINFO hinfo = {
.bsize = 256,
.ffactor = 4,
.nelem = 32768,
@@ -87,14 +87,21 @@ main(int argc, char *argv[])
int  warndup = 1;
int  unique = 0;
int  otherflag = 0;
+   int  byteorder = 0;
size_t   cnt = 0;
StringList *sl, ***svc;
size_t port, proto;
 
setprogname(argv[0]);
 
-   while ((ch = getopt(argc, argv, "qo:u")) != -1)
+   while ((ch = getopt(argc, argv, "blo:qu")) != -1)
switch (ch) {
+   case 'b':
+   case 'l':
+   if (byteorder != 0)
+   usage();
+   byteorder = ch == 'b' ? 4321 : 1234;
+   break;
case 'q':
otherflag = 1;
warndup = 0;
@@ -119,6 +126,9 @@ main(int argc, char *argv[])
if (argc == 1)
fname = argv[0];
 
+   /* Set byte order. */
+   hinfo.lorder = byteorder;
+
if (unique)
uniq(fname);
 
@@ -423,7 +433,8 @@ out:
 static void
 usage(void)
 {
-   (void)fprintf(stderr, "Usage:\t%s [-q] [-o ] []\n"
+   (void)fprintf(stderr,
+   "Usage:\t%s [-b | -l] [-q] [-o ] []\n"
"\t%s -u []\n", getprogname(), getprogname());
exit(1);
 }
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r261031 - in head: . etc usr.sbin/etcupdate usr.sbin/mergemaster

2014-01-22 Thread John Baldwin
Author: jhb
Date: Wed Jan 22 16:59:53 2014
New Revision: 261031
URL: http://svnweb.freebsd.org/changeset/base/261031

Log:
  Generate /var/db/services.db during 'make distribution' so that it is
  present during new installs.  Update etcupdate and mergemaster to
  ignore the generated file.
  
  Tested by:gjb (release build)
  MFC after:1 month

Modified:
  head/Makefile.inc1
  head/etc/Makefile
  head/usr.sbin/etcupdate/etcupdate.sh
  head/usr.sbin/mergemaster/mergemaster.sh

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Wed Jan 22 16:50:18 2014(r261030)
+++ head/Makefile.inc1  Wed Jan 22 16:59:53 2014(r261031)
@@ -771,7 +771,7 @@ _nmtree_itools= nmtree
 ITOOLS=[ awk cap_mkdb cat chflags chmod chown \
date echo egrep find grep id install ${_install-info} \
ln lockf make mkdir mtree ${_nmtree_itools} mv pwd_mkdb \
-   rm sed sh sysctl test true uname wc ${_zoneinfo}
+   rm sed services_mkdb sh sysctl test true uname wc ${_zoneinfo}
 
 #
 # distributeworld

Modified: head/etc/Makefile
==
--- head/etc/Makefile   Wed Jan 22 16:50:18 2014(r261030)
+++ head/etc/Makefile   Wed Jan 22 16:59:53 2014(r261031)
@@ -198,6 +198,8 @@ distribution:
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
${BIN1} ${DESTDIR}/etc; \
cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \
+   services_mkdb ${CAP_MKDB_ENDIAN} -o ${DESTDIR}/var/db/services.db \
+   ${DESTDIR}/etc/services; \
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
${BIN2} ${DESTDIR}/etc; \
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \

Modified: head/usr.sbin/etcupdate/etcupdate.sh
==
--- head/usr.sbin/etcupdate/etcupdate.shWed Jan 22 16:50:18 2014
(r261030)
+++ head/usr.sbin/etcupdate/etcupdate.shWed Jan 22 16:59:53 2014
(r261031)
@@ -213,7 +213,8 @@ build_tree()
 
# Purge auto-generated files.  Only the source files need to
# be updated after which these files are regenerated.
-   rm -f $1/etc/*.db $1/etc/passwd >&3 2>&1 || return 1
+   rm -f $1/etc/*.db $1/etc/passwd $1/var/db/services.db >&3 2>&1 || \
+   return 1
 
# Remove empty files.  These just clutter the output of 'diff'.
find $1 -type f -size 0 -delete >&3 2>&1 || return 1

Modified: head/usr.sbin/mergemaster/mergemaster.sh
==
--- head/usr.sbin/mergemaster/mergemaster.shWed Jan 22 16:50:18 2014
(r261030)
+++ head/usr.sbin/mergemaster/mergemaster.shWed Jan 22 16:59:53 2014
(r261031)
@@ -699,7 +699,8 @@ case "${RERUN}" in
   # or spwd.db.  Instead, we want to compare the text versions, and run *_mkdb.
   # Prompt the user to do so below, as needed.
   #
-  rm -f ${TEMPROOT}/etc/*.db ${TEMPROOT}/etc/passwd
+  rm -f ${TEMPROOT}/etc/*.db ${TEMPROOT}/etc/passwd \
+  ${TEMPROOT}/var/db/services.db
 
   # We only need to compare things like freebsd.cf once
   find ${TEMPROOT}/usr/obj -type f -delete 2>/dev/null
___
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: r261032 - head/sbin/kldstat

2014-01-22 Thread Baptiste Daroussin
Author: bapt
Date: Wed Jan 22 17:15:17 2014
New Revision: 261032
URL: http://svnweb.freebsd.org/changeset/base/261032

Log:
  Add quiet support for kldstat -n
  
  PR:   bin/180014
  Submitted by: Olivier Cochard-Labbé 
  MFC after:1 week

Modified:
  head/sbin/kldstat/kldstat.8
  head/sbin/kldstat/kldstat.c

Modified: head/sbin/kldstat/kldstat.8
==
--- head/sbin/kldstat/kldstat.8 Wed Jan 22 16:59:53 2014(r261031)
+++ head/sbin/kldstat/kldstat.8 Wed Jan 22 17:15:17 2014(r261032)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 23, 2005
+.Dd January 22, 2014
 .Dt KLDSTAT 8
 .Os
 .Sh NAME
@@ -33,6 +33,7 @@
 .Nd display status of dynamic kernel linker
 .Sh SYNOPSIS
 .Nm
+.Op Fl q
 .Op Fl v
 .Op Fl i Ar id
 .Op Fl n Ar filename

Modified: head/sbin/kldstat/kldstat.c
==
--- head/sbin/kldstat/kldstat.c Wed Jan 22 16:59:53 2014(r261031)
+++ head/sbin/kldstat/kldstat.c Wed Jan 22 17:15:17 2014(r261032)
@@ -78,7 +78,7 @@ printfile(int fileid, int verbose)
 static void
 usage(void)
 {
-fprintf(stderr, "usage: kldstat [-v] [-i id] [-n filename]\n");
+fprintf(stderr, "usage: kldstat [-q] [-v] [-i id] [-n filename]\n");
 fprintf(stderr, "   kldstat [-q] [-m modname]\n");
 exit(1);
 }
@@ -146,8 +146,13 @@ main(int argc, char** argv)
 }
 
 if (filename != NULL) {
-   if ((fileid = kldfind(filename)) < 0)
-   err(1, "can't find file %s", filename);
+   if ((fileid = kldfind(filename)) < 0) {
+   if (!quiet)
+   warn("can't find file %s", filename);
+   return 1;
+   } else if (quiet) {
+   return 0;
+   }
 }
 
 printf("Id Refs Address%*c Size Name\n", POINTER_WIDTH - 7, ' ');
___
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: r260898 - head/sys/kern

2014-01-22 Thread John Baldwin
On Tuesday, January 21, 2014 5:12:30 pm Scott Long wrote:
> 
> On Jan 21, 2014, at 9:26 AM, John Baldwin  wrote:
> 
> > On Monday, January 20, 2014 5:18:44 pm Alexander Kabaev wrote:
> >> On Mon, 20 Jan 2014 11:32:29 -0500
> >> John Baldwin  wrote:
> >> 
> >>> On Sunday 19 January 2014 18:18:03 Rui Paulo wrote:
>  On 19 Jan 2014, at 17:59, Neel Natu  wrote:
> > Author: neel
> > Date: Mon Jan 20 01:59:35 2014
> > New Revision: 260898
> > URL: http://svnweb.freebsd.org/changeset/base/260898
> > 
> > Log:
> > Bump up WITNESS_COUNT from 1024 to 1536 so there are sufficient
> > entries for
> > WITNESS to actually work.
>  
>  This value should be automatically tuned...
> >>> 
> >>> How do you propose to do so?  This is the count of locks initialized
> >>> before witness' own SYSINIT is executed and the array it sizes is
> >>> allocated statically at compile time.  This used to not be a static
> >>> array, but an intrusive list embedded in locks themselves, but we
> >>> decided to shave a pointer off of each lock that was only used for
> >>> that and to use a statically sized table instead.
> >>> 
> >>> -- 
> >>> John Baldwin
> >> 
> >> As  +  * MAXCPU, as evidently most recent
> >> overflows reported were caused by jacking MAXCPU up from its default
> >> value? 
> > 
> > If raising MAXCPU changes the number of unique lock names used, then the
> > locks are named incorrectly.  We don't use the 'pid' in the name for
> > PROC_LOCK precisely so that WITNESS will treat them all the same so
> > that if if it learns a lock order for pid 37 it enforces the same lock
> > order for pid 38.  Device locks should follow a similar rule.  They
> > should generally not include the device name (and in some cases they
> > really shouldn't even have the driver name).
> 
> Why shouldn’t they have a driver and device name?  Wouldn’t it help identify
> possible deadlocks from driver instances calling into each other?

It prevents that.  Let's say you have twe0 and twe1 and you use 'twe0 I/O'
and 'twe1 I/O' for the locks.  If you lock 'twe1 I/O' after 'twe0 I/O'
WITNESS will happily just create a new known lock order and not complain.
It will only complain if later during the same uptime you later acquire
'twe0 I/O' after 'twe1 I/O'.  If instead you name the lock 'twe I/O', then
the first time you try to acquire a second 'twe I/O' lock, WITNESS will
complain (and in general drivers shouldn't be calling into each other, so
we want them to complain the first time).

This is why we have the MTX_NETWORK_LOCK hack for driver transmit ring
locks, so that WITNESS uses a single set of lock order relationships
between transmit ring locks and other locks.

-- 
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: r261033 - head/sys/dev/usb

2014-01-22 Thread Hans Petter Selasky
Author: hselasky
Date: Wed Jan 22 17:50:43 2014
New Revision: 261033
URL: http://svnweb.freebsd.org/changeset/base/261033

Log:
  We are using the old callout API and should also add one extra tick in
  the FreeBSD 10 case.
  
  Suggested by: mav @
  MFC after:1 week

Modified:
  head/sys/dev/usb/usb_freebsd.h

Modified: head/sys/dev/usb/usb_freebsd.h
==
--- head/sys/dev/usb/usb_freebsd.h  Wed Jan 22 17:15:17 2014
(r261032)
+++ head/sys/dev/usb/usb_freebsd.h  Wed Jan 22 17:50:43 2014
(r261033)
@@ -51,11 +51,7 @@
 #defineUSB_HAVE_FIXED_PORT 0
 
 /* define zero ticks callout value */
-#if (__FreeBSD_version >= 129)
-#defineUSB_CALLOUT_ZERO_TICKS 0
-#else
 #defineUSB_CALLOUT_ZERO_TICKS 1
-#endif
 
 #defineUSB_TD_GET_PROC(td) (td)->td_proc
 #defineUSB_PROC_GET_GID(td) (td)->p_pgid
___
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: r260898 - head/sys/kern

2014-01-22 Thread John-Mark Gurney
Scott Long wrote this message on Tue, Jan 21, 2014 at 15:12 -0700:
> On Jan 21, 2014, at 9:26 AM, John Baldwin  wrote:
> 
> > On Monday, January 20, 2014 5:18:44 pm Alexander Kabaev wrote:
> >> On Mon, 20 Jan 2014 11:32:29 -0500
> >> John Baldwin  wrote:
> >> 
> >>> On Sunday 19 January 2014 18:18:03 Rui Paulo wrote:
>  On 19 Jan 2014, at 17:59, Neel Natu  wrote:
> > Author: neel
> > Date: Mon Jan 20 01:59:35 2014
> > New Revision: 260898
> > URL: http://svnweb.freebsd.org/changeset/base/260898
> > 
> > Log:
> > Bump up WITNESS_COUNT from 1024 to 1536 so there are sufficient
> > entries for
> > WITNESS to actually work.
>  
>  This value should be automatically tuned...
> >>> 
> >>> How do you propose to do so?  This is the count of locks initialized
> >>> before witness' own SYSINIT is executed and the array it sizes is
> >>> allocated statically at compile time.  This used to not be a static
> >>> array, but an intrusive list embedded in locks themselves, but we
> >>> decided to shave a pointer off of each lock that was only used for
> >>> that and to use a statically sized table instead.
> >>> 
> >>> -- 
> >>> John Baldwin
> >> 
> >> As  +  * MAXCPU, as evidently most recent
> >> overflows reported were caused by jacking MAXCPU up from its default
> >> value? 
> > 
> > If raising MAXCPU changes the number of unique lock names used, then the
> > locks are named incorrectly.  We don't use the 'pid' in the name for
> > PROC_LOCK precisely so that WITNESS will treat them all the same so
> > that if if it learns a lock order for pid 37 it enforces the same lock
> > order for pid 38.  Device locks should follow a similar rule.  They
> > should generally not include the device name (and in some cases they
> > really shouldn't even have the driver name).
> 
> Why shouldn?t they have a driver and device name?  Wouldn?t it help identify
> possible deadlocks from driver instances calling into each other?

Locks have a name and a type.  The type is used for witness, but if it
is NULL, the name is used.  So you could if you wanted, create a common
type, and then put driver/device name in name, but the passed in strings
to both name and type have to be stable storage (only the pointer is
stored), so you can't use a stack variable to construct it.

-- 
  John-Mark Gurney  Voice: +1 415 225 5579

 "All that I will do, has been done, All that I have, has not."
___
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: r260898 - head/sys/kern

2014-01-22 Thread Alfred Perlstein


On 1/22/14, 10:14 AM, John-Mark Gurney wrote:

Scott Long wrote this message on Tue, Jan 21, 2014 at 15:12 -0700:

On Jan 21, 2014, at 9:26 AM, John Baldwin  wrote:


On Monday, January 20, 2014 5:18:44 pm Alexander Kabaev wrote:

On Mon, 20 Jan 2014 11:32:29 -0500
John Baldwin  wrote:


On Sunday 19 January 2014 18:18:03 Rui Paulo wrote:

On 19 Jan 2014, at 17:59, Neel Natu  wrote:

Author: neel
Date: Mon Jan 20 01:59:35 2014
New Revision: 260898
URL: http://svnweb.freebsd.org/changeset/base/260898

Log:
Bump up WITNESS_COUNT from 1024 to 1536 so there are sufficient
entries for
WITNESS to actually work.

This value should be automatically tuned...

How do you propose to do so?  This is the count of locks initialized
before witness' own SYSINIT is executed and the array it sizes is
allocated statically at compile time.  This used to not be a static
array, but an intrusive list embedded in locks themselves, but we
decided to shave a pointer off of each lock that was only used for
that and to use a statically sized table instead.

--
John Baldwin

As  +  * MAXCPU, as evidently most recent
overflows reported were caused by jacking MAXCPU up from its default
value?

If raising MAXCPU changes the number of unique lock names used, then the
locks are named incorrectly.  We don't use the 'pid' in the name for
PROC_LOCK precisely so that WITNESS will treat them all the same so
that if if it learns a lock order for pid 37 it enforces the same lock
order for pid 38.  Device locks should follow a similar rule.  They
should generally not include the device name (and in some cases they
really shouldn't even have the driver name).

Why shouldn?t they have a driver and device name?  Wouldn?t it help identify
possible deadlocks from driver instances calling into each other?

Locks have a name and a type.  The type is used for witness, but if it
is NULL, the name is used.  So you could if you wanted, create a common
type, and then put driver/device name in name, but the passed in strings
to both name and type have to be stable storage (only the pointer is
stored), so you can't use a stack variable to construct it.

Hmm, what if locks had a pointer to a 2 element char * array, the first 
being the name, the second the type.  That would keep the size of the 
lock down and most locks could share a common tuple of name/type in each 
subsystem.  This would allow us to get rid of the pending static list.


effectively:
struct lock_object {
char *lo_name;  /* Individual lock name. */
u_int   lo_flags;
u_int   lo_data;/* General class specific data. */
struct  witness *lo_witness;/* Data for witness. */
};

would change to:
struct lock_object {
char **lo_name_type;  /* Individual lock 
name[0]/type[1]. */

u_int   lo_flags;
u_int   lo_data;/* General class specific data. */
struct  witness *lo_witness;/* Data for witness. */
};

This may be somewhat disruptive, I haven't played with how it would 
actually change driver/etc/code.


-Alfred
___
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: r261034 - head/sys/fs/ext2fs

2014-01-22 Thread Pedro F. Giffuni
Author: pfg
Date: Wed Jan 22 19:09:41 2014
New Revision: 261034
URL: http://svnweb.freebsd.org/changeset/base/261034

Log:
  ext2fs: fix logic error in the previous change.
  
  Use the bitwise negation instead of bogus boolean negation and move
  the flag manipulation with the assignment.
  Fix some grammatical errors introduced in the same change.
  
  Reported by:  bde
  MFC after:3 days

Modified:
  head/sys/fs/ext2fs/ext2_lookup.c
  head/sys/fs/ext2fs/ext2_subr.c
  head/sys/fs/ext2fs/ext2_vnops.c

Modified: head/sys/fs/ext2fs/ext2_lookup.c
==
--- head/sys/fs/ext2fs/ext2_lookup.cWed Jan 22 17:50:43 2014
(r261033)
+++ head/sys/fs/ext2fs/ext2_lookup.cWed Jan 22 19:09:41 2014
(r261034)
@@ -888,9 +888,9 @@ ext2_direnter(struct inode *ip, struct v
if (ext2_htree_has_idx(dp)) {
error = ext2_htree_add_entry(dvp, &newdir, cnp);
if (error) {
-   /* XXX: These seem to be set in the wrong place. */
-   dp->i_flags |= IN_CHANGE | IN_UPDATE;
+   /* XXX: These are set in the wrong place. */
dp->i_flags &= ~E4_INDEX;
+   dp->i_flags |= IN_CHANGE | IN_UPDATE;
}
return (error);
}

Modified: head/sys/fs/ext2fs/ext2_subr.c
==
--- head/sys/fs/ext2fs/ext2_subr.c  Wed Jan 22 17:50:43 2014
(r261033)
+++ head/sys/fs/ext2fs/ext2_subr.c  Wed Jan 22 19:09:41 2014
(r261034)
@@ -82,7 +82,7 @@ ext2_blkatoff(struct vnode *vp, off_t of
*bpp = NULL;
 
/*
-* E4_EXTENTS requires special treatment otherwise we can fall
+* E4_EXTENTS requires special treatment as we can otherwise fall
 * back to the normal path.
 */
if (!(ip->i_flags & E4_EXTENTS))

Modified: head/sys/fs/ext2fs/ext2_vnops.c
==
--- head/sys/fs/ext2fs/ext2_vnops.c Wed Jan 22 17:50:43 2014
(r261033)
+++ head/sys/fs/ext2fs/ext2_vnops.c Wed Jan 22 19:09:41 2014
(r261034)
@@ -343,9 +343,8 @@ ext2_getattr(struct vop_getattr_args *ap
vap->va_birthtime.tv_sec = ip->i_birthtime;
vap->va_birthtime.tv_nsec = ip->i_birthnsec;
}
-   vap->va_flags = ip->i_flags;
-   /* E4_* flags are private to the driver */
-   vap->va_flags &= !(E4_INDEX | E4_EXTENTS);
+   /* E4_* flags are private to the filesystem. */
+   vap->va_flags = ip->i_flags & ~(E4_INDEX | E4_EXTENTS);
vap->va_gen = ip->i_gen;
vap->va_blocksize = vp->v_mount->mnt_stat.f_iosize;
vap->va_bytes = dbtob((u_quad_t)ip->i_blocks);
___
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: r260898 - head/sys/kern

2014-01-22 Thread John Baldwin
On Wednesday, January 22, 2014 2:06:39 pm Alfred Perlstein wrote:
> 
> On 1/22/14, 10:14 AM, John-Mark Gurney wrote:
> > Scott Long wrote this message on Tue, Jan 21, 2014 at 15:12 -0700:
> >> On Jan 21, 2014, at 9:26 AM, John Baldwin  wrote:
> >>
> >>> On Monday, January 20, 2014 5:18:44 pm Alexander Kabaev wrote:
>  On Mon, 20 Jan 2014 11:32:29 -0500
>  John Baldwin  wrote:
> 
> > On Sunday 19 January 2014 18:18:03 Rui Paulo wrote:
> >> On 19 Jan 2014, at 17:59, Neel Natu  wrote:
> >>> Author: neel
> >>> Date: Mon Jan 20 01:59:35 2014
> >>> New Revision: 260898
> >>> URL: http://svnweb.freebsd.org/changeset/base/260898
> >>>
> >>> Log:
> >>> Bump up WITNESS_COUNT from 1024 to 1536 so there are sufficient
> >>> entries for
> >>> WITNESS to actually work.
> >> This value should be automatically tuned...
> > How do you propose to do so?  This is the count of locks initialized
> > before witness' own SYSINIT is executed and the array it sizes is
> > allocated statically at compile time.  This used to not be a static
> > array, but an intrusive list embedded in locks themselves, but we
> > decided to shave a pointer off of each lock that was only used for
> > that and to use a statically sized table instead.
> >
> > -- 
> > John Baldwin
>  As  +  * MAXCPU, as evidently most recent
>  overflows reported were caused by jacking MAXCPU up from its default
>  value?
> >>> If raising MAXCPU changes the number of unique lock names used, then the
> >>> locks are named incorrectly.  We don't use the 'pid' in the name for
> >>> PROC_LOCK precisely so that WITNESS will treat them all the same so
> >>> that if if it learns a lock order for pid 37 it enforces the same lock
> >>> order for pid 38.  Device locks should follow a similar rule.  They
> >>> should generally not include the device name (and in some cases they
> >>> really shouldn't even have the driver name).
> >> Why shouldn?t they have a driver and device name?  Wouldn?t it help 
identify
> >> possible deadlocks from driver instances calling into each other?
> > Locks have a name and a type.  The type is used for witness, but if it
> > is NULL, the name is used.  So you could if you wanted, create a common
> > type, and then put driver/device name in name, but the passed in strings
> > to both name and type have to be stable storage (only the pointer is
> > stored), so you can't use a stack variable to construct it.
> >
> Hmm, what if locks had a pointer to a 2 element char * array, the first 
> being the name, the second the type.  That would keep the size of the 
> lock down and most locks could share a common tuple of name/type in each 
> subsystem.  This would allow us to get rid of the pending static list.
> 
> effectively:
> struct lock_object {
>  char *lo_name;  /* Individual lock name. */
>  u_int   lo_flags;
>  u_int   lo_data;/* General class specific data. */
>  struct  witness *lo_witness;/* Data for witness. */
> };
> 
> would change to:
> struct lock_object {
>  char **lo_name_type;  /* Individual lock 
> name[0]/type[1]. */
>  u_int   lo_flags;
>  u_int   lo_data;/* General class specific data. */
>  struct  witness *lo_witness;/* Data for witness. */
> };
> 
> This may be somewhat disruptive, I haven't played with how it would 
> actually change driver/etc/code.

Where would the memory for the char* array come from?

-- 
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: r260898 - head/sys/kern

2014-01-22 Thread Alfred Perlstein


On 1/22/14, 12:27 PM, John Baldwin wrote:

On Wednesday, January 22, 2014 2:06:39 pm Alfred Perlstein wrote:

Hmm, what if locks had a pointer to a 2 element char * array, the first
being the name, the second the type.  That would keep the size of the
lock down and most locks could share a common tuple of name/type in each
subsystem.  This would allow us to get rid of the pending static list.

effectively:
struct lock_object {
  char *lo_name;  /* Individual lock name. */
  u_int   lo_flags;
  u_int   lo_data;/* General class specific data. */
  struct  witness *lo_witness;/* Data for witness. */
};

would change to:
struct lock_object {
  char **lo_name_type;  /* Individual lock
name[0]/type[1]. */
  u_int   lo_flags;
  u_int   lo_data;/* General class specific data. */
  struct  witness *lo_witness;/* Data for witness. */
};

This may be somewhat disruptive, I haven't played with how it would
actually change driver/etc/code.

Where would the memory for the char* array come from?

That is a good question.  I suspect it would be up to the subsystem to 
allocate it.


Wouldn't it be trivial for *most* of the subsystems to simply have this 
either as a static global or static function variable:


static char *mutex_typename = { "kqueue", "foo" };

Under kern I see this:
grep mtx_init * | grep -v NULL
...
kern_rmlock.c:mtx_init(&rm->rm_lock_mtx, name, "rmlock_mtx", 
MTX_NOWITNESS);

subr_bus.c:mtx_init(&devsoftc.mtx, "dev mtx", "devd", MTX_DEF);

Those are solved with statics.

Another example:

sys/dev/ae/if_ae.c
mtx_init(&sc->mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, 
MTX_DEF);


I think the array could be in the softc here? sc->mutex_name_type[0] = 
device_get_nameunit(dev); sc->mutex_name_type[1] = MTX_NETWORK_LOCK;


Do we want to do that?  It moves "wasting space" to another variable.

I'm not sure where there isn't the possibility of using either static 
(for a global mutex) or space inside the equiv of the softc (or proc or 
whatever) for this?


I'm not sure this is a good idea, just an idea.  Are there places where 
it's not as simple as doing this?


-Alfred

___
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: r260939 - head/release/doc/en_US.ISO8859-1/relnotes

2014-01-22 Thread Remko Lodder

On 21 Jan 2014, at 11:17, Ronald Klop  wrote:

> On Mon, 20 Jan 2014 23:25:50 +0100, Glen Barber  wrote:
> 
>> Author: gjb
>> Date: Mon Jan 20 22:25:50 2014
>> New Revision: 260939
>> URL: http://svnweb.freebsd.org/changeset/base/260939
>> 
>> Log:
>>  Document r260888.
>> Sponsored by:The FreeBSD Foundation
>> 
>> Modified:
>>  head/release/doc/en_US.ISO8859-1/relnotes/article.xml
>> 
>> Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml
>> ==
>> --- head/release/doc/en_US.ISO8859-1/relnotes/article.xmlMon Jan 20 
>> 22:08:11 2014(r260938)
>> +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xmlMon Jan 20 
>> 22:25:50 2014(r260939)
>> @@ -104,7 +104,9 @@
>>   
>> Kernel Changes
>> - 
>> +Add a VT kernel
>> +  configuration file, which enables the new vt
>> +  console driver.
>>
>>   Virtualization support
> 
> 
> Isn't this configuration file temporary to increase testing instead of 
> something which stays for a future release?
> 
> http://svnweb.freebsd.org/base?view=revision&revision=260888

Could be, but then again we can mention that in later release notes as well. 
It’s added now and can be used for
more exposure, it can be removed again in the future when it might (or not) be 
merged with GENERIC..

Cheers
remko

> 
> Regards,
> Ronald.

-- 

/"\   Best regards,  | re...@freebsd.org
\ /   Remko Lodder   | remko@EFnet
 Xhttp://www.evilcoder.org/  |
/ \   ASCII Ribbon Campaign  | Against HTML Mail and News



signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r261038 - in head/sys: conf kern sys

2014-01-22 Thread Warner Losh
Author: imp
Date: Wed Jan 22 21:20:08 2014
New Revision: 261038
URL: http://svnweb.freebsd.org/changeset/base/261038

Log:
  Implement generic support for early printf. Thought I can't find the
  paper trail now, this patch is similar to one posted for one of the
  preliminary versions of a new armv6 port. I took them and made them
  more generic. Option not enabled by default since each board/port has
  to provide its own eputc, and possibly do other things as well...

Modified:
  head/sys/conf/options
  head/sys/kern/subr_prf.c
  head/sys/sys/systm.h

Modified: head/sys/conf/options
==
--- head/sys/conf/options   Wed Jan 22 19:57:11 2014(r261037)
+++ head/sys/conf/options   Wed Jan 22 21:20:08 2014(r261038)
@@ -62,6 +62,7 @@ KDB_TRACE opt_kdb.h
 KDB_UNATTENDED opt_kdb.h
 KLD_DEBUG  opt_kld.h
 SYSCTL_DEBUG   opt_sysctl.h
+EARLY_PRINTF   opt_global.h
 TEXTDUMP_PREFERRED opt_ddb.h
 TEXTDUMP_VERBOSE   opt_ddb.h
 

Modified: head/sys/kern/subr_prf.c
==
--- head/sys/kern/subr_prf.cWed Jan 22 19:57:11 2014(r261037)
+++ head/sys/kern/subr_prf.cWed Jan 22 21:20:08 2014(r261038)
@@ -1137,3 +1137,25 @@ hexdump(const void *ptr, int length, con
}
 }
 
+#ifdef EARLY_PRINTF
+/*
+ * Support for calling an alternate printf early in boot (like before
+ * cn_init() can be called).  Platforms need to define eputc that want
+ * to use this.
+ */
+static void
+early_putc_func(int ch, void *arg __unused)
+{
+   eputc(ch);
+}
+
+void
+eprintf(const char *fmt, ...)
+{
+   va_list ap;
+
+   va_start(ap, fmt);
+   kvprintf(fmt, early_putc_func, NULL, 10, ap);
+   va_end(ap);
+}
+#endif

Modified: head/sys/sys/systm.h
==
--- head/sys/sys/systm.hWed Jan 22 19:57:11 2014(r261037)
+++ head/sys/sys/systm.hWed Jan 22 21:20:08 2014(r261038)
@@ -196,6 +196,10 @@ void   init_param1(void);
 void   init_param2(long physpages);
 void   init_static_kenv(char *, size_t);
 void   tablefull(const char *);
+#ifdef  EARLY_PRINTF
+void   eprintf(const char *, ...) __printflike(1, 2);
+void   eputc(int ch);
+#endif
 intkvprintf(char const *, void (*)(int, void*), void *, int,
__va_list) __printflike(1, 0);
 void   log(int, const char *, ...) __printflike(2, 3);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


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

2014-01-22 Thread John Baldwin
On Wednesday, January 22, 2014 3:59:37 pm Alfred Perlstein wrote:
> 
> On 1/22/14, 12:27 PM, John Baldwin wrote:
> > On Wednesday, January 22, 2014 2:06:39 pm Alfred Perlstein wrote:
> >> Hmm, what if locks had a pointer to a 2 element char * array, the first
> >> being the name, the second the type.  That would keep the size of the
> >> lock down and most locks could share a common tuple of name/type in each
> >> subsystem.  This would allow us to get rid of the pending static list.
> >>
> >> effectively:
> >> struct lock_object {
> >>   char *lo_name;  /* Individual lock name. */
> >>   u_int   lo_flags;
> >>   u_int   lo_data;/* General class specific data. 
*/
> >>   struct  witness *lo_witness;/* Data for witness. */
> >> };
> >>
> >> would change to:
> >> struct lock_object {
> >>   char **lo_name_type;  /* Individual lock
> >> name[0]/type[1]. */
> >>   u_int   lo_flags;
> >>   u_int   lo_data;/* General class specific data. 
*/
> >>   struct  witness *lo_witness;/* Data for witness. */
> >> };
> >>
> >> This may be somewhat disruptive, I haven't played with how it would
> >> actually change driver/etc/code.
> > Where would the memory for the char* array come from?
> >
> That is a good question.  I suspect it would be up to the subsystem to 
> allocate it.
> 
> Wouldn't it be trivial for *most* of the subsystems to simply have this 
> either as a static global or static function variable:
> 
> static char *mutex_typename = { "kqueue", "foo" };
> 
> Under kern I see this:
> grep mtx_init * | grep -v NULL
> ...
> kern_rmlock.c:mtx_init(&rm->rm_lock_mtx, name, "rmlock_mtx", 
> MTX_NOWITNESS);
> subr_bus.c:mtx_init(&devsoftc.mtx, "dev mtx", "devd", MTX_DEF);
> 
> Those are solved with statics.
> 
> Another example:
> 
> sys/dev/ae/if_ae.c
>  mtx_init(&sc->mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, 
> MTX_DEF);
> 
> I think the array could be in the softc here? sc->mutex_name_type[0] = 
> device_get_nameunit(dev); sc->mutex_name_type[1] = MTX_NETWORK_LOCK;
> 
> Do we want to do that?  It moves "wasting space" to another variable.
> 
> I'm not sure where there isn't the possibility of using either static 
> (for a global mutex) or space inside the equiv of the softc (or proc or 
> whatever) for this?
> 
> I'm not sure this is a good idea, just an idea.  Are there places where 
> it's not as simple as doing this?

To be honest, the whole name vs type thing isn't widely used, and it makes
the mtx_init() function kind of fugly.  I think what I would actually prefer
is to just kill it, changing the various places that pass a separate name to
just pass the type instead.  Note that none of the other lock APIs even allow
setting a separate type.  This would let us remove the static pending list
array as well.

(And yes, I added the name vs type thing, but at this point I think it did
not turn out nearly as useful as I had thought it would be.)

The original issue of picking useful-to-witness lock names (i.e. not just
using device_get_nameunit()) still remains of course.

-- 
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: r261039 - in head/sys: arm/arm conf

2014-01-22 Thread Warner Losh
Author: imp
Date: Wed Jan 22 21:23:58 2014
New Revision: 261039
URL: http://svnweb.freebsd.org/changeset/base/261039

Log:
  Add support for mapping a small range of the SoC devices for debugging
  purposes early in boot.

Modified:
  head/sys/arm/arm/locore.S
  head/sys/conf/options.arm

Modified: head/sys/arm/arm/locore.S
==
--- head/sys/arm/arm/locore.S   Wed Jan 22 21:20:08 2014(r261038)
+++ head/sys/arm/arm/locore.S   Wed Jan 22 21:23:58 2014(r261039)
@@ -258,9 +258,13 @@ mmu_init_table:
/* fill all table VA==PA */
/* map SDRAM VA==PA, WT cacheable */
 #if !defined(SMP)
-   MMU_INIT(PHYSADDR, PHYSADDR , 64, L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW))
+   MMU_INIT(PHYSADDR, PHYSADDR, 64, L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW))
/* map VA 0xc000..0xc3ff to PA */
MMU_INIT(KERNBASE, PHYSADDR, 64, L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW))
+#if defined(SOCDEV_PA) && defined(SOCKDEV_VA)
+   /* Map in 0x0400 worth of the SoC's devices for bootstrap debugging 
*/
+   MMU_INIT(SOCKDEV_VA, SOCDEV_PA, 64, L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW))
+#endif
 #else
MMU_INIT(PHYSADDR, PHYSADDR , 64, 
L1_TYPE_S|L1_SHARED|L1_S_C|L1_S_AP(AP_KRW))
/* map VA 0xc000..0xc3ff to PA */

Modified: head/sys/conf/options.arm
==
--- head/sys/conf/options.arm   Wed Jan 22 21:20:08 2014(r261038)
+++ head/sys/conf/options.arm   Wed Jan 22 21:23:58 2014(r261039)
@@ -35,6 +35,8 @@ LINUX_BOOT_ABIopt_global.h
 LOADERRAMADDR  opt_global.h
 NO_EVENTTIMERS opt_timer.h
 PHYSADDR   opt_global.h
+SOCDEV_PA  opt_global.h
+SOCDEV_VA  opt_global.h
 PV_STATS   opt_pmap.h
 QEMU_WORKAROUNDS   opt_global.h
 SOC_MV_ARMADAXPopt_global.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: r261040 - head/sys/arm/at91

2014-01-22 Thread Warner Losh
Author: imp
Date: Wed Jan 22 21:49:20 2014
New Revision: 261040
URL: http://svnweb.freebsd.org/changeset/base/261040

Log:
  Implement support for early printf. You need to define SOCDEV_{PA,VA}
  as described in the comments for the eputc function in your config file.

Modified:
  head/sys/arm/at91/uart_dev_at91usart.c

Modified: head/sys/arm/at91/uart_dev_at91usart.c
==
--- head/sys/arm/at91/uart_dev_at91usart.c  Wed Jan 22 21:23:58 2014
(r261039)
+++ head/sys/arm/at91/uart_dev_at91usart.c  Wed Jan 22 21:49:20 2014
(r261040)
@@ -276,6 +276,24 @@ at91_usart_putc(struct uart_bas *bas, in
WR4(bas, USART_THR, c);
 }
 
+#ifdef EARLY_PRINTF
+/*
+ * Early printf support. This assumes that we have the SoC "system" devices
+ * mapped into AT91_BASE. To use this before we adjust the boostrap tables,
+ * You'll need to define SOCDEV_VA to be 0xdc00 and SOCDEV_PA to be
+ * 0xfc00 in your config file where you define EARLY_PRINTF
+ */
+volatile uint32_t *at91_dbgu = (volatile uint32_t *)(AT91_BASE + AT91_DBGU0);
+
+void
+eputc(int c)
+{
+   while (!(at91_dbgu[USART_CSR / 4] & USART_CSR_TXRDY))
+   continue;
+   at91_dbgu[USART_THR / 4] = c;
+}
+#endif
+
 /*
  * Check for a character available.
  */
___
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: r261041 - head/sys/arm/conf

2014-01-22 Thread Warner Losh
Author: imp
Date: Wed Jan 22 22:01:29 2014
New Revision: 261041
URL: http://svnweb.freebsd.org/changeset/base/261041

Log:
  Clean up HL201 config (for the hot-e 201 and 101 models from thinlinx).
  Make comments match parameters
  Add options for early printf so we get regression build testing on it.
  Add preview of options for FDT support coming soon (I hope)

Modified:
  head/sys/arm/conf/HL201

Modified: head/sys/arm/conf/HL201
==
--- head/sys/arm/conf/HL201 Wed Jan 22 21:49:20 2014(r261040)
+++ head/sys/arm/conf/HL201 Wed Jan 22 22:01:29 2014(r261041)
@@ -1,4 +1,4 @@
-# Kernel configuration for the AT91SAM9 based Hot-e configuration file
+# Kernel configuration for the AT91SAM9G20 based Hot-e configuration file
 #
 # For more information on this file, please read the handbook section on
 # Kernel Configuration Files:
@@ -39,16 +39,16 @@ options FFS #Berkeley Fast 
Filesystem
 #options   MD_ROOT #MD is a potential root device
 #options   MD_ROOT_SIZE=4096   # 4MB ram disk
 optionsNANDFS  # NAND file system
-#options   ROOTDEVNAME=\"ufs:/dev/mmcsd0s1a\"
+optionsROOTDEVNAME=\"ufs:/dev/mmcsd0s1a\"
 optionsNFSCL   #New Network Filesystem Client
 #options   NFSD#New Network Filesystem Server
 #options   NFSLOCKD#Network Lock Manager
 optionsNFS_ROOT#NFS usable as /, requires NFSCL
-optionsBOOTP_NFSROOT
-optionsBOOTP
-optionsBOOTP_NFSV3
+#options   BOOTP_NFSROOT
+#options   BOOTP
+#options   BOOTP_NFSV3
 #options   BOOTP_WIRED_TO=ate0
-optionsBOOTP_COMPAT
+#options   BOOTP_COMPAT
 
 optionsALT_BREAK_TO_DEBUGGER
 
@@ -62,7 +62,6 @@ options   SYSVSHM #SYSV-style shared me
 optionsSYSVMSG #SYSV-style message queues
 optionsSYSVSEM #SYSV-style semaphores
 options_KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions
-#options   SYSCTL_OMIT_DESCR
 optionsMUTEX_NOINLINE
 optionsRWLOCK_NOINLINE
 optionsNO_FFS_SNAPSHOT
@@ -83,22 +82,11 @@ device  mii
 #options   DIAGNOSTIC
 
 device md
-#deviceat91_twi# TWI: Two Wire Interface
-#deviceat91_spi# SPI:
-device spibus
-# MMC/SD
-#deviceat91_mci
-#devicemmc
-#devicemmcsd
-# iic
-device iic
-device iicbus
-device icee
-
 device bpf
+
 # USB support
 optionsUSB_HOST_ALIGN=32   # Align usb buffers to cache line size.
-#deviceohci# OHCI localbus->USB interface
+device ohci# OHCI localbus->USB interface
 device usb # USB Bus (required)
 #deviceudbp# USB Double Bulk Pipe devices
 device uhid# "Human Interface Devices"
@@ -132,5 +120,14 @@ device pass# Passthrough device 
(dire
 #devicewlan_amrr   # AMRR transmit rate control algorithm
 optionsROOTDEVNAME=\"ufs:da0s1a\"
 
-# NAND Flash - my board as 128MB Samsung part
-device nand# NAND interface on CS3
+# NAND Flash - my board as 128MB Samsung part, YMMV.
+device nand# NAND interface on CS3
+
+# Coming soon, but not yet
+#options   FDT
+#options   FDT_DTB_STATIC
+#makeoptions   FDT_DTS_FILE=at91sam9g20ek.dts
+
+optionsEARLY_PRINTF
+optionsSOCDEV_PA=0xfc00
+optionsSOCDEV_VA=0xdc00
___
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: r260898 - head/sys/kern

2014-01-22 Thread Alfred Perlstein


On 1/22/14, 1:22 PM, John Baldwin wrote:

On Wednesday, January 22, 2014 3:59:37 pm Alfred Perlstein wrote:

On 1/22/14, 12:27 PM, John Baldwin wrote:

On Wednesday, January 22, 2014 2:06:39 pm Alfred Perlstein wrote:

Hmm, what if locks had a pointer to a 2 element char * array, the first
being the name, the second the type.  That would keep the size of the
lock down and most locks could share a common tuple of name/type in each
subsystem.  This would allow us to get rid of the pending static list.

effectively:
struct lock_object {
   char *lo_name;  /* Individual lock name. */
   u_int   lo_flags;
   u_int   lo_data;/* General class specific data.

*/

   struct  witness *lo_witness;/* Data for witness. */
};

would change to:
struct lock_object {
   char **lo_name_type;  /* Individual lock
name[0]/type[1]. */
   u_int   lo_flags;
   u_int   lo_data;/* General class specific data.

*/

   struct  witness *lo_witness;/* Data for witness. */
};

This may be somewhat disruptive, I haven't played with how it would
actually change driver/etc/code.

Where would the memory for the char* array come from?


That is a good question.  I suspect it would be up to the subsystem to
allocate it.

Wouldn't it be trivial for *most* of the subsystems to simply have this
either as a static global or static function variable:

static char *mutex_typename = { "kqueue", "foo" };

Under kern I see this:
grep mtx_init * | grep -v NULL
...
kern_rmlock.c:mtx_init(&rm->rm_lock_mtx, name, "rmlock_mtx",
MTX_NOWITNESS);
subr_bus.c:mtx_init(&devsoftc.mtx, "dev mtx", "devd", MTX_DEF);

Those are solved with statics.

Another example:

sys/dev/ae/if_ae.c
  mtx_init(&sc->mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK,
MTX_DEF);

I think the array could be in the softc here? sc->mutex_name_type[0] =
device_get_nameunit(dev); sc->mutex_name_type[1] = MTX_NETWORK_LOCK;

Do we want to do that?  It moves "wasting space" to another variable.

I'm not sure where there isn't the possibility of using either static
(for a global mutex) or space inside the equiv of the softc (or proc or
whatever) for this?

I'm not sure this is a good idea, just an idea.  Are there places where
it's not as simple as doing this?

To be honest, the whole name vs type thing isn't widely used, and it makes
the mtx_init() function kind of fugly.  I think what I would actually prefer
is to just kill it, changing the various places that pass a separate name to
just pass the type instead.  Note that none of the other lock APIs even allow
setting a separate type.  This would let us remove the static pending list
array as well.

(And yes, I added the name vs type thing, but at this point I think it did
not turn out nearly as useful as I had thought it would be.)

The original issue of picking useful-to-witness lock names (i.e. not just
using device_get_nameunit()) still remains of course.

I really want to agree, but anything that reduces the immediate ability 
for people to diagnose problems really makes me worry.


This would mean that you would see "network device lock" or some "type" 
but not know the actual owner.


I would say that maybe given this it's just better to grow 
WITNESS_PENDING based on maxcpu like the PR I pointed out, that way we 
do not introduce churn AND we maintain the debug-ability.


http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/185831

-Alfred
___
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: r261042 - head/sys/cam/scsi

2014-01-22 Thread Alexander Motin
Author: mav
Date: Wed Jan 22 22:19:53 2014
New Revision: 261042
URL: http://svnweb.freebsd.org/changeset/base/261042

Log:
  Mostly revert r260267 and hopefully really fix the original problem.
  
  The latest draft of SBC-3 tells: "A MAXIMUM UNMAP LBA COUNT field set to
  a non-zero value indicates the maximum number of LBAs that may be unmapped
  by an UNMAP command."  To me it does not sound like that limit is set per
  single descriptor, but rather per all command.  And I have at least one
  device that behaves exactly that way.  This patch fixes the problem there.
  
  MFC after:1 week

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

Modified: head/sys/cam/scsi/scsi_da.c
==
--- head/sys/cam/scsi/scsi_da.c Wed Jan 22 22:01:29 2014(r261041)
+++ head/sys/cam/scsi/scsi_da.c Wed Jan 22 22:19:53 2014(r261042)
@@ -211,7 +211,7 @@ struct da_softc {
int  delete_running;
int  delete_available;  /* Delete methods possibly available */
uint32_tunmap_max_ranges;
-   uint32_tunmap_max_lba; /* Max LBAs in a single range */
+   uint32_tunmap_max_lba; /* Max LBAs in UNMAP req */
uint64_tws_max_blks;
da_delete_methods   delete_method;
da_delete_func_t*delete_func;
@@ -1854,7 +1854,7 @@ dadeletemaxsize(struct da_softc *softc, 
 
switch(delete_method) {
case DA_DELETE_UNMAP:
-   sectors = (off_t)softc->unmap_max_lba * softc->unmap_max_ranges;
+   sectors = (off_t)softc->unmap_max_lba;
break;
case DA_DELETE_ATA_TRIM:
sectors = (off_t)ATA_DSM_RANGE_MAX * softc->trim_max_ranges;
@@ -2526,6 +2526,7 @@ da_delete_unmap(struct cam_periph *perip
struct bio *bp1;
uint8_t *buf = softc->unmap_buf;
uint64_t lba, lastlba = (uint64_t)-1;
+   uint64_t totalcount = 0;
uint64_t count;
uint32_t lastcount = 0, c;
uint32_t off, ranges = 0;
@@ -2552,41 +2553,42 @@ da_delete_unmap(struct cam_periph *perip
 
/* Try to extend the previous range. */
if (lba == lastlba) {
-   c = min(count, softc->unmap_max_lba - lastcount);
+   c = omin(count, UNMAP_RANGE_MAX - lastcount);
lastcount += c;
off = ((ranges - 1) * UNMAP_RANGE_SIZE) +
  UNMAP_HEAD_SIZE;
scsi_ulto4b(lastcount, &buf[off + 8]);
count -= c;
lba +=c;
+   totalcount += c;
}
 
while (count > 0) {
-   if (ranges > softc->unmap_max_ranges) {
+   c = omin(count, UNMAP_RANGE_MAX);
+   if (totalcount + c > softc->unmap_max_lba ||
+   ranges >= softc->unmap_max_ranges) {
xpt_print(periph->path,
-   "%s issuing short delete %d > %d\n",
+   "%s issuing short delete %ld > %ld"
+   "|| %d >= %d",
da_delete_method_desc[softc->delete_method],
+   totalcount + c, softc->unmap_max_lba,
ranges, softc->unmap_max_ranges);
break;
}
-   c = min(count, softc->unmap_max_lba);
off = (ranges * UNMAP_RANGE_SIZE) + UNMAP_HEAD_SIZE;
scsi_u64to8b(lba, &buf[off + 0]);
scsi_ulto4b(c, &buf[off + 8]);
lba += c;
+   totalcount += c;
ranges++;
count -= c;
lastcount = c;
}
lastlba = lba;
bp1 = bioq_first(&softc->delete_queue);
-   /*
-* Assume no range extension on the next loop iteration to
-* avoid issuing a short delete.
-*/
if (bp1 == NULL || ranges >= softc->unmap_max_ranges ||
-   bp1->bio_bcount / softc->params.secsize >
-   softc->unmap_max_lba * (softc->unmap_max_ranges - ranges))
+   totalcount + bp1->bio_bcount /
+   softc->params.secsize > softc->unmap_max_lba)
break;
} while (1);
scsi_ulto2b(ranges * 16 + 6, &buf[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: r261043 - head/sys/conf

2014-01-22 Thread Warner Losh
Author: imp
Date: Wed Jan 22 22:25:48 2014
New Revision: 261043
URL: http://svnweb.freebsd.org/changeset/base/261043

Log:
  Document EARLY_PRINTF

Modified:
  head/sys/conf/NOTES

Modified: head/sys/conf/NOTES
==
--- head/sys/conf/NOTES Wed Jan 22 22:19:53 2014(r261042)
+++ head/sys/conf/NOTES Wed Jan 22 22:25:48 2014(r261043)
@@ -446,6 +446,15 @@ optionsDEBUG_MEMGUARD
 optionsDEBUG_REDZONE
 
 #
+# EARLY_PRINTF enables support for calling a special printf (eprintf)
+# very early in the kernel (before cn_init() has been called).  This
+# should only be used for debugging purposes early in boot.  Normally,
+# it is not defined.  It is commented out here because this feature
+# isn't generally available. And the required eputc() isn't defined.
+#
+#options   EARLY_PRINTF
+
+#
 # KTRACE enables the system-call tracing facility ktrace(2).  To be more
 # SMP-friendly, KTRACE uses a worker thread to process most trace events
 # asynchronously to the thread generating the event.  This requires a
___
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: r260898 - head/sys/kern

2014-01-22 Thread John-Mark Gurney
Alfred Perlstein wrote this message on Wed, Jan 22, 2014 at 14:15 -0800:
> 
> On 1/22/14, 1:22 PM, John Baldwin wrote:
> >On Wednesday, January 22, 2014 3:59:37 pm Alfred Perlstein wrote:
> >>On 1/22/14, 12:27 PM, John Baldwin wrote:
> >>>On Wednesday, January 22, 2014 2:06:39 pm Alfred Perlstein wrote:
> Hmm, what if locks had a pointer to a 2 element char * array, the first
> being the name, the second the type.  That would keep the size of the
> lock down and most locks could share a common tuple of name/type in each
> subsystem.  This would allow us to get rid of the pending static list.
> 
> effectively:
> struct lock_object {
>    char *lo_name;  /* Individual lock name. */
>    u_int   lo_flags;
>    u_int   lo_data;/* General class specific 
>    data.
> >*/
>    struct  witness *lo_witness;/* Data for witness. */
> };
> 
> would change to:
> struct lock_object {
>    char **lo_name_type;  /* Individual lock
> name[0]/type[1]. */
>    u_int   lo_flags;
>    u_int   lo_data;/* General class specific 
>    data.
> >*/
>    struct  witness *lo_witness;/* Data for witness. */
> };
> 
> This may be somewhat disruptive, I haven't played with how it would
> actually change driver/etc/code.
> >>>Where would the memory for the char* array come from?
> >>>
> >>That is a good question.  I suspect it would be up to the subsystem to
> >>allocate it.
> >>
> >>Wouldn't it be trivial for *most* of the subsystems to simply have this
> >>either as a static global or static function variable:
> >>
> >>static char *mutex_typename = { "kqueue", "foo" };
> >>
> >>Under kern I see this:
> >>grep mtx_init * | grep -v NULL
> >>...
> >>kern_rmlock.c:mtx_init(&rm->rm_lock_mtx, name, "rmlock_mtx",
> >>MTX_NOWITNESS);
> >>subr_bus.c:mtx_init(&devsoftc.mtx, "dev mtx", "devd", MTX_DEF);
> >>
> >>Those are solved with statics.
> >>
> >>Another example:
> >>
> >>sys/dev/ae/if_ae.c
> >>  mtx_init(&sc->mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK,
> >>MTX_DEF);
> >>
> >>I think the array could be in the softc here? sc->mutex_name_type[0] =
> >>device_get_nameunit(dev); sc->mutex_name_type[1] = MTX_NETWORK_LOCK;
> >>
> >>Do we want to do that?  It moves "wasting space" to another variable.
> >>
> >>I'm not sure where there isn't the possibility of using either static
> >>(for a global mutex) or space inside the equiv of the softc (or proc or
> >>whatever) for this?
> >>
> >>I'm not sure this is a good idea, just an idea.  Are there places where
> >>it's not as simple as doing this?
> >To be honest, the whole name vs type thing isn't widely used, and it makes
> >the mtx_init() function kind of fugly.  I think what I would actually 
> >prefer
> >is to just kill it, changing the various places that pass a separate name 
> >to
> >just pass the type instead.  Note that none of the other lock APIs even 
> >allow
> >setting a separate type.  This would let us remove the static pending list
> >array as well.
> >
> >(And yes, I added the name vs type thing, but at this point I think it did
> >not turn out nearly as useful as I had thought it would be.)
> >
> >The original issue of picking useful-to-witness lock names (i.e. not just
> >using device_get_nameunit()) still remains of course.
> >
> I really want to agree, but anything that reduces the immediate ability 
> for people to diagnose problems really makes me worry.
> 
> This would mean that you would see "network device lock" or some "type" 
> but not know the actual owner.

isn't it usually apparent which lock it is from the backtrace?

-- 
  John-Mark Gurney  Voice: +1 415 225 5579

 "All that I will do, has been done, All that I have, has not."
___
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: r260898 - head/sys/kern

2014-01-22 Thread Alfred Perlstein


On 1/22/14, 2:52 PM, John-Mark Gurney wrote:

Alfred Perlstein wrote this message on Wed, Jan 22, 2014 at 14:15 -0800:

On 1/22/14, 1:22 PM, John Baldwin wrote:

On Wednesday, January 22, 2014 3:59:37 pm Alfred Perlstein wrote:

On 1/22/14, 12:27 PM, John Baldwin wrote:

On Wednesday, January 22, 2014 2:06:39 pm Alfred Perlstein wrote:

Hmm, what if locks had a pointer to a 2 element char * array, the first
being the name, the second the type.  That would keep the size of the
lock down and most locks could share a common tuple of name/type in each
subsystem.  This would allow us to get rid of the pending static list.

effectively:
struct lock_object {
   char *lo_name;  /* Individual lock name. */
   u_int   lo_flags;
   u_int   lo_data;/* General class specific
   data.

*/

   struct  witness *lo_witness;/* Data for witness. */
};

would change to:
struct lock_object {
   char **lo_name_type;  /* Individual lock
name[0]/type[1]. */
   u_int   lo_flags;
   u_int   lo_data;/* General class specific
   data.

*/

   struct  witness *lo_witness;/* Data for witness. */
};

This may be somewhat disruptive, I haven't played with how it would
actually change driver/etc/code.

Where would the memory for the char* array come from?


That is a good question.  I suspect it would be up to the subsystem to
allocate it.

Wouldn't it be trivial for *most* of the subsystems to simply have this
either as a static global or static function variable:

static char *mutex_typename = { "kqueue", "foo" };

Under kern I see this:
grep mtx_init * | grep -v NULL
...
kern_rmlock.c:mtx_init(&rm->rm_lock_mtx, name, "rmlock_mtx",
MTX_NOWITNESS);
subr_bus.c:mtx_init(&devsoftc.mtx, "dev mtx", "devd", MTX_DEF);

Those are solved with statics.

Another example:

sys/dev/ae/if_ae.c
  mtx_init(&sc->mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK,
MTX_DEF);

I think the array could be in the softc here? sc->mutex_name_type[0] =
device_get_nameunit(dev); sc->mutex_name_type[1] = MTX_NETWORK_LOCK;

Do we want to do that?  It moves "wasting space" to another variable.

I'm not sure where there isn't the possibility of using either static
(for a global mutex) or space inside the equiv of the softc (or proc or
whatever) for this?

I'm not sure this is a good idea, just an idea.  Are there places where
it's not as simple as doing this?

To be honest, the whole name vs type thing isn't widely used, and it makes
the mtx_init() function kind of fugly.  I think what I would actually
prefer
is to just kill it, changing the various places that pass a separate name
to
just pass the type instead.  Note that none of the other lock APIs even
allow
setting a separate type.  This would let us remove the static pending list
array as well.

(And yes, I added the name vs type thing, but at this point I think it did
not turn out nearly as useful as I had thought it would be.)

The original issue of picking useful-to-witness lock names (i.e. not just
using device_get_nameunit()) still remains of course.


I really want to agree, but anything that reduces the immediate ability
for people to diagnose problems really makes me worry.

This would mean that you would see "network device lock" or some "type"
but not know the actual owner.

isn't it usually apparent which lock it is from the backtrace?


Isn't the backtrace pretty obvious given IP/PC?

-Alfred
___
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: r261044 - head/etc

2014-01-22 Thread Glen Barber
Author: gjb
Date: Wed Jan 22 23:00:29 2014
New Revision: 261044
URL: http://svnweb.freebsd.org/changeset/base/261044

Log:
  Disable output about duplicate services, which were not output during
  testing.
  
  MFC after:1 month
  X-MFC-After:  r261031
  Sponsored by: The FreeBSD Foundation

Modified:
  head/etc/Makefile

Modified: head/etc/Makefile
==
--- head/etc/Makefile   Wed Jan 22 22:25:48 2014(r261043)
+++ head/etc/Makefile   Wed Jan 22 23:00:29 2014(r261044)
@@ -198,7 +198,7 @@ distribution:
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
${BIN1} ${DESTDIR}/etc; \
cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \
-   services_mkdb ${CAP_MKDB_ENDIAN} -o ${DESTDIR}/var/db/services.db \
+   services_mkdb ${CAP_MKDB_ENDIAN} -q -o 
${DESTDIR}/var/db/services.db \
${DESTDIR}/etc/services; \
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
${BIN2} ${DESTDIR}/etc; \
___
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: r261044 - head/etc

2014-01-22 Thread Glen Barber
On Wed, Jan 22, 2014 at 11:00:29PM +, Glen Barber wrote:
> Author: gjb
> Date: Wed Jan 22 23:00:29 2014
> New Revision: 261044
> URL: http://svnweb.freebsd.org/changeset/base/261044
> 
> Log:
>   Disable output about duplicate services, which were not output during
>   testing.
>   

Which was result of me, not the change(s) in question as whole.

Glen



pgp6nLIgU_bpg.pgp
Description: PGP signature


svn commit: r261068 - head/sys/dev/adb

2014-01-22 Thread Justin Hibbits
Author: jhibbits
Date: Thu Jan 23 01:09:33 2014
New Revision: 261068
URL: http://svnweb.freebsd.org/changeset/base/261068

Log:
  Properly sort the arguments to mtx_init(9).
  
  PR:   misc/186020
  Submitted by: alfred
  MFC after:1 week

Modified:
  head/sys/dev/adb/adb_kbd.c
  head/sys/dev/adb/adb_mouse.c

Modified: head/sys/dev/adb/adb_kbd.c
==
--- head/sys/dev/adb/adb_kbd.c  Thu Jan 23 00:46:29 2014(r261067)
+++ head/sys/dev/adb/adb_kbd.c  Thu Jan 23 01:09:33 2014(r261068)
@@ -304,7 +304,7 @@ adb_kbd_attach(device_t dev) 
/* Try stepping forward to the extended keyboard protocol */
adb_set_device_handler(dev,3);
 
-   mtx_init(&sc->sc_mutex,KBD_DRIVER_NAME,MTX_DEF,0);
+   mtx_init(&sc->sc_mutex, KBD_DRIVER_NAME, NULL, MTX_DEF);
cv_init(&sc->sc_cv,KBD_DRIVER_NAME);
callout_init(&sc->sc_repeater, 0);
 

Modified: head/sys/dev/adb/adb_mouse.c
==
--- head/sys/dev/adb/adb_mouse.cThu Jan 23 00:46:29 2014
(r261067)
+++ head/sys/dev/adb/adb_mouse.cThu Jan 23 01:09:33 2014
(r261068)
@@ -154,7 +154,7 @@ adb_mouse_attach(device_t dev) 
sc = device_get_softc(dev);
sc->sc_dev = dev;
 
-   mtx_init(&sc->sc_mtx,"ams",MTX_DEF,0);
+   mtx_init(&sc->sc_mtx, "ams", NULL, MTX_DEF);
cv_init(&sc->sc_cv,"ams");
 
sc->flags = 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: r261071 - in head: contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include/jemalloc contrib/jemalloc/include/jemalloc/internal contrib/jemalloc/src include lib/libc/gen lib/libc/...

2014-01-22 Thread Jason Evans
Author: jasone
Date: Thu Jan 23 02:47:36 2014
New Revision: 261071
URL: http://svnweb.freebsd.org/changeset/base/261071

Log:
  Update jemalloc to version 3.5.0.

Added:
  head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h   
(contents, props changed)
  head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_macros.h   
(contents, props changed)
  head/contrib/jemalloc/include/jemalloc/internal/public_namespace.h   
(contents, props changed)
Deleted:
  head/contrib/jemalloc/include/jemalloc/jemalloc_defs.h
Modified:
  head/contrib/jemalloc/COPYING
  head/contrib/jemalloc/ChangeLog
  head/contrib/jemalloc/FREEBSD-Xlist
  head/contrib/jemalloc/FREEBSD-diffs
  head/contrib/jemalloc/FREEBSD-upgrade
  head/contrib/jemalloc/VERSION
  head/contrib/jemalloc/doc/jemalloc.3
  head/contrib/jemalloc/include/jemalloc/internal/arena.h
  head/contrib/jemalloc/include/jemalloc/internal/chunk_dss.h
  head/contrib/jemalloc/include/jemalloc/internal/ckh.h
  head/contrib/jemalloc/include/jemalloc/internal/hash.h
  head/contrib/jemalloc/include/jemalloc/internal/huge.h
  head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal.h
  head/contrib/jemalloc/include/jemalloc/internal/private_namespace.h
  head/contrib/jemalloc/include/jemalloc/internal/prng.h
  head/contrib/jemalloc/include/jemalloc/internal/prof.h
  head/contrib/jemalloc/include/jemalloc/internal/ql.h
  head/contrib/jemalloc/include/jemalloc/internal/qr.h
  head/contrib/jemalloc/include/jemalloc/internal/rb.h
  head/contrib/jemalloc/include/jemalloc/internal/rtree.h
  head/contrib/jemalloc/include/jemalloc/internal/tcache.h
  head/contrib/jemalloc/include/jemalloc/internal/tsd.h
  head/contrib/jemalloc/include/jemalloc/internal/util.h
  head/contrib/jemalloc/include/jemalloc/jemalloc.h
  head/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h
  head/contrib/jemalloc/src/arena.c
  head/contrib/jemalloc/src/bitmap.c
  head/contrib/jemalloc/src/chunk.c
  head/contrib/jemalloc/src/chunk_dss.c
  head/contrib/jemalloc/src/chunk_mmap.c
  head/contrib/jemalloc/src/ckh.c
  head/contrib/jemalloc/src/ctl.c
  head/contrib/jemalloc/src/huge.c
  head/contrib/jemalloc/src/jemalloc.c
  head/contrib/jemalloc/src/mutex.c
  head/contrib/jemalloc/src/prof.c
  head/contrib/jemalloc/src/quarantine.c
  head/contrib/jemalloc/src/rtree.c
  head/contrib/jemalloc/src/stats.c
  head/contrib/jemalloc/src/tcache.c
  head/contrib/jemalloc/src/tsd.c
  head/contrib/jemalloc/src/util.c
  head/include/malloc_np.h
  head/lib/libc/gen/tls.c
  head/lib/libc/stdlib/jemalloc/Makefile.inc
  head/lib/libc/stdlib/jemalloc/Symbol.map

Modified: head/contrib/jemalloc/COPYING
==
--- head/contrib/jemalloc/COPYING   Thu Jan 23 02:10:30 2014
(r261070)
+++ head/contrib/jemalloc/COPYING   Thu Jan 23 02:47:36 2014
(r261071)
@@ -1,10 +1,10 @@
 Unless otherwise specified, files in the jemalloc source distribution are
 subject to the following license:
 

-Copyright (C) 2002-2013 Jason Evans .
+Copyright (C) 2002-2014 Jason Evans .
 All rights reserved.
 Copyright (C) 2007-2012 Mozilla Foundation.  All rights reserved.
-Copyright (C) 2009-2013 Facebook, Inc.  All rights reserved.
+Copyright (C) 2009-2014 Facebook, Inc.  All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:

Modified: head/contrib/jemalloc/ChangeLog
==
--- head/contrib/jemalloc/ChangeLog Thu Jan 23 02:10:30 2014
(r261070)
+++ head/contrib/jemalloc/ChangeLog Thu Jan 23 02:47:36 2014
(r261071)
@@ -6,6 +6,59 @@ found in the git revision history:
 http://www.canonware.com/cgi-bin/gitweb.cgi?p=jemalloc.git
 git://canonware.com/jemalloc.git
 
+* 3.5.0 (January 22, 2014)
+
+  This version focuses on refactoring and automated testing, though it also
+  includes some non-trivial heap profiling optimizations not mentioned below.
+
+  New features:
+  - Add the *allocx() API, which is a successor to the experimental *allocm()
+API.  The *allocx() functions are slightly simpler to use because they have
+fewer parameters, they directly return the results of primary interest, and
+mallocx()/rallocx() avoid the strict aliasing pitfall that
+allocm()/rallocx() share with posix_memalign().  Note that *allocm() is
+slated for removal in the next non-bugfix release.
+  - Add support for LinuxThreads.
+
+  Bug fixes:
+  - Unless heap profiling is enabled, disable floating point code and don't 
link
+with libm.  This, in combination with e.g. EXTRA_CFLAGS=-mno-sse on x64
+systems, makes it possible to completely disable floating point register
+use.  Some versions of glibc neglect to save/restore caller-sa

svn commit: r261072 - in head: share/man/man5 share/mk tools/build/options

2014-01-22 Thread Steven Kreuzer
Author: skreuzer (doc,ports committer)
Date: Thu Jan 23 03:14:48 2014
New Revision: 261072
URL: http://svnweb.freebsd.org/changeset/base/261072

Log:
  Remove WITHOUT_ATF as it has been replaced by WITH_TESTS
  
  PR:   conf/185326
  Reported by:  Igor Mozolevsky 
  Approved by:  hrs (mentor)

Deleted:
  head/tools/build/options/WITHOUT_ATF
Modified:
  head/share/man/man5/src.conf.5
  head/share/mk/bsd.own.mk

Modified: head/share/man/man5/src.conf.5
==
--- head/share/man/man5/src.conf.5  Thu Jan 23 02:47:36 2014
(r261071)
+++ head/share/man/man5/src.conf.5  Thu Jan 23 03:14:48 2014
(r261072)
@@ -1,7 +1,7 @@
 .\" DO NOT EDIT-- this file is automatically generated.
 .\" from FreeBSD: head/tools/build/options/makeman 255964 2013-10-01 07:22:04Z 
des
 .\" $FreeBSD$
-.Dd December 4, 2013
+.Dd January 21, 2014
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -113,9 +113,6 @@ checks.
 Set to not build
 .Xr at 1
 and related utilities.
-.It Va WITHOUT_ATF
-.\" from FreeBSD: head/tools/build/options/WITHOUT_ATF 241823 2012-10-22 
01:18:41Z marcel
-Set to not build programs and libraries related to the ATF testing framework.
 .It Va WITHOUT_ATM
 .\" from FreeBSD: head/tools/build/options/WITHOUT_ATM 156932 2006-03-21 
07:50:50Z ru
 Set to not build
@@ -245,12 +242,6 @@ and
 .Pp
 It is a default setting on
 arm/armeb, ia64/ia64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, 
mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64.
-When set, it also enforces the following options:
-.Pp
-.Bl -item -compact
-.It
-.Va WITHOUT_LLDB
-.El
 .It Va WITH_CLANG_IS_CC
 .\" from FreeBSD: head/tools/build/options/WITH_CLANG_IS_CC 235342 2012-05-12 
16:12:36Z gjb
 Set to install the Clang C/C++ compiler as
@@ -627,9 +618,9 @@ and
 On amd64, set to not build 32-bit library set and a
 .Nm ld-elf32.so.1
 runtime linker.
-.It Va WITHOUT_LIBCPLUSPLUS
-.\" from FreeBSD: head/tools/build/options/WITHOUT_LIBCPLUSPLUS 246262 
2013-02-02 22:42:46Z dim
-Set to avoid building libcxxrt and libc++.
+.It Va WITH_LIBCPLUSPLUS
+.\" from FreeBSD: head/tools/build/options/WITH_LIBCPLUSPLUS 228082 2011-11-28 
17:56:46Z dim
+Set to build libcxxrt and libc++.
 .It Va WITHOUT_LIBPTHREAD
 .\" from FreeBSD: head/tools/build/options/WITHOUT_LIBPTHREAD 188848 
2009-02-20 11:09:55Z mtm
 Set to not build the

Modified: head/share/mk/bsd.own.mk
==
--- head/share/mk/bsd.own.mkThu Jan 23 02:47:36 2014(r261071)
+++ head/share/mk/bsd.own.mkThu Jan 23 03:14:48 2014(r261072)
@@ -251,7 +251,6 @@ __DEFAULT_YES_OPTIONS = \
 ARM_EABI \
 ASSERT_DEBUG \
 AT \
-ATF \
 ATM \
 AUDIT \
 AUTHPF \
___
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: r261072 - in head: share/man/man5 share/mk tools/build/options

2014-01-22 Thread Julio Merino
On Jan 22, 2014, at 22:14, Steven Kreuzer  wrote:

> Author: skreuzer (doc,ports committer)
> Date: Thu Jan 23 03:14:48 2014
> New Revision: 261072
> URL: http://svnweb.freebsd.org/changeset/base/261072
> 
> Log:
>  Remove WITHOUT_ATF as it has been replaced by WITH_TESTS
> 
>  PR:  conf/185326
>  Reported by: Igor Mozolevsky 
>  Approved by: hrs (mentor)

Thanks for doing this.

And please don't forget to MFC into stable/10.  (Just a reminder because I 
don't see a MFC tag in the commit message.)
___
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: r261073 - head/release/doc/en_US.ISO8859-1/relnotes

2014-01-22 Thread Steven Kreuzer
Author: skreuzer (doc,ports committer)
Date: Thu Jan 23 03:24:38 2014
New Revision: 261073
URL: http://svnweb.freebsd.org/changeset/base/261073

Log:
  OpenSSL has been updated to version 1.0.1.f
  
  Approved by:  hrs (mentor)

Modified:
  head/release/doc/en_US.ISO8859-1/relnotes/article.xml

Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml
==
--- head/release/doc/en_US.ISO8859-1/relnotes/article.xml   Thu Jan 23 
03:14:48 2014(r261072)
+++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml   Thu Jan 23 
03:24:38 2014(r261073)
@@ -250,6 +250,9 @@
 
 &man.lldb.1; has been updated to upstream
   snapshot version r196259.
+
+OpenSSL has
+  been updated to version 1.0.1.f.
   
 
   
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


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

2014-01-22 Thread Adrian Chadd
.. Make it be an offset into the table rather than a pointer, then we can
do dirty rcu style hacks to just replace and grow the table as we need more
memory.

Don't we have a standard way to pull memory from the top of the physmem
area early on for allocations like this?

Adrian
On Jan 20, 2014 3:50 PM, "John Baldwin"  wrote:

> On Sunday 19 January 2014 18:18:03 Rui Paulo wrote:
> > On 19 Jan 2014, at 17:59, Neel Natu  wrote:
> > > Author: neel
> > > Date: Mon Jan 20 01:59:35 2014
> > > New Revision: 260898
> > > URL: http://svnweb.freebsd.org/changeset/base/260898
> > >
> > > Log:
> > >  Bump up WITNESS_COUNT from 1024 to 1536 so there are sufficient
> entries
> > >  for
> > >  WITNESS to actually work.
> >
> > This value should be automatically tuned...
>
> How do you propose to do so?  This is the count of locks initialized before
> witness' own SYSINIT is executed and the array it sizes is allocated
> statically at compile time.  This used to not be a static array, but an
> intrusive list embedded in locks themselves, but we decided to shave a
> pointer off of each lock that was only used for that and to use a
> statically
> sized table instead.
>
> --
> 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: r260898 - head/sys/kern

2014-01-22 Thread Rui Paulo
On 22 Jan 2014, at 20:05, Adrian Chadd  wrote:

> .. Make it be an offset into the table rather than a pointer, then we can do 
> dirty rcu style hacks to just replace and grow the table as we need more 
> memory.
> 
> Don't we have a standard way to pull memory from the top of the physmem area 
> early on for allocations like this?

Perhaps a bit overkill for this problem?  

--
Rui Paulo



___
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: r260898 - head/sys/kern

2014-01-22 Thread Alfred Perlstein


On 1/22/14, 8:34 PM, Rui Paulo wrote:

On 22 Jan 2014, at 20:05, Adrian Chadd  wrote:


.. Make it be an offset into the table rather than a pointer, then we can do 
dirty rcu style hacks to just replace and grow the table as we need more memory.

Don't we have a standard way to pull memory from the top of the physmem area 
early on for allocations like this?

Perhaps a bit overkill for this problem?


Probably.. I keep thinking we should just increase the size by 2x but 
allow platforms to override. for "SMALL".


-Alfred

___
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: r261031 - in head: . etc usr.sbin/etcupdate usr.sbin/mergemaster

2014-01-22 Thread Bryan Drewery
On Wed, Jan 22, 2014 at 04:59:53PM +, John Baldwin wrote:
> Author: jhb
> Date: Wed Jan 22 16:59:53 2014
> New Revision: 261031
> URL: http://svnweb.freebsd.org/changeset/base/261031
> 
> Log:
>   Generate /var/db/services.db during 'make distribution' so that it is
>   present during new installs.  Update etcupdate and mergemaster to
>   ignore the generated file.
>   
>   Tested by:  gjb (release build)
>   MFC after:  1 month
> 
> Modified:
>   head/Makefile.inc1
>   head/etc/Makefile
>   head/usr.sbin/etcupdate/etcupdate.sh
>   head/usr.sbin/mergemaster/mergemaster.sh
> 
> Modified: head/Makefile.inc1
> ==
> --- head/Makefile.inc1Wed Jan 22 16:50:18 2014(r261030)
> +++ head/Makefile.inc1Wed Jan 22 16:59:53 2014(r261031)
> @@ -771,7 +771,7 @@ _nmtree_itools=   nmtree
>  ITOOLS=  [ awk cap_mkdb cat chflags chmod chown \
>   date echo egrep find grep id install ${_install-info} \
>   ln lockf make mkdir mtree ${_nmtree_itools} mv pwd_mkdb \
> - rm sed sh sysctl test true uname wc ${_zoneinfo}
> + rm sed services_mkdb sh sysctl test true uname wc ${_zoneinfo}
>  
>  #
>  # distributeworld
> 
> Modified: head/etc/Makefile
> ==
> --- head/etc/Makefile Wed Jan 22 16:50:18 2014(r261030)
> +++ head/etc/Makefile Wed Jan 22 16:59:53 2014(r261031)
> @@ -198,6 +198,8 @@ distribution:
>   ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
>   ${BIN1} ${DESTDIR}/etc; \
>   cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \
> + services_mkdb ${CAP_MKDB_ENDIAN} -o ${DESTDIR}/var/db/services.db \
> + ${DESTDIR}/etc/services; \

Something is not right here. Building in a jail with make distribution
fails:

cd /zpoudriere/jails/head/usr/src/etc;  install -o root -g wheel -m 644  
crontab  devd.conf  devfs.conf  ddb.conf  dhclient.conf  disktab  fbtab  
ftpusers  gettytab  group  hosts  hosts.allow  hosts.equiv  inetd.conf  
libalias.conf  libmap.conf  login.access  login.conf  mac.conf  motd  netconfig 
 network.subr  networks  newsyslog.conf  nsswitch.conf  phones  profile  
protocols  rc  rc.bsdextended  rc.firewall  rc.initdiskless  rc.sendmail  
rc.shutdown  rc.subr  remote  rpc  services  shells  sysctl.conf  syslog.conf  
termcap.small libmap32.conf etc.amd64/ttys amd.map apmd.conf snmpd.config 
freebsd-update.conf 
/zpoudriere/jails/head/usr/src/etc/../usr.bin/locate/locate/locate.rc hosts.lpd 
printcap /zpoudriere/jails/head/usr/src/etc/../usr.bin/mail/misc/mail.rc 
ntp.conf nscd.conf portsnap.conf pf.os csh.cshrc csh.login csh.logout 
regdomain.xml /zpoudriere/jails/head/etc;  cap_mkdb -l 
/zpoudriere/jails/head/etc/login.conf;  services_mkdb -l -q -o 
/zpoudriere/jails/head/var/db/services.db  /zpoudriere/jails/head/etc/services; 
 install -o root -g wheel -m 755  netstart pccard_ether rc.suspend rc.resume 
/zpoudriere/jails/head/etc;  install -o root -g wheel -m 600  master.passwd 
nsmb.conf opieaccess /zpoudriere/jails/head/etc;
services_mkdb: illegal option -- l
Usage:  services_mkdb [-q] [-o ] []
services_mkdb -u []
*** Error code 1

Stop.
make[2]: stopped in /zpoudriere/jails/head/usr/src/etc
*** Error code 1



>   ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
>   ${BIN2} ${DESTDIR}/etc; \
>   ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
> 
> Modified: head/usr.sbin/etcupdate/etcupdate.sh
> ==
> --- head/usr.sbin/etcupdate/etcupdate.sh  Wed Jan 22 16:50:18 2014
> (r261030)
> +++ head/usr.sbin/etcupdate/etcupdate.sh  Wed Jan 22 16:59:53 2014
> (r261031)
> @@ -213,7 +213,8 @@ build_tree()
>  
>   # Purge auto-generated files.  Only the source files need to
>   # be updated after which these files are regenerated.
> - rm -f $1/etc/*.db $1/etc/passwd >&3 2>&1 || return 1
> + rm -f $1/etc/*.db $1/etc/passwd $1/var/db/services.db >&3 2>&1 || \
> + return 1
>  
>   # Remove empty files.  These just clutter the output of 'diff'.
>   find $1 -type f -size 0 -delete >&3 2>&1 || return 1
> 
> Modified: head/usr.sbin/mergemaster/mergemaster.sh
> ==
> --- head/usr.sbin/mergemaster/mergemaster.sh  Wed Jan 22 16:50:18 2014
> (r261030)
> +++ head/usr.sbin/mergemaster/mergemaster.sh  Wed Jan 22 16:59:53 2014
> (r261031)
> @@ -699,7 +699,8 @@ case "${RERUN}" in
># or spwd.db.  Instead, we want to compare the text versions, and run 
> *_mkdb.
># Prompt the user to do so below, as needed.
>#
> -  rm -f ${TEMPROOT}/etc/*.db ${TEMPROOT}/etc/passwd
> +  rm -f ${TEMPROOT}/etc/*.db ${TEMPROOT}/etc/passwd \
> +  ${TEMPROOT}/var/db/services.db
>  
># We only need to compare things like fre

svn commit: r261074 - head/sys/amd64/vmm/intel

2014-01-22 Thread Neel Natu
Author: neel
Date: Thu Jan 23 06:06:50 2014
New Revision: 261074
URL: http://svnweb.freebsd.org/changeset/base/261074

Log:
  Set "Interrupt Window Exiting" in the case where there is a vector to be
  injected into the vcpu but the VM-entry interruption information field
  already has the valid bit set.
  
  Pointed out by:   David Reed (david.r...@tidalscale.com)

Modified:
  head/sys/amd64/vmm/intel/vmx.c

Modified: head/sys/amd64/vmm/intel/vmx.c
==
--- head/sys/amd64/vmm/intel/vmx.c  Thu Jan 23 03:24:38 2014
(r261073)
+++ head/sys/amd64/vmm/intel/vmx.c  Thu Jan 23 06:06:50 2014
(r261074)
@@ -1121,15 +1121,15 @@ vmx_inject_interrupts(struct vmx *vmx, i
}
 
/*
-* If there is already an interrupt pending then just return. This
-* could happen for multiple reasons:
-* - A vectoring VM-entry was aborted due to astpending or rendezvous.
-* - A VM-exit happened during event injection.
-* - A NMI was injected above or after "NMI window exiting" VM-exit.
+* If interrupt-window exiting is already in effect then don't bother
+* checking for pending interrupts. This is just an optimization and
+* not needed for correctness.
 */
-   info = vmcs_read(VMCS_ENTRY_INTR_INFO);
-   if (info & VMCS_INTR_VALID)
+   if ((vmx->cap[vcpu].proc_ctls & PROCBASED_INT_WINDOW_EXITING) != 0) {
+   VCPU_CTR0(vmx->vm, vcpu, "Skip interrupt injection due to "
+   "pending int_window_exiting");
return;
+   }
 
/* Ask the local apic for a vector to inject */
if (!vlapic_pending_intr(vlapic, &vector))
@@ -1139,12 +1139,31 @@ vmx_inject_interrupts(struct vmx *vmx, i
 
/* Check RFLAGS.IF and the interruptibility state of the guest */
rflags = vmcs_read(VMCS_GUEST_RFLAGS);
-   if ((rflags & PSL_I) == 0)
+   if ((rflags & PSL_I) == 0) {
+   VCPU_CTR2(vmx->vm, vcpu, "Cannot inject vector %d due to "
+   "rflags %#lx", vector, rflags);
goto cantinject;
+   }
 
gi = vmcs_read(VMCS_GUEST_INTERRUPTIBILITY);
-   if (gi & HWINTR_BLOCKING)
+   if (gi & HWINTR_BLOCKING) {
+   VCPU_CTR2(vmx->vm, vcpu, "Cannot inject vector %d due to "
+   "Guest Interruptibility-state %#x", vector, gi);
goto cantinject;
+   }
+
+   info = vmcs_read(VMCS_ENTRY_INTR_INFO);
+   if (info & VMCS_INTR_VALID) {
+   /*
+* This is expected and could happen for multiple reasons:
+* - A vectoring VM-entry was aborted due to astpending
+* - A VM-exit happened during event injection.
+* - An NMI was injected above or after "NMI window exiting"
+*/
+   VCPU_CTR2(vmx->vm, vcpu, "Cannot inject vector %d due to "
+   "VM-entry intr info %#x", vector, info);
+   goto cantinject;
+   }
 
/* Inject the interrupt */
info = VMCS_INTR_T_HWINTR | VMCS_INTR_VALID;
___
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: r261031 - in head: . etc usr.sbin/etcupdate usr.sbin/mergemaster

2014-01-22 Thread Bryan Drewery
On Wed, Jan 22, 2014 at 11:57:10PM -0600, Bryan Drewery wrote:
> On Wed, Jan 22, 2014 at 04:59:53PM +, John Baldwin wrote:
> > Author: jhb
> > Date: Wed Jan 22 16:59:53 2014
> > New Revision: 261031
> > URL: http://svnweb.freebsd.org/changeset/base/261031
> > 
> > Log:
> >   Generate /var/db/services.db during 'make distribution' so that it is
> >   present during new installs.  Update etcupdate and mergemaster to
> >   ignore the generated file.
> >   
> >   Tested by:gjb (release build)
> >   MFC after:1 month
> > 
> > Modified:
> >   head/Makefile.inc1
> >   head/etc/Makefile
> >   head/usr.sbin/etcupdate/etcupdate.sh
> >   head/usr.sbin/mergemaster/mergemaster.sh
> > 
> > Modified: head/Makefile.inc1
> > ==
> > --- head/Makefile.inc1  Wed Jan 22 16:50:18 2014(r261030)
> > +++ head/Makefile.inc1  Wed Jan 22 16:59:53 2014(r261031)
> > @@ -771,7 +771,7 @@ _nmtree_itools= nmtree
> >  ITOOLS=[ awk cap_mkdb cat chflags chmod chown \
> > date echo egrep find grep id install ${_install-info} \
> > ln lockf make mkdir mtree ${_nmtree_itools} mv pwd_mkdb \
> > -   rm sed sh sysctl test true uname wc ${_zoneinfo}
> > +   rm sed services_mkdb sh sysctl test true uname wc ${_zoneinfo}
> >  
> >  #
> >  # distributeworld
> > 
> > Modified: head/etc/Makefile
> > ==
> > --- head/etc/Makefile   Wed Jan 22 16:50:18 2014(r261030)
> > +++ head/etc/Makefile   Wed Jan 22 16:59:53 2014(r261031)
> > @@ -198,6 +198,8 @@ distribution:
> > ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
> > ${BIN1} ${DESTDIR}/etc; \
> > cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \
> > +   services_mkdb ${CAP_MKDB_ENDIAN} -o ${DESTDIR}/var/db/services.db \
> > +   ${DESTDIR}/etc/services; \
> 
> Something is not right here. Building in a jail with make distribution
> fails:

Correction, I am not using jails here. This is setting TARGET_ARCH for a
build.

It seems to be using the already installed host version (which does not
have the -l support) and not the just-built version.

> 
> cd /zpoudriere/jails/head/usr/src/etc;  install -o root -g wheel -m 644  
> crontab  devd.conf  devfs.conf  ddb.conf  dhclient.conf  disktab  fbtab  
> ftpusers  gettytab  group  hosts  hosts.allow  hosts.equiv  inetd.conf  
> libalias.conf  libmap.conf  login.access  login.conf  mac.conf  motd  
> netconfig  network.subr  networks  newsyslog.conf  nsswitch.conf  phones  
> profile  protocols  rc  rc.bsdextended  rc.firewall  rc.initdiskless  
> rc.sendmail  rc.shutdown  rc.subr  remote  rpc  services  shells  sysctl.conf 
>  syslog.conf  termcap.small libmap32.conf etc.amd64/ttys amd.map apmd.conf 
> snmpd.config freebsd-update.conf 
> /zpoudriere/jails/head/usr/src/etc/../usr.bin/locate/locate/locate.rc 
> hosts.lpd printcap 
> /zpoudriere/jails/head/usr/src/etc/../usr.bin/mail/misc/mail.rc ntp.conf 
> nscd.conf portsnap.conf pf.os csh.cshrc csh.login csh.logout regdomain.xml 
> /zpoudriere/jails/head/etc;  cap_mkdb -l 
> /zpoudriere/jails/head/etc/login.conf;  services_mkdb -l -q -o 
> /zpoudriere/jails/head/var/db/services.db  
> /zpoudriere/jails/head/etc/services;  install -o root -g wheel -m 755  
> netstart pccard_ether rc.suspend rc.resume /zpoudriere/jails/head/etc;  
> install -o root -g wheel -m 600  master.passwd nsmb.conf opieaccess 
> /zpoudriere/jails/head/etc;
> services_mkdb: illegal option -- l
> Usage:  services_mkdb [-q] [-o ] []
> services_mkdb -u []
> *** Error code 1
> 
> Stop.
> make[2]: stopped in /zpoudriere/jails/head/usr/src/etc
> *** Error code 1
> 
> 
> 
> > ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
> > ${BIN2} ${DESTDIR}/etc; \
> > ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
> > 
> > Modified: head/usr.sbin/etcupdate/etcupdate.sh
> > ==
> > --- head/usr.sbin/etcupdate/etcupdate.shWed Jan 22 16:50:18 2014
> > (r261030)
> > +++ head/usr.sbin/etcupdate/etcupdate.shWed Jan 22 16:59:53 2014
> > (r261031)
> > @@ -213,7 +213,8 @@ build_tree()
> >  
> > # Purge auto-generated files.  Only the source files need to
> > # be updated after which these files are regenerated.
> > -   rm -f $1/etc/*.db $1/etc/passwd >&3 2>&1 || return 1
> > +   rm -f $1/etc/*.db $1/etc/passwd $1/var/db/services.db >&3 2>&1 || \
> > +   return 1
> >  
> > # Remove empty files.  These just clutter the output of 'diff'.
> > find $1 -type f -size 0 -delete >&3 2>&1 || return 1
> > 
> > Modified: head/usr.sbin/mergemaster/mergemaster.sh
> > ==
> > --- head/usr.sbin/mergemaster/mergemaster.shWed Jan 22 16:50:18 
> > 2014(r261030)
> > +++ head/usr.s

Re: svn commit: r261031 - in head: . etc usr.sbin/etcupdate usr.sbin/mergemaster

2014-01-22 Thread Glen Barber
On Thu, Jan 23, 2014 at 12:19:22AM -0600, Bryan Drewery wrote:
> > > Modified: head/etc/Makefile
> > > ==
> > > --- head/etc/Makefile Wed Jan 22 16:50:18 2014(r261030)
> > > +++ head/etc/Makefile Wed Jan 22 16:59:53 2014(r261031)
> > > @@ -198,6 +198,8 @@ distribution:
> > >   ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
> > >   ${BIN1} ${DESTDIR}/etc; \
> > >   cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \
> > > + services_mkdb ${CAP_MKDB_ENDIAN} -o ${DESTDIR}/var/db/services.db \
> > > + ${DESTDIR}/etc/services; \
> > 
> > Something is not right here. Building in a jail with make distribution
> > fails:
> 
> Correction, I am not using jails here. This is setting TARGET_ARCH for a
> build.
> 
> It seems to be using the already installed host version (which does not
> have the -l support) and not the just-built version.
> 

It needs to use the build host version, because using (for example)
powerpc resulting binary won't work on and amd64 system.

Glen



pgp64VYV17Nx6.pgp
Description: PGP signature


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

2014-01-22 Thread Adrian Chadd
On 22 January 2014 20:34, Rui Paulo  wrote:
> On 22 Jan 2014, at 20:05, Adrian Chadd  wrote:
>
>> .. Make it be an offset into the table rather than a pointer, then we can do 
>> dirty rcu style hacks to just replace and grow the table as we need more 
>> memory.
>>
>> Don't we have a standard way to pull memory from the top of the physmem area 
>> early on for allocations like this?
>
> Perhaps a bit overkill for this problem?

We already have platform dependent ways of doing this in the VM init
path for exactly this - structures needed early at boot.

It may be overkill but it may also be the cleanest way to allow
boot-time tuned things based on early available information, which we
may want to do when it's time to boot a single kernel on a 2-core atom
board or a 256 core intel/amd server board.


-a
___
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"