svn commit: r266790 - head/sys/dev/e1000

2014-05-27 Thread Luigi Rizzo
Author: luigi
Date: Wed May 28 06:50:16 2014
New Revision: 266790
URL: http://svnweb.freebsd.org/changeset/base/266790

Log:
  reference the correct variable in a comment
  
  MFC after:3 days

Modified:
  head/sys/dev/e1000/if_igb.c

Modified: head/sys/dev/e1000/if_igb.c
==
--- head/sys/dev/e1000/if_igb.c Wed May 28 06:38:42 2014(r266789)
+++ head/sys/dev/e1000/if_igb.c Wed May 28 06:50:16 2014(r266790)
@@ -4331,7 +4331,7 @@ igb_setup_receive_ring(struct rx_ring *r
rxbuf = &rxr->rx_buffers[j];
 #ifdef DEV_NETMAP
if (slot) {
-   /* slot sj is mapped to the i-th NIC-ring entry */
+   /* slot sj is mapped to the j-th NIC-ring entry */
int sj = netmap_idx_n2k(&na->rx_rings[rxr->me], j);
uint64_t paddr;
void *addr;
___
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: r266787 - head/sys/arm/samsung/exynos

2014-05-27 Thread Ruslan Bukin
Author: br
Date: Wed May 28 06:15:45 2014
New Revision: 266787
URL: http://svnweb.freebsd.org/changeset/base/266787

Log:
  Add simple polling mechanism that works for KDB.
  
  Submitted by: Maxim Ignatenko 

Modified:
  head/sys/arm/samsung/exynos/chrome_kb.c

Modified: head/sys/arm/samsung/exynos/chrome_kb.c
==
--- head/sys/arm/samsung/exynos/chrome_kb.c Wed May 28 06:11:16 2014
(r266786)
+++ head/sys/arm/samsung/exynos/chrome_kb.c Wed May 28 06:15:45 2014
(r266787)
@@ -131,6 +131,7 @@ struct ckb_softc {
int rows;
int cols;
device_tdev;
+   device_tgpio_dev;
struct thread   *sc_poll_thread;
 
uint8_t *scan_local;
@@ -331,6 +332,7 @@ ckb_read_char_locked(keyboard_t *kbd, in
uint16_t key;
int oldbit;
int newbit;
+   int status;
 
sc = kbd->kb_data;
 
@@ -347,7 +349,20 @@ ckb_read_char_locked(keyboard_t *kbd, in
};
 
if (sc->sc_flags & CKB_FLAG_POLLING) {
-   /* TODO */
+   for (;;) {
+   GPIO_PIN_GET(sc->gpio_dev, KB_GPIO_INT, &status);
+   if (status == 0) {
+   if (ec_command(EC_CMD_MKBP_STATE, sc->scan, 
sc->cols,
+   sc->scan, sc->cols)) {
+   return (NOKEY);
+   }
+   break;
+   }
+   if (!wait) {
+   return (NOKEY);
+   }
+   DELAY(1000);
+   }
};
 
for (i = 0; i < sc->cols; i++) {
@@ -710,6 +725,12 @@ chrome_kb_attach(device_t dev)
if ((error = parse_dts(sc)) != 0)
return error;
 
+   sc->gpio_dev = devclass_get_device(devclass_find("gpio"), 0);
+   if (sc->gpio_dev == NULL) {
+   device_printf(sc->dev, "Can't find gpio device.\n");
+   return (ENXIO);
+   }
+
 #if 0
device_printf(sc->dev, "Keyboard matrix [%dx%d]\n",
sc->cols, sc->rows);
___
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: r266786 - head/share/man/man4

2014-05-27 Thread Christian Brueffer
Author: brueffer
Date: Wed May 28 06:11:16 2014
New Revision: 266786
URL: http://svnweb.freebsd.org/changeset/base/266786

Log:
  Document support for Intel Centrino Wireless-N 105, added in r266770.
  
  MFC after:2 weeks

Modified:
  head/share/man/man4/iwn.4

Modified: head/share/man/man4/iwn.4
==
--- head/share/man/man4/iwn.4   Wed May 28 06:11:12 2014(r266785)
+++ head/share/man/man4/iwn.4   Wed May 28 06:11:16 2014(r266786)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd February 9, 2014
+.Dd May 28, 2014
 .Dt IWN 4
 .Os
 .Sh NAME
@@ -92,6 +92,7 @@ driver provides support for:
 .It Intel Centrino Advanced-N + WiMAX 6250
 .It Intel Centrino Ultimate-N 6300
 .It Intel Centrino Wireless-N 100
+.It Intel Centrino Wireless-N 105
 .It Intel Centrino Wireless-N 130
 .It Intel Centrino Wireless-N 1000
 .It Intel Centrino Wireless-N 1030
___
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: r266785 - in head/sys: arm/samsung/exynos boot/fdt/dts/arm

2014-05-27 Thread Ruslan Bukin
Author: br
Date: Wed May 28 06:11:12 2014
New Revision: 266785
URL: http://svnweb.freebsd.org/changeset/base/266785

Log:
  Describe I2C arbitrator device in DTS and use it for Chromebook Snow only.
  
  Submitted by: Maxim Ignatenko 

Modified:
  head/sys/arm/samsung/exynos/chrome_ec.c
  head/sys/boot/fdt/dts/arm/exynos5250-chromebook-snow.dts

Modified: head/sys/arm/samsung/exynos/chrome_ec.c
==
--- head/sys/arm/samsung/exynos/chrome_ec.c Wed May 28 06:02:04 2014
(r266784)
+++ head/sys/arm/samsung/exynos/chrome_ec.c Wed May 28 06:11:12 2014
(r266785)
@@ -60,12 +60,11 @@ __FBSDID("$FreeBSD$");
 
 #include 
 
-/* TODO: export to DTS */
-#define OUR_GPIO   177
-#define EC_GPIO168
-
 struct ec_softc {
device_tdev;
+   int have_arbitrator;
+   pcell_t our_gpio;
+   pcell_t ec_gpio;
 };
 
 struct ec_softc *ec_sc;
@@ -82,17 +81,24 @@ bus_claim(struct ec_softc *sc)
device_t gpio_dev;
int status;
 
+   if (sc->our_gpio == 0 || sc->ec_gpio == 0) {
+   device_printf(sc->dev, "i2c arbitrator is not configured\n");
+   return (1);
+   }
+
gpio_dev = devclass_get_device(devclass_find("gpio"), 0);
-if (gpio_dev == NULL) {
+   if (gpio_dev == NULL) {
device_printf(sc->dev, "cant find gpio_dev\n");
return (1);
}
 
/* Say we want the bus */
-   GPIO_PIN_SET(gpio_dev, OUR_GPIO, GPIO_PIN_LOW);
+   GPIO_PIN_SET(gpio_dev, sc->our_gpio, GPIO_PIN_LOW);
+
+   /* TODO(imax): insert a delay to allow EC to react. */
 
/* Check EC decision */
-   GPIO_PIN_GET(gpio_dev, EC_GPIO, &status);
+   GPIO_PIN_GET(gpio_dev, sc->ec_gpio, &status);
 
if (status == 1) {
/* Okay. We have bus */
@@ -108,13 +114,18 @@ bus_release(struct ec_softc *sc)
 {
device_t gpio_dev;
 
+   if (sc->our_gpio == 0 || sc->ec_gpio == 0) {
+   device_printf(sc->dev, "i2c arbitrator is not configured\n");
+   return (1);
+   }
+
gpio_dev = devclass_get_device(devclass_find("gpio"), 0);
-if (gpio_dev == NULL) {
+   if (gpio_dev == NULL) {
device_printf(sc->dev, "cant find gpio_dev\n");
return (1);
}
 
-   GPIO_PIN_SET(gpio_dev, OUR_GPIO, GPIO_PIN_HIGH);
+   GPIO_PIN_SET(gpio_dev, sc->our_gpio, GPIO_PIN_HIGH);
 
return (0);
 }
@@ -209,6 +220,28 @@ int ec_hello(void)
return (0);
 }
 
+static void
+configure_i2c_arbitrator(struct ec_softc *sc)
+{
+   phandle_t arbitrator;
+
+   /* TODO(imax): look for compatible entry instead of hard-coded path */
+   arbitrator = OF_finddevice("/i2c-arbitrator");
+   if (arbitrator > 0 &&
+   OF_hasprop(arbitrator, "freebsd,our-gpio") &&
+   OF_hasprop(arbitrator, "freebsd,ec-gpio")) {
+   sc->have_arbitrator = 1;
+   OF_getencprop(arbitrator, "freebsd,our-gpio",
+   &sc->our_gpio, sizeof(sc->our_gpio));
+   OF_getencprop(arbitrator, "freebsd,ec-gpio",
+   &sc->ec_gpio, sizeof(sc->ec_gpio));
+   } else {
+   sc->have_arbitrator = 0;
+   sc->our_gpio = 0;
+   sc->ec_gpio = 0;
+   }
+}
+
 static int
 ec_attach(device_t dev)
 {
@@ -219,6 +252,8 @@ ec_attach(device_t dev)
 
ec_sc = sc;
 
+   configure_i2c_arbitrator(sc);
+
/*
 * Claim the bus.
 *
@@ -227,7 +262,7 @@ ec_attach(device_t dev)
 *
 */
 
-   if (bus_claim(sc) != 0) {
+   if (sc->have_arbitrator && bus_claim(sc) != 0) {
return (ENXIO);
}
 
@@ -241,7 +276,9 @@ ec_detach(device_t dev)
 
sc = device_get_softc(dev);
 
-   bus_release(sc);
+   if (sc->have_arbitrator) {
+   bus_release(sc);
+   }
 
return (0);
 }

Modified: head/sys/boot/fdt/dts/arm/exynos5250-chromebook-snow.dts
==
--- head/sys/boot/fdt/dts/arm/exynos5250-chromebook-snow.dtsWed May 28 
06:02:04 2014(r266784)
+++ head/sys/boot/fdt/dts/arm/exynos5250-chromebook-snow.dtsWed May 28 
06:11:12 2014(r266785)
@@ -65,6 +65,11 @@
};
};
 
+   i2c-arbitrator {
+   freebsd,our-gpio = <177>;
+   freebsd,ec-gpio = <168>;
+   };
+
chosen {
stdin = &serial2;
stdout = &serial2;
___
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: r266783 - in head/sys: arm/conf boot/fdt/dts/arm

2014-05-27 Thread Ruslan Bukin
Author: br
Date: Wed May 28 06:00:55 2014
New Revision: 266783
URL: http://svnweb.freebsd.org/changeset/base/266783

Log:
  o Add kernel configuration for HP Chromebook 11
  o Use machine codename in filenames
  o Add GEOM_PART_GPT kernel option
  
  Submitted by: Maxim Ignatenko 

Added:
  head/sys/arm/conf/CHROMEBOOK-SNOW   (contents, props changed)
  head/sys/arm/conf/CHROMEBOOK-SPRING   (contents, props changed)
  head/sys/boot/fdt/dts/arm/exynos5250-chromebook-snow.dts
 - copied unchanged from r266781, 
head/sys/boot/fdt/dts/arm/exynos5250-chromebook.dts
  head/sys/boot/fdt/dts/arm/exynos5250-chromebook-spring.dts   (contents, props 
changed)
Deleted:
  head/sys/boot/fdt/dts/arm/exynos5250-chromebook.dts
Modified:
  head/sys/arm/conf/CHROMEBOOK
  head/sys/arm/conf/EXYNOS5250.common

Modified: head/sys/arm/conf/CHROMEBOOK
==
--- head/sys/arm/conf/CHROMEBOOKWed May 28 05:57:35 2014
(r266782)
+++ head/sys/arm/conf/CHROMEBOOKWed May 28 06:00:55 2014
(r266783)
@@ -1,4 +1,4 @@
-# Kernel configuration for Samsung Chromebook (Exynos5 Dual machine).
+# Kernel configuration for Chromebook (Exynos5 Dual machine).
 #
 # For more information on this file, please read the config(5) manual page,
 # and/or the handbook section on Kernel Configuration Files:
@@ -34,5 +34,3 @@ deviceukbd
 
 #FDT
 optionsFDT
-optionsFDT_DTB_STATIC
-makeoptionsFDT_DTS_FILE=exynos5250-chromebook.dts

Added: head/sys/arm/conf/CHROMEBOOK-SNOW
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/arm/conf/CHROMEBOOK-SNOW   Wed May 28 06:00:55 2014
(r266783)
@@ -0,0 +1,28 @@
+# Kernel configuration for Samsung Chromebook (Exynos5 Dual machine).
+#
+# For more information on this file, please read the config(5) manual page,
+# and/or the handbook section on Kernel Configuration Files:
+#
+#
http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html
+#
+# The handbook is also available locally in /usr/share/doc/handbook
+# if you've installed the doc distribution, otherwise always see the
+# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the
+# latest information.
+#
+# An exhaustive list of options and more detailed explanations of the
+# device lines is also present in the ../../conf/NOTES and NOTES files.
+# If you are in doubt as to the purpose or necessity of a line, check first
+# in NOTES.
+#
+# $FreeBSD$
+
+#NO_UNIVERSE
+
+include"CHROMEBOOK"
+ident  CHROMEBOOK-SNOW
+
+#FDT
+optionsFDT
+optionsFDT_DTB_STATIC
+makeoptionsFDT_DTS_FILE=exynos5250-chromebook-snow.dts

Added: head/sys/arm/conf/CHROMEBOOK-SPRING
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/arm/conf/CHROMEBOOK-SPRING Wed May 28 06:00:55 2014
(r266783)
@@ -0,0 +1,28 @@
+# Kernel configuration for HP Chromebook 11 (Exynos5 Dual machine).
+#
+# For more information on this file, please read the config(5) manual page,
+# and/or the handbook section on Kernel Configuration Files:
+#
+#
http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html
+#
+# The handbook is also available locally in /usr/share/doc/handbook
+# if you've installed the doc distribution, otherwise always see the
+# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the
+# latest information.
+#
+# An exhaustive list of options and more detailed explanations of the
+# device lines is also present in the ../../conf/NOTES and NOTES files.
+# If you are in doubt as to the purpose or necessity of a line, check first
+# in NOTES.
+#
+# $FreeBSD$
+
+#NO_UNIVERSE
+
+include"CHROMEBOOK"
+ident  CHROMEBOOK-SPRING
+
+#FDT
+optionsFDT
+optionsFDT_DTB_STATIC
+makeoptionsFDT_DTS_FILE=exynos5250-chromebook-spring.dts

Modified: head/sys/arm/conf/EXYNOS5250.common
==
--- head/sys/arm/conf/EXYNOS5250.common Wed May 28 05:57:35 2014
(r266782)
+++ head/sys/arm/conf/EXYNOS5250.common Wed May 28 06:00:55 2014
(r266783)
@@ -31,6 +31,7 @@ options   INET# InterNETworking
 optionsINET6   # IPv6 communications protocols
 optionsGEOM_PART_BSD   # BSD partition scheme
 optionsGEOM_PART_MBR   # MBR partition scheme
+optionsGEOM_PART_GPT   # GUID partition tables
 optionsTMPFS   # Efficient memory filesystem
 optionsFFS # Berkeley Fast Filesystem
 optionsSOFTUPDATES

Copied: head/sys/boot/fdt/dts/arm/exynos5250-chromebook-snow.dts (from r266781, 
head/sys

svn commit: r266782 - head/sys/compat/linux

2014-05-27 Thread Dmitry Chagin
Author: dchagin
Date: Wed May 28 05:57:35 2014
New Revision: 266782
URL: http://svnweb.freebsd.org/changeset/base/266782

Log:
  In r218101 I have not changed properly the futex syscall definition.
  Some Linux futex ops atomically verifies that the futex address uaddr
  (uval) contains the value val. Comparing signed uval and unsigned val
  may lead to an unexpected result, mostly to a deadlock.
  
  So copyin uaddr to an unsigned int to compare the parameters correctly.
  
  While here change ktr records to print parameters in more readable format.
  
  Tested by eadler@
  
  MFC after:3 days

Modified:
  head/sys/compat/linux/linux_futex.c

Modified: head/sys/compat/linux/linux_futex.c
==
--- head/sys/compat/linux/linux_futex.c Wed May 28 03:10:16 2014
(r266781)
+++ head/sys/compat/linux/linux_futex.c Wed May 28 05:57:35 2014
(r266782)
@@ -679,12 +679,12 @@ futex_atomic_op(struct thread *td, int e
 int
 linux_sys_futex(struct thread *td, struct linux_sys_futex_args *args)
 {
-   int clockrt, nrwake, op_ret, ret, val;
+   int clockrt, nrwake, op_ret, ret;
struct linux_emuldata *em;
struct waiting_proc *wp;
struct futex *f, *f2;
int error;
-   uint32_t flags;
+   uint32_t flags, val;
 
LIN_SDT_PROBE2(futex, linux_sys_futex, entry, td, args);
 
@@ -721,7 +721,7 @@ linux_sys_futex(struct thread *td, struc
case LINUX_FUTEX_WAIT_BITSET:
LIN_SDT_PROBE3(futex, linux_sys_futex, debug_wait, args->uaddr,
args->val, args->val3);
-   LINUX_CTR3(sys_futex, "WAIT uaddr %p val %d val3 %d",
+   LINUX_CTR3(sys_futex, "WAIT uaddr %p val 0x%x bitset 0x%x",
args->uaddr, args->val, args->val3);
 
error = futex_get(args->uaddr, &wp, &f,
@@ -746,9 +746,9 @@ linux_sys_futex(struct thread *td, struc
LIN_SDT_PROBE4(futex, linux_sys_futex,
debug_wait_value_neq, args->uaddr, args->val, val,
args->val3);
-   LINUX_CTR4(sys_futex,
-   "WAIT uaddr %p val %d != uval %d val3 %d",
-   args->uaddr, args->val, val, args->val3);
+   LINUX_CTR3(sys_futex,
+   "WAIT uaddr %p val 0x%x != uval 0x%x",
+   args->uaddr, args->val, val);
futex_put(f, wp);
 
LIN_SDT_PROBE1(futex, linux_sys_futex, return,
@@ -766,7 +766,7 @@ linux_sys_futex(struct thread *td, struc
case LINUX_FUTEX_WAKE_BITSET:
LIN_SDT_PROBE3(futex, linux_sys_futex, debug_wake, args->uaddr,
args->val, args->val3);
-   LINUX_CTR3(sys_futex, "WAKE uaddr %p val % d val3 %d",
+   LINUX_CTR3(sys_futex, "WAKE uaddr %p nrwake 0x%x bitset 0x%x",
args->uaddr, args->val, args->val3);
 
error = futex_get(args->uaddr, NULL, &f,
@@ -791,9 +791,9 @@ linux_sys_futex(struct thread *td, struc
args->uaddr, args->val, args->val3, args->uaddr2,
args->timeout);
LINUX_CTR5(sys_futex, "CMP_REQUEUE uaddr %p "
-   "val %d val3 %d uaddr2 %p val2 %d",
+   "nrwake 0x%x uval 0x%x uaddr2 %p nrequeue 0x%x",
args->uaddr, args->val, args->val3, args->uaddr2,
-   (int)(unsigned long)args->timeout);
+   args->timeout);
 
/*
 * Linux allows this, we would not, it is an incorrect
@@ -842,7 +842,7 @@ linux_sys_futex(struct thread *td, struc
if (val != args->val3) {
LIN_SDT_PROBE2(futex, linux_sys_futex,
debug_cmp_requeue_value_neq, args->val, val);
-   LINUX_CTR2(sys_futex, "CMP_REQUEUE val %d != uval %d",
+   LINUX_CTR2(sys_futex, "CMP_REQUEUE val 0x%x != uval 
0x%x",
args->val, val);
futex_put(f2, NULL);
futex_put(f, NULL);
@@ -861,9 +861,9 @@ linux_sys_futex(struct thread *td, struc
LIN_SDT_PROBE5(futex, linux_sys_futex, debug_wake_op,
args->uaddr, args->op, args->val, args->uaddr2, args->val3);
LINUX_CTR5(sys_futex, "WAKE_OP "
-   "uaddr %p op %d val %x uaddr2 %p val3 %x",
-   args->uaddr, args->op, args->val,
-   args->uaddr2, args->val3);
+   "uaddr %p nrwake 0x%x uaddr2 %p op 0x%x nrwake2 0x%x",
+   args->uaddr, args->val, args->uaddr2, args->val3,
+   args->timeout);
 
error = futex_get(args->uaddr, NULL, &f, flags);
if (error) {
@@ -886,6 +886,9 @@ linux_sys_futex(struct

Re: svn commit: r266757 - in head/sys: conf dev/cxgbe dev/cxgbe/common modules/cxgbe/if_cxgbe

2014-05-27 Thread George Neville-Neil
On 27 May 2014, at 20:42, Navdeep Parhar wrote:

> On 05/27/14 17:36, Luigi Rizzo wrote:
>>
>>
>>
>> On Tue, May 27, 2014 at 8:18 PM, Navdeep Parhar > > wrote:
>>
>>  Author: np
>>  Date: Tue May 27 18:18:41 2014
>>  New Revision: 266757
>>  URL: http://svnweb.freebsd.org/changeset/base/266757
>>
>>  Log:
>>cxgbe(4): netmap support for Terminator 5 (T5) based 10G/40G cards.
>>Netmap gets its own hardware-assisted virtual interface and won't take
>>over or disrupt the "normal" interface in any way.  You can use both
>>simultaneously.
>>
>>For kernels with DEV_NETMAP, cxgbe(4) carves out an ncxl interface
>>(note the 'n' prefix) in the hardware to accompany each cxl
>>interface.  These two ifnet's per port share the same wire but really
>>are separate interfaces in the hardware and software.  Each gets
>>  its own
>>L2 MAC addresses (unicast and multicast), MTU, checksum caps, etc.
>>   You
>>should run netmap on the 'n' interfaces only, that's what they are
>>  for.
>>
>>With this, pkt-gen is able to transmit > 45Mpps out of a single
>>  40G port
>>
>>
>> ​and just for the records, this is with 1 core in userland.
>> Very cool.
>>
>> Do you have an easy way to check what kind of throughput
>> you get when the netmap interface has one hw queue ?
>
> Both tx and rx are at around ~33Mpps right now with one hardware queue.
> That's more than enough to saturate a 40G link with 128B sized frames.
>

We need to port more tools to netmap now that it's in more drivers.  I'm
looking at iperf3 but there are other packet oriented daemons we ought
to be porting as well.  PTPd is, of course, on my list.

Best,
George
 
___
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: r266780 - head/sys/vm

2014-05-27 Thread Konstantin Belousov
Author: kib
Date: Wed May 28 00:45:35 2014
New Revision: 266780
URL: http://svnweb.freebsd.org/changeset/base/266780

Log:
  Remove the assert which can be triggered by the userspace.  The
  situation checked by assert is verified to not take place in
  vm_map_wire(), and protection permissions on the wired entry can be
  revoked afterward.
  
  Reported by:  markj
  Reviewed by:  alc
  Sponsored by: The FreeBSD Foundation
  MFC after:1 week

Modified:
  head/sys/vm/vm_map.c

Modified: head/sys/vm/vm_map.c
==
--- head/sys/vm/vm_map.cWed May 28 00:30:32 2014(r266779)
+++ head/sys/vm/vm_map.cWed May 28 00:45:35 2014(r266780)
@@ -1986,11 +1986,8 @@ vm_map_protect(vm_map_t map, vm_offset_t
 */
if ((current->eflags & MAP_ENTRY_USER_WIRED) != 0 &&
(current->protection & VM_PROT_WRITE) != 0 &&
-   (old_prot & VM_PROT_WRITE) == 0) {
-   KASSERT(old_prot != VM_PROT_NONE,
-   ("vm_map_protect: inaccessible wired map entry"));
+   (old_prot & VM_PROT_WRITE) == 0)
vm_fault_copy_entry(map, map, current, current, NULL);
-   }
 
/*
 * When restricting access, update the physical map.  Worry
___
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: r266757 - in head/sys: conf dev/cxgbe dev/cxgbe/common modules/cxgbe/if_cxgbe

2014-05-27 Thread Navdeep Parhar
On 05/27/14 17:36, Luigi Rizzo wrote:
> 
> 
> 
> On Tue, May 27, 2014 at 8:18 PM, Navdeep Parhar  > wrote:
> 
> Author: np
> Date: Tue May 27 18:18:41 2014
> New Revision: 266757
> URL: http://svnweb.freebsd.org/changeset/base/266757
> 
> Log:
>   cxgbe(4): netmap support for Terminator 5 (T5) based 10G/40G cards.
>   Netmap gets its own hardware-assisted virtual interface and won't take
>   over or disrupt the "normal" interface in any way.  You can use both
>   simultaneously.
> 
>   For kernels with DEV_NETMAP, cxgbe(4) carves out an ncxl interface
>   (note the 'n' prefix) in the hardware to accompany each cxl
>   interface.  These two ifnet's per port share the same wire but really
>   are separate interfaces in the hardware and software.  Each gets
> its own
>   L2 MAC addresses (unicast and multicast), MTU, checksum caps, etc.
>  You
>   should run netmap on the 'n' interfaces only, that's what they are
> for.
> 
>   With this, pkt-gen is able to transmit > 45Mpps out of a single
> 40G port
> 
> 
> ​and just for the records, this is with 1 core in userland.
> Very cool.
> 
> Do you have an easy way to check what kind of throughput
> you get when the netmap interface has one hw queue ?

Both tx and rx are at around ~33Mpps right now with one hardware queue.
 That's more than enough to saturate a 40G link with 128B sized frames.

Regards,
Navdeep

> 
> cheers
> luigi
> 
>   of a T580 card.  2 port tx is at ~56Mpps total (28M + 28M) as of now.
>   Single port receive is at 33Mpps but this is very much a work in
>   progress.  I expect it to be closer to 40Mpps once done.  In any case
>   the current effort can already saturate multiple 10G ports of a T5
> card
>   at the smallest legal packet size.  T4 gear is totally untested.
> 
>   trantor:~# ./pkt-gen -i ncxl0 -f tx -D 00:07:43:ab:cd:ef
>   881.952141 main [1621] interface is ncxl0
>   881.952250 extract_ip_range [275] range is 10.0.0.1:0
>  to 10.0.0.1:0 
>   881.952253 extract_ip_range [275] range is 10.1.0.1:0
>  to 10.1.0.1:0 
>   881.962540 main [1804] mapped 334980KB at 0x801dff000
>   Sending on netmap:ncxl0: 4 queues, 1 threads and 1 cpus.
>   10.0.0.1 -> 10.1.0.1 (00:00:00:00:00:00 -> 00:07:43:ab:cd:ef)
>   881.962562 main [1882] Sending 512 packets every  0.0 s
>   881.962563 main [1884] Wait 2 secs for phy reset
>   884.088516 main [1886] Ready...
>   884.088535 nm_open [457] overriding ifname ncxl0 ringid 0x0 flags 0x1
>   884.088607 sender_body [996] start
>   884.093246 sender_body [1064] drop copy
>   885.090435 main_thread [1418] 45206353 pps (45289533 pkts in
> 1001840 usec)
>   886.091600 main_thread [1418] 45322792 pps (45375593 pkts in
> 1001165 usec)
>   887.092435 main_thread [1418] 45313992 pps (45351784 pkts in
> 1000834 usec)
>   888.094434 main_thread [1418] 45315765 pps (45406397 pkts in
> 1002000 usec)
>   889.095434 main_thread [1418] 45333218 pps (45378551 pkts in
> 1001000 usec)
>   890.097434 main_thread [1418] 45315247 pps (45405877 pkts in
> 1002000 usec)
>   891.099434 main_thread [1418] 45326515 pps (45417168 pkts in
> 1002000 usec)
>   892.101434 main_thread [1418] 45333039 pps (45423705 pkts in
> 1002000 usec)
>   893.103434 main_thread [1418] 45324105 pps (45414708 pkts in
> 1001999 usec)
>   894.105434 main_thread [1418] 45318042 pps (45408723 pkts in
> 1002001 usec)
>   895.106434 main_thread [1418] 45332430 pps (45377762 pkts in
> 1001000 usec)
>   896.107434 main_thread [1418] 45338072 pps (45383410 pkts in
> 1001000 usec)
>   ...
> 
>   Relnotes: Yes
>   Sponsored by: Chelsio Communications.
> 
> Added:
>   head/sys/dev/cxgbe/t4_netmap.c   (contents, props changed)
> Modified:
>   head/sys/conf/files
>   head/sys/dev/cxgbe/adapter.h
>   head/sys/dev/cxgbe/common/common.h
>   head/sys/dev/cxgbe/common/t4_hw.c
>   head/sys/dev/cxgbe/t4_main.c
>   head/sys/dev/cxgbe/t4_sge.c
>   head/sys/modules/cxgbe/if_cxgbe/Makefile
> 


___
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: r266757 - in head/sys: conf dev/cxgbe dev/cxgbe/common modules/cxgbe/if_cxgbe

2014-05-27 Thread Luigi Rizzo
On Tue, May 27, 2014 at 8:18 PM, Navdeep Parhar  wrote:

> Author: np
> Date: Tue May 27 18:18:41 2014
> New Revision: 266757
> URL: http://svnweb.freebsd.org/changeset/base/266757
>
> Log:
>   cxgbe(4): netmap support for Terminator 5 (T5) based 10G/40G cards.
>   Netmap gets its own hardware-assisted virtual interface and won't take
>   over or disrupt the "normal" interface in any way.  You can use both
>   simultaneously.
>
>   For kernels with DEV_NETMAP, cxgbe(4) carves out an ncxl interface
>   (note the 'n' prefix) in the hardware to accompany each cxl
>   interface.  These two ifnet's per port share the same wire but really
>   are separate interfaces in the hardware and software.  Each gets its own
>   L2 MAC addresses (unicast and multicast), MTU, checksum caps, etc.  You
>   should run netmap on the 'n' interfaces only, that's what they are for.
>
>   With this, pkt-gen is able to transmit > 45Mpps out of a single 40G port
>

​and just for the records, this is with 1 core in userland.
Very cool.

Do you have an easy way to check what kind of throughput
you get when the netmap interface has one hw queue ?

cheers
luigi

  of a T580 card.  2 port tx is at ~56Mpps total (28M + 28M) as of now.
>   Single port receive is at 33Mpps but this is very much a work in
>   progress.  I expect it to be closer to 40Mpps once done.  In any case
>   the current effort can already saturate multiple 10G ports of a T5 card
>   at the smallest legal packet size.  T4 gear is totally untested.
>
>   trantor:~# ./pkt-gen -i ncxl0 -f tx -D 00:07:43:ab:cd:ef
>   881.952141 main [1621] interface is ncxl0
>   881.952250 extract_ip_range [275] range is 10.0.0.1:0 to 10.0.0.1:0
>   881.952253 extract_ip_range [275] range is 10.1.0.1:0 to 10.1.0.1:0
>   881.962540 main [1804] mapped 334980KB at 0x801dff000
>   Sending on netmap:ncxl0: 4 queues, 1 threads and 1 cpus.
>   10.0.0.1 -> 10.1.0.1 (00:00:00:00:00:00 -> 00:07:43:ab:cd:ef)
>   881.962562 main [1882] Sending 512 packets every  0.0 s
>   881.962563 main [1884] Wait 2 secs for phy reset
>   884.088516 main [1886] Ready...
>   884.088535 nm_open [457] overriding ifname ncxl0 ringid 0x0 flags 0x1
>   884.088607 sender_body [996] start
>   884.093246 sender_body [1064] drop copy
>   885.090435 main_thread [1418] 45206353 pps (45289533 pkts in 1001840
> usec)
>   886.091600 main_thread [1418] 45322792 pps (45375593 pkts in 1001165
> usec)
>   887.092435 main_thread [1418] 45313992 pps (45351784 pkts in 1000834
> usec)
>   888.094434 main_thread [1418] 45315765 pps (45406397 pkts in 1002000
> usec)
>   889.095434 main_thread [1418] 45333218 pps (45378551 pkts in 1001000
> usec)
>   890.097434 main_thread [1418] 45315247 pps (45405877 pkts in 1002000
> usec)
>   891.099434 main_thread [1418] 45326515 pps (45417168 pkts in 1002000
> usec)
>   892.101434 main_thread [1418] 45333039 pps (45423705 pkts in 1002000
> usec)
>   893.103434 main_thread [1418] 45324105 pps (45414708 pkts in 1001999
> usec)
>   894.105434 main_thread [1418] 45318042 pps (45408723 pkts in 1002001
> usec)
>   895.106434 main_thread [1418] 45332430 pps (45377762 pkts in 1001000
> usec)
>   896.107434 main_thread [1418] 45338072 pps (45383410 pkts in 1001000
> usec)
>   ...
>
>   Relnotes: Yes
>   Sponsored by: Chelsio Communications.
>
> Added:
>   head/sys/dev/cxgbe/t4_netmap.c   (contents, props changed)
> Modified:
>   head/sys/conf/files
>   head/sys/dev/cxgbe/adapter.h
>   head/sys/dev/cxgbe/common/common.h
>   head/sys/dev/cxgbe/common/t4_hw.c
>   head/sys/dev/cxgbe/t4_main.c
>   head/sys/dev/cxgbe/t4_sge.c
>   head/sys/modules/cxgbe/if_cxgbe/Makefile
>
>
___
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: r266779 - in head/release/picobsd: floppy.tree/etc mfs_tree/etc

2014-05-27 Thread Luigi Rizzo
Author: luigi
Date: Wed May 28 00:30:32 2014
New Revision: 266779
URL: http://svnweb.freebsd.org/changeset/base/266779

Log:
  add '3wire' (no handshake lines) to gettytab and ttys so that after
  svn 264175 bhyve etc. work -- without that, /usr/bin/login would stop
  in getpass()
  
  MFC after:3 days

Modified:
  head/release/picobsd/floppy.tree/etc/ttys
  head/release/picobsd/mfs_tree/etc/gettytab

Modified: head/release/picobsd/floppy.tree/etc/ttys
==
--- head/release/picobsd/floppy.tree/etc/ttys   Tue May 27 23:57:22 2014
(r266778)
+++ head/release/picobsd/floppy.tree/etc/ttys   Wed May 28 00:30:32 2014
(r266779)
@@ -32,4 +32,4 @@ ttyp6 nonenetwork secure
 ttyp7  nonenetwork secure
 ttyp8  nonenetwork secure
 ttyp9  nonenetwork secure
-ttyu0   "/usr/libexec/getty std.9600"   dialup  on secure
+ttyu0   "/usr/libexec/getty 3wire"   dialup  on secure

Modified: head/release/picobsd/mfs_tree/etc/gettytab
==
--- head/release/picobsd/mfs_tree/etc/gettytab  Tue May 27 23:57:22 2014
(r266778)
+++ head/release/picobsd/mfs_tree/etc/gettytab  Wed May 28 00:30:32 2014
(r266779)
@@ -4,12 +4,15 @@
 default:\
:cb:ce:ck:lc:fd#1000:cl:im=\r\nPicoBSD (%h) (%t)\r\n\r\n:sp#1200:
 
-P|Pc|Pc console:\
+# 20140527 add nc (no carrier) to the pc console entry to fix
+# devices with no handshake after svn 264175 (this also affects bhyve)
+P|Pc|Pc console|3wire:\
+   :nc:\
:ht:np:sp#115200:
 
 # Fixed speed entries
 2|std.9600|9600-baud:\
-   :np:sp#9600:
+   :nc:np:sp#9600:
 g|std.19200|19200-baud:\
:np:sp#19200:
 std.38400|38400-baud:\
___
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: r266778 - head/sys/powerpc/powerpc

2014-05-27 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Tue May 27 23:57:22 2014
New Revision: 266778
URL: http://svnweb.freebsd.org/changeset/base/266778

Log:
  Repair nested signal handling on PowerPC. The signal trampoline code
  was not allocating space for the parameter save area in the stack frame.
  If the compiler chose to save the argument to the signal handler on the
  stack, it would overwrite the first 32 bits of the sigaction struct with
  it, corrupting it for a subsequent invocation.
  
  PR:   powerpc/183040
  MFC after:8 days

Modified:
  head/sys/powerpc/powerpc/sigcode32.S
  head/sys/powerpc/powerpc/sigcode64.S

Modified: head/sys/powerpc/powerpc/sigcode32.S
==
--- head/sys/powerpc/powerpc/sigcode32.STue May 27 23:39:28 2014
(r266777)
+++ head/sys/powerpc/powerpc/sigcode32.STue May 27 23:57:22 2014
(r266778)
@@ -45,9 +45,9 @@
  */
.globl  CNAME(sigcode32),CNAME(szsigcode32)
 CNAME(sigcode32):
-   addi1,1,-16 /* reserved space for callee */
+   addi1,1,-20 /* reserved space for callee */
blrl
-   addi3,1,16+SF_UC/* restore sp, and get &frame->sf_uc */
+   addi3,1,20+SF_UC/* restore sp, and get &frame->sf_uc */
li  0,SYS_sigreturn
sc  /* sigreturn(scp) */
li  0,SYS_exit

Modified: head/sys/powerpc/powerpc/sigcode64.S
==
--- head/sys/powerpc/powerpc/sigcode64.STue May 27 23:39:28 2014
(r266777)
+++ head/sys/powerpc/powerpc/sigcode64.STue May 27 23:57:22 2014
(r266778)
@@ -45,7 +45,7 @@
  */
.globl  CNAME(sigcode64),CNAME(szsigcode64)
 CNAME(sigcode64):
-   addi1,1,-48 /* reserved space for callee */
+   addi1,1,-112/* reserved space for callee */
mflr2   /* resolve function descriptor */
ld  0,0(2)  
ld  2,8(2)
@@ -53,7 +53,7 @@ CNAME(sigcode64):
 
blrl
 
-   addi3,1,48+SF_UC/* restore sp, and get &frame->sf_uc */
+   addi3,1,112+SF_UC   /* restore sp, and get &frame->sf_uc */
li  0,SYS_sigreturn
sc  /* sigreturn(scp) */
li  0,SYS_exit
___
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: r266777 - head/contrib/unbound/libunbound

2014-05-27 Thread Dag-Erling Smørgrav
Author: des
Date: Tue May 27 23:39:28 2014
New Revision: 266777
URL: http://svnweb.freebsd.org/changeset/base/266777

Log:
  Move libworker_event_done_cb() from libworker.h to worker.h.

Modified:
  head/contrib/unbound/libunbound/libworker.h
  head/contrib/unbound/libunbound/worker.h

Modified: head/contrib/unbound/libunbound/libworker.h
==
--- head/contrib/unbound/libunbound/libworker.h Tue May 27 23:05:12 2014
(r266776)
+++ head/contrib/unbound/libunbound/libworker.h Tue May 27 23:39:28 2014
(r266777)
@@ -136,10 +136,6 @@ void libworker_delete_event(struct libwo
 /** cleanup the cache to remove all rrset IDs from it, arg is libworker */
 void libworker_alloc_cleanup(void* arg);
 
-/** mesh callback with event results */
-void libworker_event_done_cb(void* arg, int rcode, struct sldns_buffer* buf, 
-   enum sec_status s, char* why_bogus);
-
 /** 
  * fill result from parsed message, on error fills servfail 
  * @param res: is clear at start, filled in at end.

Modified: head/contrib/unbound/libunbound/worker.h
==
--- head/contrib/unbound/libunbound/worker.hTue May 27 23:05:12 2014
(r266776)
+++ head/contrib/unbound/libunbound/worker.hTue May 27 23:39:28 2014
(r266777)
@@ -91,6 +91,10 @@ void libworker_fg_done_cb(void* arg, int
 void libworker_bg_done_cb(void* arg, int rcode, sldns_buffer* buf, 
enum sec_status s, char* why_bogus);
 
+/** mesh callback with event results */
+void libworker_event_done_cb(void* arg, int rcode, struct sldns_buffer* buf, 
+   enum sec_status s, char* why_bogus);
+
 /**
  * Worker signal handler function. User argument is the worker itself.
  * @param sig: signal number.
___
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: r266770 - head/sys/dev/iwn

2014-05-27 Thread Gavin Atkinson
On Tue, 27 May 2014, Adrian Chadd wrote:
> Sweet. Firmware? Is that included?

Firmware for these was committed some time ago, in r260552.

Gavin
___
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: r266776 - head/sys/dev/iwn

2014-05-27 Thread Gavin Atkinson
Author: gavin
Date: Tue May 27 23:05:12 2014
New Revision: 266776
URL: http://svnweb.freebsd.org/changeset/base/266776

Log:
  Remove debugging printf that crept in in r266770.
  
  Submitted by: adrian, nwhitehorn
  MFC after:2 weeks

Modified:
  head/sys/dev/iwn/if_iwn.c

Modified: head/sys/dev/iwn/if_iwn.c
==
--- head/sys/dev/iwn/if_iwn.c   Tue May 27 21:31:11 2014(r266775)
+++ head/sys/dev/iwn/if_iwn.c   Tue May 27 23:05:12 2014(r266776)
@@ -460,7 +460,7 @@ iwn_attach(device_t dev)
sc->hw_type = (IWN_READ(sc, IWN_HW_REV) >> IWN_HW_REV_TYPE_SHIFT)
& IWN_HW_REV_TYPE_MASK;
sc->subdevice_id = pci_get_subdevice(dev);
-printf("hw %d sdid %x\n", sc->hw_type, sc->subdevice_id);
+
/*
 * 4965 versus 5000 and later have different methods.
 * Let's set those up first.
___
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: r266770 - head/sys/dev/iwn

2014-05-27 Thread Adrian Chadd
Sweet. Firmware? Is that included?


-a


On 27 May 2014 15:33, Gavin Atkinson  wrote:
> Oops, you are correct. I shall remove the debugging printf it in an hour or
> so.
>
> As far as treating this card like a 2030, that is also exactly what Linux
> does.
>
> Thanks,
>
> Gavin
>
> On 27 May 2014 20:47, "Adrian Chadd"  wrote:
>>
>> woo!
>>
>> There's some debugging printf left in. Maybe turn it into
>> device_printf() and hide it behind bootverbose?
>>
>> Is this all the linux driver did? Are the 2030 parameters okay?
>>
>>
>> -a
>>
>>
>> On 27 May 2014 12:39, Gavin Atkinson  wrote:
>> > Author: gavin
>> > Date: Tue May 27 19:39:57 2014
>> > New Revision: 266770
>> > URL: http://svnweb.freebsd.org/changeset/base/266770
>> >
>> > Log:
>> >   Add support for the Intel Centrino Wireless-N 105 chipset.
>> >
>> >   MFC after:2 weeks
>> >   Relnotes: yes
>> >
>> > Modified:
>> >   head/sys/dev/iwn/if_iwn.c
>> >   head/sys/dev/iwn/if_iwn_devid.h
>> >
>> > Modified: head/sys/dev/iwn/if_iwn.c
>> >
>> > ==
>> > --- head/sys/dev/iwn/if_iwn.c   Tue May 27 19:37:18 2014
>> > (r266769)
>> > +++ head/sys/dev/iwn/if_iwn.c   Tue May 27 19:39:57 2014
>> > (r266770)
>> > @@ -109,6 +109,8 @@ static const struct iwn_ident iwn_ident_
>> > { 0x8086, IWN_DID_130_2, "Intel Centrino Wireless-N 130"
>> > },
>> > { 0x8086, IWN_DID_100_1, "Intel Centrino Wireless-N 100"
>> > },
>> > { 0x8086, IWN_DID_100_2, "Intel Centrino Wireless-N 100"
>> > },
>> > +   { 0x8086, IWN_DID_105_1, "Intel Centrino Wireless-N 105"
>> > },
>> > +   { 0x8086, IWN_DID_105_2, "Intel Centrino Wireless-N 105"
>> > },
>> > { 0x8086, IWN_DID_135_1, "Intel Centrino Wireless-N 135"
>> > },
>> > { 0x8086, IWN_DID_135_2, "Intel Centrino Wireless-N 135"
>> > },
>> > { 0x8086, IWN_DID_4965_1, "Intel Wireless WiFi Link 4965"
>> > },
>> > @@ -458,7 +460,7 @@ iwn_attach(device_t dev)
>> > sc->hw_type = (IWN_READ(sc, IWN_HW_REV) >>
>> > IWN_HW_REV_TYPE_SHIFT)
>> > & IWN_HW_REV_TYPE_MASK;
>> > sc->subdevice_id = pci_get_subdevice(dev);
>> > -
>> > +printf("hw %d sdid %x\n", sc->hw_type, sc->subdevice_id);
>> > /*
>> >  * 4965 versus 5000 and later have different methods.
>> >  * Let's set those up first.
>> > @@ -986,6 +988,31 @@ iwn_config_specific(struct iwn_softc *sc
>> > }
>> > break;
>> >
>> > +/* 105 Series */
>> > +/* XXX: This series will need adjustment for rate.
>> > + * see rx_with_siso_diversity in linux kernel
>> > + */
>> > +   case IWN_DID_105_1:
>> > +   case IWN_DID_105_2:
>> > +   switch(sc->subdevice_id) {
>> > +   case IWN_SDID_105_1:
>> > +   case IWN_SDID_105_2:
>> > +   case IWN_SDID_105_3:
>> > +   //iwl105_bgn_cfg
>> > +   case IWN_SDID_105_4:
>> > +   //iwl105_bgn_d_cfg
>> > +   sc->limits =
>> > &iwn2030_sensitivity_limits;
>> > +   sc->base_params = &iwn2000_base_params;
>> > +   sc->fwname = "iwn105fw";
>> > +   break;
>> > +   default:
>> > +   device_printf(sc->sc_dev, "adapter type
>> > id : 0x%04x sub id :"
>> > +   "0x%04x rev %d not supported
>> > (subdevice)\n", pid,
>> > +   sc->subdevice_id,sc->hw_type);
>> > +   return ENOTSUP;
>> > +   }
>> > +   break;
>> > +
>> >  /* 135 Series */
>> >  /* XXX: This series will need adjustment for rate.
>> >   * see rx_with_siso_diversity in linux kernel
>> >
>> > Modified: head/sys/dev/iwn/if_iwn_devid.h
>> >
>> > ==
>> > --- head/sys/dev/iwn/if_iwn_devid.h Tue May 27 19:37:18 2014
>> > (r266769)
>> > +++ head/sys/dev/iwn/if_iwn_devid.h Tue May 27 19:39:57 2014
>> > (r266770)
>> > @@ -228,6 +228,19 @@
>> >
>> >  /*
>> >   *
>> > --
>> > + * Device ID for 105 Series
>> > + *
>> > --
>> > + */
>> > +#defineIWN_DID_105_1   0x0894
>> > +#defineIWN_DID_105_2   0x0895
>> > +/* SubDevice ID */
>> > +#defineIWN_SDID_105_1  0x0022
>> > +#defineIWN_SDID_105_2  0x0222
>> > +#defineIWN_SDID_105_3  0x0422
>> > +#defineIWN_SDID_105_4  0x0822
>> > +
>> > +/*
>> > + *
>> > --
>> >   * Device ID for 135 Series
>> >   *
>> > --

Re: svn commit: r266770 - head/sys/dev/iwn

2014-05-27 Thread Gavin Atkinson
Oops, you are correct. I shall remove the debugging printf it in an hour or
so.

As far as treating this card like a 2030, that is also exactly what Linux
does.

Thanks,

Gavin
On 27 May 2014 20:47, "Adrian Chadd"  wrote:

> woo!
>
> There's some debugging printf left in. Maybe turn it into
> device_printf() and hide it behind bootverbose?
>
> Is this all the linux driver did? Are the 2030 parameters okay?
>
>
> -a
>
>
> On 27 May 2014 12:39, Gavin Atkinson  wrote:
> > Author: gavin
> > Date: Tue May 27 19:39:57 2014
> > New Revision: 266770
> > URL: http://svnweb.freebsd.org/changeset/base/266770
> >
> > Log:
> >   Add support for the Intel Centrino Wireless-N 105 chipset.
> >
> >   MFC after:2 weeks
> >   Relnotes: yes
> >
> > Modified:
> >   head/sys/dev/iwn/if_iwn.c
> >   head/sys/dev/iwn/if_iwn_devid.h
> >
> > Modified: head/sys/dev/iwn/if_iwn.c
> >
> ==
> > --- head/sys/dev/iwn/if_iwn.c   Tue May 27 19:37:18 2014(r266769)
> > +++ head/sys/dev/iwn/if_iwn.c   Tue May 27 19:39:57 2014(r266770)
> > @@ -109,6 +109,8 @@ static const struct iwn_ident iwn_ident_
> > { 0x8086, IWN_DID_130_2, "Intel Centrino Wireless-N 130"
>},
> > { 0x8086, IWN_DID_100_1, "Intel Centrino Wireless-N 100"
>},
> > { 0x8086, IWN_DID_100_2, "Intel Centrino Wireless-N 100"
>},
> > +   { 0x8086, IWN_DID_105_1, "Intel Centrino Wireless-N 105"
>},
> > +   { 0x8086, IWN_DID_105_2, "Intel Centrino Wireless-N 105"
>},
> > { 0x8086, IWN_DID_135_1, "Intel Centrino Wireless-N 135"
>},
> > { 0x8086, IWN_DID_135_2, "Intel Centrino Wireless-N 135"
>},
> > { 0x8086, IWN_DID_4965_1, "Intel Wireless WiFi Link 4965"
> },
> > @@ -458,7 +460,7 @@ iwn_attach(device_t dev)
> > sc->hw_type = (IWN_READ(sc, IWN_HW_REV) >> IWN_HW_REV_TYPE_SHIFT)
> > & IWN_HW_REV_TYPE_MASK;
> > sc->subdevice_id = pci_get_subdevice(dev);
> > -
> > +printf("hw %d sdid %x\n", sc->hw_type, sc->subdevice_id);
> > /*
> >  * 4965 versus 5000 and later have different methods.
> >  * Let's set those up first.
> > @@ -986,6 +988,31 @@ iwn_config_specific(struct iwn_softc *sc
> > }
> > break;
> >
> > +/* 105 Series */
> > +/* XXX: This series will need adjustment for rate.
> > + * see rx_with_siso_diversity in linux kernel
> > + */
> > +   case IWN_DID_105_1:
> > +   case IWN_DID_105_2:
> > +   switch(sc->subdevice_id) {
> > +   case IWN_SDID_105_1:
> > +   case IWN_SDID_105_2:
> > +   case IWN_SDID_105_3:
> > +   //iwl105_bgn_cfg
> > +   case IWN_SDID_105_4:
> > +   //iwl105_bgn_d_cfg
> > +   sc->limits = &iwn2030_sensitivity_limits;
> > +   sc->base_params = &iwn2000_base_params;
> > +   sc->fwname = "iwn105fw";
> > +   break;
> > +   default:
> > +   device_printf(sc->sc_dev, "adapter type
> id : 0x%04x sub id :"
> > +   "0x%04x rev %d not supported
> (subdevice)\n", pid,
> > +   sc->subdevice_id,sc->hw_type);
> > +   return ENOTSUP;
> > +   }
> > +   break;
> > +
> >  /* 135 Series */
> >  /* XXX: This series will need adjustment for rate.
> >   * see rx_with_siso_diversity in linux kernel
> >
> > Modified: head/sys/dev/iwn/if_iwn_devid.h
> >
> ==
> > --- head/sys/dev/iwn/if_iwn_devid.h Tue May 27 19:37:18 2014
>  (r266769)
> > +++ head/sys/dev/iwn/if_iwn_devid.h Tue May 27 19:39:57 2014
>  (r266770)
> > @@ -228,6 +228,19 @@
> >
> >  /*
> >   *
> --
> > + * Device ID for 105 Series
> > + *
> --
> > + */
> > +#defineIWN_DID_105_1   0x0894
> > +#defineIWN_DID_105_2   0x0895
> > +/* SubDevice ID */
> > +#defineIWN_SDID_105_1  0x0022
> > +#defineIWN_SDID_105_2  0x0222
> > +#defineIWN_SDID_105_3  0x0422
> > +#defineIWN_SDID_105_4  0x0822
> > +
> > +/*
> > + *
> --
> >   * Device ID for 135 Series
> >   *
> --
> >   */
> >
>
___
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...

svn commit: r266775 - head/sys/x86/x86

2014-05-27 Thread Scott Long
Author: scottl
Date: Tue May 27 21:31:11 2014
New Revision: 266775
URL: http://svnweb.freebsd.org/changeset/base/266775

Log:
  Eliminate the fake contig_dmamap and replace it with a new flag,
  BUS_DMA_KMEM_ALLOC.  They serve the same purpose, but using the flag
  means that the map can be NULL again, which in turn enables significant
  optimizations for the common case of no bouncing.
  
  Obtained from:Netflix, Inc.
  MFC after:3 days

Modified:
  head/sys/x86/x86/busdma_bounce.c

Modified: head/sys/x86/x86/busdma_bounce.c
==
--- head/sys/x86/x86/busdma_bounce.cTue May 27 20:45:15 2014
(r266774)
+++ head/sys/x86/x86/busdma_bounce.cTue May 27 21:31:11 2014
(r266775)
@@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$");
 enum {
BUS_DMA_COULD_BOUNCE= 0x01,
BUS_DMA_MIN_ALLOC_COMP  = 0x02,
+   BUS_DMA_KMEM_ALLOC  = 0x04,
 };
 
 struct bounce_zone;
@@ -125,7 +126,7 @@ struct bus_dmamap {
 
 static STAILQ_HEAD(, bus_dmamap) bounce_map_waitinglist;
 static STAILQ_HEAD(, bus_dmamap) bounce_map_callbacklist;
-static struct bus_dmamap nobounce_dmamap, contig_dmamap;
+static struct bus_dmamap nobounce_dmamap;
 
 static void init_bounce_pages(void *dummy);
 static int alloc_bounce_zone(bus_dma_tag_t dmat);
@@ -346,7 +347,7 @@ static int
 bounce_bus_dmamap_destroy(bus_dma_tag_t dmat, bus_dmamap_t map)
 {
 
-   if (map != NULL && map != &nobounce_dmamap && map != &contig_dmamap) {
+   if (map != NULL && map != &nobounce_dmamap) {
if (STAILQ_FIRST(&map->bpages) != NULL) {
CTR3(KTR_BUSDMA, "%s: tag %p error %d",
__func__, dmat, EBUSY);
@@ -420,13 +421,13 @@ bounce_bus_dmamem_alloc(bus_dma_tag_t dm
*vaddr = (void *)kmem_alloc_attr(kernel_arena,
dmat->common.maxsize, mflags, 0ul, dmat->common.lowaddr,
attr);
-   *mapp = &contig_dmamap;
+   dmat->bounce_flags |= BUS_DMA_KMEM_ALLOC;
} else {
*vaddr = (void *)kmem_alloc_contig(kernel_arena,
dmat->common.maxsize, mflags, 0ul, dmat->common.lowaddr,
dmat->common.alignment != 0 ? dmat->common.alignment : 1ul,
dmat->common.boundary, attr);
-   *mapp = &contig_dmamap;
+   dmat->bounce_flags |= BUS_DMA_KMEM_ALLOC;
}
if (*vaddr == NULL) {
CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d",
@@ -449,18 +450,18 @@ bounce_bus_dmamem_free(bus_dma_tag_t dma
 {
/*
 * dmamem does not need to be bounced, so the map should be
-* NULL if malloc() was used and contig_dmamap if
-* kmem_alloc_contig() was used.
+* NULL and the BUS_DMA_KMEM_ALLOC flag cleared if malloc()
+* was used and set if kmem_alloc_contig() was used.
 */
-   if (!(map == NULL || map == &contig_dmamap))
+   if (map != NULL)
panic("bus_dmamem_free: Invalid map freed\n");
-   if (map == NULL)
+   if ((dmat->bounce_flags & BUS_DMA_KMEM_ALLOC) == 0)
free(vaddr, M_DEVBUF);
else
kmem_free(kernel_arena, (vm_offset_t)vaddr,
dmat->common.maxsize);
CTR3(KTR_BUSDMA, "%s: tag %p flags 0x%x", __func__, dmat,
-   dmat->common.flags);
+   dmat->bounce_flags);
 }
 
 static void
@@ -612,7 +613,7 @@ bounce_bus_dmamap_load_phys(bus_dma_tag_
bus_addr_t curaddr;
int error;
 
-   if (map == NULL || map == &contig_dmamap)
+   if (map == NULL)
map = &nobounce_dmamap;
 
if (segs == NULL)
@@ -665,7 +666,7 @@ bounce_bus_dmamap_load_buffer(bus_dma_ta
vm_offset_t vaddr;
int error;
 
-   if (map == NULL || map == &contig_dmamap)
+   if (map == NULL)
map = &nobounce_dmamap;
 
if (segs == NULL)
@@ -976,7 +977,7 @@ add_bounce_page(bus_dma_tag_t dmat, bus_
struct bounce_page *bpage;
 
KASSERT(dmat->bounce_zone != NULL, ("no bounce zone in dma tag"));
-   KASSERT(map != NULL && map != &nobounce_dmamap && map != &contig_dmamap,
+   KASSERT(map != NULL && map != &nobounce_dmamap,
("add_bounce_page: bad map %p", map));
 
bz = dmat->bounce_zone;
___
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: r266774 - head/sbin/ifconfig

2014-05-27 Thread Allan Jude
Author: allanjude (doc committer)
Date: Tue May 27 20:45:15 2014
New Revision: 266774
URL: http://svnweb.freebsd.org/changeset/base/266774

Log:
  improve ifconfig(8) man page by describing special behaviour of -l ether
  
  PR:   docs/187644
  Submitted by: Andrew Merenbach (original patch)
  Approved by:  bcr (mentor)

Modified:
  head/sbin/ifconfig/ifconfig.8

Modified: head/sbin/ifconfig/ifconfig.8
==
--- head/sbin/ifconfig/ifconfig.8   Tue May 27 20:22:36 2014
(r266773)
+++ head/sbin/ifconfig/ifconfig.8   Tue May 27 20:45:15 2014
(r266774)
@@ -169,6 +169,18 @@ and
 .Dq lladdr
 are synonyms for
 .Dq link .
+When using the
+.Fl l
+flag, the
+.Dq ether
+address family has special meaning and is no longer synonymous with
+.Dq link
+or
+.Dq lladdr .
+Specifying
+.Fl l Dq ether
+will list only ethernet interfaces, excluding all other interface types,
+including the loopback interface.
 .It Ar dest_address
 Specify the address of the correspondent on the other end
 of a point to point link.
@@ -2554,6 +2566,11 @@ The
 .Fl l
 flag may be used to list all available interfaces on the system, with
 no other additional information.
+If an
+.Ar address_family
+is specified, only interfaces of that type will be listed.
+.Fl l Dq ether
+will list only ethernet adapters, excluding the loopback interface.
 Use of this flag is mutually exclusive
 with all other flags and commands, except for
 .Fl d
___
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: r266553 - head/release/scripts

2014-05-27 Thread Warner Losh

On May 27, 2014, at 1:40 PM, Tijl Coosemans  wrote:

> On Tue, 27 May 2014 07:18:06 -0600 Warner Losh wrote:
>> On May 27, 2014, at 1:36 AM, Tijl Coosemans  wrote:
>>> On Mon, 26 May 2014 16:31:21 -0600 Warner Losh wrote:
 On May 26, 2014, at 4:18 PM, Tijl Coosemans  wrote: 
> On Mon, 26 May 2014 09:53:57 -0600 Warner Losh wrote:
>> On May 26, 2014, at 8:39 AM, Nathan Whitehorn  
>> wrote:
>>> On 05/26/14 02:35, Tijl Coosemans wrote:
 I suppose you could replace the "x86" in the pkg scheme with 
 i386/amd64,
 but then you'd still be talking about i386:32, amd64:32 and amd64:64
 instead of x86:32, x86:x32 and x86:64.  
>> 
>> I suppose you could replace these by ?i386?, ?x32? (or ?amd64x32?) and
>> ?amd64? respectively.
> 
> So you're on an amd64 or mips64 system (as indicated by uname) but you
> want to use the 32-bit package if possible.  How does your script know
> about the magic "x32", "amd64x32" or "mipsn32" strings?  Wouldn't it be
> easier if you could just use "`uname -p`:32??
 
 Oh give me a break. You know it because you know you are building for
 mipsn32 because that?s what you?ve set MACHINE_ARCH or TARGET_ARCH to,
>>> 
>>> No, MACHINE_ARCH or TARGET_ARCH is "amd64" or "mips64".  You are building
>>> the 64-bit OS and then decide separately per package whether you want the
>>> ILP32 one or the LP64 one.
>> 
>> I think I understand why we?re talking past each other. This bit is wrong.
>> The  LP64 one has a MACHINE_ARCH of ?amd64? or ?mips64?. The ILP32 one will
>> have MACHINE_ARCH of ?i386? or ?mips?. The weird ones (ILP32 with 64-bit
>> registers) will have a different MACHINE_ARCH of ?x32? or ?mipsn32?.
>> Selection can be done on a case by case basis, but this will be validated
>> against the supported_abis sysctl. There?s no need to have different names
>> here, the current standard ones do just fine, are completely sufficient and
>> all inclusive. This is rather by definition, and your understanding of the
>> definition sounds flawed.
>> 
>> While we have limited support for building 32-bit binaries, it is to build
>> 32-bit binaries for a different MACHINE_ARCH. -m32 on amd64 creates i386
>> binaries, not amd64:32 binaries. -m32 on powerpc64 creates powerpc binaries,
>> not powerpc64:32 binaries. On mips, -mabi-n32 (I think the option is) is
>> required to create the mipsn32 binaries. In every single one of these cases,
>> there exists a MACHINE_ARCH that completely describes the binary.
> 
> amd64:32 is provided by the -mx32 compiler flag.

True, but not relevant.

>> So I?m still waiting for a use case that requires the new names. One has
>> not been articulated, and I don?t think one actually exists.
> 
> Imagine you've built a system with MACHINE_ARCH amd64 and one with
> MACHINE_ARCH mips64.  Now you want to populate these systems with a list
> of packages for which you wrote a script.  These systems each support 2
> ABIs: a native 64-bit one (amd64 and mips64) and a native 32-bit one (x32
> and mipsn32).  Both are native in the sense that they make full use of the
> instruction set.  This is not like i386 on amd64 or mips o32 on mips64
> because those are more like compat shims that operate under special
> (crippled) cpu modes that nobody uses unless they're stuck with old code.
> Both our ABIs on the other hand are native and equally valid and which one
> to use for a particular package depends entirely on the use case.  If your
> use case requires more than 4G of address space you'll have to use the
> 64-bit package, otherwise you can use the 32-bit package which, depending
> on how pointer heavy the code is, may give a performance benefit.  You
> make this choice for each of the packages in your list and add that
> information to your script.

Long hypothetical, but so what? In such a case, you’d pick one of two different 
MACHINE_ARCH values depending on the package. This this is a fairly atypical 
use case, it would not be unreasonable for the person wanting to do this to 
know the proper companion ABI. In both cases, you have the choice of two other 
values to use. Which one you use will depend on a variety of factors, and what 
might be right for one application may be wrong for others.

And in both cases, there’s actually two choices: for amd64, you’d have i386 and 
x32. Both of these are fine choices, and it would depend on the workload which 
one is better (i386 has better toolchain support and maturity, x32 offers some 
interesting theoretical wins, but doesn’t have the same maturity). Same with 
mips64, you’d have two choices as well. In both cases, you can’t just take 
uname/MACHINE_ARCH and slap :32 on the end.

> Now let's work with Nathan's patch which uses the following string to
> identify the pkg repository to fetch packages from:
> `uname -s`:`uname -r | cut -f 1 -d .`:`uname -p`
> 
> On our two systems that would be FreeBSD:11:amd64 and FreeBSD:11:mips64.
> Now if y

svn commit: r266773 - head/usr.bin/top

2014-05-27 Thread John Baldwin
Author: jhb
Date: Tue May 27 20:22:36 2014
New Revision: 266773
URL: http://svnweb.freebsd.org/changeset/base/266773

Log:
  Fix a couple of size_t != int warnings.

Modified:
  head/usr.bin/top/machine.c

Modified: head/usr.bin/top/machine.c
==
--- head/usr.bin/top/machine.c  Tue May 27 19:56:02 2014(r266772)
+++ head/usr.bin/top/machine.c  Tue May 27 20:22:36 2014(r266773)
@@ -916,7 +916,7 @@ format_next_process(caddr_t handle, char
argbuflen = cmdlen * 4;
argbuf = (char *)malloc(argbuflen + 1);
if (argbuf == NULL) {
-   warn("malloc(%d)", argbuflen + 1);
+   warn("malloc(%zd)", argbuflen + 1);
free(cmdbuf);
return NULL;
}
@@ -1023,7 +1023,7 @@ format_next_process(caddr_t handle, char
thr_buf[0] = '\0';
else
snprintf(thr_buf, sizeof(thr_buf), "%*d ",
-   sizeof(thr_buf) - 2, pp->ki_numthreads);
+   (int)(sizeof(thr_buf) - 2), pp->ki_numthreads);
 
snprintf(fmt, sizeof(fmt), proc_fmt,
pp->ki_pid,
___
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: r266765 - in head/sys/amd64/vmm: . intel

2014-05-27 Thread John Baldwin
On Tuesday, May 27, 2014 3:04:38 pm John Baldwin wrote:
> Author: jhb
> Date: Tue May 27 19:04:38 2014
> New Revision: 266765
> URL: http://svnweb.freebsd.org/changeset/base/266765
> 
> Log:
>   - Rework the XSAVE/XRSTOR emulation to only expose XCR0 features to the
> guest for which the rules regarding xsetbv emulation are known.  In
> particular future extensions like AVX-512 have interdependencies among
> feature bits that could allow a guest to trigger a GP# in the host with
> the current approach of allowing anything the host supports.
>   - Add proper checking of Intel MPX and AVX-512 XSAVE features in the
> xsetbv emulation and allow these features to be exposed to the guest if
> they are enabled in the host.
>   - Expose a subset of known-safe features from leaf 0 of the structured
> extended features to guests if they are supported on the host including
> RDFSBASE/RDGSBASE, BMI1/2, AVX2, AVX-512, HLE, ERMS, and RTM.  Aside
> from AVX-512, these features are all new instructions available for use
> in ring 3 with no additional hypervisor changes needed.
>   
>   Reviewed by:neel

Unfortunately there is no production silicon with either AVX-512 or MPX that
runs FreeBSD AFAIK, so I haven't been able to test that this works correctly
for those features.  Using plain AVX in a guest still works ok though.

-- 
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: r266772 - head/sys/dev/firewire

2014-05-27 Thread John Baldwin
Author: jhb
Date: Tue May 27 19:56:02 2014
New Revision: 266772
URL: http://svnweb.freebsd.org/changeset/base/266772

Log:
  Various cleanups and fixes:
  - Switch from timeout() to callout_*() for per-request timers.
  - Use device_find_child() in the identify routine.
  - Use device_printf() instead of passing device_get_nameunit() to
printf().
  - Expand the SBP_LOCK coverage simplifying the locking.
  - Uninline STAILQ_FOREACH_SAFE().
  
  Tested by:sbruno

Modified:
  head/sys/dev/firewire/sbp.c

Modified: head/sys/dev/firewire/sbp.c
==
--- head/sys/dev/firewire/sbp.c Tue May 27 19:46:11 2014(r266771)
+++ head/sys/dev/firewire/sbp.c Tue May 27 19:56:02 2014(r266772)
@@ -177,7 +177,7 @@ struct sbp_ocb {
struct sbp_dev  *sdev;
int flags; /* XXX should be removed */
bus_dmamap_tdmamap;
-   struct callout_handle timeout_ch;
+   struct callout  timer;
 };
 
 #define OCB_ACT_MGM 0
@@ -250,8 +250,9 @@ struct sbp_softc {
int flags;
struct mtx mtx;
 };
-#define SBP_LOCK(sbp) mtx_lock(&(sbp)->mtx)
-#define SBP_UNLOCK(sbp) mtx_unlock(&(sbp)->mtx)
+#defineSBP_LOCK(sbp)   mtx_lock(&(sbp)->mtx)
+#defineSBP_UNLOCK(sbp) mtx_unlock(&(sbp)->mtx)
+#defineSBP_LOCK_ASSERT(sbp)mtx_assert(&(sbp)->mtx, MA_OWNED)
 
 static void sbp_post_explore (void *);
 static void sbp_recv (struct fw_xfer *);
@@ -265,7 +266,6 @@ static void sbp_execute_ocb (void *,  bu
 static void sbp_free_ocb (struct sbp_dev *, struct sbp_ocb *);
 static void sbp_abort_ocb (struct sbp_ocb *, int);
 static void sbp_abort_all_ocbs (struct sbp_dev *, int);
-static struct fw_xfer * sbp_write_cmd_locked (struct sbp_dev *, int, int);
 static struct fw_xfer * sbp_write_cmd (struct sbp_dev *, int, int);
 static struct sbp_ocb * sbp_get_ocb (struct sbp_dev *);
 static struct sbp_ocb * sbp_enqueue_ocb (struct sbp_dev *, struct sbp_ocb *);
@@ -337,7 +337,8 @@ SBP_DEBUG(0)
printf("sbp_identify\n");
 END_DEBUG
 
-   BUS_ADD_CHILD(parent, 0, "sbp", device_get_unit(parent));
+   if (device_find_child(parent, "sbp", -1) == NULL)
+   BUS_ADD_CHILD(parent, 0, "sbp", -1);
 }
 
 /*
@@ -346,17 +347,11 @@ END_DEBUG
 static int
 sbp_probe(device_t dev)
 {
-   device_t pa;
 
 SBP_DEBUG(0)
printf("sbp_probe\n");
 END_DEBUG
 
-   pa = device_get_parent(dev);
-   if(device_get_unit(dev) != device_get_unit(pa)){
-   return(ENXIO);
-   }
-
device_set_desc(dev, "SBP-2/SCSI over FireWire");
 
 #if 0
@@ -460,6 +455,7 @@ sbp_alloc_lun(struct sbp_target *target)
int maxlun, lun, i;
 
sbp = target->sbp;
+   SBP_LOCK_ASSERT(sbp);
crom_init_context(&cc, target->fwdev->csrrom);
/* XXX shoud parse appropriate unit directories only */
maxlun = -1;
@@ -476,8 +472,7 @@ END_DEBUG
crom_next(&cc);
}
if (maxlun < 0)
-   printf("%s:%d no LUN found\n",
-   device_get_nameunit(target->sbp->fd.dev),
+   device_printf(target->sbp->fd.dev, "%d no LUN found\n",
target->target_id);
 
maxlun ++;
@@ -548,7 +543,7 @@ END_DEBUG
sdev->lun_id = lun;
sdev->target = target;
STAILQ_INIT(&sdev->ocbs);
-   CALLOUT_INIT(&sdev->login_callout);
+   callout_init_mtx(&sdev->login_callout, &sbp->mtx, 0);
sdev->status = SBP_DEV_RESET;
new = 1;
snprintf(sdev->bustgtlun, 32, "%s:%d:%d",
@@ -592,7 +587,7 @@ END_DEBUG
/* XXX */
goto next;
}
-   callout_handle_init(&ocb->timeout_ch);
+   callout_init_mtx(&ocb->timer, &sbp->mtx, 0);
sbp_free_ocb(sdev, ocb);
}
 next:
@@ -648,8 +643,8 @@ END_DEBUG
STAILQ_INIT(&target->xferlist);
target->n_xfer = 0;
STAILQ_INIT(&target->mgm_ocb_queue);
-   CALLOUT_INIT(&target->mgm_ocb_timeout);
-   CALLOUT_INIT(&target->scan_callout);
+   callout_init_mtx(&target->mgm_ocb_timeout, &sbp->mtx, 0);
+   callout_init_mtx(&target->scan_callout, &sbp->mtx, 0);
 
target->luns = NULL;
target->num_lun = 0;
@@ -693,6 +688,7 @@ static void
 sbp_login_callout(void *arg)
 {
struct sbp_dev *sdev = (struct sbp_dev *)arg;
+   SBP_LOCK_ASSERT(sdev->target->sbp);
sbp_mgm_orb(sdev, ORB_FUN_LGI, NULL);
 }
 
@@ -737,6 +733,7 @@ SBP_DEBUG(1)
 END_DEBUG
 
sbp = target->sbp;
+   SBP_LOCK_ASSERT(sbp);
sbp_alloc_lun(target);
 
/* XXX untimeout mgm_ocb and dequeue */
@@ -746,10 +743,8 @@ END_DEBUG
continue;
if (alive && (sde

Re: svn commit: r266770 - head/sys/dev/iwn

2014-05-27 Thread Adrian Chadd
woo!

There's some debugging printf left in. Maybe turn it into
device_printf() and hide it behind bootverbose?

Is this all the linux driver did? Are the 2030 parameters okay?


-a


On 27 May 2014 12:39, Gavin Atkinson  wrote:
> Author: gavin
> Date: Tue May 27 19:39:57 2014
> New Revision: 266770
> URL: http://svnweb.freebsd.org/changeset/base/266770
>
> Log:
>   Add support for the Intel Centrino Wireless-N 105 chipset.
>
>   MFC after:2 weeks
>   Relnotes: yes
>
> Modified:
>   head/sys/dev/iwn/if_iwn.c
>   head/sys/dev/iwn/if_iwn_devid.h
>
> Modified: head/sys/dev/iwn/if_iwn.c
> ==
> --- head/sys/dev/iwn/if_iwn.c   Tue May 27 19:37:18 2014(r266769)
> +++ head/sys/dev/iwn/if_iwn.c   Tue May 27 19:39:57 2014(r266770)
> @@ -109,6 +109,8 @@ static const struct iwn_ident iwn_ident_
> { 0x8086, IWN_DID_130_2, "Intel Centrino Wireless-N 130"  
>   },
> { 0x8086, IWN_DID_100_1, "Intel Centrino Wireless-N 100"  
>   },
> { 0x8086, IWN_DID_100_2, "Intel Centrino Wireless-N 100"  
>   },
> +   { 0x8086, IWN_DID_105_1, "Intel Centrino Wireless-N 105"  
>   },
> +   { 0x8086, IWN_DID_105_2, "Intel Centrino Wireless-N 105"  
>   },
> { 0x8086, IWN_DID_135_1, "Intel Centrino Wireless-N 135"  
>   },
> { 0x8086, IWN_DID_135_2, "Intel Centrino Wireless-N 135"  
>   },
> { 0x8086, IWN_DID_4965_1, "Intel Wireless WiFi Link 4965" 
>   },
> @@ -458,7 +460,7 @@ iwn_attach(device_t dev)
> sc->hw_type = (IWN_READ(sc, IWN_HW_REV) >> IWN_HW_REV_TYPE_SHIFT)
> & IWN_HW_REV_TYPE_MASK;
> sc->subdevice_id = pci_get_subdevice(dev);
> -
> +printf("hw %d sdid %x\n", sc->hw_type, sc->subdevice_id);
> /*
>  * 4965 versus 5000 and later have different methods.
>  * Let's set those up first.
> @@ -986,6 +988,31 @@ iwn_config_specific(struct iwn_softc *sc
> }
> break;
>
> +/* 105 Series */
> +/* XXX: This series will need adjustment for rate.
> + * see rx_with_siso_diversity in linux kernel
> + */
> +   case IWN_DID_105_1:
> +   case IWN_DID_105_2:
> +   switch(sc->subdevice_id) {
> +   case IWN_SDID_105_1:
> +   case IWN_SDID_105_2:
> +   case IWN_SDID_105_3:
> +   //iwl105_bgn_cfg
> +   case IWN_SDID_105_4:
> +   //iwl105_bgn_d_cfg
> +   sc->limits = &iwn2030_sensitivity_limits;
> +   sc->base_params = &iwn2000_base_params;
> +   sc->fwname = "iwn105fw";
> +   break;
> +   default:
> +   device_printf(sc->sc_dev, "adapter type id : 
> 0x%04x sub id :"
> +   "0x%04x rev %d not supported 
> (subdevice)\n", pid,
> +   sc->subdevice_id,sc->hw_type);
> +   return ENOTSUP;
> +   }
> +   break;
> +
>  /* 135 Series */
>  /* XXX: This series will need adjustment for rate.
>   * see rx_with_siso_diversity in linux kernel
>
> Modified: head/sys/dev/iwn/if_iwn_devid.h
> ==
> --- head/sys/dev/iwn/if_iwn_devid.h Tue May 27 19:37:18 2014
> (r266769)
> +++ head/sys/dev/iwn/if_iwn_devid.h Tue May 27 19:39:57 2014
> (r266770)
> @@ -228,6 +228,19 @@
>
>  /*
>   * --
> + * Device ID for 105 Series
> + * --
> + */
> +#defineIWN_DID_105_1   0x0894
> +#defineIWN_DID_105_2   0x0895
> +/* SubDevice ID */
> +#defineIWN_SDID_105_1  0x0022
> +#defineIWN_SDID_105_2  0x0222
> +#defineIWN_SDID_105_3  0x0422
> +#defineIWN_SDID_105_4  0x0822
> +
> +/*
> + * --
>   * Device ID for 135 Series
>   * --
>   */
>
___
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: r266771 - in head: cddl/contrib/opensolaris/cmd/zfs sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs...

2014-05-27 Thread Xin LI
Author: delphij
Date: Tue May 27 19:46:11 2014
New Revision: 266771
URL: http://svnweb.freebsd.org/changeset/base/266771

Log:
  MFV r266766:
  
  Add a new zfs property, "redundant_metadata" which can have values "all" or
  "most".  The default will be "all", which is the current behavior.  When set
  to all, ZFS stores an extra copy of all metadata.  If a single on-disk block
  is corrupt, at worst a single block of user data (which is recordsize bytes
  long) can be lost.
  
  Setting to "most" will cause us to only store 1 copy of level-1 indirect
  blocks of user data files.  This can improve performance of random writes,
  because less metadata has to be written.  In practice,  at worst about
  100 blocks (of recordsize bytes each) of user data can be lost if a single
  on-disk block is corrupt.
  
  The exact behavior of which metadata blocks are stored redundantly may change
  in future releases.
  
  Illumos issue: 3835 zfs need not store 2 copies of all metadata
  
  MFC after:2 weeks

Modified:
  head/cddl/contrib/opensolaris/cmd/zfs/zfs.8
  head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h
  head/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h
Directory Properties:
  head/cddl/contrib/opensolaris/   (props changed)
  head/sys/cddl/contrib/opensolaris/   (props changed)

Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8
==
--- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Tue May 27 19:39:57 2014
(r266770)
+++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Tue May 27 19:46:11 2014
(r266771)
@@ -18,7 +18,7 @@
 .\" information: Portions Copyright [] [name of copyright owner]
 .\"
 .\" Copyright (c) 2010, Sun Microsystems, Inc. All Rights Reserved.
-.\" Copyright (c) 2013 by Delphix. All rights reserved.
+.\" Copyright (c) 2014 by Delphix. All rights reserved.
 .\" Copyright (c) 2011, Pawel Jakub Dawidek 
 .\" Copyright (c) 2012, Glen Barber 
 .\" Copyright (c) 2012, Bryan Drewery 
@@ -30,7 +30,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 23, 2014
+.Dd May 27, 2014
 .Dt ZFS 8
 .Os
 .Sh NAME
@@ -1193,6 +1193,53 @@ affects only files created afterward; ex
 .Pp
 This property can also be referred to by its shortened column name,
 .Sy recsize .
+.It Sy redundant_metadata Ns = Ns Cm all | most
+Controls what types of metadata are stored redundantly.
+ZFS stores an extra copy of metadata, so that if a single block is corrupted,
+the amount of user data lost is limited.
+This extra copy is in addition to any redundancy provided at the pool level
+.Pq e.g. by mirroring or RAID-Z ,
+and is in addition to an extra copy specified by the
+.Sy copies
+property
+.Pq up to a total of 3 copies .
+For example if the pool is mirrored,
+.Cm copies Ns = Ns Ar 2 ,
+and
+.Cm redundant_metadata Ns = Ns Ar most ,
+then ZFS
+stores 6 copies of most metadata, and 4 copies of data and some
+metadata.
+.Pp
+When set to
+.Cm all ,
+ZFS stores an extra copy of all metadata.
+If a
+single on-disk block is corrupt, at worst a single block of user data
+.Po which is
+.Cm recordsize
+bytes long
+can be lost.
+.Pc
+.Pp
+When set to
+.Cm most ,
+ZFS stores an extra copy of most types of
+metadata.
+This can improve performance of random writes, because less
+metadata must be written.
+In practice, at worst about 100 blocks
+.Po of
+.Cm recordsize
+bytes each
+.Pc
+of user data can be lost if a single
+on-disk block is corrupt.
+The exact behavior of which metadata blocks
+are stored redundantly may change in future releases.
+.Pp
+The default value is
+.Cm all .
 .It Sy refquota Ns = Ns Ar size | Cm none
 Limits the amount of space a dataset can consume. This property enforces a hard
 limit on the amount of space used. This hard limit does not include space used

Modified: head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c
==
--- head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Tue May 27 
19:39:57 2014(r266770)
+++ head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Tue May 27 
19:46:11 2014(r266771)
@@ -20,7 +20,7 @@
  */
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2013 by Delphix. All rights reserved.
+ * Copyright (c) 2011, 2014 by Delphix. All rights reserved.
  * Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
  * Copyright (c) 2013, Joyent, Inc. All rights reserved.
  */
@@ -206,7 +206,18 @@ zfs_prop_init(void)
{ NULL }
};
 
+   static zprop_index_t redundant_metadata_table[] = {
+   { "all",ZFS_REDUNDANT_METADATA_ALL },
+   

Re: svn commit: r266553 - head/release/scripts

2014-05-27 Thread Tijl Coosemans
On Tue, 27 May 2014 07:18:06 -0600 Warner Losh wrote:
> On May 27, 2014, at 1:36 AM, Tijl Coosemans  wrote:
>> On Mon, 26 May 2014 16:31:21 -0600 Warner Losh wrote:
>>> On May 26, 2014, at 4:18 PM, Tijl Coosemans  wrote: 
 On Mon, 26 May 2014 09:53:57 -0600 Warner Losh wrote:
> On May 26, 2014, at 8:39 AM, Nathan Whitehorn  
> wrote:
>> On 05/26/14 02:35, Tijl Coosemans wrote:
>>> I suppose you could replace the "x86" in the pkg scheme with i386/amd64,
>>> but then you'd still be talking about i386:32, amd64:32 and amd64:64
>>> instead of x86:32, x86:x32 and x86:64.  
> 
> I suppose you could replace these by ?i386?, ?x32? (or ?amd64x32?) and
> ?amd64? respectively.
 
 So you're on an amd64 or mips64 system (as indicated by uname) but you
 want to use the 32-bit package if possible.  How does your script know
 about the magic "x32", "amd64x32" or "mipsn32" strings?  Wouldn't it be
 easier if you could just use "`uname -p`:32??
>>> 
>>> Oh give me a break. You know it because you know you are building for
>>> mipsn32 because that?s what you?ve set MACHINE_ARCH or TARGET_ARCH to,
>> 
>> No, MACHINE_ARCH or TARGET_ARCH is "amd64" or "mips64".  You are building
>> the 64-bit OS and then decide separately per package whether you want the
>> ILP32 one or the LP64 one.
> 
> I think I understand why we?re talking past each other. This bit is wrong.
> The  LP64 one has a MACHINE_ARCH of ?amd64? or ?mips64?. The ILP32 one will
> have MACHINE_ARCH of ?i386? or ?mips?. The weird ones (ILP32 with 64-bit
> registers) will have a different MACHINE_ARCH of ?x32? or ?mipsn32?.
> Selection can be done on a case by case basis, but this will be validated
> against the supported_abis sysctl. There?s no need to have different names
> here, the current standard ones do just fine, are completely sufficient and
> all inclusive. This is rather by definition, and your understanding of the
> definition sounds flawed.
> 
> While we have limited support for building 32-bit binaries, it is to build
> 32-bit binaries for a different MACHINE_ARCH. -m32 on amd64 creates i386
> binaries, not amd64:32 binaries. -m32 on powerpc64 creates powerpc binaries,
> not powerpc64:32 binaries. On mips, -mabi-n32 (I think the option is) is
> required to create the mipsn32 binaries. In every single one of these cases,
> there exists a MACHINE_ARCH that completely describes the binary.

amd64:32 is provided by the -mx32 compiler flag.

> So I?m still waiting for a use case that requires the new names. One has
> not been articulated, and I don?t think one actually exists.

Imagine you've built a system with MACHINE_ARCH amd64 and one with
MACHINE_ARCH mips64.  Now you want to populate these systems with a list
of packages for which you wrote a script.  These systems each support 2
ABIs: a native 64-bit one (amd64 and mips64) and a native 32-bit one (x32
and mipsn32).  Both are native in the sense that they make full use of the
instruction set.  This is not like i386 on amd64 or mips o32 on mips64
because those are more like compat shims that operate under special
(crippled) cpu modes that nobody uses unless they're stuck with old code.
Both our ABIs on the other hand are native and equally valid and which one
to use for a particular package depends entirely on the use case.  If your
use case requires more than 4G of address space you'll have to use the
64-bit package, otherwise you can use the 32-bit package which, depending
on how pointer heavy the code is, may give a performance benefit.  You
make this choice for each of the packages in your list and add that
information to your script.

Now let's work with Nathan's patch which uses the following string to
identify the pkg repository to fetch packages from:
`uname -s`:`uname -r | cut -f 1 -d .`:`uname -p`

On our two systems that would be FreeBSD:11:amd64 and FreeBSD:11:mips64.
Now if your script has to install the 32-bit version of a package how
can it go from those two strings to FreeBSD:11:x32 or FreeBSD:11:mipsn32
without a lookup table?  I say, you can more easily indicate whether you
want the 32-bit or 64-bit package by appending :32 or :64 to the original
strings, so FreeBSD:11:amd64:32 and FreeBSD:11:mips64:32.

Like I said in a reply to Nathan's patch, pkg could default to :32 or :64
for every arch so it can be left out in many cases.  FreeBSD:11:i386
would then be equivalent to FreeBSD:11:i386:32, FreeBSD:11:amd64 to
FreeBSD:11:amd64:64, etc.

This also does not preclude the existence of a mipsn32 MACHINE_ARCH in
case you want to build a pure mipsn32 system (including the kernel), but
I wonder how many people would use that if it is possible to have a
mips64 system run n32 binaries.  I don't think many people would run a
pure x32 system (with x32 kernel) so I don't see the need to have an
"x32" value for MACHINE_ARCH (or TARGET_ARCH).
___
svn-src-head@freebsd.org mailing list
http://lists.fre

svn commit: r266770 - head/sys/dev/iwn

2014-05-27 Thread Gavin Atkinson
Author: gavin
Date: Tue May 27 19:39:57 2014
New Revision: 266770
URL: http://svnweb.freebsd.org/changeset/base/266770

Log:
  Add support for the Intel Centrino Wireless-N 105 chipset.
  
  MFC after:2 weeks
  Relnotes: yes

Modified:
  head/sys/dev/iwn/if_iwn.c
  head/sys/dev/iwn/if_iwn_devid.h

Modified: head/sys/dev/iwn/if_iwn.c
==
--- head/sys/dev/iwn/if_iwn.c   Tue May 27 19:37:18 2014(r266769)
+++ head/sys/dev/iwn/if_iwn.c   Tue May 27 19:39:57 2014(r266770)
@@ -109,6 +109,8 @@ static const struct iwn_ident iwn_ident_
{ 0x8086, IWN_DID_130_2, "Intel Centrino Wireless-N 130"
},
{ 0x8086, IWN_DID_100_1, "Intel Centrino Wireless-N 100"
},
{ 0x8086, IWN_DID_100_2, "Intel Centrino Wireless-N 100"
},
+   { 0x8086, IWN_DID_105_1, "Intel Centrino Wireless-N 105"
},
+   { 0x8086, IWN_DID_105_2, "Intel Centrino Wireless-N 105"
},
{ 0x8086, IWN_DID_135_1, "Intel Centrino Wireless-N 135"
},
{ 0x8086, IWN_DID_135_2, "Intel Centrino Wireless-N 135"
},
{ 0x8086, IWN_DID_4965_1, "Intel Wireless WiFi Link 4965"   
},
@@ -458,7 +460,7 @@ iwn_attach(device_t dev)
sc->hw_type = (IWN_READ(sc, IWN_HW_REV) >> IWN_HW_REV_TYPE_SHIFT)
& IWN_HW_REV_TYPE_MASK;
sc->subdevice_id = pci_get_subdevice(dev);
-
+printf("hw %d sdid %x\n", sc->hw_type, sc->subdevice_id);
/*
 * 4965 versus 5000 and later have different methods.
 * Let's set those up first.
@@ -986,6 +988,31 @@ iwn_config_specific(struct iwn_softc *sc
}
break;
 
+/* 105 Series */
+/* XXX: This series will need adjustment for rate.
+ * see rx_with_siso_diversity in linux kernel
+ */
+   case IWN_DID_105_1:
+   case IWN_DID_105_2:
+   switch(sc->subdevice_id) {
+   case IWN_SDID_105_1:
+   case IWN_SDID_105_2:
+   case IWN_SDID_105_3:
+   //iwl105_bgn_cfg
+   case IWN_SDID_105_4:
+   //iwl105_bgn_d_cfg
+   sc->limits = &iwn2030_sensitivity_limits;
+   sc->base_params = &iwn2000_base_params;
+   sc->fwname = "iwn105fw";
+   break;
+   default:
+   device_printf(sc->sc_dev, "adapter type id : 
0x%04x sub id :"
+   "0x%04x rev %d not supported 
(subdevice)\n", pid,
+   sc->subdevice_id,sc->hw_type);
+   return ENOTSUP;
+   }
+   break;
+
 /* 135 Series */
 /* XXX: This series will need adjustment for rate.
  * see rx_with_siso_diversity in linux kernel

Modified: head/sys/dev/iwn/if_iwn_devid.h
==
--- head/sys/dev/iwn/if_iwn_devid.h Tue May 27 19:37:18 2014
(r266769)
+++ head/sys/dev/iwn/if_iwn_devid.h Tue May 27 19:39:57 2014
(r266770)
@@ -228,6 +228,19 @@
 
 /*
  * --
+ * Device ID for 105 Series
+ * --
+ */
+#defineIWN_DID_105_1   0x0894
+#defineIWN_DID_105_2   0x0895
+/* SubDevice ID */
+#defineIWN_SDID_105_1  0x0022
+#defineIWN_SDID_105_2  0x0222
+#defineIWN_SDID_105_3  0x0422
+#defineIWN_SDID_105_4  0x0822
+
+/*
+ * --
  * Device ID for 135 Series
  * --
  */
___
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: r266768 - head/sys/cddl/contrib/opensolaris

2014-05-27 Thread Xin LI
Author: delphij
Date: Tue May 27 19:15:01 2014
New Revision: 266768
URL: http://svnweb.freebsd.org/changeset/base/266768

Log:
  Note r266764 as merged (was committed as r265458).

Modified:
Directory Properties:
  head/sys/cddl/contrib/opensolaris/   (props changed)
___
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: r266767 - head/sys/cddl/contrib/opensolaris

2014-05-27 Thread Xin LI
Author: delphij
Date: Tue May 27 19:11:58 2014
New Revision: 266767
URL: http://svnweb.freebsd.org/changeset/base/266767

Log:
  Dummy merge r266763.  The Illumos change is not applicable to FreeBSD
  as we solved it differently when importing LZ4 support.

Modified:
Directory Properties:
  head/sys/cddl/contrib/opensolaris/   (props changed)
___
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: r266765 - in head/sys/amd64/vmm: . intel

2014-05-27 Thread John Baldwin
Author: jhb
Date: Tue May 27 19:04:38 2014
New Revision: 266765
URL: http://svnweb.freebsd.org/changeset/base/266765

Log:
  - Rework the XSAVE/XRSTOR emulation to only expose XCR0 features to the
guest for which the rules regarding xsetbv emulation are known.  In
particular future extensions like AVX-512 have interdependencies among
feature bits that could allow a guest to trigger a GP# in the host with
the current approach of allowing anything the host supports.
  - Add proper checking of Intel MPX and AVX-512 XSAVE features in the
xsetbv emulation and allow these features to be exposed to the guest if
they are enabled in the host.
  - Expose a subset of known-safe features from leaf 0 of the structured
extended features to guests if they are supported on the host including
RDFSBASE/RDGSBASE, BMI1/2, AVX2, AVX-512, HLE, ERMS, and RTM.  Aside
from AVX-512, these features are all new instructions available for use
in ring 3 with no additional hypervisor changes needed.
  
  Reviewed by:  neel

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

Modified: head/sys/amd64/vmm/intel/vmx.c
==
--- head/sys/amd64/vmm/intel/vmx.c  Tue May 27 19:02:25 2014
(r266764)
+++ head/sys/amd64/vmm/intel/vmx.c  Tue May 27 19:04:38 2014
(r266765)
@@ -1380,8 +1380,30 @@ vmx_emulate_xsetbv(struct vmx *vmx, int 
return (HANDLED);
}
 
-   if ((xcrval & (XFEATURE_ENABLED_AVX | XFEATURE_ENABLED_SSE)) ==
-   XFEATURE_ENABLED_AVX) {
+   /* AVX (YMM_Hi128) requires SSE. */
+   if (xcrval & XFEATURE_ENABLED_AVX &&
+   (xcrval & XFEATURE_AVX) != XFEATURE_AVX) {
+   vm_inject_gp(vmx->vm, vcpu);
+   return (HANDLED);
+   }
+
+   /*
+* AVX512 requires base AVX (YMM_Hi128) as well as OpMask,
+* ZMM_Hi256, and Hi16_ZMM.
+*/
+   if (xcrval & XFEATURE_AVX512 &&
+   (xcrval & (XFEATURE_AVX512 | XFEATURE_AVX)) !=
+   (XFEATURE_AVX512 | XFEATURE_AVX)) {
+   vm_inject_gp(vmx->vm, vcpu);
+   return (HANDLED);
+   }
+
+   /*
+* Intel MPX requires both bound register state flags to be
+* set.
+*/
+   if (((xcrval & XFEATURE_ENABLED_BNDREGS) != 0) !=
+   ((xcrval & XFEATURE_ENABLED_BNDCSR) != 0)) {
vm_inject_gp(vmx->vm, vcpu);
return (HANDLED);
}

Modified: head/sys/amd64/vmm/vmm_host.c
==
--- head/sys/amd64/vmm/vmm_host.c   Tue May 27 19:02:25 2014
(r266764)
+++ head/sys/amd64/vmm/vmm_host.c   Tue May 27 19:04:38 2014
(r266765)
@@ -66,11 +66,16 @@ vmm_host_state_init(void)
 * XSAVE.  Only permit a guest to use XSAVE features supported
 * by the host.  This ensures that the FPU state used by the
 * guest is always a subset of the saved guest FPU state.
+*
+* In addition, only permit known XSAVE features where the
+* rules for which features depend on other features is known
+* to properly emulate xsetbv.
 */
if (vmm_host_cr4 & CR4_XSAVE) {
vmm_xsave_limits.xsave_enabled = 1;
vmm_host_xcr0 = rxcr(0);
-   vmm_xsave_limits.xcr0_allowed = vmm_host_xcr0;
+   vmm_xsave_limits.xcr0_allowed = vmm_host_xcr0 &
+   (XFEATURE_AVX | XFEATURE_MPX | XFEATURE_AVX512);
 
cpuid_count(0xd, 0x0, regs);
vmm_xsave_limits.xsave_max_size = regs[1];

Modified: head/sys/amd64/vmm/x86.c
==
--- head/sys/amd64/vmm/x86.cTue May 27 19:02:25 2014(r266764)
+++ head/sys/amd64/vmm/x86.cTue May 27 19:04:38 2014(r266765)
@@ -241,6 +241,26 @@ x86_emulate_cpuid(struct vm *vm, int vcp
 
/* leaf 0 */
if (*ecx == 0) {
+   cpuid_count(*eax, *ecx, regs);
+
+   /* Only leaf 0 is supported */
+   regs[0] = 0;
+
+   /*
+* Expose known-safe features.
+*/
+   regs[1] &= (CPUID_STDEXT_FSGSBASE |
+   CPUID_STDEXT_BMI1 | CPUID_STDEXT_HLE |
+   CPUID_STDEXT_AVX2 | CPUID_STDEXT_BMI2 |
+   CPUID_STDEXT_ERMS | CPUID_STDEXT_RTM |
+   CPUID_STDEXT_AVX512F |
+   CPUID_STDEXT_AVX512PF |
+   CPUID_STDEXT_AVX512ER |
+   CPUID_STDEXT_AVX512CD);
+ 

svn commit: r266760 - head/contrib/bmake

2014-05-27 Thread Simon J. Gerraty
Author: sjg
Date: Tue May 27 18:39:13 2014
New Revision: 266760
URL: http://svnweb.freebsd.org/changeset/base/266760

Log:
  Portmgr no longer need the UL hack.
  
  Reviewed by: obrien

Modified:
  head/contrib/bmake/var.c

Modified: head/contrib/bmake/var.c
==
--- head/contrib/bmake/var.cTue May 27 18:27:51 2014(r266759)
+++ head/contrib/bmake/var.cTue May 27 18:39:13 2014(r266760)
@@ -141,17 +141,6 @@ __RCSID("$NetBSD: var.c,v 1.184 2013/09/
 
 extern int makelevel;
 /*
- * XXX transition hack for FreeBSD ports.
- * bsd.port.mk can set .MAKE.FreeBSD_UL=yes
- * to cause us to treat :[LU] as aliases for :t[lu]
- * To be reverted when ports converts to :t[lu] (when 8.3 is EOL)
- */
-#define MAKE_FREEBSD_UL ".MAKE.FreeBSD_UL"
-#ifdef MAKE_FREEBSD_UL
-static int FreeBSD_UL = FALSE;
-#endif
-
-/*
  * This lets us tell if we have replaced the original environ
  * (which we cannot free).
  */
@@ -990,12 +979,6 @@ Var_Set(const char *name, const char *va
 
Var_Append(MAKEOVERRIDES, name, VAR_GLOBAL);
 }
-   
-#ifdef MAKE_FREEBSD_UL
-if (strcmp(MAKE_FREEBSD_UL, name) == 0) {
-   FreeBSD_UL = getBoolean(MAKE_FREEBSD_UL, FALSE);
-}
-#endif
 
 
  out:
@@ -2689,24 +2672,8 @@ ApplyModifiers(char *nstr, const char *t
free(loop.str);
break;
}
-   case 'U':
-#ifdef MAKE_FREEBSD_UL
-   if (FreeBSD_UL) {
-   int nc = tstr[1];
-
-   /* we have to be careful, since :U is used internally */
-   if (nc == ':' || nc == endc) {
-   char *dp = bmake_strdup(nstr);
-   for (newStr = dp; *dp; dp++)
-   *dp = toupper((unsigned char)*dp);
-   cp = tstr + 1;
-   termc = *cp;
-   break;  /* yes inside the conditional */
-   }
-   /* FALLTHROUGH */
-   }
-#endif
case 'D':
+   case 'U':
{
Buffer  buf;/* Buffer for patterns */
int wantit; /* want data in buffer */
@@ -2766,17 +2733,6 @@ ApplyModifiers(char *nstr, const char *t
break;
}
case 'L':
-#ifdef MAKE_FREEBSD_UL
-   if (FreeBSD_UL) {
-   char *dp = bmake_strdup(nstr);
-   for (newStr = dp; *dp; dp++)
-   *dp = tolower((unsigned char)*dp);
-   cp = tstr + 1;
-   termc = *cp;
-   break;
-   }
-   /* FALLTHROUGH */
-#endif
{
if ((v->flags & VAR_JUNK) != 0)
v->flags |= VAR_KEEP;
___
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: r266757 - in head/sys: conf dev/cxgbe dev/cxgbe/common modules/cxgbe/if_cxgbe

2014-05-27 Thread Navdeep Parhar
Author: np
Date: Tue May 27 18:18:41 2014
New Revision: 266757
URL: http://svnweb.freebsd.org/changeset/base/266757

Log:
  cxgbe(4): netmap support for Terminator 5 (T5) based 10G/40G cards.
  Netmap gets its own hardware-assisted virtual interface and won't take
  over or disrupt the "normal" interface in any way.  You can use both
  simultaneously.
  
  For kernels with DEV_NETMAP, cxgbe(4) carves out an ncxl interface
  (note the 'n' prefix) in the hardware to accompany each cxl
  interface.  These two ifnet's per port share the same wire but really
  are separate interfaces in the hardware and software.  Each gets its own
  L2 MAC addresses (unicast and multicast), MTU, checksum caps, etc.  You
  should run netmap on the 'n' interfaces only, that's what they are for.
  
  With this, pkt-gen is able to transmit > 45Mpps out of a single 40G port
  of a T580 card.  2 port tx is at ~56Mpps total (28M + 28M) as of now.
  Single port receive is at 33Mpps but this is very much a work in
  progress.  I expect it to be closer to 40Mpps once done.  In any case
  the current effort can already saturate multiple 10G ports of a T5 card
  at the smallest legal packet size.  T4 gear is totally untested.
  
  trantor:~# ./pkt-gen -i ncxl0 -f tx -D 00:07:43:ab:cd:ef
  881.952141 main [1621] interface is ncxl0
  881.952250 extract_ip_range [275] range is 10.0.0.1:0 to 10.0.0.1:0
  881.952253 extract_ip_range [275] range is 10.1.0.1:0 to 10.1.0.1:0
  881.962540 main [1804] mapped 334980KB at 0x801dff000
  Sending on netmap:ncxl0: 4 queues, 1 threads and 1 cpus.
  10.0.0.1 -> 10.1.0.1 (00:00:00:00:00:00 -> 00:07:43:ab:cd:ef)
  881.962562 main [1882] Sending 512 packets every  0.0 s
  881.962563 main [1884] Wait 2 secs for phy reset
  884.088516 main [1886] Ready...
  884.088535 nm_open [457] overriding ifname ncxl0 ringid 0x0 flags 0x1
  884.088607 sender_body [996] start
  884.093246 sender_body [1064] drop copy
  885.090435 main_thread [1418] 45206353 pps (45289533 pkts in 1001840 usec)
  886.091600 main_thread [1418] 45322792 pps (45375593 pkts in 1001165 usec)
  887.092435 main_thread [1418] 45313992 pps (45351784 pkts in 1000834 usec)
  888.094434 main_thread [1418] 45315765 pps (45406397 pkts in 1002000 usec)
  889.095434 main_thread [1418] 45333218 pps (45378551 pkts in 1001000 usec)
  890.097434 main_thread [1418] 45315247 pps (45405877 pkts in 1002000 usec)
  891.099434 main_thread [1418] 45326515 pps (45417168 pkts in 1002000 usec)
  892.101434 main_thread [1418] 45333039 pps (45423705 pkts in 1002000 usec)
  893.103434 main_thread [1418] 45324105 pps (45414708 pkts in 1001999 usec)
  894.105434 main_thread [1418] 45318042 pps (45408723 pkts in 1002001 usec)
  895.106434 main_thread [1418] 45332430 pps (45377762 pkts in 1001000 usec)
  896.107434 main_thread [1418] 45338072 pps (45383410 pkts in 1001000 usec)
  ...
  
  Relnotes: Yes
  Sponsored by: Chelsio Communications.

Added:
  head/sys/dev/cxgbe/t4_netmap.c   (contents, props changed)
Modified:
  head/sys/conf/files
  head/sys/dev/cxgbe/adapter.h
  head/sys/dev/cxgbe/common/common.h
  head/sys/dev/cxgbe/common/t4_hw.c
  head/sys/dev/cxgbe/t4_main.c
  head/sys/dev/cxgbe/t4_sge.c
  head/sys/modules/cxgbe/if_cxgbe/Makefile

Modified: head/sys/conf/files
==
--- head/sys/conf/files Tue May 27 16:30:54 2014(r266756)
+++ head/sys/conf/files Tue May 27 18:18:41 2014(r266757)
@@ -1127,6 +1127,8 @@ dev/cxgb/cxgb_t3fw.c  optional cxgb cxgb
compile-with "${NORMAL_C} -I$S/dev/cxgb"
 dev/cxgbe/t4_main.coptional cxgbe pci \
compile-with "${NORMAL_C} -I$S/dev/cxgbe"
+dev/cxgbe/t4_netmap.c  optional cxgbe pci \
+   compile-with "${NORMAL_C} -I$S/dev/cxgbe"
 dev/cxgbe/t4_sge.c optional cxgbe pci \
compile-with "${NORMAL_C} -I$S/dev/cxgbe"
 dev/cxgbe/t4_l2t.c optional cxgbe pci \

Modified: head/sys/dev/cxgbe/adapter.h
==
--- head/sys/dev/cxgbe/adapter.hTue May 27 16:30:54 2014
(r266756)
+++ head/sys/dev/cxgbe/adapter.hTue May 27 18:18:41 2014
(r266757)
@@ -54,6 +54,7 @@
 #include 
 
 #include "offload.h"
+#include "common/t4_msg.h"
 #include "firmware/t4fw_interface.h"
 
 MALLOC_DECLARE(M_CXGBE);
@@ -131,6 +132,7 @@ enum {
RX_IQ_ESIZE = 64,   /* At least 64 so CPL_RX_PKT will fit */
 
EQ_ESIZE = 64,  /* All egress queues use this entry size */
+   SGE_MAX_WR_NDESC = SGE_MAX_WR_LEN / EQ_ESIZE, /* max WR size in desc */
 
RX_FL_ESIZE = EQ_ESIZE, /* 8 64bit addresses */
 #if MJUMPAGESIZE != MCLBYTES
@@ -155,6 +157,17 @@ enum {
 };
 
 enum {
+   XGMAC_MTU   = (1 << 0),
+   XGMAC_PROMISC   = (1 << 1),
+   XGMAC_ALLMULTI  = (1 << 2),
+   XGMAC_VLANEX= (1 << 3),
+   XGMAC_UCADDR= (1 << 4),
+   XGMAC_MCADDRS   = (1 

svn commit: r266756 - head/share/mk

2014-05-27 Thread Warner Losh
Author: imp
Date: Tue May 27 16:30:54 2014
New Revision: 266756
URL: http://svnweb.freebsd.org/changeset/base/266756

Log:
  Better documentation for why KERBEROS and OPENSSH are here, and where
  to look for all the other options that used to be here (well, in
  bsd.own.mk)
  
  Suggested by: des@

Modified:
  head/share/mk/bsd.opts.mk
  head/share/mk/bsd.own.mk

Modified: head/share/mk/bsd.opts.mk
==
--- head/share/mk/bsd.opts.mk   Tue May 27 16:17:25 2014(r266755)
+++ head/share/mk/bsd.opts.mk   Tue May 27 16:30:54 2014(r266756)
@@ -40,8 +40,13 @@ :
 # that haven't been converted over.
 #
 
-# Only these options are used by bsd.*.mk. Most seem legit, except maybe
-# OPENSSH.
+# Only these options are used by bsd.*.mk. KERBEROS and OPENSSH are
+# unforutnately needed to support statically linking the entire
+# tree. su(1) wouldn't link since it depends on PAM which depends on
+# ssh libraries when building with OPENSSH, and likewise for KERBEROS.
+
+# All other variables used to build /usr/src live in src.opts.mk
+# and variables from both files are documented in src.conf(5).
 
 __DEFAULT_YES_OPTIONS = \
 ASSERT_DEBUG \

Modified: head/share/mk/bsd.own.mk
==
--- head/share/mk/bsd.own.mkTue May 27 16:17:25 2014(r266755)
+++ head/share/mk/bsd.own.mkTue May 27 16:30:54 2014(r266756)
@@ -122,7 +122,7 @@
 .if !target()
 :
 
-.include 
+.include  # options now here or src.opts.mk
 
 .if !defined(_WITHOUT_SRCCONF)
 
___
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: r266753 - head/share/man/man5

2014-05-27 Thread Glen Barber
Author: gjb
Date: Tue May 27 15:55:26 2014
New Revision: 266753
URL: http://svnweb.freebsd.org/changeset/base/266753

Log:
  Regen after r266752.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/share/man/man5/src.conf.5

Modified: head/share/man/man5/src.conf.5
==
--- head/share/man/man5/src.conf.5  Tue May 27 15:52:27 2014
(r266752)
+++ head/share/man/man5/src.conf.5  Tue May 27 15:55:26 2014
(r266753)
@@ -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 May 15, 2014
+.Dd May 27, 2014
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -125,7 +125,7 @@ Set to not build audit support into syst
 Set to not build
 .Xr authpf 8 .
 .It Va WITHOUT_BINUTILS
-.\" from FreeBSD: head/tools/build/options/WITHOUT_BINUTILS 264660 2014-04-18 
17:03:58Z imp
+.\" from FreeBSD: head/tools/build/options/WITHOUT_BINUTILS 266158 2014-05-15 
16:51:45Z brooks
 Set to not build or install binutils (as, c++-filt, gconv,
 ld, nm, objcopy, objdump, readelf, size and strip) as part
 of the normal system build.
@@ -363,10 +363,9 @@ Set to not build the Webster dictionary 
 .\" from FreeBSD: head/tools/build/options/WITHOUT_DMAGENT 262335 2014-02-22 
13:05:23Z bapt
 Set to not build dma Mail Transport Agent
 .It Va WITHOUT_DOCCOMPRESS
-.\" from FreeBSD: head/tools/build/options/WITHOUT_DOCCOMPRESS 265838 
2014-05-10 16:38:54Z imp
+.\" from FreeBSD: head/tools/build/options/WITHOUT_DOCCOMPRESS 266752 
2014-05-27 15:52:27Z gjb
 Set to not to install compressed system documentation.
 Only the uncompressed version will be installed.
-
 .It Va WITHOUT_DYNAMICROOT
 .\" from FreeBSD: head/tools/build/options/WITHOUT_DYNAMICROOT 156932 
2006-03-21 07:50:50Z ru
 Set this if you do not want to link
@@ -395,11 +394,10 @@ This includes the device tree compiler (
 Set to not build or install programs
 for operating floppy disk driver.
 .It Va WITH_FMAKE
-.\" from FreeBSD: head/tools/build/options/WITH_FMAKE 265828 2014-05-10 
16:37:39Z imp
+.\" from FreeBSD: head/tools/build/options/WITH_FMAKE 266752 2014-05-27 
15:52:27Z gjb
 Causes the old FreeBSD 
 .Xr make 1
 program to be built and installed as fmake.
-
 .It Va WITHOUT_FMTREE
 .\" from FreeBSD: head/tools/build/options/WITHOUT_FMTREE 261299 2014-01-30 
21:37:43Z brooks
 Set to not build and install
@@ -484,10 +482,9 @@ This is the default on platforms where g
 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.
 .It Va WITHOUT_GNU_GREP_COMPAT
-.\" from FreeBSD: head/tools/build/options/WITHOUT_GNU_GREP_COMPAT 265826 
2014-05-10 16:37:28Z imp
+.\" from FreeBSD: head/tools/build/options/WITHOUT_GNU_GREP_COMPAT 266752 
2014-05-27 15:52:27Z gjb
 Set this option to omit the gnu extentions to grep from being included in 
 BSD grep.
-
 .It Va WITHOUT_GNU_SUPPORT
 .\" from FreeBSD: head/tools/build/options/WITHOUT_GNU_SUPPORT 156932 
2006-03-21 07:50:50Z ru
 Set to build some programs without optional GNU support.
@@ -739,11 +736,9 @@ When set, the following options are also
 is set explicitly)
 .El
 .It Va WITHOUT_MANCOMPRESS
-.\" from FreeBSD: head/tools/build/options/WITHOUT_MANCOMPRESS 265838 
2014-05-10 16:38:54Z imp
+.\" from FreeBSD: head/tools/build/options/WITHOUT_MANCOMPRESS 266752 
2014-05-27 15:52:27Z gjb
 Set to not to install compressed man pages.
 Only the uncompressed versions will be installed.
-
-
 .It Va WITHOUT_MAN_UTILS
 .\" from FreeBSD: head/tools/build/options/WITHOUT_MAN_UTILS 208322 2010-05-20 
00:07:21Z jkim
 Set to not build utilities for manual pages,
___
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: r266752 - head/tools/build/options

2014-05-27 Thread Glen Barber
Author: gjb
Date: Tue May 27 15:52:27 2014
New Revision: 266752
URL: http://svnweb.freebsd.org/changeset/base/266752

Log:
  Remove empty lines that cause mdoc warnings.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/tools/build/options/WITHOUT_DOCCOMPRESS
  head/tools/build/options/WITHOUT_GNU_GREP_COMPAT
  head/tools/build/options/WITHOUT_MANCOMPRESS
  head/tools/build/options/WITH_FMAKE

Modified: head/tools/build/options/WITHOUT_DOCCOMPRESS
==
--- head/tools/build/options/WITHOUT_DOCCOMPRESSTue May 27 15:30:24 
2014(r266751)
+++ head/tools/build/options/WITHOUT_DOCCOMPRESSTue May 27 15:52:27 
2014(r266752)
@@ -1,4 +1,3 @@
 .\" $FreeBSD$
 Set to not to install compressed system documentation.
 Only the uncompressed version will be installed.
-

Modified: head/tools/build/options/WITHOUT_GNU_GREP_COMPAT
==
--- head/tools/build/options/WITHOUT_GNU_GREP_COMPATTue May 27 15:30:24 
2014(r266751)
+++ head/tools/build/options/WITHOUT_GNU_GREP_COMPATTue May 27 15:52:27 
2014(r266752)
@@ -1,4 +1,3 @@
 .\" $FreeBSD$
 Set this option to omit the gnu extentions to grep from being included in 
 BSD grep.
-

Modified: head/tools/build/options/WITHOUT_MANCOMPRESS
==
--- head/tools/build/options/WITHOUT_MANCOMPRESSTue May 27 15:30:24 
2014(r266751)
+++ head/tools/build/options/WITHOUT_MANCOMPRESSTue May 27 15:52:27 
2014(r266752)
@@ -1,5 +1,3 @@
 .\" $FreeBSD$
 Set to not to install compressed man pages.
 Only the uncompressed versions will be installed.
-
-

Modified: head/tools/build/options/WITH_FMAKE
==
--- head/tools/build/options/WITH_FMAKE Tue May 27 15:30:24 2014
(r266751)
+++ head/tools/build/options/WITH_FMAKE Tue May 27 15:52:27 2014
(r266752)
@@ -2,4 +2,3 @@
 Causes the old FreeBSD 
 .Xr make 1
 program to be built and installed as fmake.
-
___
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: r266746 - head/sys/x86/x86

2014-05-27 Thread Scott Long
Author: scottl
Date: Tue May 27 14:18:57 2014
New Revision: 266746
URL: http://svnweb.freebsd.org/changeset/base/266746

Log:
  Now that there are separate back-end implementations of busdma, the bounce
  implementation shouldn't steal flags from the common front-end.
  Move those flags to the back-end.
  
  Obtained from:  Netflix, Inc.
  MFC after:  3 days

Modified:
  head/sys/x86/x86/busdma_bounce.c

Modified: head/sys/x86/x86/busdma_bounce.c
==
--- head/sys/x86/x86/busdma_bounce.cTue May 27 14:06:23 2014
(r266745)
+++ head/sys/x86/x86/busdma_bounce.cTue May 27 14:18:57 2014
(r266746)
@@ -58,16 +58,20 @@ __FBSDID("$FreeBSD$");
 #else
 #define MAX_BPAGES 8192
 #endif
-#define BUS_DMA_COULD_BOUNCE   BUS_DMA_BUS3
-#define BUS_DMA_MIN_ALLOC_COMP BUS_DMA_BUS4
+
+enum {
+   BUS_DMA_COULD_BOUNCE= 0x01,
+   BUS_DMA_MIN_ALLOC_COMP  = 0x02,
+};
 
 struct bounce_zone;
 
 struct bus_dma_tag {
struct bus_dma_tag_common common;
-   int   map_count;
-   bus_dma_segment_t *segments;
-   struct bounce_zone *bounce_zone;
+   int map_count;
+   int bounce_flags;
+   bus_dma_segment_t   *segments;
+   struct bounce_zone  *bounce_zone;
 };
 
 struct bounce_page {
@@ -173,14 +177,14 @@ bounce_bus_dma_tag_create(bus_dma_tag_t 
newtag->segments = NULL;
 
if (parent != NULL && ((newtag->common.filter != NULL) ||
-   ((parent->common.flags & BUS_DMA_COULD_BOUNCE) != 0)))
-   newtag->common.flags |= BUS_DMA_COULD_BOUNCE;
+   ((parent->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0)))
+   newtag->bounce_flags |= BUS_DMA_COULD_BOUNCE;
 
if (newtag->common.lowaddr < ptoa((vm_paddr_t)Maxmem) ||
newtag->common.alignment > 1)
-   newtag->common.flags |= BUS_DMA_COULD_BOUNCE;
+   newtag->bounce_flags |= BUS_DMA_COULD_BOUNCE;
 
-   if (((newtag->common.flags & BUS_DMA_COULD_BOUNCE) != 0) &&
+   if (((newtag->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0) &&
(flags & BUS_DMA_ALLOCNOW) != 0) {
struct bounce_zone *bz;
 
@@ -201,7 +205,7 @@ bounce_bus_dma_tag_create(bus_dma_tag_t 
error = ENOMEM;
}
/* Performed initial allocation */
-   newtag->common.flags |= BUS_DMA_MIN_ALLOC_COMP;
+   newtag->bounce_flags |= BUS_DMA_MIN_ALLOC_COMP;
} else
error = 0;

@@ -279,7 +283,7 @@ bounce_bus_dmamap_create(bus_dma_tag_t d
 * exclusion region, a data alignment that is stricter than 1, and/or
 * an active address boundary.
 */
-   if (dmat->common.flags & BUS_DMA_COULD_BOUNCE) {
+   if (dmat->bounce_flags & BUS_DMA_COULD_BOUNCE) {
/* Must bounce */
if (dmat->bounce_zone == NULL) {
if ((error = alloc_bounce_zone(dmat)) != 0)
@@ -307,17 +311,17 @@ bounce_bus_dmamap_create(bus_dma_tag_t d
else
maxpages = MIN(MAX_BPAGES, Maxmem -
atop(dmat->common.lowaddr));
-   if ((dmat->common.flags & BUS_DMA_MIN_ALLOC_COMP) == 0 ||
+   if ((dmat->bounce_flags & BUS_DMA_MIN_ALLOC_COMP) == 0 ||
(bz->map_count > 0 && bz->total_bpages < maxpages)) {
pages = MAX(atop(dmat->common.maxsize), 1);
pages = MIN(maxpages - bz->total_bpages, pages);
pages = MAX(pages, 1);
if (alloc_bounce_pages(dmat, pages) < pages)
error = ENOMEM;
-   if ((dmat->common.flags & BUS_DMA_MIN_ALLOC_COMP)
+   if ((dmat->bounce_flags & BUS_DMA_MIN_ALLOC_COMP)
== 0) {
if (error == 0) {
-   dmat->common.flags |=
+   dmat->bounce_flags |=
BUS_DMA_MIN_ALLOC_COMP;
}
} else
@@ -614,7 +618,7 @@ bounce_bus_dmamap_load_phys(bus_dma_tag_
if (segs == NULL)
segs = dmat->segments;
 
-   if ((dmat->common.flags & BUS_DMA_COULD_BOUNCE) != 0) {
+   if ((dmat->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0) {
_bus_dmamap_count_phys(dmat, map, buf, buflen, flags);
if (map->pagesneeded != 0) {
error = _bus_dmamap_reserve_pages(dmat, map, flags);
@@ -626,7 +630,7 @@ bounce_bus_dmamap_load_phys(bus_dma_tag_
while (buflen > 0) {
curaddr = buf;
sgsize = MIN(buflen, dmat->common.maxsegsz);
-   if (((dmat->common.flags & BUS_DMA_COULD_BOUNCE) != 0) &&
+   

svn commit: r266745 - head/sys/x86/x86

2014-05-27 Thread Scott Long
Author: scottl
Date: Tue May 27 14:06:23 2014
New Revision: 266745
URL: http://svnweb.freebsd.org/changeset/base/266745

Log:
  Revert r266481.  It was based on faulty analysis of the problem.  A correct
  fix is forthcoming.
  
  Obtained from:Netflix, Inc.

Modified:
  head/sys/x86/x86/busdma_bounce.c

Modified: head/sys/x86/x86/busdma_bounce.c
==
--- head/sys/x86/x86/busdma_bounce.cTue May 27 13:35:31 2014
(r266744)
+++ head/sys/x86/x86/busdma_bounce.cTue May 27 14:06:23 2014
(r266745)
@@ -172,35 +172,12 @@ bounce_bus_dma_tag_create(bus_dma_tag_t 
newtag->map_count = 0;
newtag->segments = NULL;
 
-   /*
-* Bouncing might be needed if there's a filter.
-* XXX Filters are likely broken as there's no way to
-* guarantee that bounce pages will also satisfy the
-* filter requirement.
-*/
if (parent != NULL && ((newtag->common.filter != NULL) ||
((parent->common.flags & BUS_DMA_COULD_BOUNCE) != 0)))
newtag->common.flags |= BUS_DMA_COULD_BOUNCE;
 
-   /*
-* Bouncing might be needed if there's an upper memory
-* restriction.
-*/
-   if (newtag->common.lowaddr < ptoa((vm_paddr_t)Maxmem))
-   newtag->common.flags |= BUS_DMA_COULD_BOUNCE;
-
-   /*
-* Bouncing might be needed if there's an alignment
-* restriction that can't be satisfied by breaking up
-* the segment.
-* XXX Need to consider non-natural alignment.
-* XXX Static allocations that tie to bus_dmamem_alloc()
-* will likely pass this test and be penalized with
-* the COULD_BOUNCE flag.  Should probably have
-* bus_dmamem_alloc() clear this flag.
-*/
-   if ((newtag->common.nsegments <= 1) &&
-   (newtag->common.alignment > 1))
+   if (newtag->common.lowaddr < ptoa((vm_paddr_t)Maxmem) ||
+   newtag->common.alignment > 1)
newtag->common.flags |= BUS_DMA_COULD_BOUNCE;
 
if (((newtag->common.flags & BUS_DMA_COULD_BOUNCE) != 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"


Re: svn commit: r266743 - head/sys/modules/geom

2014-05-27 Thread Andrey V. Elsukov
On 27.05.2014 17:50, Nikolai Lifanov wrote:
>>   Disconnect the following geom classes from the kernel modules build:
>>   BSD, FOX, MBR, PC98, SUNLABEL and VOL_FFS. They all have a modern
>>   replacement. Also it is still possible build them manually.
>>   
>>   Discussed with:geom
>>
>> Modified:
>>   head/sys/modules/geom/Makefile
>>
> 
> What about buggy UEFI firmware? I am writing this from a laptop running
> FreeBSD that will absolutely not boot in CSM mode from a GPT-partitioned
> disk. There is plenty of buggy hardware like this "out there". Could you
> reconnect MBR and BSD partitioning schemes until UEFI loader is
> connected to release builds (.iso media) please?

MBR and BSD partitioning schemes are supported by GEOM_PART class, why
do you need these modules? Do you have problems with geom_part_mbr and
geom_part_bsd?

-- 
WBR, Andrey V. Elsukov
___
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: r266743 - head/sys/modules/geom

2014-05-27 Thread Nikolai Lifanov
On 05/27/14 06:21, Andrey V. Elsukov wrote:
> Author: ae
> Date: Tue May 27 10:21:49 2014
> New Revision: 266743
> URL: http://svnweb.freebsd.org/changeset/base/266743
> 
> Log:
>   Disconnect the following geom classes from the kernel modules build:
>   BSD, FOX, MBR, PC98, SUNLABEL and VOL_FFS. They all have a modern
>   replacement. Also it is still possible build them manually.
>   
>   Discussed with: geom
> 
> Modified:
>   head/sys/modules/geom/Makefile
> 

What about buggy UEFI firmware? I am writing this from a laptop running
FreeBSD that will absolutely not boot in CSM mode from a GPT-partitioned
disk. There is plenty of buggy hardware like this "out there". Could you
reconnect MBR and BSD partitioning schemes until UEFI loader is
connected to release builds (.iso media) please?

- Nikolai Lifanov

___
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: r266744 - head/sys/dev/uart

2014-05-27 Thread Sean Bruno
Author: sbruno
Date: Tue May 27 13:35:31 2014
New Revision: 266744
URL: http://svnweb.freebsd.org/changeset/base/266744

Log:
  Add PCI ID for AMT based serial interface found on the Lenovo T61.
  
  uart2:  port 0x1830-0x1837
mem 0xfe024000-0xfe024fff irq 17 at device 3.3 on pci0
  uart2: console (115200,n,8,1)
  
  Tested as tty and serial console.  Seems "fine"

Modified:
  head/sys/dev/uart/uart_bus_pci.c

Modified: head/sys/dev/uart/uart_bus_pci.c
==
--- head/sys/dev/uart/uart_bus_pci.cTue May 27 10:21:49 2014
(r266743)
+++ head/sys/dev/uart/uart_bus_pci.cTue May 27 13:35:31 2014
(r266744)
@@ -118,6 +118,7 @@ static const struct pci_id pci_ns8250_id
8 * DEFAULT_RCLK },
 { 0x8086, 0x1c3d, 0x, 0, "Intel AMT - KT Controller", 0x10 },
 { 0x8086, 0x1d3d, 0x, 0, "Intel C600/X79 Series Chipset KT Controller", 
0x10 },
+{ 0x8086, 0x2a07, 0x, 0, "Intel AMT - PM965/GM965 KT Controller", 0x10 },
 { 0x8086, 0x2e17, 0x, 0, "4 Series Chipset Serial KT Controller", 0x10 },
 { 0x8086, 0x3b67, 0x, 0, "5 Series/3400 Series Chipset KT Controller",
0x10 },
___
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: r266553 - head/release/scripts

2014-05-27 Thread Warner Losh

On May 27, 2014, at 1:36 AM, Tijl Coosemans  wrote:

> On Mon, 26 May 2014 16:31:21 -0600 Warner Losh wrote:
>> On May 26, 2014, at 4:18 PM, Tijl Coosemans  wrote: 
>>> On Mon, 26 May 2014 09:53:57 -0600 Warner Losh wrote:
 On May 26, 2014, at 8:39 AM, Nathan Whitehorn  
 wrote:
> On 05/26/14 02:35, Tijl Coosemans wrote:
>> I suppose you could replace the "x86" in the pkg scheme with i386/amd64,
>> but then you'd still be talking about i386:32, amd64:32 and amd64:64
>> instead of x86:32, x86:x32 and x86:64.  
 
 I suppose you could replace these by “i386”, “x32” (or “amd64x32”) and
 “amd64” respectively.
>>> 
>>> So you're on an amd64 or mips64 system (as indicated by uname) but you
>>> want to use the 32-bit package if possible.  How does your script know
>>> about the magic "x32", "amd64x32" or "mipsn32" strings?  Wouldn't it be
>>> easier if you could just use "`uname -p`:32”?
>> 
>> Oh give me a break. You know it because you know you are building for
>> mipsn32 because that’s what you’ve set MACHINE_ARCH or TARGET_ARCH to,
> 
> No, MACHINE_ARCH or TARGET_ARCH is "amd64" or "mips64".  You are building
> the 64-bit OS and then decide separately per package whether you want the
> ILP32 one or the LP64 one.

I think I understand why we’re talking past each other. This bit is wrong. The  
LP64 one has a MACHINE_ARCH of “amd64” or “mips64”. The ILP32 one will have 
MACHINE_ARCH of “i386” or “mips”. The weird ones (ILP32 with 64-bit registers) 
will have a different MACHINE_ARCH of “x32” or “mipsn32”. Selection can be done 
on a case by case basis, but this will be validated against the supported_abis 
sysctl. There’s no need to have different names here, the current standard ones 
do just fine, are completely sufficient and all inclusive. This is rather by 
definition, and your understanding of the definition sounds flawed.

While we have limited support for building 32-bit binaries, it is to build 
32-bit binaries for a different MACHINE_ARCH. -m32 on amd64 creates i386 
binaries, not amd64:32 binaries. -m32 on powerpc64 creates powerpc binaries, 
not powerpc64:32 binaries. On mips, -mabi-n32 (I think the option is) is 
required to create the mipsn32 binaries. In every single one of these cases, 
there exists a MACHINE_ARCH that completely describes the binary.

So I’m still waiting for a use case that requires the new names. One has not 
been articulated, and I don’t think one actually exists.

Warner


signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r266743 - head/sys/modules/geom

2014-05-27 Thread Andrey V. Elsukov
Author: ae
Date: Tue May 27 10:21:49 2014
New Revision: 266743
URL: http://svnweb.freebsd.org/changeset/base/266743

Log:
  Disconnect the following geom classes from the kernel modules build:
  BSD, FOX, MBR, PC98, SUNLABEL and VOL_FFS. They all have a modern
  replacement. Also it is still possible build them manually.
  
  Discussed with:   geom

Modified:
  head/sys/modules/geom/Makefile

Modified: head/sys/modules/geom/Makefile
==
--- head/sys/modules/geom/Makefile  Tue May 27 10:12:16 2014
(r266742)
+++ head/sys/modules/geom/Makefile  Tue May 27 10:21:49 2014
(r266743)
@@ -1,34 +1,28 @@
 # $FreeBSD$
 
 SUBDIR=geom_bde \
-   geom_bsd \
geom_cache \
geom_ccd \
geom_concat \
geom_eli \
-   geom_fox \
geom_gate \
geom_journal \
geom_label \
geom_linux_lvm \
-   geom_mbr \
geom_mirror \
geom_mountver \
geom_multipath \
geom_nop \
geom_part \
-   geom_pc98 \
geom_raid \
geom_raid3 \
geom_sched \
geom_shsec \
geom_stripe \
-   geom_sunlabel \
geom_uncompress \
geom_uzip \
geom_vinum \
geom_virstor \
-   geom_vol_ffs \
geom_zero
 
 .include 
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


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

2014-05-27 Thread Hans Petter Selasky
Author: hselasky
Date: Tue May 27 10:12:16 2014
New Revision: 266742
URL: http://svnweb.freebsd.org/changeset/base/266742

Log:
  - Correct bus space resource type for register access.
  - Add configuration of interrupt type and polarity via FDT.
  
  Sponsored by: DARPA, AFRL

Modified:
  head/sys/dev/usb/controller/saf1761_otg.c
  head/sys/dev/usb/controller/saf1761_otg.h
  head/sys/dev/usb/controller/saf1761_otg_fdt.c

Modified: head/sys/dev/usb/controller/saf1761_otg.c
==
--- head/sys/dev/usb/controller/saf1761_otg.c   Tue May 27 10:01:19 2014
(r266741)
+++ head/sys/dev/usb/controller/saf1761_otg.c   Tue May 27 10:12:16 2014
(r266742)
@@ -2052,7 +2052,8 @@ saf1761_otg_init(struct saf1761_otg_soft
SAF1761_WRITE_LE_4(sc, SOTG_INTERRUPT_CFG,
SOTG_INTERRUPT_CFG_CDBGMOD |
SOTG_INTERRUPT_CFG_DDBGMODIN |
-   SOTG_INTERRUPT_CFG_DDBGMODOUT);
+   SOTG_INTERRUPT_CFG_DDBGMODOUT |
+   sc->sc_interrupt_cfg);
 
/* enable VBUS and ID interrupt */
SAF1761_WRITE_LE_4(sc, SOTG_IRQ_ENABLE_SET_CLR,

Modified: head/sys/dev/usb/controller/saf1761_otg.h
==
--- head/sys/dev/usb/controller/saf1761_otg.h   Tue May 27 10:01:19 2014
(r266741)
+++ head/sys/dev/usb/controller/saf1761_otg.h   Tue May 27 10:12:16 2014
(r266742)
@@ -144,6 +144,7 @@ struct saf1761_otg_softc {
uint32_t sc_host_isoc_map;
uint32_t sc_intr_enable;/* enabled interrupts */
uint32_t sc_hw_mode;/* hardware mode */
+   uint32_t sc_interrupt_cfg;  /* interrupt configuration */
 
uint32_t sc_bounce_buffer[1024 / 4];
 

Modified: head/sys/dev/usb/controller/saf1761_otg_fdt.c
==
--- head/sys/dev/usb/controller/saf1761_otg_fdt.c   Tue May 27 10:01:19 
2014(r266741)
+++ head/sys/dev/usb/controller/saf1761_otg_fdt.c   Tue May 27 10:12:16 
2014(r266742)
@@ -156,6 +156,18 @@ saf1761_otg_fdt_attach(device_t dev)
sc->sc_hw_mode |= SOTG_HW_MODE_CTRL_DREQ_POL;
}
 
+   /* get IRQ polarity */
+   if (OF_getprop(ofw_bus_get_node(dev), "int-polarity",
+   ¶m, sizeof(param)) > 0) {
+   sc->sc_interrupt_cfg |= SOTG_INTERRUPT_CFG_INTPOL;
+   }
+
+   /* get IRQ level triggering */
+   if (OF_getprop(ofw_bus_get_node(dev), "int-level",
+   ¶m, sizeof(param)) > 0) {
+   sc->sc_interrupt_cfg |= SOTG_INTERRUPT_CFG_INTLVL;
+   }
+
/* initialise some bus fields */
sc->sc_bus.parent = dev;
sc->sc_bus.devices = sc->sc_devices;
@@ -168,7 +180,7 @@ saf1761_otg_fdt_attach(device_t dev)
}
rid = 0;
sc->sc_io_res =
-   bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, RF_ACTIVE);
+   bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE);
 
if (!sc->sc_io_res) {
goto error;
@@ -243,7 +255,7 @@ saf1761_otg_fdt_detach(device_t dev)
sc->sc_irq_res = NULL;
}
if (sc->sc_io_res) {
-   bus_release_resource(dev, SYS_RES_IOPORT, 0,
+   bus_release_resource(dev, SYS_RES_MEMORY, 0,
sc->sc_io_res);
sc->sc_io_res = 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: r266741 - head/sys/dev/usb/controller

2014-05-27 Thread Hans Petter Selasky
Author: hselasky
Date: Tue May 27 10:01:19 2014
New Revision: 266741
URL: http://svnweb.freebsd.org/changeset/base/266741

Log:
  Multiple fixes and improvements:
  - Put "_LE_" into the register access macros to indicate little endian
  byte order is expected by the hardware.
  - Avoid using the bounce buffer when not strictly needed. Try to move
  data directly using bus-space functions first.
  - Ensure we preserve the reserved bits in the power down mode
  register. Else the hardware goes into a non-recoverable state.
  - Always use 32-bit access when writing or reading registers or FIFOs,
  because the hardware is 32-bit oriented and don't really understand 8-
  and 16-bit access.
  - Correct writes to the memory address register. There is no need to
  shift the register offset.
  - Correct interval for interrupt endpoints.
  - Optimise 90ns internal memory buffer read delay.
  - Rename PDT into PTD, which is how the datasheet writes it.
  - Add missing programming for activating host controller PTDs.
  
  Sponsored by: DARPA, AFRL

Modified:
  head/sys/dev/usb/controller/saf1761_otg.c
  head/sys/dev/usb/controller/saf1761_otg.h
  head/sys/dev/usb/controller/saf1761_otg_reg.h

Modified: head/sys/dev/usb/controller/saf1761_otg.c
==
--- head/sys/dev/usb/controller/saf1761_otg.c   Tue May 27 09:42:07 2014
(r266740)
+++ head/sys/dev/usb/controller/saf1761_otg.c   Tue May 27 10:01:19 2014
(r266741)
@@ -195,9 +195,9 @@ saf1761_otg_wakeup_peer(struct saf1761_o
 
DPRINTFN(5, "\n");
 
-   temp = SAF1761_READ_2(sc, SOTG_MODE);
-   SAF1761_WRITE_2(sc, SOTG_MODE, temp | SOTG_MODE_SNDRSU);
-   SAF1761_WRITE_2(sc, SOTG_MODE, temp & ~SOTG_MODE_SNDRSU);
+   temp = SAF1761_READ_LE_4(sc, SOTG_MODE);
+   SAF1761_WRITE_LE_4(sc, SOTG_MODE, temp | SOTG_MODE_SNDRSU);
+   SAF1761_WRITE_LE_4(sc, SOTG_MODE, temp & ~SOTG_MODE_SNDRSU);
 
/* Wait 8ms for remote wakeup to complete. */
usb_pause_mtx(&sc->sc_bus.bus_mtx, hz / 125);
@@ -253,8 +253,8 @@ saf1761_host_channel_free(struct saf1761
return;
 
/* disable channel */
-   SAF1761_WRITE_4(sc, SOTG_PDT(td->channel) + SOTG_PDT_DW3, 0);
-   SAF1761_WRITE_4(sc, SOTG_PDT(td->channel) + SOTG_PDT_DW0, 0);
+   SAF1761_WRITE_LE_4(sc, SOTG_PTD(td->channel) + SOTG_PTD_DW3, 0);
+   SAF1761_WRITE_LE_4(sc, SOTG_PTD(td->channel) + SOTG_PTD_DW0, 0);
 
switch (td->ep_type) {
case UE_INTERRUPT:
@@ -275,49 +275,143 @@ saf1761_host_channel_free(struct saf1761
}
 }
 
+static uint32_t
+saf1761_peek_host_memory_le_4(struct saf1761_otg_softc *sc, uint32_t offset)
+{
+   SAF1761_WRITE_LE_4(sc, SOTG_MEMORY_REG, offset);
+   SAF1761_90NS_DELAY(sc); /* read prefetch time is 90ns */
+   return (SAF1761_READ_LE_4(sc, offset));
+}
+
 static void
-saf1761_read_host_memory_4(struct saf1761_otg_softc *sc, uint32_t offset,
-void *buf, uint32_t count)
+saf1761_read_host_memory(struct saf1761_otg_softc *sc,
+struct saf1761_otg_td *td, uint32_t len)
 {
-   if (count == 0)
+   struct usb_page_search buf_res;
+   uint32_t offset;
+   uint32_t count;
+
+   if (len == 0)
return;
-   SAF1761_WRITE_4(sc, SOTG_MEMORY_REG, SOTG_HC_MEMORY_ADDR(offset));
-   DELAY(1);   /* read prefetch time is 90ns */
-   bus_space_read_region_4((sc)->sc_io_tag, (sc)->sc_io_hdl, offset, buf, 
count);
+
+   offset = SOTG_DATA_ADDR(td->channel);
+   SAF1761_WRITE_LE_4(sc, SOTG_MEMORY_REG, offset);
+   SAF1761_90NS_DELAY(sc); /* read prefetch time is 90ns */
+
+   /* optimised read first */
+   while (len > 0) {
+   usbd_get_page(td->pc, td->offset, &buf_res);
+
+   /* get correct length */
+   if (buf_res.length > len)
+   buf_res.length = len;
+
+   /* check buffer alignment */
+   if (((uintptr_t)buf_res.buffer) & 3)
+   break;
+
+   count = buf_res.length & ~3;
+   if (count == 0)
+   break;
+
+   bus_space_read_region_4((sc)->sc_io_tag, (sc)->sc_io_hdl,
+   offset, buf_res.buffer, count / 4);
+
+   len -= count;
+   offset += count;
+
+   /* update remainder and offset */
+   td->remainder -= count;
+   td->offset += count;
+   }
+
+   if (len > 0) {
+   /* use bounce buffer */
+   bus_space_read_region_4((sc)->sc_io_tag, (sc)->sc_io_hdl,
+   offset, sc->sc_bounce_buffer, (len + 3) / 4);
+   usbd_copy_in(td->pc, td->offset,
+   sc->sc_bounce_buffer, len);
+
+   /* update remainder and offset */
+   td->remainder -= len;
+   td->offset += len;
+   }
 }
 
 static void
-saf1761_write_host_memory_4(struct saf176

svn commit: r266738 - in head/sys/dev/usb: . net

2014-05-27 Thread Kevin Lo
Author: kevlo
Date: Tue May 27 08:14:54 2014
New Revision: 266738
URL: http://svnweb.freebsd.org/changeset/base/266738

Log:
  - Improve performance by fixing incorrect Rx/Tx handling
  - Rename definition of AXGE_* to reflect reality
  - Add new USB IDs

Modified:
  head/sys/dev/usb/net/if_axge.c
  head/sys/dev/usb/net/if_axgereg.h
  head/sys/dev/usb/usbdevs

Modified: head/sys/dev/usb/net/if_axge.c
==
--- head/sys/dev/usb/net/if_axge.c  Tue May 27 08:06:20 2014
(r266737)
+++ head/sys/dev/usb/net/if_axge.c  Tue May 27 08:14:54 2014
(r266738)
@@ -66,7 +66,8 @@ static const STRUCT_USB_HOST_ID axge_dev
 #defineAXGE_DEV(v,p) { USB_VP(USB_VENDOR_##v, USB_PRODUCT_##v##_##p) }
AXGE_DEV(ASIX, AX88178A),
AXGE_DEV(ASIX, AX88179),
-   /* AXGE_DEV(SITECOMEU, LN032), */
+   AXGE_DEV(DLINK, DUB1312),
+   AXGE_DEV(SITECOMEU, LN032),
 #undef AXGE_DEV
 };
 
@@ -108,12 +109,11 @@ static intaxge_read_mem(struct axge_sof
uint16_t, void *, int);
 static voidaxge_write_mem(struct axge_softc *, uint8_t, uint16_t,
uint16_t, void *, int);
-static uint8_t axge_read_cmd_1(struct axge_softc *, uint8_t, uint16_t,
-   uint16_t);
+static uint8_t axge_read_cmd_1(struct axge_softc *, uint8_t, uint16_t);
 static uint16_taxge_read_cmd_2(struct axge_softc *, uint8_t, uint16_t,
uint16_t);
 static voidaxge_write_cmd_1(struct axge_softc *, uint8_t, uint16_t,
-   uint16_t, uint8_t);
+   uint8_t);
 static voidaxge_write_cmd_2(struct axge_softc *, uint8_t, uint16_t,
uint16_t, uint16_t);
 static voidaxge_chip_init(struct axge_softc *);
@@ -125,7 +125,7 @@ static void axge_ifmedia_sts(struct ifne
 static int axge_ioctl(struct ifnet *, u_long, caddr_t);
 static int axge_rx_frame(struct usb_ether *, struct usb_page_cache *, int);
 static int axge_rxeof(struct usb_ether *, struct usb_page_cache *,
-   unsigned int, unsigned int, struct axge_csum_hdr *);
+   unsigned int, unsigned int, uint32_t);
 static voidaxge_csum_cfg(struct usb_ether *);
 
 #defineAXGE_CSUM_FEATURES  (CSUM_IP | CSUM_TCP | CSUM_UDP)
@@ -144,7 +144,7 @@ static const struct usb_config axge_conf
.endpoint = UE_ADDR_ANY,
.direction = UE_DIR_OUT,
.frames = 16,
-   .bufsize = 16 * (MCLBYTES + 16),
+   .bufsize = 16 * MCLBYTES,
.flags = {.pipe_bof = 1,.force_short_xfer = 1,},
.callback = axge_bulk_write_callback,
.timeout = 1,   /* 10 seconds */
@@ -240,12 +240,11 @@ axge_write_mem(struct axge_softc *sc, ui
 }
 
 static uint8_t
-axge_read_cmd_1(struct axge_softc *sc, uint8_t cmd, uint16_t index,
-uint16_t reg)
+axge_read_cmd_1(struct axge_softc *sc, uint8_t cmd, uint16_t reg)
 {
uint8_t val;
 
-   axge_read_mem(sc, cmd, index, reg, &val, 1);
+   axge_read_mem(sc, cmd, 1, reg, &val, 1);
return (val);
 }
 
@@ -260,10 +259,9 @@ axge_read_cmd_2(struct axge_softc *sc, u
 }
 
 static void
-axge_write_cmd_1(struct axge_softc *sc, uint8_t cmd, uint16_t index,
-uint16_t reg, uint8_t val)
+axge_write_cmd_1(struct axge_softc *sc, uint8_t cmd, uint16_t reg, uint8_t val)
 {
-   axge_write_mem(sc, cmd, index, reg, &val, 1);
+   axge_write_mem(sc, cmd, 1, reg, &val, 1);
 }
 
 static void
@@ -356,31 +354,30 @@ axge_miibus_statchg(device_t dev)
if ((sc->sc_flags & AXGE_FLAG_LINK) == 0)
goto done;
 
-   link_status = axge_read_cmd_1(sc, AXGE_ACCESS_MAC, 1, AXGE_LINK_STATUS);
+   link_status = axge_read_cmd_1(sc, AXGE_ACCESS_MAC, AXGE_PLSR);
 
val = 0;
if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FDX) != 0) {
-   val |= AXGE_MEDIUM_FULL_DUPLEX;
+   val |= MSR_FD;
if ((IFM_OPTIONS(mii->mii_media_active) & IFM_ETH_TXPAUSE) != 0)
-   val |= AXGE_MEDIUM_TXFLOW_CTRLEN;
+   val |= MSR_TFC;
if ((IFM_OPTIONS(mii->mii_media_active) & IFM_ETH_RXPAUSE) != 0)
-   val |= AXGE_MEDIUM_RXFLOW_CTRLEN;
+   val |= MSR_RFC;
}
-   val |=  AXGE_MEDIUM_RECEIVE_EN;
+   val |=  MSR_RE;
switch (IFM_SUBTYPE(mii->mii_media_active)) {
case IFM_1000_T:
-   val |= AXGE_MEDIUM_GIGAMODE | AXGE_MEDIUM_EN_125MHZ;
-   if (link_status & AXGE_LINK_STATUS_USB_SS)
+   val |= MSR_GM | MSR_EN_125MHZ;
+   if (link_status & PLSR_USB_SS)
memcpy(tmp, &axge_bulk_size[0], 5);
-   else if (link_status & AXGE_LINK_STATUS_USB_HS)
+   else if (link_status & PLSR_USB_HS)
memcpy(tmp, &axge_bulk_size[1], 5);

svn commit: r266737 - head/sys/netinet

2014-05-27 Thread Adrian Chadd
Author: adrian
Date: Tue May 27 08:06:20 2014
New Revision: 266737
URL: http://svnweb.freebsd.org/changeset/base/266737

Log:
  The users of RSS shouldn't be directly concerned about hash -> CPU ID
  mappings.  Instead, they should be first mapping to an RSS bucket and
  then querying the RSS bucket -> CPU ID mapping to figure out the target
  CPU.
  
  When (if?) RSS rebalancing is implemented or some other (non round-robin)
  distribution of work from buckets to CPU IDs, various bits of code - both
  userland and kernel - will need to know how this mapping works.
  
  So, to support this:
  
  * Add a new function rss_m2bucket() - this maps an mbuf to a given bucket.
Anything which is currently doing hash -> CPU work may instead wish to
do hash -> bucket, and then query the bucket->cpuid map for which
CPU it belongs on.  Or, map it to a bucket, then re-pin that bucket ->
CPU during a rebalance operation.
  
  * For userland applications which wish to exploit affinity to RSS buckets,
the bucket -> CPU ID mapping is now available via a sysctl.
net.inet.rss.bucket_mapping lists the bucket to CPU ID mapping via
a list of bucket:cpu pairs.

Modified:
  head/sys/netinet/in_rss.c
  head/sys/netinet/in_rss.h

Modified: head/sys/netinet/in_rss.c
==
--- head/sys/netinet/in_rss.c   Tue May 27 07:16:43 2014(r266736)
+++ head/sys/netinet/in_rss.c   Tue May 27 08:06:20 2014(r266737)
@@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -425,6 +426,24 @@ rss_hash2cpuid(uint32_t hash_val, uint32
 }
 
 /*
+ * Query the RSS bucket associated with the given hash value and
+ * type.
+ */
+int
+rss_hash2bucket(uint32_t hash_val, uint32_t hash_type, uint32_t *bucket_id)
+{
+
+   switch (hash_type) {
+   case M_HASHTYPE_RSS_IPV4:
+   case M_HASHTYPE_RSS_TCP_IPV4:
+   *bucket_id = rss_getbucket(hash_val);
+   return (0);
+   default:
+   return (-1);
+   }
+}
+
+/*
  * netisr CPU affinity lookup routine for use by protocols.
  */
 struct mbuf *
@@ -436,6 +455,16 @@ rss_m2cpuid(struct mbuf *m, uintptr_t so
return (m);
 }
 
+int
+rss_m2bucket(struct mbuf *m, uint32_t *bucket_id)
+{
+
+   M_ASSERTPKTHDR(m);
+
+   return(rss_hash2bucket(m->m_pkthdr.flowid, M_HASHTYPE_GET(m),
+   bucket_id));
+}
+
 /*
  * Query the RSS hash algorithm.
  */
@@ -512,3 +541,31 @@ sysctl_rss_key(SYSCTL_HANDLER_ARGS)
 SYSCTL_PROC(_net_inet_rss, OID_AUTO, key,
 CTLTYPE_OPAQUE | CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, 0, sysctl_rss_key,
 "", "RSS keying material");
+
+static int
+sysctl_rss_bucket_mapping(SYSCTL_HANDLER_ARGS)
+{
+   struct sbuf *sb;
+   int error;
+   int i;
+
+   error = 0;
+   error = sysctl_wire_old_buffer(req, 0);
+   if (error != 0)
+   return (error);
+   sb = sbuf_new_for_sysctl(NULL, NULL, 512, req);
+   if (sb == NULL)
+   return (ENOMEM);
+   for (i = 0; i < rss_buckets; i++) {
+   sbuf_printf(sb, "%s%d:%d", i == 0 ? "" : " ",
+   i,
+   rss_getcpu(i));
+   }
+   error = sbuf_finish(sb);
+   sbuf_delete(sb);
+
+   return (error);
+}
+SYSCTL_PROC(_net_inet_rss, OID_AUTO, bucket_mapping,
+CTLTYPE_STRING | CTLFLAG_RD, NULL, 0,
+sysctl_rss_bucket_mapping, "", "RSS bucket -> CPU mapping");

Modified: head/sys/netinet/in_rss.h
==
--- head/sys/netinet/in_rss.h   Tue May 27 07:16:43 2014(r266736)
+++ head/sys/netinet/in_rss.h   Tue May 27 08:06:20 2014(r266737)
@@ -91,5 +91,8 @@ uint32_t  rss_hash_ip6_2tuple(struct in6_
  */
 struct mbuf*rss_m2cpuid(struct mbuf *m, uintptr_t source, u_int *cpuid);
 u_int  rss_hash2cpuid(uint32_t hash_val, uint32_t hash_type);
+intrss_hash2bucket(uint32_t hash_val, uint32_t hash_type,
+   uint32_t *bucket_id);
+intrss_m2bucket(struct mbuf *m, uint32_t *bucket_id);
 
 #endif /* !_NETINET_IN_RSS_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"


Re: svn commit: r266553 - head/release/scripts

2014-05-27 Thread Tijl Coosemans
On Mon, 26 May 2014 16:31:21 -0600 Warner Losh wrote:
> On May 26, 2014, at 4:18 PM, Tijl Coosemans  wrote: 
>> On Mon, 26 May 2014 09:53:57 -0600 Warner Losh wrote:
>>> On May 26, 2014, at 8:39 AM, Nathan Whitehorn  
>>> wrote:
 On 05/26/14 02:35, Tijl Coosemans wrote:
> I suppose you could replace the "x86" in the pkg scheme with i386/amd64,
> but then you'd still be talking about i386:32, amd64:32 and amd64:64
> instead of x86:32, x86:x32 and x86:64.  
>>> 
>>> I suppose you could replace these by “i386”, “x32” (or “amd64x32”) and
>>> “amd64” respectively.
>> 
>> So you're on an amd64 or mips64 system (as indicated by uname) but you
>> want to use the 32-bit package if possible.  How does your script know
>> about the magic "x32", "amd64x32" or "mipsn32" strings?  Wouldn't it be
>> easier if you could just use "`uname -p`:32”?
> 
> Oh give me a break. You know it because you know you are building for
> mipsn32 because that’s what you’ve set MACHINE_ARCH or TARGET_ARCH to,

No, MACHINE_ARCH or TARGET_ARCH is "amd64" or "mips64".  You are building
the 64-bit OS and then decide separately per package whether you want the
ILP32 one or the LP64 one.
___
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: r266553 - head/release/scripts

2014-05-27 Thread Tijl Coosemans
On Mon, 26 May 2014 18:47:34 -0700 Nathan Whitehorn wrote:
> I've written two patches today. The first 
> (http://people.freebsd.org/~nwhitehorn/pkg_machinearch.diff) is to pkg 
> itself and the second 
> (http://people.freebsd.org/~nwhitehorn/pkg_bootstrap_machinearch.diff) 
> is to the pkg bootstrapper in base. These switch pkg from using 
> identifiers like "freebsd:11:arm:be:eabi:softfp" to identifiers like 
> "FreeBSD:11:armeb", matching the canonical FreeBSD platform identifiers. 
> The strings it uses can be predicted easily from scripts, as they are 
> identical in all cases to the output of `uname -s`:`uname -r | cut -f 1 
> -d .`:`uname -p`.

If those are the current names for arm then I also prefer uname -p for
the third field.  If each arch gets a default value of 32 or 64 for the
fourth field it can also be left out in many cases.
___
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: r266736 - head/usr.bin/svn/lib/libapr

2014-05-27 Thread Peter Wemm
Author: peter
Date: Tue May 27 07:16:43 2014
New Revision: 266736
URL: http://svnweb.freebsd.org/changeset/base/266736

Log:
  Update backend files and makefiles for apr 1.4.8 -> 1.5.1

Modified:
  head/usr.bin/svn/lib/libapr/Makefile
  head/usr.bin/svn/lib/libapr/apr.h
  head/usr.bin/svn/lib/libapr/apr_private.h

Modified: head/usr.bin/svn/lib/libapr/Makefile
==
--- head/usr.bin/svn/lib/libapr/MakefileTue May 27 07:15:14 2014
(r266735)
+++ head/usr.bin/svn/lib/libapr/MakefileTue May 27 07:16:43 2014
(r266736)
@@ -4,7 +4,7 @@
 
 INTERNALLIB=   yes
 LIB=   apr
-SRCS=  apr_cpystrn.c apr_fnmatch.c apr_getpass.c apr_hash.c \
+SRCS=  apr_cpystrn.c apr_fnmatch.c apr_getpass.c apr_hash.c 
apr_skiplist.c \
apr_pools.c apr_random.c apr_snprintf.c apr_strings.c \
apr_strnatcmp.c apr_strtok.c apr_tables.c buffer.c \
builtins.c charset.c common.c copy.c dir.c dso.c env.c \
@@ -18,7 +18,7 @@ SRCS= apr_cpystrn.c apr_fnmatch.c apr_g
shm.c signals.c sockaddr.c socket_util.c sockets.c \
sockopt.c solaris.c start.c tempdir.c thread.c thread_cond.c \
thread_mutex.c thread_rwlock.c threadpriv.c time.c \
-   timestr.c userinfo.c version.c waitio.c
+   timestr.c userinfo.c version.c waitio.c z_asio.c
 
 .PATH: ${APR}/atomic/unix ${APR}/dso/unix ${APR}/file_io/unix \
${APR}/locks/unix ${APR}/memory/unix ${APR}/misc/unix \

Modified: head/usr.bin/svn/lib/libapr/apr.h
==
--- head/usr.bin/svn/lib/libapr/apr.h   Tue May 27 07:15:14 2014
(r266735)
+++ head/usr.bin/svn/lib/libapr/apr.h   Tue May 27 07:16:43 2014
(r266736)
@@ -118,7 +118,7 @@
  * or the extern "C" namespace 
  */
 
-#if APR_HAVE_WINDOWS_H
+#if APR_HAVE_WINDOWS_H && defined(WIN32)
 /* If windows.h was already included, our preferences don't matter.
  * If not, include a restricted set of windows headers to our tastes.
  */
@@ -466,6 +466,8 @@ typedef  apr_uint32_tapr_uin
  */
 #define APR_THREAD_FUNC   
 
+#if defined(DOXYGEN) || !defined(WIN32)
+
 /**
  * The public APR functions are declared with APR_DECLARE(), so they may
  * use the most appropriate calling convention.  Public APR functions with 
@@ -518,6 +520,20 @@ typedef  apr_uint32_tapr_uin
  */
 #define APR_DECLARE_DATA
 
+#elif defined(APR_DECLARE_STATIC)
+#define APR_DECLARE(type)type __stdcall
+#define APR_DECLARE_NONSTD(type) type __cdecl
+#define APR_DECLARE_DATA
+#elif defined(APR_DECLARE_EXPORT)
+#define APR_DECLARE(type)__declspec(dllexport) type __stdcall
+#define APR_DECLARE_NONSTD(type) __declspec(dllexport) type __cdecl
+#define APR_DECLARE_DATA __declspec(dllexport)
+#else
+#define APR_DECLARE(type)__declspec(dllimport) type __stdcall
+#define APR_DECLARE_NONSTD(type) __declspec(dllimport) type __cdecl
+#define APR_DECLARE_DATA __declspec(dllimport)
+#endif
+
 /* Define APR_SSIZE_T_FMT.  
  * If ssize_t is an integer we define it to be "d",
  * if ssize_t is a long int we define it to be "ld",

Modified: head/usr.bin/svn/lib/libapr/apr_private.h
==
--- head/usr.bin/svn/lib/libapr/apr_private.h   Tue May 27 07:15:14 2014
(r266735)
+++ head/usr.bin/svn/lib/libapr/apr_private.h   Tue May 27 07:16:43 2014
(r266736)
@@ -86,6 +86,9 @@
 /* Define if accept4 function is supported */
 #define HAVE_ACCEPT4 1
 
+/* Define if async i/o supports message q's */
+/* #undef HAVE_AIO_MSGQ */
+
 /* Define to 1 if you have `alloca', as a function or macro. */
 #define HAVE_ALLOCA 1
 
@@ -142,7 +145,7 @@
 /* #undef HAVE_DL_H */
 
 /* Define if dup3 function is supported */
-/* #undef HAVE_DUP3 */
+#define HAVE_DUP3 1
 
 /* Define if EGD is supported */
 /* #undef HAVE_EGD */
@@ -934,7 +937,7 @@
 
 
 /* switch this on if we have a BeOS version below BONE */
-#if BEOS && !HAVE_BONE_VERSION
+#if defined(BEOS) && !defined(HAVE_BONE_VERSION)
 #define BEOS_R5 1
 #else
 #define BEOS_BONE 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: r266735 - in head/contrib/apr: . docs encoding file_io/unix include include/arch/unix include/private locks/unix network_io/unix passwd poll/unix shmem/unix strings support/unix tables ...

2014-05-27 Thread Peter Wemm
Author: peter
Date: Tue May 27 07:15:14 2014
New Revision: 266735
URL: http://svnweb.freebsd.org/changeset/base/266735

Log:
  Merge apr-1.4.8 -> apr-1.5.1 and update.

Added:
  head/contrib/apr/CMakeLists.txt
 - copied unchanged from r266734, vendor/apr/dist/CMakeLists.txt
  head/contrib/apr/README.cmake
 - copied unchanged from r266734, vendor/apr/dist/README.cmake
  head/contrib/apr/encoding/
 - copied from r266734, vendor/apr/dist/encoding/
  head/contrib/apr/include/apr.hwc
 - copied unchanged from r266734, vendor/apr/dist/include/apr.hwc
  head/contrib/apr/include/apr_escape.h
 - copied unchanged from r266734, vendor/apr/dist/include/apr_escape.h
  head/contrib/apr/include/apr_skiplist.h
 - copied unchanged from r266734, vendor/apr/dist/include/apr_skiplist.h
  head/contrib/apr/include/private/
 - copied from r266734, vendor/apr/dist/include/private/
  head/contrib/apr/poll/unix/z_asio.c
 - copied unchanged from r266734, vendor/apr/dist/poll/unix/z_asio.c
  head/contrib/apr/tables/apr_skiplist.c
 - copied unchanged from r266734, vendor/apr/dist/tables/apr_skiplist.c
  head/contrib/apr/tools/
 - copied from r266734, vendor/apr/dist/tools/
Modified:
  head/contrib/apr/CHANGES
  head/contrib/apr/LICENSE
  head/contrib/apr/Makefile.in
  head/contrib/apr/Makefile.win
  head/contrib/apr/NOTICE
  head/contrib/apr/apr.dep
  head/contrib/apr/apr.dsp
  head/contrib/apr/apr.mak
  head/contrib/apr/apr.spec
  head/contrib/apr/build-outputs.mk
  head/contrib/apr/build.conf
  head/contrib/apr/configure
  head/contrib/apr/configure.in
  head/contrib/apr/docs/canonical_filenames.html
  head/contrib/apr/file_io/unix/filedup.c
  head/contrib/apr/file_io/unix/filestat.c
  head/contrib/apr/file_io/unix/mktemp.c
  head/contrib/apr/file_io/unix/open.c
  head/contrib/apr/file_io/unix/pipe.c
  head/contrib/apr/file_io/unix/readwrite.c
  head/contrib/apr/include/apr.h.in
  head/contrib/apr/include/apr_allocator.h
  head/contrib/apr/include/apr_errno.h
  head/contrib/apr/include/apr_file_info.h
  head/contrib/apr/include/apr_file_io.h
  head/contrib/apr/include/apr_fnmatch.h
  head/contrib/apr/include/apr_hash.h
  head/contrib/apr/include/apr_inherit.h
  head/contrib/apr/include/apr_lib.h
  head/contrib/apr/include/apr_mmap.h
  head/contrib/apr/include/apr_network_io.h
  head/contrib/apr/include/apr_poll.h
  head/contrib/apr/include/apr_pools.h
  head/contrib/apr/include/apr_shm.h
  head/contrib/apr/include/apr_strings.h
  head/contrib/apr/include/apr_tables.h
  head/contrib/apr/include/apr_thread_mutex.h
  head/contrib/apr/include/apr_thread_proc.h
  head/contrib/apr/include/apr_time.h
  head/contrib/apr/include/apr_user.h
  head/contrib/apr/include/apr_version.h
  head/contrib/apr/include/arch/unix/apr_arch_poll_private.h
  head/contrib/apr/include/arch/unix/apr_arch_threadproc.h
  head/contrib/apr/include/arch/unix/apr_private.h.in
  head/contrib/apr/libapr.dep
  head/contrib/apr/libapr.dsp
  head/contrib/apr/libapr.mak
  head/contrib/apr/locks/unix/proc_mutex.c
  head/contrib/apr/network_io/unix/sendrecv.c
  head/contrib/apr/network_io/unix/sockaddr.c
  head/contrib/apr/network_io/unix/socket_util.c
  head/contrib/apr/network_io/unix/sockets.c
  head/contrib/apr/network_io/unix/sockopt.c
  head/contrib/apr/passwd/apr_getpass.c
  head/contrib/apr/poll/unix/pollcb.c
  head/contrib/apr/poll/unix/pollset.c
  head/contrib/apr/shmem/unix/shm.c
  head/contrib/apr/strings/apr_cpystrn.c
  head/contrib/apr/strings/apr_strings.c
  head/contrib/apr/support/unix/waitio.c
  head/contrib/apr/tables/apr_hash.c
  head/contrib/apr/tables/apr_tables.c
Directory Properties:
  head/contrib/apr/   (props changed)

Modified: head/contrib/apr/CHANGES
==
--- head/contrib/apr/CHANGESTue May 27 07:00:57 2014(r266734)
+++ head/contrib/apr/CHANGESTue May 27 07:15:14 2014(r266735)
@@ -1,235 +1,124 @@
  -*- coding: utf-8 -*-
-Changes for APR 1.4.8
+Changes for APR 1.5.1
 
-  *) Fix compiltation with FreeBSD on ARM.  [Olli Hauer ]
+  *) apr_os_proc_mutex_get() on Unix:  Avoid segfault for cross-
+ process pthread mutexes.  [Yann Ylavic ]
 
-  *) Fix 1.4.7 regression in apr_mcast_hops() and apr_mcast_loopback()
- for AF_INET (IPv4) sockets on most Unix platforms.  [Joe Orton]
+  *) When using shmget-based shared memory, the ID used for ftok is
+ now an APR hash of the filename instead of the constant '1'.
+ We do this to help avoid collisions. PR 53996 [Jim Jagielski]
 
-  *) Fix the return value of apr_threadattr_detach_get() on some
- platforms like OS X and Solaris. [Rainer Jung, ]
+  *) apr_socket_atreadeof(): Fix breakage on OS X. [Jim Jagielski]
 
-Changes for APR 1.4.7
+  *) Fix POSIX shared memory (shm_open) use for named shared memory.
+ Includes adding '--enable-posix-shm' to force POSIX shm if
+ available, and OS X compatibility