Re: svn commit: r312792 - in head/sys/arm: arm include

2017-01-26 Thread Svatopluk Kraus
Thank you.


On Thu, Jan 26, 2017 at 6:23 AM, Jason A. Harmening  wrote:
> Author: jah
> Date: Thu Jan 26 05:23:33 2017
> New Revision: 312792
> URL: https://svnweb.freebsd.org/changeset/base/312792
>
> Log:
>   Further cleanup of per-CPU armv6 pmap data:
>
>   - Replace pcpu_find(curcpu) with get_pcpu(), which is much
> more direct.
>
>   - Remove armv4 pcpu fields which I added in r286296 but never
> needed to use.
>
>   - armv6 pc_qmap_addr was leftover from the old armv6 pmap
> implementation.  Rename it and put it to use in the new one.
>
>   Noted by: skra
>   Reviewed by:  skra
>   MFC after:1 week
>   Differential Revision:https://reviews.freebsd.org/D9312
>
> Modified:
>   head/sys/arm/arm/pmap-v6.c
>   head/sys/arm/include/pcpu.h
>

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


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

2017-01-26 Thread Wojciech Macek
Author: wma
Date: Thu Jan 26 11:14:23 2017
New Revision: 312812
URL: https://svnweb.freebsd.org/changeset/base/312812

Log:
  Add dummy functions for Marvell SoC's not equipped with AHCI
  
  Commit r312747 ("Setup decoding windows for ARMADA38X") resulted
  in build failing for Marvell platforms, which don't have AHCI controller.
  This patch provides a fix by adding dummy functions for such cases.
  
  On the occasion rename register dump routine to decode_win_ahci_dump,
  in order to avoid confusion.
  
  Submitted by:  Marcin Wojtas 
  Obtained from: Semihalf
  Sponsored by:  Stormshield

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

Modified: head/sys/arm/mv/mv_common.c
==
--- head/sys/arm/mv/mv_common.c Thu Jan 26 11:07:36 2017(r312811)
+++ head/sys/arm/mv/mv_common.c Thu Jan 26 11:14:23 2017(r312812)
@@ -108,7 +108,7 @@ static void decode_win_usb3_dump(u_long)
 static void decode_win_eth_dump(u_long base);
 static void decode_win_idma_dump(u_long base);
 static void decode_win_xor_dump(u_long base);
-static void decode_win_sata_dump(u_long base);
+static void decode_win_ahci_dump(u_long base);
 
 static int fdt_get_ranges(const char *, void *, int, int *, int *);
 #ifdef SOC_MV_ARMADA38X
@@ -141,7 +141,7 @@ static struct soc_node_spec soc_nodes[] 
{ "mrvl,ge", &decode_win_eth_setup, &decode_win_eth_dump },
{ "mrvl,usb-ehci", &decode_win_usb_setup, &decode_win_usb_dump },
{ "marvell,armada-380-xhci", &decode_win_usb3_setup, 
&decode_win_usb3_dump },
-   { "marvell,armada-380-ahci", &decode_win_ahci_setup, 
&decode_win_sata_dump },
+   { "marvell,armada-380-ahci", &decode_win_ahci_setup, 
&decode_win_ahci_dump },
{ "mrvl,sata", &decode_win_sata_setup, NULL },
{ "mrvl,xor", &decode_win_xor_setup, &decode_win_xor_dump },
{ "mrvl,idma", &decode_win_idma_setup, &decode_win_idma_dump },
@@ -2007,6 +2007,10 @@ decode_win_sata_setup(u_long base)
}
 }
 
+#ifdef SOC_MV_ARMADA38X
+/*
+ * Configure AHCI decoding windows
+ */
 static void
 decode_win_ahci_setup(u_long base)
 {
@@ -2046,7 +2050,7 @@ decode_win_ahci_setup(u_long base)
 }
 
 static void
-decode_win_sata_dump(u_long base)
+decode_win_ahci_dump(u_long base)
 {
int i;
 
@@ -2056,6 +2060,22 @@ decode_win_sata_dump(u_long base)
win_sata_sz_read(base,i));
 }
 
+#else
+/*
+ * Provide dummy functions to satisfy the build
+ * for SoC's not equipped with AHCI controller
+ */
+static void
+decode_win_ahci_setup(u_long base)
+{
+}
+
+static void
+decode_win_ahci_dump(u_long base)
+{
+}
+#endif
+
 static int
 decode_win_sata_valid(void)
 {
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r312747 - head/sys/arm/mv

2017-01-26 Thread Wojciech Macek
Fixed in https://svnweb.freebsd.org/changeset/base/312812

Regards,
Wojtek

2017-01-26 2:56 GMT+01:00 Ed Maste :

> On 25 January 2017 at 05:31, Wojciech Macek  wrote:
> > Author: wma
> > Date: Wed Jan 25 10:31:16 2017
> > New Revision: 312747
> > URL: https://svnweb.freebsd.org/changeset/base/312747
> >
> > Log:
> >   Setup decoding windows for ARMADA38X
> >
> >   It is necesarry to open memory windows on internal bus for
> >   AHCI driver to work correctly.
>
> Build broken with:
>
> /scratch/tmp/emaste/freebsd/sys/arm/mv/mv_common.c:2019:3: error:
> implicit declaration of function 'win_sata_sz_write' is invalid in C99
> [-Werror,-Wimplicit-function-declaration]
> win_sata_sz_write(base, i, 0);
> ^
> /scratch/tmp/emaste/freebsd/sys/arm/mv/mv_common.c:2024:25: error: use
> of undeclared identifier 'IO_WIN_ATTR_SHIFT'
> cr = (ddr_attr(i) << IO_WIN_ATTR_SHIFT) |
>  ^
> ...
>
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r312813 - in head/sys: arm/mv dev/fdt

2017-01-26 Thread Andrew Turner
Author: andrew
Date: Thu Jan 26 13:04:14 2017
New Revision: 312813
URL: https://svnweb.freebsd.org/changeset/base/312813

Log:
  Make fdt_pm_mask_table internal to the Marvell code, it's unued anywhere
  else.
  
  Sponsored by: ABT Systems Ltd

Modified:
  head/sys/arm/mv/mv_common.c
  head/sys/dev/fdt/fdt_common.h

Modified: head/sys/arm/mv/mv_common.c
==
--- head/sys/arm/mv/mv_common.c Thu Jan 26 11:14:23 2017(r312812)
+++ head/sys/arm/mv/mv_common.c Thu Jan 26 13:04:14 2017(r312813)
@@ -149,7 +149,12 @@ static struct soc_node_spec soc_nodes[] 
{ NULL, NULL, NULL },
 };
 
