svn commit: r341394 - stable/11/libexec/rtld-elf/arm

2018-12-01 Thread Michal Meloun
Author: mmel
Date: Sun Dec  2 07:45:22 2018
New Revision: 341394
URL: https://svnweb.freebsd.org/changeset/base/341394

Log:
  MFC r338317:
  
Fix wrong offset calculation for R_ARM_TLS_TPOFF32 relocations.  
TLS_TCB_SIZE
is already accounted in defobj-> tlsoffset so all these symbols were
incorrectly relocated by +8.

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

Modified: stable/11/libexec/rtld-elf/arm/reloc.c
==
--- stable/11/libexec/rtld-elf/arm/reloc.c  Sun Dec  2 07:39:16 2018
(r341393)
+++ stable/11/libexec/rtld-elf/arm/reloc.c  Sun Dec  2 07:45:22 2018
(r341394)
@@ -327,9 +327,7 @@ reloc_nonplt_object(Obj_Entry *obj, const Elf_Rel *rel
if (!defobj->tls_done && allocate_tls_offset(obj))
return -1;
 
-   /* XXX: FIXME */
-   tmp = (Elf_Addr)def->st_value + defobj->tlsoffset +
-   TLS_TCB_SIZE;
+   tmp = (Elf_Addr)def->st_value + defobj->tlsoffset;
if (__predict_true(RELOC_ALIGNED_P(where)))
*where = tmp;
else
___
svn-src-all@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 commit: r341393 - head/sys/arm/arm

2018-12-01 Thread Michal Meloun
Author: mmel
Date: Sun Dec  2 07:39:16 2018
New Revision: 341393
URL: https://svnweb.freebsd.org/changeset/base/341393

Log:
  Return computed real memory size, not a value from similarly named
  global variable.
  
  MFC after:1 week

Modified:
  head/sys/arm/arm/physmem.c

Modified: head/sys/arm/arm/physmem.c
==
--- head/sys/arm/arm/physmem.c  Sun Dec  2 05:06:37 2018(r341392)
+++ head/sys/arm/arm/physmem.c  Sun Dec  2 07:39:16 2018(r341393)
@@ -265,7 +265,7 @@ regions_to_avail(vm_paddr_t *avail, uint32_t exflags, 
if (pavail != NULL)
*pavail = availmem;
if (prealmem != NULL)
-   *prealmem = realmem;
+   *prealmem = totalmem;
return (acnt);
 }
 
___
svn-src-all@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 commit: r341392 - in head/tests/sys/geom/class: . eli mirror

2018-12-01 Thread Alan Somers
Author: asomers
Date: Sun Dec  2 05:06:37 2018
New Revision: 341392
URL: https://svnweb.freebsd.org/changeset/base/341392

Log:
  Unbreak geli/gmirror testcases if their geom classes cannot be loaded
  
  The problem with the logic prior to this commit was twofold:
  
  1. The wrong set of idioms (TAP-compatible) were being applied to the ATF
 testcases when run, resulting in confusing ATF failure results on setup.
  2. The cleanup subroutines were broken when the geom classes could not be
 loaded as they exited with 0 unexpectedly.
  
  This commit changes the test code to source the class-specific configuration
  (conf.sh) once globally, instead of sourcing it per testcase and per cleanup
  subroutine, and to call the ATF-specific setup subroutine(s) inline in
  the testcases.
  
  The refactoring done is effectively a no-op for the TAP testcases, modulo
  any refactoring done to create common code between the ATF and TAP
  testcases.
  
  This unbreaks the geli testcases converted to ATF in r327662 and r327683,
  and the gmirror testcases added in r327780, respectively, when the geom
  class could not be loaded.
  
  tests/sys/geom/class/mirror/...
  While here, ignore errors when turning debug failpoint sysctl off, which
  could occur if the gmirror class was not loaded.
  
  Submitted by: ngie
  MFC after:2 weeks
  Pull Request: https://github.com/freebsd/freebsd/pull/241

Modified:
  head/tests/sys/geom/class/eli/attach_test.sh
  head/tests/sys/geom/class/eli/conf.sh
  head/tests/sys/geom/class/eli/configure_test.sh
  head/tests/sys/geom/class/eli/delkey_test.sh
  head/tests/sys/geom/class/eli/detach_test.sh
  head/tests/sys/geom/class/eli/init_test.sh
  head/tests/sys/geom/class/eli/integrity_test.sh
  head/tests/sys/geom/class/eli/kill_test.sh
  head/tests/sys/geom/class/eli/misc_test.sh
  head/tests/sys/geom/class/eli/onetime_test.sh
  head/tests/sys/geom/class/eli/resize_test.sh
  head/tests/sys/geom/class/eli/setkey_test.sh
  head/tests/sys/geom/class/geom_subr.sh
  head/tests/sys/geom/class/mirror/sync_error.sh

Modified: head/tests/sys/geom/class/eli/attach_test.sh
==
--- head/tests/sys/geom/class/eli/attach_test.shSun Dec  2 02:20:35 
2018(r341391)
+++ head/tests/sys/geom/class/eli/attach_test.shSun Dec  2 05:06:37 
2018(r341392)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+. $(atf_get_srcdir)/conf.sh
+
 atf_test_case attach_d cleanup
 attach_d_head()
 {
@@ -8,7 +10,7 @@ attach_d_head()
 }
 attach_d_body()
 {
-   . $(atf_get_srcdir)/conf.sh
+   geli_test_setup
 
sectors=100
md=$(attach_md -t malloc -s `expr $sectors + 1`)
@@ -35,7 +37,6 @@ attach_d_body()
 }
 attach_d_cleanup()
 {
-   . $(atf_get_srcdir)/conf.sh
geli_test_cleanup
 }
 
@@ -47,7 +48,7 @@ attach_r_head()
 }
 attach_r_body()
 {
-   . $(atf_get_srcdir)/conf.sh
+   geli_test_setup
 
sectors=100
md=$(attach_md -t malloc -s `expr $sectors + 1`)
@@ -64,7 +65,6 @@ attach_r_body()
 }
 attach_r_cleanup()
 {
-   . $(atf_get_srcdir)/conf.sh
geli_test_cleanup
 }
 
@@ -76,7 +76,7 @@ nokey_head()
 }
 nokey_body()
 {
-   . $(atf_get_srcdir)/conf.sh
+   geli_test_setup
 
sectors=100
md=$(attach_md -t malloc -s `expr $sectors + 1`)
@@ -88,7 +88,6 @@ nokey_body()
 }
 nokey_cleanup()
 {
-   . $(atf_get_srcdir)/conf.sh
geli_test_cleanup
 }
 

Modified: head/tests/sys/geom/class/eli/conf.sh
==
--- head/tests/sys/geom/class/eli/conf.sh   Sun Dec  2 02:20:35 2018
(r341391)
+++ head/tests/sys/geom/class/eli/conf.sh   Sun Dec  2 05:06:37 2018
(r341392)
@@ -82,7 +82,6 @@ for_each_geli_config_nointegrity() {
done
 }
 
-
 geli_test_cleanup()
 {
if [ -f "$TEST_MDS_FILE" ]; then
@@ -95,4 +94,10 @@ geli_test_cleanup()
true
 }
 
+geli_test_setup()
+{
+   geom_atf_test_setup
+}
+
+ATF_TEST=true
 . `dirname $0`/../geom_subr.sh

Modified: head/tests/sys/geom/class/eli/configure_test.sh
==
--- head/tests/sys/geom/class/eli/configure_test.sh Sun Dec  2 02:20:35 
2018(r341391)
+++ head/tests/sys/geom/class/eli/configure_test.sh Sun Dec  2 05:06:37 
2018(r341392)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+. $(atf_get_srcdir)/conf.sh
+
 atf_test_case configure_b_B cleanup
 configure_b_B_head()
 {
@@ -8,7 +10,7 @@ configure_b_B_head()
 }
 configure_b_B_body()
 {
-   . $(atf_get_srcdir)/conf.sh
+   geli_test_setup
 
sectors=100
md=$(attach_md -t malloc -s `expr $sectors + 1`)
@@ -49,7 +51,6 @@ configure_b_B_body()
 }
 configure_b_B_cleanup()
 {
-   . $(atf_get_srcdir)/conf.sh
geli_test_cleanup
 }
 

Modified: head/tests/sys/geom/class/eli/delkey_test.sh
==

Svn-src-all, The most user-friendly method to rank a website

2018-12-01 Thread he...@myownphrase.com
Hi Svn-src-all,

If the phrase you're trying to rank well for aren't competitive then getting
good placement is pretty easy. Just follow our new technology and you will get
the best of it.
This technology can place your web page on top of search engines and keep it
above your competitors during the whole year so that you can renew it every year
just like domains. 

You can get more information about the technology from after visiting the
website. You can fill online quote form or call. In meantime, you can see how it
works in 3 easy steps:
- Go to our website and click on DEMO button.
- Type your website 
freebsd org and keyword in demo form.
- Click on VIEW ONLINE DEMO and see results.


Enjoy,
Henry

___
svn-src-all@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"


Re: svn commit: r340997 - head/lib/libarchive

2018-12-01 Thread Justin Hibbits
On Mon, Nov 26, 2018 at 3:45 PM Martin Matuska  wrote:
>
> Author: mm
> Date: Mon Nov 26 21:45:27 2018
> New Revision: 340997
> URL: https://svnweb.freebsd.org/changeset/base/340997
>
> Log:
>   libarchive configuration changes
>   - move HAVE_BZLIB_H, HAVE_LIBLZMA and HAVE_LZMA_H to config_freebsd.h
>   - activate support for multi-threaded lzma encoding [1]
>
>   PR:   233543 [1]
>   Reported by:  cem
>   MFC after:1 week
>
> Modified:
>   head/lib/libarchive/Makefile
>   head/lib/libarchive/config_freebsd.h
>
> Modified: head/lib/libarchive/Makefile
> ==
> --- head/lib/libarchive/MakefileMon Nov 26 20:56:05 2018
> (r340996)
> +++ head/lib/libarchive/MakefileMon Nov 26 21:45:27 2018
> (r340997)
> @@ -7,7 +7,6 @@ _LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive
>  LIB=   archive
>
>  LIBADD=z bz2 lzma bsdxml
> -CFLAGS+= -DHAVE_BZLIB_H=1 -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1
>
>  # FreeBSD SHLIB_MAJOR value is managed as part of the FreeBSD system.
>  # It has no real relation to the libarchive version number.
>
> Modified: head/lib/libarchive/config_freebsd.h
> ==
> --- head/lib/libarchive/config_freebsd.hMon Nov 26 20:56:05 2018  
>   (r340996)
> +++ head/lib/libarchive/config_freebsd.hMon Nov 26 21:45:27 2018  
>   (r340997)
> @@ -133,14 +133,17 @@
>  #define HAVE_LCHFLAGS 1
>  #define HAVE_LCHMOD 1
>  #define HAVE_LCHOWN 1
> +#define HAVE_LIBLZMA 1
>  #define HAVE_LIBZ 1
>  #define HAVE_LIMITS_H 1
>  #define HAVE_LINK 1
> +#define HAVE_LZMA_H 1
>  #define HAVE_LOCALE_H 1
>  #define HAVE_LOCALTIME_R 1
>  #define HAVE_LONG_LONG_INT 1
>  #define HAVE_LSTAT 1
>  #define HAVE_LUTIMES 1
> +#define HAVE_LZMA_STREAM_ENCODER_MT 1
>  #define HAVE_MBRTOWC 1
>  #define HAVE_MEMMOVE 1
>  #define HAVE_MEMORY_H 1
>

This breaks ports-mgmt/pkg now, with the following failure log:

--- pkg-static ---
/usr/lib/liblzma.a(stream_encoder_mt.o): In function `mythread_cond_init':
/usr/local/poudriere/jails/ppc64/usr/src/contrib/xz/src/common/mythread.h:230:
undefined reference to `pthread_condattr_init'
/usr/local/poudriere/jails/ppc64/usr/src/contrib/xz/src/common/mythread.h:233:
undefined reference to `pthread_condattr_setclock'
/usr/local/poudriere/jails/ppc64/usr/src/contrib/xz/src/common/mythread.h:237:
undefined reference to `pthread_condattr_destroy'
/usr/lib/liblzma.a(stream_encoder_mt.o): In function `get_thread':
/usr/local/poudriere/jails/ppc64/usr/src/contrib/xz/src/common/mythread.h:237:
undefined reference to `pthread_condattr_destroy'
/usr/lib/liblzma.a(stream_encoder_mt.o): In function `mythread_cond_init':
/usr/local/poudriere/jails/ppc64/usr/src/contrib/xz/src/common/mythread.h:233:
undefined reference to `pthread_condattr_setclock'
/usr/local/poudriere/jails/ppc64/usr/src/contrib/xz/src/common/mythread.h:237:
undefined reference to `pthread_condattr_destroy'
/usr/local/poudriere/jails/ppc64/usr/src/contrib/xz/src/common/mythread.h:230:
undefined reference to `pthread_condattr_init'
/usr/local/poudriere/jails/ppc64/usr/src/contrib/xz/src/common/mythread.h:237:
undefined reference to `pthread_condattr_destroy'
*** [pkg-static] Error code 1

- Justin
___
svn-src-all@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 commit: r341391 - head/stand/uboot/common

2018-12-01 Thread Justin Hibbits
Author: jhibbits
Date: Sun Dec  2 02:20:35 2018
New Revision: 341391
URL: https://svnweb.freebsd.org/changeset/base/341391

Log:
  ubldr: Force 'usefdt' variable to 1 for powerpc
  
  The fdt is gated, on powerpc, with a 'usefdt' environment variable.  Force
  enable it in ubldr, so that the fdt is passed through the metadata.

Modified:
  head/stand/uboot/common/main.c

Modified: head/stand/uboot/common/main.c
==
--- head/stand/uboot/common/main.c  Sun Dec  2 00:41:43 2018
(r341390)
+++ head/stand/uboot/common/main.c  Sun Dec  2 02:20:35 2018
(r341391)
@@ -497,6 +497,9 @@ main(int argc, char **argv)
 do_interact:
setenv("LINES", "24", 1);   /* optional */
setenv("prompt", "loader>", 1);
+#ifdef __powerpc__
+   setenv("usefdt", "1", 1);
+#endif
 
archsw.arch_loadaddr = uboot_loadaddr;
archsw.arch_getdev = uboot_getdev;
___
svn-src-all@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 commit: r341390 - head/tests/sys/geom/class/eli

2018-12-01 Thread Alan Somers
Author: asomers
Date: Sun Dec  2 00:41:43 2018
New Revision: 341390
URL: https://svnweb.freebsd.org/changeset/base/341390

Log:
  Remove some dead code from the geli tests
  
  This is detritus in the Makefile, leftover from 327662.
  
  MFC after:2 weeks

Modified:
  head/tests/sys/geom/class/eli/Makefile

Modified: head/tests/sys/geom/class/eli/Makefile
==
--- head/tests/sys/geom/class/eli/Makefile  Sat Dec  1 21:37:47 2018
(r341389)
+++ head/tests/sys/geom/class/eli/Makefile  Sun Dec  2 00:41:43 2018
(r341390)
@@ -21,10 +21,6 @@ ATF_TESTS_SH+=   setkey_test
 
 ${PACKAGE}FILES+=  conf.sh
 
-.for t in ${TAP_TESTS_SH}
-TEST_METADATA.$t+= required_user="root"
-.endfor
-
 CFLAGS.pbkdf2_test=-I${SRCTOP}/sys
 
 SRCS.pbkdf2_test=  \
___
svn-src-all@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 commit: r341389 - head/sys/powerpc/cpufreq

2018-12-01 Thread Conrad Meyer
Author: cem
Date: Sat Dec  1 21:37:47 2018
New Revision: 341389
URL: https://svnweb.freebsd.org/changeset/base/341389

Log:
  pmcr: Fix pstate setting on Power8
  
  Fix p-state setting on Power8 by removing the accidental double-indirection of
  the pstate_ids table.
  
  The pstate_ids table comes from the OF property "ibm,pstate-ids."  On Power9,
  the values happen to be identical to the indices, so the extra indirection was
  harmless.  On Power8, the values were out of the range [0, npstates], so
  pmcr_set() would fail the spec[0] range check with EINVAL.
  
  While here, include both the value and index in the driver-specific register
  array as spec[0] and spec[1] respectively.  They're redundant, but relatively
  harmless, and it may aid debugging.
  
  While here, fix the range check to exclude the index npstates, which is one
  past the last valid index.
  
  PR:   233693
  Reported and tested by:   sbruno
  Reviewed by:  jhibbits

Modified:
  head/sys/powerpc/cpufreq/pmcr.c

Modified: head/sys/powerpc/cpufreq/pmcr.c
==
--- head/sys/powerpc/cpufreq/pmcr.c Sat Dec  1 21:28:05 2018
(r341388)
+++ head/sys/powerpc/cpufreq/pmcr.c Sat Dec  1 21:37:47 2018
(r341389)
@@ -174,6 +174,7 @@ pmcr_settings(device_t dev, struct cf_setting *sets, i
for (i = 0; i < npstates; i++) {
sets[i].freq = pstate_freqs[i];
sets[i].spec[0] = pstate_ids[i];
+   sets[i].spec[1] = i;
sets[i].dev = dev;
}
*count = npstates;
@@ -189,13 +190,11 @@ pmcr_set(device_t dev, const struct cf_setting *set)
if (set == NULL)
return (EINVAL);
 
-   if (set->spec[0] < 0 || set->spec[0] > npstates)
+   if (set->spec[1] < 0 || set->spec[1] >= npstates)
return (EINVAL);
 
-   pmcr = ((long)pstate_ids[set->spec[0]] << PMCR_LOWERPS_SHIFT) &
-   PMCR_LOWERPS_MASK;
-   pmcr |= ((long)pstate_ids[set->spec[0]] << PMCR_UPPERPS_SHIFT) &
-   PMCR_UPPERPS_MASK;
+   pmcr = ((long)set->spec[0] << PMCR_LOWERPS_SHIFT) & PMCR_LOWERPS_MASK;
+   pmcr |= ((long)set->spec[0] << PMCR_UPPERPS_SHIFT) & PMCR_UPPERPS_MASK;
pmcr |= PMCR_VERSION_1;
 
mtspr(SPR_PMCR, pmcr);
@@ -228,6 +227,7 @@ pmcr_get(device_t dev, struct cf_setting *set)
return (EINVAL);
 
set->spec[0] = pstate;
+   set->spec[1] = i;
set->freq = pstate_freqs[i];
 
set->dev = dev;
___
svn-src-all@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"


Re: svn commit: r341377 - head/sys/contrib/ipfilter/netinet

2018-12-01 Thread Cy Schubert
In message <20181201214705.7d2dca977d720467db57e...@bidouilliste.com>, 
Emmanuel
 Vadot writes:
> 
>
>  Hi Cy,
>
> On Sat, 1 Dec 2018 17:59:42 + (UTC)
> Cy Schubert  wrote:
>
> > Author: cy
> > Date: Sat Dec  1 17:59:41 2018
> > New Revision: 341377
> > URL: https://svnweb.freebsd.org/changeset/base/341377
> > 
> > Log:
> >   Restore handling of PMTU discovery, removed through an unifdef(1)
> >   following the MFV of r254219 into r255332. In addition the 'FreeBSD'
> >   macro was never defined in ipfilter 5.1.2 thus it never would have
> >   been enabled in the first place.
> >   
> >   This work is prompted by a general cleanup of the IP Filter code
> >   prompted by working to resolve a PR. More to follow.
> >   
> >   MFC after:1 week
> > 
> > Modified:
> >   head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
> > 
> > Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
>
>  This breaks a lot of things : https://ci.freebsd.org/tinderbox/

I see, gcc platforms. Thanks cem@ for the quick fix.


-- 
Cheers,
Cy Schubert 
FreeBSD UNIX: Web:  http://www.FreeBSD.org

The need of the many outweighs the greed of the few.


___
svn-src-all@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 commit: r341388 - head/sys/contrib/ipfilter/netinet

2018-12-01 Thread Conrad Meyer
Author: cem
Date: Sat Dec  1 21:28:05 2018
New Revision: 341388
URL: https://svnweb.freebsd.org/changeset/base/341388

Log:
  Restore build of the kernel, removed through r341377
  
  Turns out we already had a path_mtu_discovery variable.
  
  X-MFC-with:   r341377

Modified:
  head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c

Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
==
--- head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c  Sat Dec  1 20:39:20 
2018(r341387)
+++ head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c  Sat Dec  1 21:28:05 
2018(r341388)
@@ -85,9 +85,6 @@ static const char rcsid[] = "@(#)$Id$";
 #endif
 extern int ip_optcopy __P((struct ip *, struct ip *));
 
-VNET_DECLARE(int, path_mtu_discovery);
-#defineV_path_mtu_discoveryVNET(path_mtu_discovery)
-
 # ifdef IPFILTER_M_IPFILTER
 MALLOC_DEFINE(M_IPFILTER, "ipfilter", "IP Filter packet filter data 
structures");
 # endif
___
svn-src-all@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"


Re: svn commit: r341377 - head/sys/contrib/ipfilter/netinet

2018-12-01 Thread Emmanuel Vadot


 Hi Cy,

On Sat, 1 Dec 2018 17:59:42 + (UTC)
Cy Schubert  wrote:

> Author: cy
> Date: Sat Dec  1 17:59:41 2018
> New Revision: 341377
> URL: https://svnweb.freebsd.org/changeset/base/341377
> 
> Log:
>   Restore handling of PMTU discovery, removed through an unifdef(1)
>   following the MFV of r254219 into r255332. In addition the 'FreeBSD'
>   macro was never defined in ipfilter 5.1.2 thus it never would have
>   been enabled in the first place.
>   
>   This work is prompted by a general cleanup of the IP Filter code
>   prompted by working to resolve a PR. More to follow.
>   
>   MFC after:  1 week
> 
> Modified:
>   head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
> 
> Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c

 This breaks a lot of things : https://ci.freebsd.org/tinderbox/

-- 
Emmanuel Vadot  
___
svn-src-all@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 commit: r341387 - head/lib/libc/gen

2018-12-01 Thread Justin Hibbits
Author: jhibbits
Date: Sat Dec  1 20:39:20 2018
New Revision: 341387
URL: https://svnweb.freebsd.org/changeset/base/341387

Log:
  Fix PowerPC64 ELFv1-specific problem in __elf_phdr_match_addr() leading to 
crash
  in threaded programs that unload libraries.
  
  Summary:
  The GNOME update to 3.28 exposed a bug in __elf_phdr_match_addr(), which leads
  to a crash when building devel/libsoup on powerpc64.
  
  Due to __elf_phdr_match_addr() limiting its search to PF_X sections, on the
  PPC64 ELFv1 ABI, it was never matching function pointers properly.
  
  This meant that libthr was never cleaning up its atfork list in
  __pthread_cxa_finalize(), so if a library with an atfork handler was unloaded,
  libthr would crash on the next fork.
  
  Normally, the null pointer check it does before calling the handler would 
avoid
  this crash, but, due to PPC64 ELFv1 using function descriptors instead of raw
  function pointers, a null check against the pointer itself is insufficient, as
  the pointer itself was not null, it was just pointing at a function descriptor
  that had been zeroed. (Which is an ABI violation.)
  
  Calling a zeroed function descriptor on PPC64 ELFv1 causes a jump to address 0
  with a zeroed r2 and r11.
  
  Submitted by: git_bdragon.rtk0.net
  Reviewed By:  kib
  MFC after:1 week
  Differential Revision: https://reviews.freebsd.org/D18364

Modified:
  head/lib/libc/gen/elf_utils.c

Modified: head/lib/libc/gen/elf_utils.c
==
--- head/lib/libc/gen/elf_utils.c   Sat Dec  1 20:31:49 2018
(r341386)
+++ head/lib/libc/gen/elf_utils.c   Sat Dec  1 20:39:20 2018
(r341387)
@@ -47,8 +47,21 @@ __elf_phdr_match_addr(struct dl_phdr_info *phdr_info, 
 
for (i = 0; i < phdr_info->dlpi_phnum; i++) {
ph = &phdr_info->dlpi_phdr[i];
-   if (ph->p_type != PT_LOAD || (ph->p_flags & PF_X) == 0)
+   if (ph->p_type != PT_LOAD)
continue;
+
+   /* ELFv1 ABI for powerpc64 passes function descriptor
+* pointers around, not function pointers.  The function
+* descriptors live in .opd, which is a non-executable segment.
+* The PF_X check would therefore make all address checks fail,
+* causing a crash in some instances.  Don't skip over
+* non-executable segments in the ELFv1 powerpc64 case.
+*/
+#if !defined(__powerpc64__) || (defined(_CALL_ELF) && _CALL_ELF == 2)
+   if ((ph->p_flags & PF_X) == 0)
+   continue;
+#endif
+
if (phdr_info->dlpi_addr + ph->p_vaddr <= (uintptr_t)addr &&
(uintptr_t)addr + sizeof(addr) < phdr_info->dlpi_addr +
ph->p_vaddr + ph->p_memsz)
___
svn-src-all@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 commit: r341386 - in head/sys: arm64/conf conf dev/iicbus

2018-12-01 Thread Emmanuel Vadot
Author: manu
Date: Sat Dec  1 20:31:49 2018
New Revision: 341386
URL: https://svnweb.freebsd.org/changeset/base/341386

Log:
  Add Silergy SYR827 PMIC driver
  
  SYR827 is a PMIC that can output a voltage from 0.7125V to 1.5V in 12.5mV 
steps
  It's controlled via I2C.
  
  MFC after:1 month

Added:
  head/sys/dev/iicbus/syr827.c   (contents, props changed)
Modified:
  head/sys/arm64/conf/GENERIC
  head/sys/conf/files

Modified: head/sys/arm64/conf/GENERIC
==
--- head/sys/arm64/conf/GENERIC Sat Dec  1 20:31:05 2018(r341385)
+++ head/sys/arm64/conf/GENERIC Sat Dec  1 20:31:49 2018(r341386)
@@ -211,6 +211,7 @@ device  iicbus
 device iic
 device twsi# Allwinner I2C controller
 device rk_i2c  # RockChip I2C controller
+device syr827  # Silergy SYR827 PMIC
 
 # Clock and reset controllers
 device aw_ccu  # Allwinner clock controller

Modified: head/sys/conf/files
==
--- head/sys/conf/files Sat Dec  1 20:31:05 2018(r341385)
+++ head/sys/conf/files Sat Dec  1 20:31:49 2018(r341386)
@@ -1826,6 +1826,7 @@ dev/iicbus/ds13rtc.c  optional ds13rtc | 
ds133x | ds13
 dev/iicbus/ds1672.coptional ds1672
 dev/iicbus/ds3231.coptional ds3231
 dev/iicbus/rtc8583.c   optional rtc8583
+dev/iicbus/syr827.coptional ext_resources syr827
 dev/iicbus/icee.c  optional icee
 dev/iicbus/if_ic.c optional ic
 dev/iicbus/iic.c   optional iic

Added: head/sys/dev/iicbus/syr827.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/dev/iicbus/syr827.cSat Dec  1 20:31:49 2018
(r341386)
@@ -0,0 +1,354 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
+ * Copyright (c) 2016 Jared McNeill 
+ * Copyright (c) 2018 Emmanuel Vadot 
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+
+#include "iicbus_if.h"
+#include "regdev_if.h"
+
+#defineVSEL0   0x00
+#defineVSEL1   0x01
+
+#defineVSEL_BUCK_EN(1 << 7)
+#defineVSEL_NSEL_MASK  0x3F
+#defineVSEL_VOLTAGE_BASE   712500 /* uV */
+#defineVSEL_VOLTAGE_STEP   12500  /* uV */
+
+#defineID1 0x03
+#define ID1_VENDOR_MASK0xE0
+#define ID1_VENDOR_SHIFT   5
+#define ID1_DIE_MASK   0xF
+
+#defineID2 0x4
+#define ID2_DIE_REV_MASK   0xF
+
+static struct ofw_compat_data compat_data[] = {
+   { "silergy,syr827", 1 },
+   { NULL, 0 }
+};
+
+struct syr827_reg_sc {
+   struct regnode  *regnode;
+   device_tbase_dev;
+   phandle_t   xref;
+   struct regnode_std_param *param;
+
+   int volt_reg;
+   int suspend_reg;
+};
+
+struct syr827_softc {
+   uint16_taddr;
+   struct intr_config_hook intr_hook;
+
+   /* Regulator */
+   struct syr827_reg_sc*reg;
+};
+
+static int
+syr827_read(device_t dev, uint8_t reg, uint8_t *data, uint8_t size)
+{
+   struct syr827_softc *sc;
+   struct iic_msg msg[2];
+
+   sc = device_get_softc(dev);
+
+   msg[0].slave = sc->addr;
+   msg

svn commit: r341384 - head/sys/contrib/ipfilter/netinet

2018-12-01 Thread Cy Schubert
Author: cy
Date: Sat Dec  1 20:30:18 2018
New Revision: 341384
URL: https://svnweb.freebsd.org/changeset/base/341384

Log:
  Remove IFF_DRVRLOCK as it is used in IRIX only (and we all know IRIX
  is dead). This includes collaterally removing code shared by HP/UX,
  SGI, and Linux, where IP Filter will in all likelihood for various
  reasons never run again.
  
  MFC after:1 week

Modified:
  head/sys/contrib/ipfilter/netinet/ip_log.c

Modified: head/sys/contrib/ipfilter/netinet/ip_log.c
==
--- head/sys/contrib/ipfilter/netinet/ip_log.c  Sat Dec  1 20:29:42 2018
(r341383)
+++ head/sys/contrib/ipfilter/netinet/ip_log.c  Sat Dec  1 20:30:18 2018
(r341384)
@@ -97,14 +97,8 @@ struct file;
 #include 
 #ifdef __sgi
 # include 
-# ifdef IFF_DRVRLOCK /* IRIX6 */
-#  include 
-# endif
 #endif
-#if !defined(__hpux) && !defined(linux) && \
-!(defined(__sgi) && !defined(IFF_DRVRLOCK)) /*IRIX<6*/
 # include 
-#endif
 #include 
 #include 
 #include 
___
svn-src-all@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 commit: r341385 - head/sys/arm64/rockchip

2018-12-01 Thread Emmanuel Vadot
Author: manu
Date: Sat Dec  1 20:31:05 2018
New Revision: 341385
URL: https://svnweb.freebsd.org/changeset/base/341385

Log:
  arm64: rockchip: rk805: Add basic support for RK808 PMIC
  
  RK808 PMIC is the companion chip for RK3399 SoC.
  Add basic regulator support in RK805 since they are similar.
  
  MFC after:1 month

Modified:
  head/sys/arm64/rockchip/rk805.c
  head/sys/arm64/rockchip/rk805reg.h

Modified: head/sys/arm64/rockchip/rk805.c
==
--- head/sys/arm64/rockchip/rk805.c Sat Dec  1 20:30:18 2018
(r341384)
+++ head/sys/arm64/rockchip/rk805.c Sat Dec  1 20:31:05 2018
(r341385)
@@ -51,8 +51,14 @@ __FBSDID("$FreeBSD$");
 
 MALLOC_DEFINE(M_RK805_REG, "RK805 regulator", "RK805 power regulator");
 
+enum rk_pmic_type {
+   RK805 = 1,
+   RK808,
+};
+
 static struct ofw_compat_data compat_data[] = {
-   {"rockchip,rk805", 1},
+   {"rockchip,rk805", RK805},
+   {"rockchip,rk808", RK808},
{NULL, 0}
 };
 
@@ -83,6 +89,7 @@ struct rk805_softc {
struct resource *   res[1];
void *  intrcookie;
struct intr_config_hook intr_hook;
+   enum rk_pmic_type   type;
 
struct rk805_reg_sc **regs;
int nregs;
@@ -133,6 +140,51 @@ static struct rk805_regdef rk805_regdefs[] = {
},
 };
 
+static struct rk805_regdef rk808_regdefs[] = {
+   {
+   .id = RK805_DCDC1,
+   .name = "DCDC_REG1",
+   .enable_reg = RK805_DCDC_EN,
+   .enable_mask = 0x1,
+   .voltage_reg = RK805_DCDC1_ON_VSEL,
+   .voltage_mask = 0x3F,
+   .voltage_min = 712500,
+   .voltage_max = 150,
+   .voltage_step = 12500,
+   .voltage_nstep = 64,
+   },
+   {
+   .id = RK805_DCDC2,
+   .name = "DCDC_REG2",
+   .enable_reg = RK805_DCDC_EN,
+   .enable_mask = 0x2,
+   .voltage_reg = RK805_DCDC2_ON_VSEL,
+   .voltage_mask = 0x3F,
+   .voltage_min = 712500,
+   .voltage_max = 150,
+   .voltage_step = 12500,
+   .voltage_nstep = 64,
+   },
+   {
+   .id = RK805_DCDC3,
+   .name = "DCDC_REG3",
+   .enable_reg = RK805_DCDC_EN,
+   .enable_mask = 0x4,
+   },
+   {
+   .id = RK805_DCDC4,
+   .name = "DCDC_REG4",
+   .enable_reg = RK805_DCDC_EN,
+   .enable_mask = 0x8,
+   .voltage_reg = RK805_DCDC4_ON_VSEL,
+   .voltage_mask = 0xF,
+   .voltage_min = 180,
+   .voltage_max = 330,
+   .voltage_step = 10,
+   .voltage_nstep = 16,
+   },
+};
+
 static int
 rk805_read(device_t dev, uint8_t reg, uint8_t *data, uint8_t size)
 {
@@ -226,11 +278,17 @@ rk805_regnode_set_voltage(struct regnode *regnode, int
if (!sc->def->voltage_step)
return (ENXIO);
 
+   rk805_read(sc->base_dev, sc->def->voltage_reg, &val, 1);
+   printf("rk805_set_voltage: Current value for %x: %x\n", 
sc->def->voltage_reg, val);
if (rk805_regnode_voltage_to_reg(sc, min_uvolt, max_uvolt, &val) != 0)
return (ERANGE);
 
+   printf("rk805_set_voltage: Setting %x to %x\n", sc->def->voltage_reg, 
val);
rk805_write(sc->base_dev, sc->def->voltage_reg, val);
 
+   rk805_read(sc->base_dev, sc->def->voltage_reg, &val, 1);
+   printf("rk805_set_voltage: Set value for %x: %x\n", 
sc->def->voltage_reg, val);
+
*udelay = 0;
 
return (0);
@@ -326,13 +384,14 @@ rk805_start(void *pdev)
sc = device_get_softc(dev);
sc->dev = dev;
 
-   if (bootverbose) {
-   err = rk805_read(dev, 0x17, data, 1);
+   /* No version register in RK808 */
+   if (bootverbose && sc->type == RK805) {
+   err = rk805_read(dev, RK805_CHIP_NAME, data, 1);
if (err != 0) {
device_printf(dev, "Cannot read chip name reg\n");
return;
}
-   err = rk805_read(dev, 0x18, data + 1, 1);
+   err = rk805_read(dev, RK805_CHIP_VER, data + 1, 1);
if (err != 0) {
device_printf(dev, "Cannot read chip version reg\n");
return;
@@ -365,8 +424,17 @@ rk805_attach(device_t dev)
sc->regs = malloc(sizeof(struct rk805_reg_sc *) * sc->nregs,
M_RK805_REG, M_WAITOK | M_ZERO);
 
-   regdefs = rk805_regdefs;
-   sc->nregs = nitems(rk805_regdefs);
+   sc->type = ofw_bus_search_compatible(dev, compat_data)->ocd_data;
+   switch (sc->type) {
+   case RK805:
+   regdefs = rk805_regdefs;
+   sc->nregs = nitems(rk805_regdefs);
+ 

svn commit: r341383 - head/sys/arm64/rockchip

2018-12-01 Thread Emmanuel Vadot
Author: manu
Date: Sat Dec  1 20:29:42 2018
New Revision: 341383
URL: https://svnweb.freebsd.org/changeset/base/341383

Log:
  arm64: rockchip: rk_i2c: Use correct clock
  
  While here add RK3399 support and call clk_set_assigned to set the correct
  clock set in the DTS.
  
  MFC after:1 month

Modified:
  head/sys/arm64/rockchip/rk_i2c.c

Modified: head/sys/arm64/rockchip/rk_i2c.c
==
--- head/sys/arm64/rockchip/rk_i2c.cSat Dec  1 20:28:16 2018
(r341382)
+++ head/sys/arm64/rockchip/rk_i2c.cSat Dec  1 20:29:42 2018
(r341383)
@@ -146,6 +146,9 @@ static struct ofw_compat_data compat_data[] = {
 #ifdef SOC_ROCKCHIP_RK3328
{"rockchip,rk3328-i2c", 1},
 #endif
+#ifdef SOC_ROCKCHIP_RK3399
+   {"rockchip,rk3399-i2c", 1},
+#endif
{NULL, 0}
 };
 
@@ -168,15 +171,15 @@ static int rk_i2c_detach(device_t dev);
 static uint32_t
 rk_i2c_get_clkdiv(struct rk_i2c_softc *sc, uint64_t speed)
 {
-   uint64_t pclk_freq;
+   uint64_t sclk_freq;
uint32_t clkdiv;
int err;
 
-   err = clk_get_freq(sc->pclk, &pclk_freq);
+   err = clk_get_freq(sc->sclk, &sclk_freq);
if (err != 0)
return (err);
 
-   clkdiv = (pclk_freq / speed / RK_I2C_CLKDIV_MUL / 2) - 1;
+   clkdiv = (sclk_freq / speed / RK_I2C_CLKDIV_MUL / 2) - 1;
clkdiv &= RK_I2C_CLKDIVL_MASK;
 
clkdiv = clkdiv << RK_I2C_CLKDIVH_SHIFT | clkdiv;
@@ -417,7 +420,6 @@ rk_i2c_transfer(device_t dev, struct iic_msg *msgs, ui
/* Write slave address */
reg = msgs[i].slave | RK_I2C_MRXADDR_VALID(0);
RK_I2C_WRITE(sc, RK_I2C_MRXADDR, reg);
-
/* Write slave register address */
for (j = 0, reg = 0; j < msgs[i].len; j++) {
reg |= (msgs[i].buf[j] & 0xff) << (j * 8);
@@ -508,6 +510,8 @@ rk_i2c_attach(device_t dev)
device_printf(dev, "cannot setup interrupt handler\n");
return (ENXIO);
}
+
+   clk_set_assigned(dev, ofw_bus_get_node(dev));
 
/* Activate the module clocks. */
error = clk_get_by_ofw_name(dev, 0, "i2c", &sc->sclk);
___
svn-src-all@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 commit: r341382 - in head/sys: arm64/conf arm64/rockchip arm64/rockchip/clk conf

2018-12-01 Thread Emmanuel Vadot
Author: manu
Date: Sat Dec  1 20:28:16 2018
New Revision: 341382
URL: https://svnweb.freebsd.org/changeset/base/341382

Log:
  arm64/rockchip: add RK3399 support
  
  Add CRU (Clock and Reset Unit) driver for RK3399.
  Add support in rk_pinctrl driver.
  
  Submitted by:  Greg V  (Original version)
  Differential Revision: https://reviews.freebsd.org/D16732
  
  MFC after:1 month

Added:
  head/sys/arm64/rockchip/clk/rk3399_cru.c   (contents, props changed)
  head/sys/arm64/rockchip/clk/rk3399_pmucru.c   (contents, props changed)
Modified:
  head/sys/arm64/conf/GENERIC
  head/sys/arm64/rockchip/if_dwc_rk.c
  head/sys/arm64/rockchip/rk_grf.c
  head/sys/arm64/rockchip/rk_pinctrl.c
  head/sys/conf/files.arm64
  head/sys/conf/options.arm64

Modified: head/sys/arm64/conf/GENERIC
==
--- head/sys/arm64/conf/GENERIC Sat Dec  1 20:26:59 2018(r341381)
+++ head/sys/arm64/conf/GENERIC Sat Dec  1 20:28:16 2018(r341382)
@@ -108,6 +108,7 @@ options SOC_CAVM_THUNDERX
 optionsSOC_HISI_HI6220
 optionsSOC_BRCM_BCM2837
 optionsSOC_ROCKCHIP_RK3328
+optionsSOC_ROCKCHIP_RK3399
 optionsSOC_XILINX_ZYNQ
 
 # Timer drivers

Added: head/sys/arm64/rockchip/clk/rk3399_cru.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/arm64/rockchip/clk/rk3399_cru.cSat Dec  1 20:28:16 2018
(r341382)
@@ -0,0 +1,1535 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
+ * Copyright (c) 2018 Emmanuel Vadot 
+ * Copyright (c) 2018 Greg V 
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+
+/* GATES */
+
+#definePCLK_GPIO2  336
+#definePCLK_GPIO3  337
+#definePCLK_GPIO4  338
+#definePCLK_I2C1   341
+#definePCLK_I2C2   342
+#definePCLK_I2C3   343
+#definePCLK_I2C5   344
+#definePCLK_I2C6   345
+#definePCLK_I2C7   346
+
+static struct rk_cru_gate rk3399_gates[] = {
+   /* CRU_CLKGATE_CON0 */
+   CRU_GATE(0, "clk_core_l_lpll_src", "lpll", 0x300, 0)
+   CRU_GATE(0, "clk_core_l_bpll_src", "bpll", 0x300, 1)
+   CRU_GATE(0, "clk_core_l_dpll_src", "dpll", 0x300, 2)
+   CRU_GATE(0, "clk_core_l_gpll_src", "gpll", 0x300, 3)
+
+   /* CRU_CLKGATE_CON1 */
+   CRU_GATE(0, "clk_core_b_lpll_src", "lpll", 0x304, 0)
+   CRU_GATE(0, "clk_core_b_bpll_src", "bpll", 0x304, 1)
+   CRU_GATE(0, "clk_core_b_dpll_src", "dpll", 0x304, 2)
+   CRU_GATE(0, "clk_core_b_gpll_src", "gpll", 0x304, 3)
+
+   /* CRU_CLKGATE_CON5 */
+   CRU_GATE(0, "cpll_aclk_perihp_src", "cpll", 0x314, 0)
+   CRU_GATE(0, "gpll_aclk_perihp_src", "gpll", 0x314, 1)
+
+   /* CRU_CLKGATE_CON7 */
+   CRU_GATE(0, "gpll_aclk_perilp0_src", "gpll", 0x31C, 0)
+   CRU_GATE(0, "cpll_aclk_perilp0_src", "cpll", 0x31C, 1)
+
+   /* CRU_CLKGATE_CON8 */
+   CRU_GATE(0, "hclk_perilp1_cpll_src", "cpll", 0x320, 1)
+   CRU_GATE(0, "hclk_perilp1_gpll_src", "gpll", 0x320, 0)
+
+   /* CRU_CLKGATE_CON22 */
+   CRU_GATE(PCLK_I2C7, "pclk_rki2c7", "pclk_perilp1", 0x358, 5)
+   CRU_GATE(PCLK_I2C1, "pclk_rki2c1", "pclk_perilp1", 0x358, 6)
+   CRU_GATE(PCLK_I2C5, "pclk_rki2c5", "pclk_perilp1", 0x358, 7)
+   CRU_GATE(PCLK_I2C6, "pclk_rki2c6", "pclk_perilp1", 0x358, 8)
+   CRU_G

svn commit: r341381 - head/sys/arm64/rockchip/clk

2018-12-01 Thread Emmanuel Vadot
Author: manu
Date: Sat Dec  1 20:26:59 2018
New Revision: 341381
URL: https://svnweb.freebsd.org/changeset/base/341381

Log:
  arm64: rockchip: Add RK3399_CLK_PLL
  
  PLLs on the RK3399 are different than the ones on the RK3328.
  Add a new type and some dedicated recalc and set_freq functions.
  Rename the RK3328 dedicated rk_clk_pll function with rk3328_ prefix.
  
  MFC after:1 month

Modified:
  head/sys/arm64/rockchip/clk/rk3328_cru.c
  head/sys/arm64/rockchip/clk/rk_clk_pll.c
  head/sys/arm64/rockchip/clk/rk_clk_pll.h
  head/sys/arm64/rockchip/clk/rk_cru.c
  head/sys/arm64/rockchip/clk/rk_cru.h

Modified: head/sys/arm64/rockchip/clk/rk3328_cru.c
==
--- head/sys/arm64/rockchip/clk/rk3328_cru.cSat Dec  1 18:23:41 2018
(r341380)
+++ head/sys/arm64/rockchip/clk/rk3328_cru.cSat Dec  1 20:26:59 2018
(r341381)
@@ -973,23 +973,23 @@ static struct rk_clk_composite_def i2c3 = {
 
 static struct rk_clk rk3328_clks[] = {
{
-   .type = RK_CLK_PLL,
+   .type = RK3328_CLK_PLL,
.clk.pll = &apll
},
{
-   .type = RK_CLK_PLL,
+   .type = RK3328_CLK_PLL,
.clk.pll = &dpll
},
{
-   .type = RK_CLK_PLL,
+   .type = RK3328_CLK_PLL,
.clk.pll = &cpll
},
{
-   .type = RK_CLK_PLL,
+   .type = RK3328_CLK_PLL,
.clk.pll = &gpll
},
{
-   .type = RK_CLK_PLL,
+   .type = RK3328_CLK_PLL,
.clk.pll = &npll
},
 

Modified: head/sys/arm64/rockchip/clk/rk_clk_pll.c
==
--- head/sys/arm64/rockchip/clk/rk_clk_pll.cSat Dec  1 18:23:41 2018
(r341380)
+++ head/sys/arm64/rockchip/clk/rk_clk_pll.cSat Dec  1 20:26:59 2018
(r341381)
@@ -65,47 +65,7 @@ struct rk_clk_pll_sc {
 #defineDEVICE_UNLOCK(_clk) \
CLKDEV_DEVICE_UNLOCK(clknode_get_device(_clk))
 
-#defineRK_CLK_PLL_FBDIV_OFFSET 0
-#defineRK_CLK_PLL_FBDIV_SHIFT  0
-#defineRK_CLK_PLL_FBDIV_MASK   0xFFF
-
-#defineRK_CLK_PLL_POSTDIV1_OFFSET  0
-#defineRK_CLK_PLL_POSTDIV1_SHIFT   12
-#defineRK_CLK_PLL_POSTDIV1_MASK0x7000
-
-#defineRK_CLK_PLL_DSMPD_OFFSET 4
-#defineRK_CLK_PLL_DSMPD_SHIFT  12
-#defineRK_CLK_PLL_DSMPD_MASK   0x1000
-
-#defineRK_CLK_PLL_REFDIV_OFFSET4
-#defineRK_CLK_PLL_REFDIV_SHIFT 0
-#defineRK_CLK_PLL_REFDIV_MASK  0x3F
-
-#defineRK_CLK_PLL_POSTDIV2_OFFSET  4
-#defineRK_CLK_PLL_POSTDIV2_SHIFT   6
-#defineRK_CLK_PLL_POSTDIV2_MASK0x1C0
-
-#defineRK_CLK_PLL_FRAC_OFFSET  8
-#defineRK_CLK_PLL_FRAC_SHIFT   0
-#defineRK_CLK_PLL_FRAC_MASK0xFF
-
-#defineRK_CLK_PLL_LOCK_MASK0x400
-
-#defineRK_CLK_PLL_WRITE_MASK   0x
-
 static int
-rk_clk_pll_init(struct clknode *clk, device_t dev)
-{
-   struct rk_clk_pll_sc *sc;
-
-   sc = clknode_get_softc(clk);
-
-   clknode_init_parent_idx(clk, 0);
-
-   return (0);
-}
-
-static int
 rk_clk_pll_set_gate(struct clknode *clk, bool enable)
 {
struct rk_clk_pll_sc *sc;
@@ -128,10 +88,50 @@ rk_clk_pll_set_gate(struct clknode *clk, bool enable)
return (0);
 }
 
+#defineRK3328_CLK_PLL_FBDIV_OFFSET 0
+#defineRK3328_CLK_PLL_FBDIV_SHIFT  0
+#defineRK3328_CLK_PLL_FBDIV_MASK   0xFFF
+
+#defineRK3328_CLK_PLL_POSTDIV1_OFFSET  0
+#defineRK3328_CLK_PLL_POSTDIV1_SHIFT   12
+#defineRK3328_CLK_PLL_POSTDIV1_MASK0x7000
+
+#defineRK3328_CLK_PLL_DSMPD_OFFSET 4
+#defineRK3328_CLK_PLL_DSMPD_SHIFT  12
+#defineRK3328_CLK_PLL_DSMPD_MASK   0x1000
+
+#defineRK3328_CLK_PLL_REFDIV_OFFSET4
+#defineRK3328_CLK_PLL_REFDIV_SHIFT 0
+#defineRK3328_CLK_PLL_REFDIV_MASK  0x3F
+
+#defineRK3328_CLK_PLL_POSTDIV2_OFFSET  4
+#defineRK3328_CLK_PLL_POSTDIV2_SHIFT   6
+#defineRK3328_CLK_PLL_POSTDIV2_MASK0x1C0
+
+#defineRK3328_CLK_PLL_FRAC_OFFSET  8
+#defineRK3328_CLK_PLL_FRAC_SHIFT   0
+#defineRK3328_CLK_PLL_FRAC_MASK0xFF
+
+#defineRK3328_CLK_PLL_LOCK_MASK0x400
+
+#defineRK3328_CLK_PLL_WRITE_MASK   0x
+
 static int
-rk_clk_pll_recalc(struct clknode *clk, uint64_t *freq)
+rk3328_clk_pll_init(struct clknode *clk, device_t dev)
 {
struct rk_clk_pll_sc *sc;
+
+   sc = clknode_get_softc(clk);
+
+   clknode_init_parent_idx(clk, 0);
+
+   return (0);
+}
+
+static int
+rk3328_clk_p

svn commit: r341380 - in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet

2018-12-01 Thread Cy Schubert
Author: cy
Date: Sat Dec  1 18:23:41 2018
New Revision: 341380
URL: https://svnweb.freebsd.org/changeset/base/341380

Log:
  MFC r340867:
  
  FreeBSD 7 has been history for many moons. Remove some dead code.

Modified:
  stable/11/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/12/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/11/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
==
--- stable/11/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Sat Dec  1 
18:17:51 2018(r341379)
+++ stable/11/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Sat Dec  1 
18:23:41 2018(r341380)
@@ -57,15 +57,7 @@ static const char rcsid[] = "@(#)$Id$";
 #include 
 #include 
 #include 
-#if defined(__FreeBSD_version) && (__FreeBSD_version >= 80)
 #include 
-#else
-#define CURVNET_SET(arg)
-#define CURVNET_RESTORE()
-#defineVNET_DEFINE(_t, _v) _t _v
-#defineVNET_DECLARE(_t, _v)extern _t _v
-#defineVNET(arg)   arg
-#endif
 #include 
 #include 
 #include 
___
svn-src-all@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 commit: r341380 - in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet

2018-12-01 Thread Cy Schubert
Author: cy
Date: Sat Dec  1 18:23:41 2018
New Revision: 341380
URL: https://svnweb.freebsd.org/changeset/base/341380

Log:
  MFC r340867:
  
  FreeBSD 7 has been history for many moons. Remove some dead code.

Modified:
  stable/12/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
==
--- stable/12/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Sat Dec  1 
18:17:51 2018(r341379)
+++ stable/12/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Sat Dec  1 
18:23:41 2018(r341380)
@@ -57,15 +57,7 @@ static const char rcsid[] = "@(#)$Id$";
 #include 
 #include 
 #include 
-#if defined(__FreeBSD_version) && (__FreeBSD_version >= 80)
 #include 
-#else
-#define CURVNET_SET(arg)
-#define CURVNET_RESTORE()
-#defineVNET_DEFINE(_t, _v) _t _v
-#defineVNET_DECLARE(_t, _v)extern _t _v
-#defineVNET(arg)   arg
-#endif
 #include 
 #include 
 #include 
___
svn-src-all@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 commit: r341379 - in stable: 10/sys/contrib/ipfilter/netinet 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet

2018-12-01 Thread Cy Schubert
Author: cy
Date: Sat Dec  1 18:17:51 2018
New Revision: 341379
URL: https://svnweb.freebsd.org/changeset/base/341379

Log:
  MFC r340868:
  
  An OSF/1 ifdef makes absolutley no sense in a FreeBSD specific source
  file.

Modified:
  stable/10/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
  stable/12/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
Directory Properties:
  stable/11/   (props changed)
  stable/12/   (props changed)

Modified: stable/10/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
==
--- stable/10/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Sat Dec  1 
18:09:17 2018(r341378)
+++ stable/10/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Sat Dec  1 
18:17:51 2018(r341379)
@@ -61,9 +61,6 @@ static const char rcsid[] = "@(#)$Id$";
 #define CURVNET_SET(arg)
 #define CURVNET_RESTORE()
 #endif
-#if defined(__osf__)
-# include 
-#endif
 #include 
 #include 
 #include 
___
svn-src-all@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 commit: r341379 - in stable: 10/sys/contrib/ipfilter/netinet 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet

2018-12-01 Thread Cy Schubert
Author: cy
Date: Sat Dec  1 18:17:51 2018
New Revision: 341379
URL: https://svnweb.freebsd.org/changeset/base/341379

Log:
  MFC r340868:
  
  An OSF/1 ifdef makes absolutley no sense in a FreeBSD specific source
  file.

Modified:
  stable/12/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
  stable/11/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
Directory Properties:
  stable/10/   (props changed)
  stable/11/   (props changed)

Modified: stable/12/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
==
--- stable/12/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Sat Dec  1 
18:09:17 2018(r341378)
+++ stable/12/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Sat Dec  1 
18:17:51 2018(r341379)
@@ -66,9 +66,6 @@ static const char rcsid[] = "@(#)$Id$";
 #defineVNET_DECLARE(_t, _v)extern _t _v
 #defineVNET(arg)   arg
 #endif
-#if defined(__osf__)
-# include 
-#endif
 #include 
 #include 
 #include 
___
svn-src-all@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 commit: r341379 - in stable: 10/sys/contrib/ipfilter/netinet 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet

2018-12-01 Thread Cy Schubert
Author: cy
Date: Sat Dec  1 18:17:51 2018
New Revision: 341379
URL: https://svnweb.freebsd.org/changeset/base/341379

Log:
  MFC r340868:
  
  An OSF/1 ifdef makes absolutley no sense in a FreeBSD specific source
  file.

Modified:
  stable/11/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
  stable/12/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
Directory Properties:
  stable/10/   (props changed)
  stable/12/   (props changed)

Modified: stable/11/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
==
--- stable/11/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Sat Dec  1 
18:09:17 2018(r341378)
+++ stable/11/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Sat Dec  1 
18:17:51 2018(r341379)
@@ -66,9 +66,6 @@ static const char rcsid[] = "@(#)$Id$";
 #defineVNET_DECLARE(_t, _v)extern _t _v
 #defineVNET(arg)   arg
 #endif
-#if defined(__osf__)
-# include 
-#endif
 #include 
 #include 
 #include 
___
svn-src-all@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 commit: r341378 - in stable: 10/sys/contrib/ipfilter/netinet 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet

2018-12-01 Thread Cy Schubert
Author: cy
Date: Sat Dec  1 18:09:17 2018
New Revision: 341378
URL: https://svnweb.freebsd.org/changeset/base/341378

Log:
  MFC r340909:
  
  Combine two lines into one following unifdef for r255332.

Modified:
  stable/10/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
  stable/12/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
Directory Properties:
  stable/11/   (props changed)
  stable/12/   (props changed)

Modified: stable/10/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
==
--- stable/10/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Sat Dec  1 
17:59:41 2018(r341377)
+++ stable/10/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Sat Dec  1 
18:09:17 2018(r341378)
@@ -289,8 +289,7 @@ ipfdetach(softc)
  * Filter ioctl interface.
  */
 int
-ipfioctl(dev, cmd, data, mode
-, p)
+ipfioctl(dev, cmd, data, mode, p)
struct thread *p;
 #definep_cred  td_ucred
 #definep_uid   td_ucred->cr_ruid
___
svn-src-all@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 commit: r341378 - in stable: 10/sys/contrib/ipfilter/netinet 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet

2018-12-01 Thread Cy Schubert
Author: cy
Date: Sat Dec  1 18:09:17 2018
New Revision: 341378
URL: https://svnweb.freebsd.org/changeset/base/341378

Log:
  MFC r340909:
  
  Combine two lines into one following unifdef for r255332.

Modified:
  stable/12/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
  stable/11/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
Directory Properties:
  stable/10/   (props changed)
  stable/11/   (props changed)

Modified: stable/12/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
==
--- stable/12/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Sat Dec  1 
17:59:41 2018(r341377)
+++ stable/12/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Sat Dec  1 
18:09:17 2018(r341378)
@@ -299,8 +299,7 @@ ipfdetach(softc)
  * Filter ioctl interface.
  */
 int
-ipfioctl(dev, cmd, data, mode
-, p)
+ipfioctl(dev, cmd, data, mode, p)
struct thread *p;
 #definep_cred  td_ucred
 #definep_uid   td_ucred->cr_ruid
___
svn-src-all@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 commit: r341378 - in stable: 10/sys/contrib/ipfilter/netinet 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet

2018-12-01 Thread Cy Schubert
Author: cy
Date: Sat Dec  1 18:09:17 2018
New Revision: 341378
URL: https://svnweb.freebsd.org/changeset/base/341378

Log:
  MFC r340909:
  
  Combine two lines into one following unifdef for r255332.

Modified:
  stable/11/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
Directory Properties:
  stable/11/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
  stable/12/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
Directory Properties:
  stable/10/   (props changed)
  stable/12/   (props changed)

Modified: stable/11/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
==
--- stable/11/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Sat Dec  1 
17:59:41 2018(r341377)
+++ stable/11/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Sat Dec  1 
18:09:17 2018(r341378)
@@ -299,8 +299,7 @@ ipfdetach(softc)
  * Filter ioctl interface.
  */
 int
-ipfioctl(dev, cmd, data, mode
-, p)
+ipfioctl(dev, cmd, data, mode, p)
struct thread *p;
 #definep_cred  td_ucred
 #definep_uid   td_ucred->cr_ruid
___
svn-src-all@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 commit: r341377 - head/sys/contrib/ipfilter/netinet

2018-12-01 Thread Cy Schubert
Author: cy
Date: Sat Dec  1 17:59:41 2018
New Revision: 341377
URL: https://svnweb.freebsd.org/changeset/base/341377

Log:
  Restore handling of PMTU discovery, removed through an unifdef(1)
  following the MFV of r254219 into r255332. In addition the 'FreeBSD'
  macro was never defined in ipfilter 5.1.2 thus it never would have
  been enabled in the first place.
  
  This work is prompted by a general cleanup of the IP Filter code
  prompted by working to resolve a PR. More to follow.
  
  MFC after:1 week

Modified:
  head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c

Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
==
--- head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c  Sat Dec  1 17:48:28 
2018(r341376)
+++ head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c  Sat Dec  1 17:59:41 
2018(r341377)
@@ -85,6 +85,8 @@ static const char rcsid[] = "@(#)$Id$";
 #endif
 extern int ip_optcopy __P((struct ip *, struct ip *));
 
+VNET_DECLARE(int, path_mtu_discovery);
+#defineV_path_mtu_discoveryVNET(path_mtu_discovery)
 
 # ifdef IPFILTER_M_IPFILTER
 MALLOC_DEFINE(M_IPFILTER, "ipfilter", "IP Filter packet filter data 
structures");
@@ -477,11 +479,7 @@ ipf_send_ip(fin, m)
IP_HL_A(ip, sizeof(*oip) >> 2);
ip->ip_tos = oip->ip_tos;
ip->ip_id = fin->fin_ip->ip_id;
-#if defined(FreeBSD) && (__FreeBSD_version > 46)
-   ip->ip_off = htons(path_mtu_discovery ? IP_DF : 0);
-#else
-   ip->ip_off = 0;
-#endif
+   ip->ip_off = htons(V_path_mtu_discovery ? IP_DF : 0);
ip->ip_ttl = V_ip_defttl;
ip->ip_sum = 0;
break;
___
svn-src-all@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 commit: r341376 - in stable/12/sys: compat/linux kern sys

2018-12-01 Thread Mark Johnston
Author: markj
Date: Sat Dec  1 17:48:28 2018
New Revision: 341376
URL: https://svnweb.freebsd.org/changeset/base/341376

Log:
  MFC r340861, r340900:
  Minor kevent(2) cleanups.

Modified:
  stable/12/sys/compat/linux/linux_event.c
  stable/12/sys/kern/kern_event.c
  stable/12/sys/kern/vfs_aio.c
  stable/12/sys/sys/event.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/compat/linux/linux_event.c
==
--- stable/12/sys/compat/linux/linux_event.cSat Dec  1 16:50:12 2018
(r341375)
+++ stable/12/sys/compat/linux/linux_event.cSat Dec  1 17:48:28 2018
(r341376)
@@ -504,7 +504,7 @@ linux_epoll_ctl(struct thread *td, struct linux_epoll_
 * and the EV_ADD flag is not set.
 */
kev[0].flags &= ~EV_ADD;
-   error = kqfd_register(args->epfd, &kev[0], td, 1);
+   error = kqfd_register(args->epfd, &kev[0], td, M_WAITOK);
if (error != ENOENT) {
error = EEXIST;
goto leave0;

Modified: stable/12/sys/kern/kern_event.c
==
--- stable/12/sys/kern/kern_event.c Sat Dec  1 16:50:12 2018
(r341375)
+++ stable/12/sys/kern/kern_event.c Sat Dec  1 17:48:28 2018
(r341376)
@@ -102,13 +102,13 @@ TASKQUEUE_DEFINE_THREAD(kqueue_ctx);
 static int kevent_copyout(void *arg, struct kevent *kevp, int count);
 static int kevent_copyin(void *arg, struct kevent *kevp, int count);
 static int kqueue_register(struct kqueue *kq, struct kevent *kev,
-   struct thread *td, int waitok);
+   struct thread *td, int mflag);
 static int kqueue_acquire(struct file *fp, struct kqueue **kqp);
 static voidkqueue_release(struct kqueue *kq, int locked);
 static voidkqueue_destroy(struct kqueue *kq);
 static voidkqueue_drain(struct kqueue *kq, struct thread *td);
 static int kqueue_expand(struct kqueue *kq, struct filterops *fops,
-   uintptr_t ident, int waitok);
+   uintptr_t ident, int mflag);
 static voidkqueue_task(void *arg, int pending);
 static int kqueue_scan(struct kqueue *kq, int maxevents,
struct kevent_copyops *k_ops,
@@ -150,7 +150,7 @@ static void knote_drop_detached(struct knote *kn, 
str
 static voidknote_enqueue(struct knote *kn);
 static voidknote_dequeue(struct knote *kn);
 static voidknote_init(void);
-static struct  knote *knote_alloc(int waitok);
+static struct  knote *knote_alloc(int mflag);
 static voidknote_free(struct knote *kn);
 
 static voidfilt_kqdetach(struct knote *kn);
@@ -582,7 +582,7 @@ knote_fork(struct knlist *list, int pid)
kev.fflags = kn->kn_sfflags;
kev.data = kn->kn_id;   /* parent */
kev.udata = kn->kn_kevent.udata;/* preserve udata */
-   error = kqueue_register(kq, &kev, NULL, 0);
+   error = kqueue_register(kq, &kev, NULL, M_NOWAIT);
if (error)
kn->kn_fflags |= NOTE_TRACKERR;
 
@@ -596,7 +596,7 @@ knote_fork(struct knlist *list, int pid)
kev.fflags = kn->kn_sfflags;
kev.data = kn->kn_id;   /* parent */
kev.udata = kn->kn_kevent.udata;/* preserve udata */
-   error = kqueue_register(kq, &kev, NULL, 0);
+   error = kqueue_register(kq, &kev, NULL, M_NOWAIT);
if (error)
kn->kn_fflags |= NOTE_TRACKERR;
if (kn->kn_fop->f_event(kn, NOTE_FORK))
@@ -1229,7 +1229,7 @@ kqueue_kevent(struct kqueue *kq, struct thread *td, in
if (!kevp->filter)
continue;
kevp->flags &= ~EV_SYSFLAGS;
-   error = kqueue_register(kq, kevp, td, 1);
+   error = kqueue_register(kq, kevp, td, M_WAITOK);
if (error || (kevp->flags & EV_RECEIPT)) {
if (nevents == 0)
return (error);
@@ -1370,12 +1370,11 @@ kqueue_fo_release(int filt)
 }
 
 /*
- * A ref to kq (obtained via kqueue_acquire) must be held.  waitok will
- * influence if memory allocation should wait.  Make sure it is 0 if you
- * hold any mutexes.
+ * A ref to kq (obtained via kqueue_acquire) must be held.
  */
 static int
-kqueue_register(struct kqueue *kq, struct kevent *kev, struct thread *td, int 
waitok)
+kqueue_register(struct kqueue *kq, struct kevent *kev, struct thread *td,
+int mflag)
 {
struct filterops *fops;
struct file *fp;
@@ -1405,7 +1404,7 @@ kqueue_register(struct kqueue *kq, struct kevent *kev,
 * allocation failures are handled in the loop, only
 * if the spa

svn commit: r341375 - head/sys/vm

2018-12-01 Thread Konstantin Belousov
Author: kib
Date: Sat Dec  1 16:50:12 2018
New Revision: 341375
URL: https://svnweb.freebsd.org/changeset/base/341375

Log:
  Allow to create swap zone larger than v_page_count / 2.
  
  If user configured the maxswapzone tunable, just take the literal
  value for the initial zone sizing attempt.  Before, it was only
  possible to reduce the zone by the tunable.
  
  While there, correct the message which was not correct when zone
  creation rounded the size up.
  
  Reported by:  jmg
  Reviewed by:  markj
  MFC after:1 week
  Sponsored by: The FreeBSD Foundation
  Differential revision:https://reviews.freebsd.org/D18381

Modified:
  head/sys/vm/swap_pager.c

Modified: head/sys/vm/swap_pager.c
==
--- head/sys/vm/swap_pager.cSat Dec  1 16:43:18 2018(r341374)
+++ head/sys/vm/swap_pager.cSat Dec  1 16:50:12 2018(r341375)
@@ -547,12 +547,12 @@ swap_pager_swap_init(void)
mtx_unlock(&pbuf_mtx);
 
/*
-* Initialize our zone, guessing on the number we need based
-* on the number of pages in the system.
+* Initialize our zone, taking the user's requested size or
+* estimating the number we need based on the number of pages
+* in the system.
 */
-   n = vm_cnt.v_page_count / 2;
-   if (maxswzone && n > maxswzone / sizeof(struct swblk))
-   n = maxswzone / sizeof(struct swblk);
+   n = maxswzone != 0 ? maxswzone / sizeof(struct swblk) :
+   vm_cnt.v_page_count / 2;
swpctrie_zone = uma_zcreate("swpctrie", pctrie_node_size(), NULL, NULL,
pctrie_zone_init, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM);
if (swpctrie_zone == NULL)
@@ -580,7 +580,7 @@ swap_pager_swap_init(void)
n = uma_zone_get_max(swblk_zone);
 
if (n < n2)
-   printf("Swap blk zone entries reduced from %lu to %lu.\n",
+   printf("Swap blk zone entries changed from %lu to %lu.\n",
n2, n);
swap_maxpages = n * SWAP_META_PAGES;
swzone = n * sizeof(struct swblk);
___
svn-src-all@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 commit: r341374 - in head/sys: arm/arm i386/i386

2018-12-01 Thread Konstantin Belousov
Author: kib
Date: Sat Dec  1 16:43:18 2018
New Revision: 341374
URL: https://svnweb.freebsd.org/changeset/base/341374

Log:
  Correct the tunable name in the message.
  
  Submitted by:  Andre Albsmeier 
  PR:   231577
  MFC after:1 week

Modified:
  head/sys/arm/arm/pmap-v6.c
  head/sys/i386/i386/pmap.c

Modified: head/sys/arm/arm/pmap-v6.c
==
--- head/sys/arm/arm/pmap-v6.c  Sat Dec  1 15:42:02 2018(r341373)
+++ head/sys/arm/arm/pmap-v6.c  Sat Dec  1 16:43:18 2018(r341374)
@@ -3037,7 +3037,7 @@ get_pv_entry(pmap_t pmap, boolean_t try)
if (ratecheck(&lastprint, &printinterval))
printf("Approaching the limit on PV entries, consider "
"increasing either the vm.pmap.shpgperproc or the "
-   "vm.pmap.pv_entry_max tunable.\n");
+   "vm.pmap.pv_entries tunable.\n");
 retry:
pc = TAILQ_FIRST(&pmap->pm_pvchunk);
if (pc != NULL) {

Modified: head/sys/i386/i386/pmap.c
==
--- head/sys/i386/i386/pmap.c   Sat Dec  1 15:42:02 2018(r341373)
+++ head/sys/i386/i386/pmap.c   Sat Dec  1 16:43:18 2018(r341374)
@@ -2568,7 +2568,7 @@ get_pv_entry(pmap_t pmap, boolean_t try)
if (ratecheck(&lastprint, &printinterval))
printf("Approaching the limit on PV entries, consider "
"increasing either the vm.pmap.shpgperproc or the "
-   "vm.pmap.pv_entry_max tunable.\n");
+   "vm.pmap.pv_entries tunable.\n");
 retry:
pc = TAILQ_FIRST(&pmap->pm_pvchunk);
if (pc != NULL) {
___
svn-src-all@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 commit: r341373 - vendor/lldb/lldb-release_70-r348011

2018-12-01 Thread Dimitry Andric
Author: dim
Date: Sat Dec  1 15:42:02 2018
New Revision: 341373
URL: https://svnweb.freebsd.org/changeset/base/341373

Log:
  Tag lldb release_70 branch r348011.

Added:
  vendor/lldb/lldb-release_70-r348011/
 - copied from r341372, vendor/lldb/dist-release_70/
___
svn-src-all@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 commit: r341372 - vendor/lldb/dist-release_70/source/Plugins/SymbolFile/DWARF

2018-12-01 Thread Dimitry Andric
Author: dim
Date: Sat Dec  1 15:41:59 2018
New Revision: 341372
URL: https://svnweb.freebsd.org/changeset/base/341372

Log:
  Vendor import of lldb release_70 branch r348011:
  https://llvm.org/svn/llvm-project/lldb/branches/release_70@348011

Modified:
  vendor/lldb/dist-release_70/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp

Modified: 
vendor/lldb/dist-release_70/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
==
--- vendor/lldb/dist-release_70/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp   
Sat Dec  1 15:41:57 2018(r341371)
+++ vendor/lldb/dist-release_70/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp   
Sat Dec  1 15:41:59 2018(r341372)
@@ -261,7 +261,11 @@ void DWARFUnit::ExtractDIEsRWLocked() {
   }
 
   if (!m_die_array.empty()) {
-lldbassert(!m_first_die || m_first_die == m_die_array.front());
+if (m_first_die) {
+  // Only needed for the assertion.
+  m_first_die.SetEmptyChildren(m_die_array.front().GetEmptyChildren());
+  lldbassert(m_first_die == m_die_array.front());
+}
 m_first_die = m_die_array.front();
   }
 
___
svn-src-all@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 commit: r341371 - vendor/lld/lld-release_70-r348011

2018-12-01 Thread Dimitry Andric
Author: dim
Date: Sat Dec  1 15:41:57 2018
New Revision: 341371
URL: https://svnweb.freebsd.org/changeset/base/341371

Log:
  Tag lld release_70 branch r348011.

Added:
  vendor/lld/lld-release_70-r348011/
 - copied from r341370, vendor/lld/dist-release_70/
___
svn-src-all@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 commit: r341368 - vendor/clang/clang-release_70-r348011

2018-12-01 Thread Dimitry Andric
Author: dim
Date: Sat Dec  1 15:41:48 2018
New Revision: 341368
URL: https://svnweb.freebsd.org/changeset/base/341368

Log:
  Tag clang release_70 branch r348011.

Added:
  vendor/clang/clang-release_70-r348011/
 - copied from r341367, vendor/clang/dist-release_70/
___
svn-src-all@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 commit: r341370 - vendor/libc++/libc++-release_70-r348011

2018-12-01 Thread Dimitry Andric
Author: dim
Date: Sat Dec  1 15:41:54 2018
New Revision: 341370
URL: https://svnweb.freebsd.org/changeset/base/341370

Log:
  Tag libc++ release_70 branch r348011.

Added:
  vendor/libc++/libc++-release_70-r348011/
 - copied from r341369, vendor/libc++/dist-release_70/
___
svn-src-all@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 commit: r341369 - vendor/compiler-rt/compiler-rt-release_70-r348011

2018-12-01 Thread Dimitry Andric
Author: dim
Date: Sat Dec  1 15:41:51 2018
New Revision: 341369
URL: https://svnweb.freebsd.org/changeset/base/341369

Log:
  Tag compiler-rt release_70 branch r348011.

Added:
  vendor/compiler-rt/compiler-rt-release_70-r348011/
 - copied from r341368, vendor/compiler-rt/dist-release_70/
___
svn-src-all@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 commit: r341367 - in vendor/clang/dist-release_70: include/clang/Basic lib/CodeGen lib/Driver/ToolChains/Arch lib/Headers lib/Sema lib/Serialization test/CodeGen test/CoverageMapping test/Drive...

2018-12-01 Thread Dimitry Andric
Author: dim
Date: Sat Dec  1 15:41:40 2018
New Revision: 341367
URL: https://svnweb.freebsd.org/changeset/base/341367

Log:
  Vendor import of clang release_70 branch r348011:
  https://llvm.org/svn/llvm-project/cfe/branches/release_70@348011

Added:
  vendor/clang/dist-release_70/test/SemaOpenCL/extension-begin.h   (contents, 
props changed)
Modified:
  vendor/clang/dist-release_70/include/clang/Basic/AttrDocs.td
  vendor/clang/dist-release_70/include/clang/Basic/DiagnosticFrontendKinds.td
  vendor/clang/dist-release_70/include/clang/Basic/DiagnosticSemaKinds.td
  vendor/clang/dist-release_70/lib/CodeGen/CodeGenModule.cpp
  vendor/clang/dist-release_70/lib/CodeGen/CoverageMappingGen.cpp
  vendor/clang/dist-release_70/lib/Driver/ToolChains/Arch/PPC.cpp
  vendor/clang/dist-release_70/lib/Driver/ToolChains/Arch/PPC.h
  vendor/clang/dist-release_70/lib/Headers/altivec.h
  vendor/clang/dist-release_70/lib/Sema/SemaInit.cpp
  vendor/clang/dist-release_70/lib/Serialization/ASTWriter.cpp
  vendor/clang/dist-release_70/test/CodeGen/builtins-ppc-altivec.c
  vendor/clang/dist-release_70/test/CodeGen/builtins-ppc-quadword.c
  vendor/clang/dist-release_70/test/CodeGen/builtins-ppc-vsx.c
  vendor/clang/dist-release_70/test/CoverageMapping/macros.c
  vendor/clang/dist-release_70/test/Driver/openbsd.c
  vendor/clang/dist-release_70/test/Frontend/warning-stdlibcxx-darwin.cpp
  vendor/clang/dist-release_70/test/Sema/attr-ifunc.c
  vendor/clang/dist-release_70/test/SemaCXX/sourceranges.cpp
  vendor/clang/dist-release_70/test/SemaOpenCL/extension-begin.cl
  vendor/clang/dist-release_70/tools/scan-build/bin/scan-build

Modified: vendor/clang/dist-release_70/include/clang/Basic/AttrDocs.td
==
--- vendor/clang/dist-release_70/include/clang/Basic/AttrDocs.tdSat Dec 
 1 15:41:34 2018(r341366)
+++ vendor/clang/dist-release_70/include/clang/Basic/AttrDocs.tdSat Dec 
 1 15:41:40 2018(r341367)
@@ -3364,7 +3364,7 @@ def IFuncDocs : Documentation {
   let Content = [{
 ``__attribute__((ifunc("resolver")))`` is used to mark that the address of a 
declaration should be resolved at runtime by calling a resolver function.
 
-The symbol name of the resolver function is given in quotes.  A function with 
this name (after mangling) must be defined in the current translation unit; it 
may be ``static``.  The resolver function should take no arguments and return a 
pointer.
+The symbol name of the resolver function is given in quotes.  A function with 
this name (after mangling) must be defined in the current translation unit; it 
may be ``static``.  The resolver function should return a pointer.
 
 The ``ifunc`` attribute may only be used on a function declaration.  A 
function declaration with an ``ifunc`` attribute is considered to be a 
definition of the declared entity.  The entity must not have weak linkage; for 
example, in C++, it cannot be applied to a declaration if a definition at that 
location would be considered inline.
 

Modified: 
vendor/clang/dist-release_70/include/clang/Basic/DiagnosticFrontendKinds.td
==
--- vendor/clang/dist-release_70/include/clang/Basic/DiagnosticFrontendKinds.td 
Sat Dec  1 15:41:34 2018(r341366)
+++ vendor/clang/dist-release_70/include/clang/Basic/DiagnosticFrontendKinds.td 
Sat Dec  1 15:41:40 2018(r341367)
@@ -238,7 +238,7 @@ def warn_option_invalid_ocl_version : Warning<
   "OpenCL version %0 does not support the option '%1'">, InGroup;
 
 def warn_stdlibcxx_not_found : Warning<
-  "include path for stdlibc++ headers not found; pass '-std=libc++' on the "
+  "include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the "
   "command line to use the libc++ standard library instead">,
   InGroup>;
 }

Modified: 
vendor/clang/dist-release_70/include/clang/Basic/DiagnosticSemaKinds.td
==
--- vendor/clang/dist-release_70/include/clang/Basic/DiagnosticSemaKinds.td 
Sat Dec  1 15:41:34 2018(r341366)
+++ vendor/clang/dist-release_70/include/clang/Basic/DiagnosticSemaKinds.td 
Sat Dec  1 15:41:40 2018(r341367)
@@ -2857,8 +2857,6 @@ def err_cyclic_alias : Error<
   "%select{alias|ifunc}0 definition is part of a cycle">;
 def err_ifunc_resolver_return : Error<
   "ifunc resolver function must return a pointer">;
-def err_ifunc_resolver_params : Error<
-  "ifunc resolver function must have no parameters">;
 def warn_attribute_wrong_decl_type_str : Warning<
   "%0 attribute only applies to %1">, InGroup;
 def err_attribute_wrong_decl_type_str : Error<

Modified: vendor/clang/dist-release_70/lib/CodeGen/CodeGenModule.cpp
==
--- vendor/clang/dist-release_70/lib/CodeGen/CodeGenModule.cpp  Sat Dec  1 
15:41:34 2018(r341366)
+

svn commit: r341365 - in vendor/llvm/dist-release_70: include/llvm/MC include/llvm/Support include/llvm/Transforms/Utils lib/CodeGen lib/MC lib/Target/Mips lib/Target/Mips/MCTargetDesc lib/Target/P...

2018-12-01 Thread Dimitry Andric
Author: dim
Date: Sat Dec  1 15:41:24 2018
New Revision: 341365
URL: https://svnweb.freebsd.org/changeset/base/341365

Log:
  Vendor import of llvm release_70 branch r348011:
  https://llvm.org/svn/llvm-project/llvm/branches/release_70@348011

Added:
  vendor/llvm/dist-release_70/test/CodeGen/Mips/Fast-ISel/bricmpi1.ll
  
vendor/llvm/dist-release_70/test/CodeGen/Mips/buildpairf64-extractelementf64-implicit-sp.ll
  vendor/llvm/dist-release_70/test/CodeGen/Mips/micromips-b-range.ll
  vendor/llvm/dist-release_70/test/CodeGen/Mips/micromips-gcc-except-table.ll
  vendor/llvm/dist-release_70/test/CodeGen/Mips/micromips-mtc-mfc.ll
  
vendor/llvm/dist-release_70/test/CodeGen/Mips/shrink-wrap-buildpairf64-extractelementf64.mir
  vendor/llvm/dist-release_70/test/CodeGen/PowerPC/scalar_vector_test_1.ll
  vendor/llvm/dist-release_70/test/CodeGen/PowerPC/scalar_vector_test_2.ll
  vendor/llvm/dist-release_70/test/CodeGen/PowerPC/scalar_vector_test_3.ll
  vendor/llvm/dist-release_70/test/CodeGen/PowerPC/scalar_vector_test_4.ll
  vendor/llvm/dist-release_70/test/DebugInfo/Mips/eh_frame.ll
  
vendor/llvm/dist-release_70/test/Transforms/LCSSA/rewrite-existing-dbg-values.ll
Modified:
  vendor/llvm/dist-release_70/include/llvm/MC/MCAsmBackend.h
  vendor/llvm/dist-release_70/include/llvm/Support/GenericDomTreeConstruction.h
  vendor/llvm/dist-release_70/include/llvm/Transforms/Utils/SSAUpdater.h
  vendor/llvm/dist-release_70/include/llvm/Transforms/Utils/SSAUpdaterImpl.h
  vendor/llvm/dist-release_70/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
  vendor/llvm/dist-release_70/lib/MC/MCExpr.cpp
  vendor/llvm/dist-release_70/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
  vendor/llvm/dist-release_70/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.h
  vendor/llvm/dist-release_70/lib/Target/Mips/MCTargetDesc/MipsELFStreamer.cpp
  vendor/llvm/dist-release_70/lib/Target/Mips/MCTargetDesc/MipsELFStreamer.h
  vendor/llvm/dist-release_70/lib/Target/Mips/MicroMips32r6InstrInfo.td
  vendor/llvm/dist-release_70/lib/Target/Mips/Mips64InstrInfo.td
  vendor/llvm/dist-release_70/lib/Target/Mips/Mips64r6InstrInfo.td
  vendor/llvm/dist-release_70/lib/Target/Mips/MipsFastISel.cpp
  vendor/llvm/dist-release_70/lib/Target/Mips/MipsInstrFPU.td
  vendor/llvm/dist-release_70/lib/Target/Mips/MipsSEFrameLowering.cpp
  vendor/llvm/dist-release_70/lib/Target/Mips/MipsSEISelDAGToDAG.cpp
  vendor/llvm/dist-release_70/lib/Target/Mips/MipsSEInstrInfo.cpp
  vendor/llvm/dist-release_70/lib/Target/PowerPC/P9InstrResources.td
  vendor/llvm/dist-release_70/lib/Target/PowerPC/PPCISelLowering.cpp
  vendor/llvm/dist-release_70/lib/Target/PowerPC/PPCInstrVSX.td
  vendor/llvm/dist-release_70/lib/Transforms/Utils/LCSSA.cpp
  vendor/llvm/dist-release_70/lib/Transforms/Utils/SSAUpdater.cpp
  vendor/llvm/dist-release_70/test/CodeGen/Mips/longbranch.ll
  vendor/llvm/dist-release_70/test/CodeGen/Mips/tls.ll
  vendor/llvm/dist-release_70/test/CodeGen/PowerPC/VSX-XForm-Scalars.ll
  vendor/llvm/dist-release_70/test/CodeGen/PowerPC/build-vector-tests.ll
  vendor/llvm/dist-release_70/test/CodeGen/PowerPC/load-v4i8-improved.ll
  vendor/llvm/dist-release_70/test/CodeGen/PowerPC/power9-moves-and-splats.ll
  vendor/llvm/dist-release_70/test/CodeGen/PowerPC/pr38087.ll
  vendor/llvm/dist-release_70/test/CodeGen/PowerPC/qpx-load-splat.ll
  vendor/llvm/dist-release_70/test/CodeGen/PowerPC/swaps-le-6.ll
  vendor/llvm/dist-release_70/test/CodeGen/PowerPC/vsx_insert_extract_le.ll
  vendor/llvm/dist-release_70/test/CodeGen/X86/mingw-comdats.ll
  vendor/llvm/dist-release_70/tools/llvm-exegesis/lib/CMakeLists.txt

Modified: vendor/llvm/dist-release_70/include/llvm/MC/MCAsmBackend.h
==
--- vendor/llvm/dist-release_70/include/llvm/MC/MCAsmBackend.h  Sat Dec  1 
14:20:32 2018(r341364)
+++ vendor/llvm/dist-release_70/include/llvm/MC/MCAsmBackend.h  Sat Dec  1 
15:41:24 2018(r341365)
@@ -165,6 +165,11 @@ class MCAsmBackend { (public)
 return 0;
   }
 
+  /// Check whether a given symbol has been flagged with MICROMIPS flag.
+  virtual bool isMicroMips(const MCSymbol *Sym) const {
+return false;
+  }
+
   /// Handles all target related code padding when starting to write a new
   /// basic block to an object file.
   ///

Modified: 
vendor/llvm/dist-release_70/include/llvm/Support/GenericDomTreeConstruction.h
==
--- 
vendor/llvm/dist-release_70/include/llvm/Support/GenericDomTreeConstruction.h   
Sat Dec  1 14:20:32 2018(r341364)
+++ 
vendor/llvm/dist-release_70/include/llvm/Support/GenericDomTreeConstruction.h   
Sat Dec  1 15:41:24 2018(r341365)
@@ -1186,6 +1186,20 @@ struct SemiNCAInfo {
<< '\t' << U << "\n");
 LLVM_DEBUG(dbgs() << "\n");
 
+// Recalculate the DominatorTree when the number of updates
+// exceeds a threshold, which usually makes direct updating slower than
+  

svn commit: r341366 - vendor/llvm/llvm-release_70-r348011

2018-12-01 Thread Dimitry Andric
Author: dim
Date: Sat Dec  1 15:41:34 2018
New Revision: 341366
URL: https://svnweb.freebsd.org/changeset/base/341366

Log:
  Tag llvm release_70 branch r348011.

Added:
  vendor/llvm/llvm-release_70-r348011/
 - copied from r341365, vendor/llvm/dist-release_70/
___
svn-src-all@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 commit: r341364 - in head: lib/libc/amd64/string sys/amd64/amd64

2018-12-01 Thread Mateusz Guzik
Author: mjg
Date: Sat Dec  1 14:20:32 2018
New Revision: 341364
URL: https://svnweb.freebsd.org/changeset/base/341364

Log:
  amd64: align target memmove buffer to 16 bytes before using rep movs
  
  See the review for sample test results.
  
  Reviewed by:  kib (kernel part)
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D18401

Modified:
  head/lib/libc/amd64/string/memmove.S
  head/sys/amd64/amd64/support.S

Modified: head/lib/libc/amd64/string/memmove.S
==
--- head/lib/libc/amd64/string/memmove.SSat Dec  1 12:08:16 2018
(r341363)
+++ head/lib/libc/amd64/string/memmove.SSat Dec  1 14:20:32 2018
(r341364)
@@ -139,6 +139,8 @@ __FBSDID("$FreeBSD$");
 
ALIGN_TEXT
 1256:
+   testb   $15,%dil
+   jnz 100f
 .if \erms == 1
rep
movsb
@@ -146,6 +148,34 @@ __FBSDID("$FreeBSD$");
shrq$3,%rcx /* copy by 64-bit words */
rep
movsq
+   movq%rdx,%rcx
+   andl$7,%ecx /* any bytes left? */
+   jne 100408b
+.endif
+   \end
+   ret
+100:
+   movq(%rsi),%r8
+   movq8(%rsi),%r9
+   movq%rdi,%r10
+   movq%rdi,%rcx
+   andq$15,%rcx
+   leaq-16(%rdx,%rcx),%rdx
+   neg %rcx
+   leaq16(%rdi,%rcx),%rdi
+   leaq16(%rsi,%rcx),%rsi
+   movq%rdx,%rcx
+.if \erms == 1
+   rep
+   movsb
+   movq%r8,(%r10)
+   movq%r9,8(%r10)
+.else
+   shrq$3,%rcx /* copy by 64-bit words */
+   rep
+   movsq
+   movq%r8,(%r10)
+   movq%r9,8(%r10)
movq%rdx,%rcx
andl$7,%ecx /* any bytes left? */
jne 100408b

Modified: head/sys/amd64/amd64/support.S
==
--- head/sys/amd64/amd64/support.S  Sat Dec  1 12:08:16 2018
(r341363)
+++ head/sys/amd64/amd64/support.S  Sat Dec  1 14:20:32 2018
(r341364)
@@ -302,6 +302,8 @@ END(memcmp)
 
ALIGN_TEXT
 1256:
+   testb   $15,%dil
+   jnz 100f
 .if \erms == 1
rep
movsb
@@ -309,6 +311,34 @@ END(memcmp)
shrq$3,%rcx /* copy by 64-bit words */
rep
movsq
+   movq%rdx,%rcx
+   andl$7,%ecx /* any bytes left? */
+   jne 100408b
+.endif
+   \end
+   ret
+100:
+   movq(%rsi),%r8
+   movq8(%rsi),%r9
+   movq%rdi,%r10
+   movq%rdi,%rcx
+   andq$15,%rcx
+   leaq-16(%rdx,%rcx),%rdx
+   neg %rcx
+   leaq16(%rdi,%rcx),%rdi
+   leaq16(%rsi,%rcx),%rsi
+   movq%rdx,%rcx
+.if \erms == 1
+   rep
+   movsb
+   movq%r8,(%r10)
+   movq%r9,8(%r10)
+.else
+   shrq$3,%rcx /* copy by 64-bit words */
+   rep
+   movsq
+   movq%r8,(%r10)
+   movq%r9,8(%r10)
movq%rdx,%rcx
andl$7,%ecx /* any bytes left? */
jne 100408b
___
svn-src-all@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 commit: r341363 - stable/11/share/man/man4

2018-12-01 Thread Vincenzo Maffione
Author: vmaffione
Date: Sat Dec  1 12:08:16 2018
New Revision: 341363
URL: https://svnweb.freebsd.org/changeset/base/341363

Log:
  MFC r339548
  
  man: fix vale(4) port naming
  
  The current documentation describing the syntax of a VALE port is wrong.
  This patch fixes it to make it consistent.
  
  Differential Revision:https://reviews.freebsd.org/D17411

Modified:
  stable/11/share/man/man4/vale.4
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/share/man/man4/vale.4
==
--- stable/11/share/man/man4/vale.4 Sat Dec  1 11:52:13 2018
(r341362)
+++ stable/11/share/man/man4/vale.4 Sat Dec  1 12:08:16 2018
(r341363)
@@ -59,18 +59,18 @@ API.
 .Pp
 .Nm
 ports are named
-.Pa vale[bdg:][port]
+.Pa valeSSS:PPP
 where
 .Pa vale
 is the prefix indicating a VALE switch rather than a standard interface,
-.Pa bdg
+.Pa SSS
 indicates a specific switch (the colon is a separator),
 and
-.Pa port
+.Pa PPP
 indicates a port within the switch.
-Bridge and port names are arbitrary strings, the only
-constraint being that the full name must fit within 16
-characters.
+Both SSS and PPP have the form [0-9a-zA-Z_]+ , the string cannot
+exceed IFNAMSIZ characters, and PPP cannot be the name of any
+existing OS network interface.
 .Pp
 See
 .Xr netmap 4
@@ -97,22 +97,20 @@ Set to non-zero values to enable in-kernel diagnostics
 Create one switch, with a traffic generator connected to one
 port, and a netmap-enabled tcpdump instance on another port:
 .Bd -literal -offset indent
-tcpdump -ni vale-a:1 &
-pkt-gen  -i vale-a:0 -f tx &
+tcpdump -ni valea:1 &
+pkt-gen  -i valea:0 -f tx &
 .Ed
 .Pp
 Create two switches,
 each connected to two qemu machines on different ports.
 .Bd -literal -offset indent
-qemu -net nic -net netmap,ifname=vale-1:a ... &
-qemu -net nic -net netmap,ifname=vale-1:b ... &
-qemu -net nic -net netmap,ifname=vale-2:c ... &
-qemu -net nic -net netmap,ifname=vale-2:d ... &
+qemu -net nic -net netmap,ifname=vale1:a ... &
+qemu -net nic -net netmap,ifname=vale1:b ... &
+qemu -net nic -net netmap,ifname=vale2:c ... &
+qemu -net nic -net netmap,ifname=vale2:d ... &
 .Ed
 .Sh SEE ALSO
 .Xr netmap 4
-.Pp
-.Xr http://info.iet.unipi.it/~luigi/vale/
 .Pp
 Luigi Rizzo, Giuseppe Lettieri: VALE, a switched ethernet for virtual machines,
 June 2012, http://info.iet.unipi.it/~luigi/vale/
___
svn-src-all@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 commit: r341362 - stable/12/sys/dev/cxgbe

2018-12-01 Thread Vincenzo Maffione
Author: vmaffione
Date: Sat Dec  1 11:52:13 2018
New Revision: 341362
URL: https://svnweb.freebsd.org/changeset/base/341362

Log:
  MFC r341145
  
  cxgbe: revert r309725
  
  After the fix contained in r341144, cxgbe does not need anymore
  to set the IFCAP_NETMAP flag manually.
  
  Differential Revision:https://reviews.freebsd.org/D17987

Modified:
  stable/12/sys/dev/cxgbe/t4_main.c
  stable/12/sys/dev/cxgbe/t4_netmap.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/cxgbe/t4_main.c
==
--- stable/12/sys/dev/cxgbe/t4_main.c   Sat Dec  1 11:50:52 2018
(r341361)
+++ stable/12/sys/dev/cxgbe/t4_main.c   Sat Dec  1 11:52:13 2018
(r341362)
@@ -1522,10 +1522,6 @@ cxgbe_vi_attach(device_t dev, struct vi_info *vi)
if (vi->nofldrxq != 0)
ifp->if_capabilities |= IFCAP_TOE;
 #endif
-#ifdef DEV_NETMAP
-   if (vi->nnmrxq != 0)
-   ifp->if_capabilities |= IFCAP_NETMAP;
-#endif
 #ifdef RATELIMIT
if (is_ethoffload(vi->pi->adapter) && vi->nofldtxq != 0) {
ifp->if_capabilities |= IFCAP_TXRTLMT;
@@ -1541,7 +1537,7 @@ cxgbe_vi_attach(device_t dev, struct vi_info *vi)
 
ether_ifattach(ifp, vi->hw_addr);
 #ifdef DEV_NETMAP
-   if (ifp->if_capabilities & IFCAP_NETMAP)
+   if (vi->nnmrxq != 0)
cxgbe_nm_attach(vi);
 #endif
sb = sbuf_new_auto();

Modified: stable/12/sys/dev/cxgbe/t4_netmap.c
==
--- stable/12/sys/dev/cxgbe/t4_netmap.c Sat Dec  1 11:50:52 2018
(r341361)
+++ stable/12/sys/dev/cxgbe/t4_netmap.c Sat Dec  1 11:52:13 2018
(r341362)
@@ -913,7 +913,7 @@ cxgbe_nm_attach(struct vi_info *vi)
na.nm_register = cxgbe_netmap_reg;
na.num_tx_rings = vi->nnmtxq;
na.num_rx_rings = vi->nnmrxq;
-   netmap_attach(&na);
+   netmap_attach(&na); /* This adds IFCAP_NETMAP to if_capabilities */
 }
 
 void
___
svn-src-all@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 commit: r341361 - stable/12/sys/dev/netmap

2018-12-01 Thread Vincenzo Maffione
Author: vmaffione
Date: Sat Dec  1 11:50:52 2018
New Revision: 341361
URL: https://svnweb.freebsd.org/changeset/base/341361

Log:
  MFC r341144
  
  netmap: set IFCAP_NETMAP in if_capabilities
  
  Revision r307394 removed (by mistake) the code that sets IFCAP_NETMAP
  in if_capabilities on netmap_attach. This patch reverts this change.
  
  Differential Revision:https://reviews.freebsd.org/D17987

Modified:
  stable/12/sys/dev/netmap/netmap_freebsd.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/netmap/netmap_freebsd.c
==
--- stable/12/sys/dev/netmap/netmap_freebsd.c   Sat Dec  1 09:59:32 2018
(r341360)
+++ stable/12/sys/dev/netmap/netmap_freebsd.c   Sat Dec  1 11:50:52 2018
(r341361)
@@ -1549,6 +1549,7 @@ out:
 void
 nm_os_onattach(struct ifnet *ifp)
 {
+   ifp->if_capabilities |= IFCAP_NETMAP;
 }
 
 void
___
svn-src-all@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 commit: r341359 - head/sys/netpfil/pf

2018-12-01 Thread Kristof Provost
Author: kp
Date: Sat Dec  1 09:58:21 2018
New Revision: 341359
URL: https://svnweb.freebsd.org/changeset/base/341359

Log:
  pf: Fix panic on overlapping interface names
  
  In rare situations[*] it's possible for two different interfaces to have
  the same name. This confuses pf, because kifs are indexed by name (which
  is assumed to be unique). As a result we can end up trying to
  if_rele(NULL), which panics.
  
  Explicitly checking the ifp pointer before if_rele() prevents the panic.
  Note pf will likely behave in unexpected ways on the the overlapping
  interfaces.
  
  [*] Insert an interface in a vnet jail. Rename it to an interface which
  exists on the host. Remove the jail. There are now two interfaces with
  the same name in the host.

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

Modified: head/sys/netpfil/pf/pf_if.c
==
--- head/sys/netpfil/pf/pf_if.c Sat Dec  1 09:57:29 2018(r341358)
+++ head/sys/netpfil/pf/pf_if.c Sat Dec  1 09:58:21 2018(r341359)
@@ -853,7 +853,8 @@ pfi_detach_ifnet_event(void *arg __unused, struct ifne
V_pfi_update++;
pfi_kif_update(kif);
 
-   if_rele(kif->pfik_ifp);
+   if (kif->pfik_ifp)
+   if_rele(kif->pfik_ifp);
 
kif->pfik_ifp = NULL;
ifp->if_pf_kif = NULL;
___
svn-src-all@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 commit: r341358 - head/tests/sys/netpfil/pf

2018-12-01 Thread Kristof Provost
Author: kp
Date: Sat Dec  1 09:57:29 2018
New Revision: 341358
URL: https://svnweb.freebsd.org/changeset/base/341358

Log:
  pf tests: Make pass_block:noalias more robust
  
  Send several ICMPv6 echo requests. We've seen occasional failures with a
  single request.

Modified:
  head/tests/sys/netpfil/pf/pass_block.sh

Modified: head/tests/sys/netpfil/pf/pass_block.sh
==
--- head/tests/sys/netpfil/pf/pass_block.sh Sat Dec  1 05:58:33 2018
(r341357)
+++ head/tests/sys/netpfil/pf/pass_block.sh Sat Dec  1 09:57:29 2018
(r341358)
@@ -107,21 +107,21 @@ noalias_body()
| cut -d % -f 1)
 
# Sanity check
-   atf_check -s exit:0 -o ignore ping6 -c 1 -x 1 2001:db8:42::2
-   atf_check -s exit:0 -o ignore ping6 -c 1 -x 1 ${linklocaladdr}%${epair}a
+   atf_check -s exit:0 -o ignore ping6 -c 3 -x 1 2001:db8:42::2
+   atf_check -s exit:0 -o ignore ping6 -c 3 -x 1 ${linklocaladdr}%${epair}a
 
jexec alcatraz pfctl -e
pft_set_rules alcatraz "block out inet6 from (${epair}b:0) to any"
 
-   atf_check -s exit:2 -o ignore ping6 -c 1 -x 1 2001:db8:42::2
+   atf_check -s exit:2 -o ignore ping6 -c 3 -x 1 2001:db8:42::2
 
# We should still be able to ping the link-local address
-   atf_check -s exit:0 -o ignore ping6 -c 1 -x 1 ${linklocaladdr}%${epair}a
+   atf_check -s exit:0 -o ignore ping6 -c 3 -x 1 ${linklocaladdr}%${epair}a
 
pft_set_rules alcatraz "block out inet6 from (${epair}b) to any"
 
# We cannot ping to the link-local address
-   atf_check -s exit:2 -o ignore ping6 -c 1 -x 1 ${linklocaladdr}%${epair}a
+   atf_check -s exit:2 -o ignore ping6 -c 3 -x 1 ${linklocaladdr}%${epair}a
 }
 
 noalias_cleanup()
___
svn-src-all@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 commit: r341360 - head/tests/sys/netpfil/pf

2018-12-01 Thread Kristof Provost
Author: kp
Date: Sat Dec  1 09:59:32 2018
New Revision: 341360
URL: https://svnweb.freebsd.org/changeset/base/341360

Log:
  pf tests: Test name handling
  
  Provoke a situation where two interfaces have the same name, and verify
  pf's reaction to this.

Added:
  head/tests/sys/netpfil/pf/names.sh   (contents, props changed)
Modified:
  head/tests/sys/netpfil/pf/Makefile

Modified: head/tests/sys/netpfil/pf/Makefile
==
--- head/tests/sys/netpfil/pf/Makefile  Sat Dec  1 09:58:21 2018
(r341359)
+++ head/tests/sys/netpfil/pf/Makefile  Sat Dec  1 09:59:32 2018
(r341360)
@@ -9,6 +9,7 @@ ATF_TESTS_SH+=  anchor \
pass_block \
forward \
fragmentation \
+   names \
set_tos \
route_to \
synproxy \

Added: head/tests/sys/netpfil/pf/names.sh
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tests/sys/netpfil/pf/names.sh  Sat Dec  1 09:59:32 2018
(r341360)
@@ -0,0 +1,34 @@
+# $FreeBSD$
+
+. $(atf_get_srcdir)/utils.subr
+
+atf_test_case "names" "cleanup"
+names_head()
+{
+   atf_set descr 'Test overlapping names'
+   atf_set require.user root
+}
+
+names_body()
+{
+   pft_init
+
+   epair=$(pft_mkepair)
+
+   pft_mkjail alcatraz ${epair}b
+   ifconfig ${epair}a name foo
+   jexec alcatraz ifconfig ${epair}b name foo
+
+   jail -r alcatraz
+   ifconfig foo destroy
+}
+
+names_cleanup()
+{
+   pft_cleanup
+}
+
+atf_init_test_cases()
+{
+   atf_add_test_case "names"
+}
___
svn-src-all@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 commit: r341357 - head/bin/pkill

2018-12-01 Thread Guangyuan Yang
Author: ygy (doc committer)
Date: Sat Dec  1 05:58:33 2018
New Revision: 341357
URL: https://svnweb.freebsd.org/changeset/base/341357

Log:
  Clarify that patterns are extended regular expressions in pkill(1) manual 
page.
  
  PR:   231060
  Submitted by: naddy
  MFC after:3 days

Modified:
  head/bin/pkill/pkill.1

Modified: head/bin/pkill/pkill.1
==
--- head/bin/pkill/pkill.1  Sat Dec  1 03:20:10 2018(r341356)
+++ head/bin/pkill/pkill.1  Sat Dec  1 05:58:33 2018(r341357)
@@ -29,7 +29,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd June 5, 2017
+.Dd December 1, 2018
 .Dt PKILL 1
 .Os
 .Sh NAME
@@ -221,7 +221,7 @@ This option is valid only when given as the first argu
 .Pp
 If any
 .Ar pattern
-operands are specified, they are used as regular expressions to match
+operands are specified, they are used as extended regular expressions to match
 the command name or full argument list of each process.
 If the
 .Fl f
___
svn-src-all@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"