-struct fdt_pm_mask_entry fdt_pm_mask_table[] = {
+struct fdt_pm_mask_entry {
+   char*compat;
+   uint32_tmask;
+};
+
+static struct fdt_pm_mask_entry fdt_pm_mask_table[] = {
{ "mrvl,ge",CPU_PM_CTRL_GE(0) },
{ "mrvl,ge",CPU_PM_CTRL_GE(1) },
{ "mrvl,usb-ehci",  CPU_PM_CTRL_USB(0) },

Modified: head/sys/dev/fdt/fdt_common.h
==
--- head/sys/dev/fdt/fdt_common.h   Thu Jan 26 11:14:23 2017
(r312812)
+++ head/sys/dev/fdt/fdt_common.h   Thu Jan 26 13:04:14 2017
(r312813)
@@ -71,12 +71,6 @@ extern vm_paddr_t fdt_immr_pa;
 extern vm_offset_t fdt_immr_va;
 extern vm_offset_t fdt_immr_size;
 
-struct fdt_pm_mask_entry {
-   char*compat;
-   uint32_tmask;
-};
-extern struct fdt_pm_mask_entry fdt_pm_mask_table[];
-
 #if defined(FDT_DTB_STATIC)
 extern u_char fdt_static_dtb;
 #endif
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r312814 - head/sys/sys

2017-01-26 Thread Sean Bruno
Author: sbruno
Date: Thu Jan 26 13:46:47 2017
New Revision: 312814
URL: https://svnweb.freebsd.org/changeset/base/312814

Log:
  Shoot a couple of style bugs down in the macro declarations.
  
  Submitted by: bde

Modified:
  head/sys/sys/gtaskqueue.h

Modified: head/sys/sys/gtaskqueue.h
==
--- head/sys/sys/gtaskqueue.h   Thu Jan 26 13:04:14 2017(r312813)
+++ head/sys/sys/gtaskqueue.h   Thu Jan 26 13:46:47 2017(r312814)
@@ -80,7 +80,6 @@ int   taskqgroup_adjust(struct taskqgroup 
 #define TASKQGROUP_DECLARE(name)   \
 extern struct taskqgroup *qgroup_##name
 
-
 #ifdef EARLY_AP_STARTUP
 #define TASKQGROUP_DEFINE(name, cnt, stride)   \
\
@@ -94,8 +93,7 @@ taskqgroup_define_##name(void *arg)   

 }  \
\
 SYSINIT(taskqgroup_##name, SI_SUB_INIT_IF, SI_ORDER_FIRST, \
-   taskqgroup_define_##name, NULL) \
-
+   taskqgroup_define_##name, NULL)
 #else /* !EARLY_AP_STARTUP */
 #define TASKQGROUP_DEFINE(name, cnt, stride)   \
\
@@ -117,8 +115,7 @@ taskqgroup_adjust_##name(void *arg) 

 }  \
\
 SYSINIT(taskqgroup_adj_##name, SI_SUB_SMP, SI_ORDER_ANY,   \
-   taskqgroup_adjust_##name, NULL) \
-
+   taskqgroup_adjust_##name, NULL)
 #endif /* EARLY_AP_STARTUP */
 
 TASKQGROUP_DECLARE(net);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r312815 - head/sys/kern

2017-01-26 Thread Sean Bruno
Author: sbruno
Date: Thu Jan 26 13:48:45 2017
New Revision: 312815
URL: https://svnweb.freebsd.org/changeset/base/312815

Log:
  A few more style bugs lying around in here.
  
  Submitted by: bde

Modified:
  head/sys/kern/subr_gtaskqueue.c

Modified: head/sys/kern/subr_gtaskqueue.c
==
--- head/sys/kern/subr_gtaskqueue.c Thu Jan 26 13:46:47 2017
(r312814)
+++ head/sys/kern/subr_gtaskqueue.c Thu Jan 26 13:48:45 2017
(r312815)
@@ -630,6 +630,7 @@ taskqgroup_find(struct taskqgroup *qgrou
 
return (idx);
 }
+
 /*
  * smp_started is unusable since it is not set for UP kernels or even for
  * SMP kernels when there is 1 CPU.  This is usually handled by adding a
@@ -643,6 +644,7 @@ taskqgroup_find(struct taskqgroup *qgrou
  * SI_ORDER_ANY and unclearly after the CPUs are started.  It would be
  * simpler for adjustment to pass a flag indicating if it is delayed.
  */ 
+
 static int tqg_smp_started;
 
 static void
@@ -670,7 +672,7 @@ taskqgroup_attach(struct taskqgroup *qgr
qgroup->tqg_queue[qid].tgc_cnt++;
LIST_INSERT_HEAD(&qgroup->tqg_queue[qid].tgc_tasks, gtask, gt_list);
gtask->gt_taskqueue = qgroup->tqg_queue[qid].tgc_taskq;
-   if (irq != -1 && tqg_smp_started ) {
+   if (irq != -1 && tqg_smp_started) {
gtask->gt_cpu = qgroup->tqg_queue[qid].tgc_cpu;
CPU_ZERO(&mask);
CPU_SET(qgroup->tqg_queue[qid].tgc_cpu, &mask);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r312816 - head/sys/net

2017-01-26 Thread Sean Bruno
Author: sbruno
Date: Thu Jan 26 13:50:09 2017
New Revision: 312816
URL: https://svnweb.freebsd.org/changeset/base/312816

Log:
  Minor style annoyance.
  
  Submitted by: bde

Modified:
  head/sys/net/iflib.c

Modified: head/sys/net/iflib.c
==
--- head/sys/net/iflib.cThu Jan 26 13:48:45 2017(r312815)
+++ head/sys/net/iflib.cThu Jan 26 13:50:09 2017(r312816)
@@ -3755,6 +3755,7 @@ iflib_device_register(device_t dev, void
device_printf(dev, "qset structure setup failed %d\n", err);
goto fail_queues;
}
+
/*
 * Group taskqueues aren't properly set up until SMP is started,
 * so we disable interrupts until we can handle them post
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r312818 - head/share/man/man9

2017-01-26 Thread David E. O'Brien
Author: obrien
Date: Thu Jan 26 16:36:12 2017
New Revision: 312818
URL: https://svnweb.freebsd.org/changeset/base/312818

Log:
  Correct grammar.

Modified:
  head/share/man/man9/printf.9

Modified: head/share/man/man9/printf.9
==
--- head/share/man/man9/printf.9Thu Jan 26 15:37:53 2017
(r312817)
+++ head/share/man/man9/printf.9Thu Jan 26 16:36:12 2017
(r312818)
@@ -111,7 +111,7 @@ It requires two arguments: a
 pointer and a
 .Vt "char *"
 string.
-The memory pointed to be the pointer is output in hexadecimal one byte at
+The memory pointed to by the pointer is output in hexadecimal one byte at
 a time.
 The string is used as a delimiter between individual bytes.
 If present, a width directive will specify the number of bytes to display.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r311993 - head/sys/dev/nand

2017-01-26 Thread Ronald Klop

Should this be merged to 11-stable also?
I got a build failure on this with 11/arm.

Ronald.


On Thu, 12 Jan 2017 19:05:12 +0100, Alexander Kabaev   
wrote:



Author: kan
Date: Thu Jan 12 18:05:12 2017
New Revision: 311993
URL: https://svnweb.freebsd.org/changeset/base/311993

Log:
  Fix typo in r311971.
 Reported by:   ohartmann at walstatt.org

Modified:
  head/sys/dev/nand/nand_geom.c

Modified: head/sys/dev/nand/nand_geom.c
==
--- head/sys/dev/nand/nand_geom.c   Thu Jan 12 17:54:55 2017
(r311992)
+++ head/sys/dev/nand/nand_geom.c   Thu Jan 12 18:05:12 2017
(r311993)
@@ -416,7 +416,7 @@ create_geom_disk(struct nand_chip *chip)
snprintf(rdisk->d_ident, sizeof(rdisk->d_ident),
"nand_raw: Man:0x%02x Dev:0x%02x", chip->id.man_id,
chip->id.dev_id);
-   disk->d_rotation_rate = DISK_RR_NON_ROTATING;
+   rdisk->d_rotation_rate = DISK_RR_NON_ROTATING;
disk_create(rdisk, DISK_VERSION);
___
svn-src-...@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

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


svn commit: r312820 - head/sys/modules

2017-01-26 Thread Ed Maste
Author: emaste
Date: Thu Jan 26 17:59:54 2017
New Revision: 312820
URL: https://svnweb.freebsd.org/changeset/base/312820

Log:
  Disconnect netfpga10g module from the build
  
  It only builds with the non-default DEVICE_POLLING option.
  
  Approved by:  bz

Modified:
  head/sys/modules/Makefile

Modified: head/sys/modules/Makefile
==
--- head/sys/modules/Makefile   Thu Jan 26 16:38:53 2017(r312819)
+++ head/sys/modules/Makefile   Thu Jan 26 17:59:54 2017(r312820)
@@ -265,7 +265,6 @@ SUBDIR= \
${_nctgpio} \
${_ncv} \
${_ndis} \
-   netfpga10g \
${_netgraph} \
${_nfe} \
nfscl \
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r312821 - in head/sys/modules: . usb

2017-01-26 Thread Ed Maste
Author: emaste
Date: Thu Jan 26 18:05:31 2017
New Revision: 312821
URL: https://svnweb.freebsd.org/changeset/base/312821

Log:
  mips: exclude modules that fail to build

Modified:
  head/sys/modules/Makefile
  head/sys/modules/usb/Makefile

Modified: head/sys/modules/Makefile
==
--- head/sys/modules/Makefile   Thu Jan 26 17:59:54 2017(r312820)
+++ head/sys/modules/Makefile   Thu Jan 26 18:05:31 2017(r312821)
@@ -503,13 +503,16 @@ _bce= bce
 _fatm= fatm
 _fxp=  fxp
 _ispfw=ispfw
+_sf=   sf
+_ti=   ti
+_txp=  txp
+
+.if ${MACHINE_CPUARCH} != "mips"
 _mwlfw=mwlfw
 _otusfw=   otusfw
 _ralfw=ralfw
 _rtwnfw=   rtwnfw
-_sf=   sf
-_ti=   ti
-_txp=  txp
+.endif
 .endif
 
 .if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \

Modified: head/sys/modules/usb/Makefile
==
--- head/sys/modules/usb/Makefile   Thu Jan 26 17:59:54 2017
(r312820)
+++ head/sys/modules/usb/Makefile   Thu Jan 26 18:05:31 2017
(r312821)
@@ -70,9 +70,12 @@ _uath=   uath
 _zyd=  zyd
 _kue=  kue
 _run=  run
-_runfw=runfw
 _rsu=  rsu
+
+.if ${MACHINE_CPUARCH} != "mips"
 _rsufw=rsufw
+_runfw=runfw
+.endif
 .endif
 
 .if ${MACHINE_CPUARCH} == "amd64"
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r312822 - head/sys/mips/conf

2017-01-26 Thread Ed Maste
Author: emaste
Date: Thu Jan 26 18:18:35 2017
New Revision: 312822
URL: https://svnweb.freebsd.org/changeset/base/312822

Log:
  Enable modules in the MIPS ERL kernel config
  
  As reported by cperciva[1], modules are beneficial for typical
  Edgerouter Lite use cases.
  
  [1] http://www.daemonology.net/blog/2016-01-10-FreeBSD-EdgeRouter-Lite.html

Modified:
  head/sys/mips/conf/ERL

Modified: head/sys/mips/conf/ERL
==
--- head/sys/mips/conf/ERL  Thu Jan 26 18:05:31 2017(r312821)
+++ head/sys/mips/conf/ERL  Thu Jan 26 18:18:35 2017(r312822)
@@ -24,8 +24,6 @@ ident ERL
 makeoptionsARCH_FLAGS="-march=octeon -mabi=64"
 makeoptionsLDSCRIPT_NAME=ldscript.mips.octeon1
 
-# Don't build any modules yet.
-makeoptionsMODULES_OVERRIDE=""
 makeoptionsKERNLOADADDR=0x8010
 
 # We don't need to build a trampolined version of the kernel.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r312825 - in head: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/aes/asm crypto/openssl/crypto/asn1 crypto/openssl/crypto/bn crypto/openssl/crypto/bn/as...

2017-01-26 Thread Jung-uk Kim
Author: jkim
Date: Thu Jan 26 19:10:29 2017
New Revision: 312825
URL: https://svnweb.freebsd.org/changeset/base/312825

Log:
  Merge OpenSSL 1.0.2k.

Modified:
  head/crypto/openssl/CHANGES
  head/crypto/openssl/CONTRIBUTING
  head/crypto/openssl/Configure
  head/crypto/openssl/INSTALL
  head/crypto/openssl/Makefile
  head/crypto/openssl/Makefile.org
  head/crypto/openssl/NEWS
  head/crypto/openssl/README
  head/crypto/openssl/apps/apps.c
  head/crypto/openssl/apps/apps.h
  head/crypto/openssl/apps/ca.c
  head/crypto/openssl/apps/cms.c
  head/crypto/openssl/apps/dgst.c
  head/crypto/openssl/apps/dh.c
  head/crypto/openssl/apps/dhparam.c
  head/crypto/openssl/apps/dsa.c
  head/crypto/openssl/apps/dsaparam.c
  head/crypto/openssl/apps/ec.c
  head/crypto/openssl/apps/ecparam.c
  head/crypto/openssl/apps/enc.c
  head/crypto/openssl/apps/gendh.c
  head/crypto/openssl/apps/gendsa.c
  head/crypto/openssl/apps/genpkey.c
  head/crypto/openssl/apps/genrsa.c
  head/crypto/openssl/apps/pkcs12.c
  head/crypto/openssl/apps/pkcs7.c
  head/crypto/openssl/apps/pkcs8.c
  head/crypto/openssl/apps/pkey.c
  head/crypto/openssl/apps/pkeyparam.c
  head/crypto/openssl/apps/pkeyutl.c
  head/crypto/openssl/apps/prime.c
  head/crypto/openssl/apps/rand.c
  head/crypto/openssl/apps/req.c
  head/crypto/openssl/apps/rsa.c
  head/crypto/openssl/apps/rsautl.c
  head/crypto/openssl/apps/s_cb.c
  head/crypto/openssl/apps/s_client.c
  head/crypto/openssl/apps/s_server.c
  head/crypto/openssl/apps/smime.c
  head/crypto/openssl/apps/speed.c
  head/crypto/openssl/apps/spkac.c
  head/crypto/openssl/apps/srp.c
  head/crypto/openssl/apps/verify.c
  head/crypto/openssl/apps/x509.c
  head/crypto/openssl/crypto/aes/asm/aes-s390x.pl
  head/crypto/openssl/crypto/asn1/p5_pbev2.c
  head/crypto/openssl/crypto/asn1/x_crl.c
  head/crypto/openssl/crypto/bn/asm/x86_64-mont.pl
  head/crypto/openssl/crypto/bn/asm/x86_64-mont5.pl
  head/crypto/openssl/crypto/bn/bn_exp.c
  head/crypto/openssl/crypto/bn/bn_mul.c
  head/crypto/openssl/crypto/bn/bn_prime.c
  head/crypto/openssl/crypto/bn/bn_sqr.c
  head/crypto/openssl/crypto/cms/cms_kari.c
  head/crypto/openssl/crypto/dh/dh_key.c
  head/crypto/openssl/crypto/dsa/dsa_pmeth.c
  head/crypto/openssl/crypto/ec/ec2_mult.c
  head/crypto/openssl/crypto/ecdh/ech_ossl.c
  head/crypto/openssl/crypto/err/err.c
  head/crypto/openssl/crypto/evp/e_aes.c
  head/crypto/openssl/crypto/evp/e_rc4_hmac_md5.c
  head/crypto/openssl/crypto/evp/evp.h
  head/crypto/openssl/crypto/evp/evp_err.c
  head/crypto/openssl/crypto/evp/pmeth_fn.c
  head/crypto/openssl/crypto/evp/pmeth_lib.c
  head/crypto/openssl/crypto/modes/ctr128.c
  head/crypto/openssl/crypto/opensslv.h
  head/crypto/openssl/crypto/perlasm/x86_64-xlate.pl
  head/crypto/openssl/crypto/rsa/rsa_gen.c
  head/crypto/openssl/crypto/rsa/rsa_oaep.c
  head/crypto/openssl/crypto/rsa/rsa_pmeth.c
  head/crypto/openssl/crypto/s390xcap.c
  head/crypto/openssl/crypto/ui/ui_lib.c
  head/crypto/openssl/crypto/ui/ui_openssl.c
  head/crypto/openssl/doc/apps/ocsp.pod
  head/crypto/openssl/doc/crypto/EVP_DigestSignInit.pod
  head/crypto/openssl/doc/crypto/EVP_DigestVerifyInit.pod
  head/crypto/openssl/doc/crypto/RSA_generate_key.pod
  head/crypto/openssl/doc/crypto/X509_NAME_get_index_by_NID.pod
  head/crypto/openssl/doc/crypto/X509_NAME_print_ex.pod
  head/crypto/openssl/doc/ssl/SSL_CTX_set_session_cache_mode.pod
  head/crypto/openssl/doc/ssl/SSL_get_error.pod
  head/crypto/openssl/doc/ssl/SSL_read.pod
  head/crypto/openssl/doc/ssl/SSL_write.pod
  head/crypto/openssl/engines/ccgost/Makefile
  head/crypto/openssl/ssl/bad_dtls_test.c
  head/crypto/openssl/ssl/s23_pkt.c
  head/crypto/openssl/ssl/s2_lib.c
  head/crypto/openssl/ssl/s2_pkt.c
  head/crypto/openssl/ssl/s3_clnt.c
  head/crypto/openssl/ssl/s3_pkt.c
  head/crypto/openssl/ssl/s3_srvr.c
  head/crypto/openssl/ssl/ssl_cert.c
  head/crypto/openssl/ssl/ssl_err.c
  head/crypto/openssl/ssl/ssl_lib.c
  head/crypto/openssl/ssl/ssl_locl.h
  head/crypto/openssl/ssl/ssl_sess.c
  head/crypto/openssl/ssl/t1_lib.c
  head/crypto/openssl/util/domd
  head/crypto/openssl/util/mklink.pl
  head/secure/lib/libcrypto/Makefile.inc
  head/secure/lib/libcrypto/amd64/x86_64-mont.S
  head/secure/lib/libcrypto/amd64/x86_64-mont5.S
  head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3
  head/secure/lib/libcrypto/man/ASN1_STRING_length.3
  head/secure/lib/libcrypto/man/ASN1_STRING_new.3
  head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3
  head/secure/lib/libcrypto/man/ASN1_TIME_set.3
  head/secure/lib/libcrypto/man/ASN1_generate_nconf.3
  head/secure/lib/libcrypto/man/BIO_ctrl.3
  head/secure/lib/libcrypto/man/BIO_f_base64.3
  head/secure/lib/libcrypto/man/BIO_f_buffer.3
  head/secure/lib/libcrypto/man/BIO_f_cipher.3
  head/secure/lib/libcrypto/man/BIO_f_md.3
  head/secure/lib/libcrypto/man/BIO_f_null.3
  head/secure/lib/libcrypto/man/BIO_f_ssl.3
  head/secure/lib/libcrypto/man/BIO_find_type.3
  head/secure/lib/libcrypto/man/BIO_new.3
  head/secure/lib/libcrypto/man/BIO_new_CM

svn commit: r312827 - head/sys/cam

2017-01-26 Thread Scott Long
Author: scottl
Date: Thu Jan 26 20:08:58 2017
New Revision: 312827
URL: https://svnweb.freebsd.org/changeset/base/312827

Log:
  Refactor xpt_print_path, xpt_print, and xpt_path_string.  Implement
  all of them in terms of an sbuf-based back-end, xpt_path_sbuf.  This
  unifies the implementation, but more importantly it stops the output
  fropm being split between 4 or more invocations of printf.  The
  multiple invocations cause interleaving of the messages on the
  console during boot, making the output of disk discovery often
  unintelligible.  This change helps a lot, but more work is needed.
  
  Reviewed by:  ken, mav
  Sponsored by: Netflix

Modified:
  head/sys/cam/cam_xpt.c
  head/sys/cam/cam_xpt.h

Modified: head/sys/cam/cam_xpt.c
==
--- head/sys/cam/cam_xpt.c  Thu Jan 26 19:14:14 2017(r312826)
+++ head/sys/cam/cam_xpt.c  Thu Jan 26 20:08:58 2017(r312827)
@@ -3697,33 +3697,14 @@ xpt_path_comp_dev(struct cam_path *path,
 void
 xpt_print_path(struct cam_path *path)
 {
+   struct sbuf sb;
+   char buffer[XPT_PRINT_LEN];
 
-   if (path == NULL)
-   printf("(nopath): ");
-   else {
-   if (path->periph != NULL)
-   printf("(%s%d:", path->periph->periph_name,
-  path->periph->unit_number);
-   else
-   printf("(noperiph:");
-
-   if (path->bus != NULL)
-   printf("%s%d:%d:", path->bus->sim->sim_name,
-  path->bus->sim->unit_number,
-  path->bus->sim->bus_id);
-   else
-   printf("nobus:");
-
-   if (path->target != NULL)
-   printf("%d:", path->target->target_id);
-   else
-   printf("X:");
-
-   if (path->device != NULL)
-   printf("%jx): ", (uintmax_t)path->device->lun_id);
-   else
-   printf("X): ");
-   }
+   sbuf_new(&sb, buffer, XPT_PRINT_LEN, SBUF_FIXEDLEN);
+   xpt_path_sbuf(path, &sb);
+   sbuf_finish(&sb);
+   printf("%s", sbuf_data(&sb));
+   sbuf_delete(&sb);
 }
 
 void
@@ -3745,49 +3726,66 @@ void
 xpt_print(struct cam_path *path, const char *fmt, ...)
 {
va_list ap;
-   xpt_print_path(path);
+   struct sbuf sb;
+   char buffer[XPT_PRINT_MAXLEN];
+
+   sbuf_new(&sb, buffer, XPT_PRINT_MAXLEN, SBUF_FIXEDLEN);
+
+   xpt_path_sbuf(path, &sb);
va_start(ap, fmt);
-   vprintf(fmt, ap);
+   sbuf_vprintf(&sb, fmt, ap);
va_end(ap);
+
+   sbuf_finish(&sb);
+   printf("%s", sbuf_data(&sb));
+   sbuf_delete(&sb);
 }
 
 int
 xpt_path_string(struct cam_path *path, char *str, size_t str_len)
 {
struct sbuf sb;
+   int len;
 
sbuf_new(&sb, str, str_len, 0);
+   len = xpt_path_sbuf(path, &sb);
+   sbuf_finish(&sb);
+   return (len);
+}
+
+int
+xpt_path_sbuf(struct cam_path *path, struct sbuf *sb)
+{
 
if (path == NULL)
-   sbuf_printf(&sb, "(nopath): ");
+   sbuf_printf(sb, "(nopath): ");
else {
if (path->periph != NULL)
-   sbuf_printf(&sb, "(%s%d:", path->periph->periph_name,
+   sbuf_printf(sb, "(%s%d:", path->periph->periph_name,
path->periph->unit_number);
else
-   sbuf_printf(&sb, "(noperiph:");
+   sbuf_printf(sb, "(noperiph:");
 
if (path->bus != NULL)
-   sbuf_printf(&sb, "%s%d:%d:", path->bus->sim->sim_name,
+   sbuf_printf(sb, "%s%d:%d:", path->bus->sim->sim_name,
path->bus->sim->unit_number,
path->bus->sim->bus_id);
else
-   sbuf_printf(&sb, "nobus:");
+   sbuf_printf(sb, "nobus:");
 
if (path->target != NULL)
-   sbuf_printf(&sb, "%d:", path->target->target_id);
+   sbuf_printf(sb, "%d:", path->target->target_id);
else
-   sbuf_printf(&sb, "X:");
+   sbuf_printf(sb, "X:");
 
if (path->device != NULL)
-   sbuf_printf(&sb, "%jx): ",
+   sbuf_printf(sb, "%jx): ",
(uintmax_t)path->device->lun_id);
else
-   sbuf_printf(&sb, "X): ");
+   sbuf_printf(sb, "X): ");
}
-   sbuf_finish(&sb);
 
-   return(sbuf_len(&sb));
+   return(sbuf_len(sb));
 }
 
 path_id_t

Modified: head/sys/cam/cam_xpt.h
==
--- head/sys/cam/cam_xpt.

svn commit: r312830 - head/sys/cam

2017-01-26 Thread Scott Long
Author: scottl
Date: Thu Jan 26 20:18:03 2017
New Revision: 312830
URL: https://svnweb.freebsd.org/changeset/base/312830

Log:
  Fix a development mis-merge from r312827
  
  Sponsored by: Netflix

Modified:
  head/sys/cam/cam_xpt.c

Modified: head/sys/cam/cam_xpt.c
==
--- head/sys/cam/cam_xpt.c  Thu Jan 26 20:15:14 2017(r312829)
+++ head/sys/cam/cam_xpt.c  Thu Jan 26 20:18:03 2017(r312830)
@@ -3727,9 +3727,9 @@ xpt_print(struct cam_path *path, const c
 {
va_list ap;
struct sbuf sb;
-   char buffer[XPT_PRINT_MAXLEN];
+   char buffer[XPT_PRINT_LEN];
 
-   sbuf_new(&sb, buffer, XPT_PRINT_MAXLEN, SBUF_FIXEDLEN);
+   sbuf_new(&sb, buffer, XPT_PRINT_LEN, SBUF_FIXEDLEN);
 
xpt_path_sbuf(path, &sb);
va_start(ap, fmt);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r312831 - in head/contrib/llvm: include/llvm/Analysis lib/Analysis

2017-01-26 Thread Dimitry Andric
Author: dim
Date: Thu Jan 26 20:18:28 2017
New Revision: 312831
URL: https://svnweb.freebsd.org/changeset/base/312831

Log:
  Revert r312765 for now, since it causes assertions when building
  lang/spidermonkey24.
  
  Reported by:  antoine
  PR:   215649

Modified:
  head/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h
  head/contrib/llvm/include/llvm/Analysis/ScalarEvolutionExpander.h
  head/contrib/llvm/lib/Analysis/ScalarEvolution.cpp
  head/contrib/llvm/lib/Analysis/ScalarEvolutionExpander.cpp

Modified: head/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h
==
--- head/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h   Thu Jan 26 
20:18:03 2017(r312830)
+++ head/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h   Thu Jan 26 
20:18:28 2017(r312831)
@@ -495,29 +495,10 @@ namespace llvm {
 
 /// The typedef for ExprValueMap.
 ///
-typedef std::pair ValueOffsetPair;
-typedef DenseMap> 
ExprValueMapType;
+typedef DenseMap> ExprValueMapType;
 
 /// ExprValueMap -- This map records the original values from which
 /// the SCEV expr is generated from.
-///
-/// We want to represent the mapping as SCEV -> ValueOffsetPair instead
-/// of SCEV -> Value:
-/// Suppose we know S1 expands to V1, and
-///  S1 = S2 + C_a
-///  S3 = S2 + C_b
-/// where C_a and C_b are different SCEVConstants. Then we'd like to
-/// expand S3 as V1 - C_a + C_b instead of expanding S2 literally.
-/// It is helpful when S2 is a complex SCEV expr.
-///
-/// In order to do that, we represent ExprValueMap as a mapping from
-/// SCEV to ValueOffsetPair. We will save both S1->{V1, 0} and
-/// S2->{V1, C_a} into the map when we create SCEV for V1. When S3
-/// is expanded, it will first expand S2 to V1 - C_a because of
-/// S2->{V1, C_a} in the map, then expand S3 to V1 - C_a + C_b.
-///
-/// Note: S->{V, Offset} in the ExprValueMap means S can be expanded
-/// to V - Offset.
 ExprValueMapType ExprValueMap;
 
 /// The typedef for ValueExprMap.
@@ -1200,7 +1181,7 @@ namespace llvm {
 bool containsAddRecurrence(const SCEV *S);
 
 /// Return the Value set from which the SCEV expr is generated.
-SetVector *getSCEVValues(const SCEV *S);
+SetVector *getSCEVValues(const SCEV *S);
 
 /// Erase Value from ValueExprMap and ExprValueMap.
 void eraseValueFromMap(Value *V);

Modified: head/contrib/llvm/include/llvm/Analysis/ScalarEvolutionExpander.h
==
--- head/contrib/llvm/include/llvm/Analysis/ScalarEvolutionExpander.h   Thu Jan 
26 20:18:03 2017(r312830)
+++ head/contrib/llvm/include/llvm/Analysis/ScalarEvolutionExpander.h   Thu Jan 
26 20:18:28 2017(r312831)
@@ -325,8 +325,7 @@ namespace llvm {
   PointerType *PTy, Type *Ty, Value *V);
 
 /// \brief Find a previous Value in ExprValueMap for expand.
-ScalarEvolution::ValueOffsetPair
-FindValueInExprValueMap(const SCEV *S, const Instruction *InsertPt);
+Value *FindValueInExprValueMap(const SCEV *S, const Instruction *InsertPt);
 
 Value *expand(const SCEV *S);
 

Modified: head/contrib/llvm/lib/Analysis/ScalarEvolution.cpp
==
--- head/contrib/llvm/lib/Analysis/ScalarEvolution.cpp  Thu Jan 26 20:18:03 
2017(r312830)
+++ head/contrib/llvm/lib/Analysis/ScalarEvolution.cpp  Thu Jan 26 20:18:28 
2017(r312831)
@@ -3378,28 +3378,8 @@ bool ScalarEvolution::containsAddRecurre
   return F.FoundOne;
 }
 
-/// Try to split a SCEVAddExpr into a pair of {SCEV, ConstantInt}.
-/// If \p S is a SCEVAddExpr and is composed of a sub SCEV S' and an
-/// offset I, then return {S', I}, else return {\p S, nullptr}.
-static std::pair splitAddExpr(const SCEV *S) {
-  const auto *Add = dyn_cast(S);
-  if (!Add)
-return {S, nullptr};
-
-  if (Add->getNumOperands() != 2)
-return {S, nullptr};
-
-  auto *ConstOp = dyn_cast(Add->getOperand(0));
-  if (!ConstOp)
-return {S, nullptr};
-
-  return {Add->getOperand(1), ConstOp->getValue()};
-}
-
-/// Return the ValueOffsetPair set for \p S. \p S can be represented
-/// by the value and offset from any ValueOffsetPair in the set.
-SetVector *
-ScalarEvolution::getSCEVValues(const SCEV *S) {
+/// Return the Value set from S.
+SetVector *ScalarEvolution::getSCEVValues(const SCEV *S) {
   ExprValueMapType::iterator SI = ExprValueMap.find_as(S);
   if (SI == ExprValueMap.end())
 return nullptr;
@@ -3407,31 +3387,24 @@ ScalarEvolution::getSCEVValues(const SCE
   if (VerifySCEVMap) {
 // Check there is no dangling Value in the set returned.
 for (const auto &VE : SI->second)
-  assert(ValueExprMap.count(VE.first));
+  assert(ValueExprMap.count(VE));
   }
 #endif
   return &SI->second;
 }
 
-/// Era

svn commit: r312832 - in head/contrib/llvm: include/llvm/Analysis lib/Analysis lib/Transforms/Scalar

2017-01-26 Thread Dimitry Andric
Author: dim
Date: Thu Jan 26 20:39:43 2017
New Revision: 312832
URL: https://svnweb.freebsd.org/changeset/base/312832

Log:
  Pull in r278160 from upstream llvm trunk (by Wei Mi):
  
Recommit "Use ValueOffsetPair to enhance value reuse during SCEV
expansion".
  
The fix for PR28705 will be committed consecutively.
  
In D12090, the ExprValueMap was added to reuse existing value during
SCEV expansion. However, const folding and sext/zext distribution can
make the reuse still difficult.
  
A simplified case is: suppose we know S1 expands to V1 in
ExprValueMap, and
  S1 = S2 + C_a
  S3 = S2 + C_b
where C_a and C_b are different SCEVConstants. Then we'd like to
expand S3 as V1 - C_a + C_b instead of expanding S2 literally. It is
helpful when S2 is a complex SCEV expr and S2 has no entry in
ExprValueMap, which is usually caused by the fact that S3 is
generated from S1 after const folding.
  
In order to do that, we represent ExprValueMap as a mapping from SCEV
to ValueOffsetPair. We will save both S1->{V1, 0} and S2->{V1, C_a}
into the ExprValueMap when we create SCEV for V1. When S3 is
expanded, it will first expand S2 to V1 - C_a because of S2->{V1,
C_a} in the map, then expand S3 to V1 - C_a + C_b.
  
Differential Revision: https://reviews.llvm.org/D21313
  
  Pull in r278161 from upstream llvm trunk (by Wei Mi):
  
Fix the runtime error caused by "Use ValueOffsetPair to enhance value
reuse during SCEV expansion".
  
The patch is to fix the bug in PR28705. It was caused by setting
wrong return value for SCEVExpander::findExistingExpansion. The
return values of findExistingExpansion have different meanings when
the function is used in different ways so it is easy to make mistake.
The fix creates two new interfaces to replace
SCEVExpander::findExistingExpansion, and specifies where each
interface is expected to be used.
  
Differential Revision: https://reviews.llvm.org/D22942
  
  Pull in r281439 from upstream llvm trunk (by Wei Mi):
  
Create a getelementptr instead of sub expr for ValueOffsetPair if the
value is a pointer.
  
This patch is to fix PR30213. When expanding an expr based on
ValueOffsetPair, if the value is of pointer type, we can only create
a getelementptr instead of sub expr.
  
Differential Revision: https://reviews.llvm.org/D24088
  
  This should fix assertion failures when building OpenCV >= 3.1, and also
  allow building lang/spidermonkey24 without any further assertions.
  
  PR:   215649
  MFC after:1 week

Modified:
  head/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h
  head/contrib/llvm/include/llvm/Analysis/ScalarEvolutionExpander.h
  head/contrib/llvm/lib/Analysis/ScalarEvolution.cpp
  head/contrib/llvm/lib/Analysis/ScalarEvolutionExpander.cpp
  head/contrib/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp

Modified: head/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h
==
--- head/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h   Thu Jan 26 
20:18:28 2017(r312831)
+++ head/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h   Thu Jan 26 
20:39:43 2017(r312832)
@@ -495,10 +495,29 @@ namespace llvm {
 
 /// The typedef for ExprValueMap.
 ///
-typedef DenseMap> ExprValueMapType;
+typedef std::pair ValueOffsetPair;
+typedef DenseMap> 
ExprValueMapType;
 
 /// ExprValueMap -- This map records the original values from which
 /// the SCEV expr is generated from.
+///
+/// We want to represent the mapping as SCEV -> ValueOffsetPair instead
+/// of SCEV -> Value:
+/// Suppose we know S1 expands to V1, and
+///  S1 = S2 + C_a
+///  S3 = S2 + C_b
+/// where C_a and C_b are different SCEVConstants. Then we'd like to
+/// expand S3 as V1 - C_a + C_b instead of expanding S2 literally.
+/// It is helpful when S2 is a complex SCEV expr.
+///
+/// In order to do that, we represent ExprValueMap as a mapping from
+/// SCEV to ValueOffsetPair. We will save both S1->{V1, 0} and
+/// S2->{V1, C_a} into the map when we create SCEV for V1. When S3
+/// is expanded, it will first expand S2 to V1 - C_a because of
+/// S2->{V1, C_a} in the map, then expand S3 to V1 - C_a + C_b.
+///
+/// Note: S->{V, Offset} in the ExprValueMap means S can be expanded
+/// to V - Offset.
 ExprValueMapType ExprValueMap;
 
 /// The typedef for ValueExprMap.
@@ -1181,7 +1200,7 @@ namespace llvm {
 bool containsAddRecurrence(const SCEV *S);
 
 /// Return the Value set from which the SCEV expr is generated.
-SetVector *getSCEVValues(const SCEV *S);
+SetVector *getSCEVValues(const SCEV *S);
 
 /// Erase Value from ValueExprMap and ExprValueMap.
 void eraseValueFromMap(Value *V);

Modified: head/contrib/llvm/include/llvm/Analysis/ScalarEvol

svn commit: r312833 - head/sys/mips/conf

2017-01-26 Thread Kurt Lidl
Author: lidl
Date: Thu Jan 26 20:45:04 2017
New Revision: 312833
URL: https://svnweb.freebsd.org/changeset/base/312833

Log:
  Remove 'options NO_SWAPPING' from ERL configuration file

Modified:
  head/sys/mips/conf/ERL

Modified: head/sys/mips/conf/ERL
==
--- head/sys/mips/conf/ERL  Thu Jan 26 20:39:43 2017(r312832)
+++ head/sys/mips/conf/ERL  Thu Jan 26 20:45:04 2017(r312833)
@@ -88,7 +88,6 @@ options   MAC # TrustedBSD MAC 
Framewor
 #options   KDTRACE_FRAME   # Ensure frames are compiled in
 #options   KDTRACE_HOOKS   # Kernel DTrace hooks
 optionsINCLUDE_CONFIG_FILE # Include this file in kernel
-optionsNO_SWAPPING # Disable support for paging
 optionsTMPFS   # Temporary file system
 
 # Debugging for use in -current
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r312770 - in head/sys: net netinet netinet6

2017-01-26 Thread Gleb Smirnoff
On Thu, Jan 26, 2017 at 02:03:05PM +1100, Bruce Evans wrote:
B> On Thu, 26 Jan 2017, Konstantin Belousov wrote:
B> 
B> > On Wed, Jan 25, 2017 at 02:20:06PM -0800, Gleb Smirnoff wrote:
B> >>   Thanks, Luiz!
B> >>
B> >>   One stylistic nit that I missed in review:
B> >>
B> >> L>  static int
B> >> L> -in_difaddr_ioctl(caddr_t data, struct ifnet *ifp, struct thread *td)
B> >> L> +in_difaddr_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp, struct 
thread *td)
B> >> L>  {
B> >> L>const struct ifreq *ifr = (struct ifreq *)data;
B> >> L>const struct sockaddr_in *addr = (const struct sockaddr_in *)
B> >> L> @@ -618,7 +618,8 @@ in_difaddr_ioctl(caddr_t data, struct if
B> >> L>in_ifadown(&ia->ia_ifa, 1);
B> >> L>
B> >> L>if (ia->ia_ifa.ifa_carp)
B> >> L> -  (*carp_detach_p)(&ia->ia_ifa);
B> >> L> +  (*carp_detach_p)(&ia->ia_ifa,
B> >> L> +  (cmd == SIOCDIFADDR) ? false : true);
B> >>
B> >> Can we change the very last line to:
B> >>
B> >>   (cmd == SIOCAIFADDR) ? true : false);
B> 
B> That is not stylistic, but invert the result.  Perhaps you meant to
B> reverse the test to avoid negative logic for the result.

It uses different ioctl value, so it doesn't invert result. Instead
of !SIOCDIFADDR I want more explicit SIOCAIFADDR.

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


svn commit: r312852 - head/sys/cam

2017-01-26 Thread Jung-uk Kim
Author: jkim
Date: Fri Jan 27 00:17:07 2017
New Revision: 312852
URL: https://svnweb.freebsd.org/changeset/base/312852

Log:
  Fix libcam build.  It was broken with r312827.

Modified:
  head/sys/cam/cam_xpt.h

Modified: head/sys/cam/cam_xpt.h
==
--- head/sys/cam/cam_xpt.h  Thu Jan 26 23:29:30 2017(r312851)
+++ head/sys/cam/cam_xpt.h  Fri Jan 27 00:17:07 2017(r312852)
@@ -32,8 +32,10 @@
 #ifndef _CAM_CAM_XPT_H
 #define _CAM_CAM_XPT_H 1
 
+#ifdef _KERNEL
 #include 
 #include "opt_printf.h"
+#endif
 
 /* Forward Declarations */
 union ccb;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


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

2017-01-26 Thread Adrian Chadd
Author: adrian
Date: Fri Jan 27 01:17:00 2017
New Revision: 312853
URL: https://svnweb.freebsd.org/changeset/base/312853

Log:
  [ath] fix "doing stuff before wakeup" warning; add comments for ACK/CTS 
handling during DFS/PASSIVE channels
  
  * Although the hardware is awake, the power state handling doesn't think so.
So just explicitly wake it up early in setup so ath_hal calls don't 
complain.
  
  * We shouldn't be transmitting or ACKing frames during DFS CAC or on passive
channels before we hear a beacon.  So, start laying down comments in the
places where this work has to be done.
  
  Note:
  
  * The main bit missing from finishing this particular bit of work is a state
call to transition a VAP from passive to non-passive when a beacon is heard.
CAC is easy, it's an interface state.  So, I'll go and add a method to 
control
that soon.

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

Modified: head/sys/dev/ath/if_ath.c
==
--- head/sys/dev/ath/if_ath.c   Fri Jan 27 00:17:07 2017(r312852)
+++ head/sys/dev/ath/if_ath.c   Fri Jan 27 01:17:00 2017(r312853)
@@ -634,6 +634,17 @@ ath_attach(u_int16_t devid, struct ath_s
 #endif
 
/*
+* Force the chip awake during setup, just to keep
+* the HAL/driver power tracking happy.
+*
+* There are some methods (eg ath_hal_setmac())
+* that poke the hardware.
+*/
+   ATH_LOCK(sc);
+   ath_power_setpower(sc, HAL_PM_AWAKE, 1);
+   ATH_UNLOCK(sc);
+
+   /*
 * Setup the DMA/EDMA functions based on the current
 * hardware support.
 *
@@ -1010,6 +1021,28 @@ ath_attach(u_int16_t devid, struct ath_s
sc->sc_rx_lnamixer = ath_hal_hasrxlnamixer(ah);
sc->sc_hasdivcomb = ath_hal_hasdivantcomb(ah);
 
+   /*
+* Some WB335 cards do not support antenna diversity. Since
+* we use a hardcoded value for AR9565 instead of using the
+* EEPROM/OTP data, remove the combining feature from
+* the HW capabilities bitmap.
+*/
+   /*
+* XXX TODO: check reference driver and ath9k for what to do
+* here for WB335.  I think we have to actually disable the
+* LNA div processing in the HAL and instead use the hard
+* coded values; and then use BT diversity.
+*
+* .. but also need to setup MCI too for WB335..
+*/
+#if 0
+   if (sc->sc_pci_devinfo & (ATH9K_PCI_AR9565_1ANT | 
ATH9K_PCI_AR9565_2ANT)) {
+   device_printf(sc->sc_dev, "%s: WB335: disabling LNA mixer 
diversity\n",
+   __func__);
+   sc->sc_dolnadiv = 0;
+   }
+#endif
+
if (ath_hal_hasfastframes(ah))
ic->ic_caps |= IEEE80211_C_FF;
wmodes = ath_hal_getwirelessmodes(ah);
@@ -1351,6 +1384,7 @@ bad2:
ath_desc_free(sc);
ath_txdma_teardown(sc);
ath_rxdma_teardown(sc);
+
 bad:
if (ah)
ath_hal_detach(ah);
@@ -3611,6 +3645,8 @@ ath_mode_init(struct ath_softc *sc)
struct ath_hal *ah = sc->sc_ah;
u_int32_t rfilt;
 
+   /* XXX power state? */
+
/* configure rx filter */
rfilt = ath_calcrxfilter(sc);
ath_hal_setrxfilter(ah, rfilt);
@@ -5654,6 +5690,56 @@ ath_newstate(struct ieee80211vap *vap, e
 */
IEEE80211_LOCK_ASSERT(ic);
 
+   /*
+* XXX TODO: if nstate is _S_CAC, then we should disable
+* ACK processing until CAC is completed.
+*/
+
+   /*
+* XXX TODO: if we're on a passive channel, then we should
+* not allow any ACKs or self-generated frames until we hear
+* a beacon.  Unfortunately there isn't a notification from
+* net80211 so perhaps we could slot that particular check
+* into the mgmt receive path and just ensure that we clear
+* it on RX of beacons in passive mode (and only clear it
+* once, obviously.)
+*/
+
+   /*
+* XXX TODO: net80211 should be tracking whether channels
+* have heard beacons and are thus considered "OK" for
+* transmitting - and then inform the driver about this
+* state change.  That way if we hear an AP go quiet
+* (and nothing else is beaconing on a channel) the
+* channel can go back to being passive until another
+* beacon is heard.
+*/
+
+   /*
+* XXX TODO: if nstate is _S_CAC, then we should disable
+* ACK processing until CAC is completed.
+*/
+
+   /*
+* XXX TODO: if we're on a passive channel, then we should
+* not allow any ACKs or self-generated frames until we hear
+* a beacon.  Unfortunately there isn't a notification from
+* net80211 so perhaps we could slot that particular check
+* into the mgmt receive path and just ensure that we clear
+* it on RX of beacons in passi

svn commit: r312854 - head/sys/net80211

2017-01-26 Thread Adrian Chadd
Author: adrian
Date: Fri Jan 27 01:24:24 2017
New Revision: 312854
URL: https://svnweb.freebsd.org/changeset/base/312854

Log:
  [net80211] prepare configuration checks for VHT, fragment-offload and 
seqno-offload.
  
  * allocate an ext bit for fragment offload.  Some NICs (like the ath10k
hardware in native wifi or 802.3 mode) support doing packet fragmentation
in firmware/hardware, so we don't have to do it here.
  
  * allocate an ext bit for VHT and start using it.

Modified:
  head/sys/net80211/ieee80211_var.h

Modified: head/sys/net80211/ieee80211_var.h
==
--- head/sys/net80211/ieee80211_var.h   Fri Jan 27 01:17:00 2017
(r312853)
+++ head/sys/net80211/ieee80211_var.h   Fri Jan 27 01:24:24 2017
(r312854)
@@ -93,10 +93,13 @@
  * says that VHT is supported - and then this macro can be
  * changed.
  */
-#defineIEEE80211_CONF_VHT(ic)  ((ic)->ic_vhtcaps != 0)
+#defineIEEE80211_CONF_VHT(ic)  \
+   ((ic)->ic_flags_ext & IEEE80211_FEXT_VHT)
 
 #defineIEEE80211_CONF_SEQNO_OFFLOAD(ic)\
((ic)->ic_flags_ext & IEEE80211_FEXT_SEQNO_OFFLOAD)
+#defineIEEE80211_CONF_FRAG_OFFLOAD(ic) \
+   ((ic)->ic_flags_ext & IEEE80211_FEXT_FRAG_OFFLOAD)
 
 /*
  * 802.11 control state is split into a common portion that maps
@@ -633,11 +636,14 @@ MALLOC_DECLARE(M_80211_VAP);
 #defineIEEE80211_FEXT_UNIQMAC   0x0004 /* CONF: user or 
computed mac */
 #defineIEEE80211_FEXT_SCAN_OFFLOAD 0x0008  /* CONF: scan 
is fully offloaded */
 #defineIEEE80211_FEXT_SEQNO_OFFLOAD0x0010  /* CONF: driver 
does seqno insertion/allocation */
+#defineIEEE80211_FEXT_FRAG_OFFLOAD 0x0020  /* CONF: 
hardware does 802.11 fragmentation + assignment */
+#defineIEEE80211_FEXT_VHT  0x0040  /* CONF: VHT support */
 
 #defineIEEE80211_FEXT_BITS \
"\20\2INACT\3SCANWAIT\4BGSCAN\5WPS\6TSN\7SCANREQ\10RESUME" \
"\0114ADDR\12NONEPR_PR\13SWBMISS\14DFS\15DOTD\16STATEWAIT\17REINIT" \
-   
"\20BPF\21WDSLEGACY\22PROBECHAN\23UNIQMAC\24SCAN_OFFLOAD\25SEQNO_OFFLOAD"
+   
"\20BPF\21WDSLEGACY\22PROBECHAN\23UNIQMAC\24SCAN_OFFLOAD\25SEQNO_OFFLOAD" \
+   "\26VHT"
 
 /* ic_flags_ht/iv_flags_ht */
 #defineIEEE80211_FHT_NONHT_PR   0x0001 /* STATUS: non-HT sta 
present */
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r312855 - in head: . gnu/usr.bin/binutils/ld share/mk tools/build/options usr.bin/clang/lld

2017-01-26 Thread Ed Maste
Author: emaste
Date: Fri Jan 27 01:59:12 2017
New Revision: 312855
URL: https://svnweb.freebsd.org/changeset/base/312855

Log:
  Rename LLD_AS_LD to LLD_IS_LD, for consistency with CLANG_IS_CC
  
  Reported by:  Dan McGregor 

Added:
  head/tools/build/options/WITHOUT_LLD_IS_LD
 - copied unchanged from r312854, head/tools/build/options/WITHOUT_LLD_AS_LD
  head/tools/build/options/WITH_LLD_IS_LD
 - copied unchanged from r312854, head/tools/build/options/WITH_LLD_AS_LD
Deleted:
  head/tools/build/options/WITHOUT_LLD_AS_LD
  head/tools/build/options/WITH_LLD_AS_LD
Modified:
  head/Makefile.inc1
  head/UPDATING
  head/gnu/usr.bin/binutils/ld/Makefile
  head/share/mk/src.opts.mk
  head/usr.bin/clang/lld/Makefile

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Fri Jan 27 01:24:24 2017(r312854)
+++ head/Makefile.inc1  Fri Jan 27 01:59:12 2017(r312855)
@@ -516,7 +516,7 @@ TMAKE=  MAKEOBJDIRPREFIX=${OBJTREE} \
 # cross-tools stage
 XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} \
TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
-   MK_GDB=no MK_TESTS=no MK_LLD_AS_LD=no
+   MK_GDB=no MK_TESTS=no MK_LLD_IS_LD=no
 
 # kernel-tools stage
 KTMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \

Modified: head/UPDATING
==
--- head/UPDATING   Fri Jan 27 01:24:24 2017(r312854)
+++ head/UPDATING   Fri Jan 27 01:59:12 2017(r312855)
@@ -51,6 +51,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12
 
 ** SPECIAL WARNING: **
 
+20170127:
+   The WITH_LLD_AS_LD / WITHOUT_LLD_AS_LD build knobs have been renamed
+   WITH_LLD_IS_LD / WITHOUT_LLD_IS_LD, for consistency with CLANG_IS_CC.
+
 20170112:
The EM_MULTIQUEUE kernel configuration option is deprecated now that
the em(4) driver conforms to iflib specifications.

Modified: head/gnu/usr.bin/binutils/ld/Makefile
==
--- head/gnu/usr.bin/binutils/ld/Makefile   Fri Jan 27 01:24:24 2017
(r312854)
+++ head/gnu/usr.bin/binutils/ld/Makefile   Fri Jan 27 01:59:12 2017
(r312855)
@@ -49,7 +49,7 @@ CLEANFILES+=  ldemul-list.h stringify.sed
 
 FILES= ${LDSCRIPTS:S|^|ldscripts/|}
 FILESDIR=  ${SCRIPTDIR}
-.if ${MK_LLD_AS_LD} == "no"
+.if ${MK_LLD_IS_LD} == "no"
 LINKS= ${BINDIR}/ld.bfd ${BINDIR}/ld
 .endif
 

Modified: head/share/mk/src.opts.mk
==
--- head/share/mk/src.opts.mk   Fri Jan 27 01:24:24 2017(r312854)
+++ head/share/mk/src.opts.mk   Fri Jan 27 01:59:12 2017(r312855)
@@ -251,9 +251,9 @@ __DEFAULT_YES_OPTIONS+=LLVM_LIBUNWIND
 __DEFAULT_NO_OPTIONS+=LLVM_LIBUNWIND
 .endif
 .if ${__T} == "aarch64"
-__DEFAULT_YES_OPTIONS+=LLD_AS_LD
+__DEFAULT_YES_OPTIONS+=LLD_IS_LD
 .else
-__DEFAULT_NO_OPTIONS+=LLD_AS_LD
+__DEFAULT_NO_OPTIONS+=LLD_IS_LD
 .endif
 .if ${__T} == "aarch64" || ${__T} == "amd64"
 __DEFAULT_YES_OPTIONS+=LLD LLDB

Copied: head/tools/build/options/WITHOUT_LLD_IS_LD (from r312854, 
head/tools/build/options/WITHOUT_LLD_AS_LD)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/build/options/WITHOUT_LLD_IS_LD  Fri Jan 27 01:59:12 2017
(r312855, copy of r312854, head/tools/build/options/WITHOUT_LLD_AS_LD)
@@ -0,0 +1,2 @@
+.\" $FreeBSD$
+Set to use GNU binutils ld as the system linker, instead of LLVM's LLD.

Copied: head/tools/build/options/WITH_LLD_IS_LD (from r312854, 
head/tools/build/options/WITH_LLD_AS_LD)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/build/options/WITH_LLD_IS_LD Fri Jan 27 01:59:12 2017
(r312855, copy of r312854, head/tools/build/options/WITH_LLD_AS_LD)
@@ -0,0 +1,2 @@
+.\" $FreeBSD$
+Set to use LLVM's LLD as the system linker, instead of GNU binutils ld.

Modified: head/usr.bin/clang/lld/Makefile
==
--- head/usr.bin/clang/lld/Makefile Fri Jan 27 01:24:24 2017
(r312854)
+++ head/usr.bin/clang/lld/Makefile Fri Jan 27 01:59:12 2017
(r312855)
@@ -8,7 +8,7 @@ LLD_SRCS=   ${LLVM_SRCS}/tools/lld
 PACKAGE=   lld
 PROG_CXX=  ld.lld
 MAN=
-.if ${MK_LLD_AS_LD} != "no"
+.if ${MK_LLD_IS_LD} != "no"
 SYMLINKS=  ${PROG_CXX} ${BINDIR}/ld
 .endif
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r312857 - head

2017-01-26 Thread Ed Maste
Author: emaste
Date: Fri Jan 27 03:43:18 2017
New Revision: 312857
URL: https://svnweb.freebsd.org/changeset/base/312857

Log:
  Use cross-NM (XNM) in compat32 build
  
  An attempt to build mips64 using external toolchain failed as it tried
  to use the host amd64 nm.
  
  MFC after:1 month
  Sponsored by: The FreeBSD Foundation

Modified:
  head/Makefile.libcompat

Modified: head/Makefile.libcompat
==
--- head/Makefile.libcompat Fri Jan 27 02:35:05 2017(r312856)
+++ head/Makefile.libcompat Fri Jan 27 03:43:18 2017(r312857)
@@ -50,6 +50,8 @@ LIB32WMAKEFLAGS= LD="${XLD} -m elf32btsm
 LIB32WMAKEFLAGS+= OBJCOPY="${XOBJCOPY}"
 .endif
 
+LIB32WMAKEFLAGS+= NM="${XNM}"
+
 
 LIB32CFLAGS=   -DCOMPAT_32BIT
 LIB32DTRACE=   ${DTRACE} -32
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r312859 - head/sys/arm/ti/am335x

2017-01-26 Thread Ian Lepore
Author: ian
Date: Fri Jan 27 04:08:24 2017
New Revision: 312859
URL: https://svnweb.freebsd.org/changeset/base/312859

Log:
  Configure the timer capture pin to input mode in the timer control
  register, in addition to configuring it as input with the pinmux driver.
  
  There was a control register bit commented as "no desc in datasheet".  A
  later revision of the manual reveals the bit to be an input/output control
  for the timer pin.  In addition to configuring capture or pulse mode, you
  apparently have to separately configure the pin direction in the timer
  control register.
  
  Before this change, the timer block was apparently driving a signal onto a
  pad configured by pinmux as input.  Capture mode still accidentally worked
  for me during testing because I was using a very strong signal source that
  just out-muscled the weaker drive from the misconfigured pin.

Modified:
  head/sys/arm/ti/am335x/am335x_dmtpps.c
  head/sys/arm/ti/am335x/am335x_dmtreg.h

Modified: head/sys/arm/ti/am335x/am335x_dmtpps.c
==
--- head/sys/arm/ti/am335x/am335x_dmtpps.c  Fri Jan 27 03:44:50 2017
(r312858)
+++ head/sys/arm/ti/am335x/am335x_dmtpps.c  Fri Jan 27 04:08:24 2017
(r312859)
@@ -463,6 +463,14 @@ dmtpps_attach(device_t dev)
sc->tmr_num = ti_hwmods_get_unit(dev, "timer");
snprintf(sc->tmr_name, sizeof(sc->tmr_name), "DMTimer%d", sc->tmr_num);
 
+   /*
+* Configure the timer pulse/capture pin to input/capture mode.  This is
+* required in addition to configuring the pin as input with the pinmux
+* controller (which was done via fdt data or tunable at probe time).
+*/
+   sc->tclr = DMT_TCLR_GPO_CFG;
+   DMTIMER_WRITE4(sc, DMT_TCLR, sc->tclr);
+
/* Set up timecounter hardware, start it. */
DMTIMER_WRITE4(sc, DMT_TSICR, DMT_TSICR_RESET);
while (DMTIMER_READ4(sc, DMT_TIOCP_CFG) & DMT_TIOCP_RESET)

Modified: head/sys/arm/ti/am335x/am335x_dmtreg.h
==
--- head/sys/arm/ti/am335x/am335x_dmtreg.h  Fri Jan 27 03:44:50 2017
(r312858)
+++ head/sys/arm/ti/am335x/am335x_dmtreg.h  Fri Jan 27 04:08:24 2017
(r312859)
@@ -62,7 +62,7 @@
 #define  DMT_TCLR_TRGMODE_BOTH   (2 << 10) /* Trigger on match + 
ovflow */
 #define  DMT_TCLR_PWM_PTOGGLE(1 << 12) /* PWM toggles */
 #define  DMT_TCLR_CAP_MODE_2ND   (1 << 13) /* Capture second event 
mode */
-#define  DMT_TCLR_GPO_CFG(1 << 14) /* (no descr in 
datasheet) */
+#define  DMT_TCLR_GPO_CFG(1 << 14) /* Tmr pin conf, 0=out, 
1=in */
 #defineDMT_TCRR0x3C/* Counter Register */
 #defineDMT_TLDR0x40/* Load Reg */
 #defineDMT_TTGR0x44/* Trigger Reg */
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r312770 - in head/sys: net netinet netinet6

2017-01-26 Thread Bruce Evans

On Thu, 26 Jan 2017, Gleb Smirnoff wrote:


On Thu, Jan 26, 2017 at 02:03:05PM +1100, Bruce Evans wrote:
B> On Thu, 26 Jan 2017, Konstantin Belousov wrote:
B>
B> > On Wed, Jan 25, 2017 at 02:20:06PM -0800, Gleb Smirnoff wrote:
B> >>   Thanks, Luiz!
B> >>
B> >>   One stylistic nit that I missed in review:
B> >>
B> >> L>  static int
B> >> L> -in_difaddr_ioctl(caddr_t data, struct ifnet *ifp, struct thread *td)
B> >> L> +in_difaddr_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp, struct 
thread *td)
B> >> L>  {
B> >> L>const struct ifreq *ifr = (struct ifreq *)data;
B> >> L>const struct sockaddr_in *addr = (const struct sockaddr_in *)
B> >> L> @@ -618,7 +618,8 @@ in_difaddr_ioctl(caddr_t data, struct if
B> >> L>in_ifadown(&ia->ia_ifa, 1);
B> >> L>
B> >> L>if (ia->ia_ifa.ifa_carp)
B> >> L> -  (*carp_detach_p)(&ia->ia_ifa);
B> >> L> +  (*carp_detach_p)(&ia->ia_ifa,
B> >> L> +  (cmd == SIOCDIFADDR) ? false : true);
B> >>
B> >> Can we change the very last line to:
B> >>
B> >>  (cmd == SIOCAIFADDR) ? true : false);
B>
B> That is not stylistic, but invert the result.  Perhaps you meant to
B> reverse the test to avoid negative logic for the result.

It uses different ioctl value, so it doesn't invert result. Instead
of !SIOCDIFADDR I want more explicit SIOCAIFADDR.


Oops.  So it is non-stylistic in a different way.  cmd can only be
SIOCDIFADDR, or one or both of SIOCAIFADDR.  Than is unclear.  Assuming
that the original code is correct and that all 3 cases can occur,
inversion would break all 3 cases, while the non-stylistic change breaks
only the O_SIOCAIFADDR case.

Since there can be more than 2 cases and it isn't clear that there are
at most 3, any boolean test on 1 of the cases is going to be unclear.
Positive logic will be clearer, but that requires comparison with 2
cases.  The current code use negative logic to select these 2 cases as
the complement of the other case.

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