svn commit: r356350 - head/sys/vm
Author: jeff Date: Sat Jan 4 07:56:28 2020 New Revision: 356350 URL: https://svnweb.freebsd.org/changeset/base/356350 Log: Sort cross-domain frees into per-domain buckets before inserting these onto their respective bucket lists. This is a several order of magnitude improvement in contention on the keg lock under heavy free traffic while requiring only an additional bucket per-domain worth of memory. Discussed with: markj, rlibby Differential Revision:https://reviews.freebsd.org/D22830 Modified: head/sys/vm/uma_core.c head/sys/vm/uma_int.h Modified: head/sys/vm/uma_core.c == --- head/sys/vm/uma_core.c Sat Jan 4 03:30:08 2020(r356349) +++ head/sys/vm/uma_core.c Sat Jan 4 07:56:28 2020(r356350) @@ -951,10 +951,6 @@ cache_drain(uma_zone_t zone) * * XXX: It would good to be able to assert that the zone is being * torn down to prevent improper use of cache_drain(). -* -* XXX: We lock the zone before passing into bucket_cache_reclaim() as -* it is used elsewhere. Should the tear-down path be made special -* there in some form? */ CPU_FOREACH(cpu) { cache = >uz_cpu[cpu]; @@ -974,9 +970,7 @@ cache_drain(uma_zone_t zone) bucket_free(zone, bucket, NULL); } } - ZONE_LOCK(zone); bucket_cache_reclaim(zone, true); - ZONE_UNLOCK(zone); } static void @@ -1082,9 +1076,29 @@ bucket_cache_reclaim(uma_zone_t zone, bool drain) int i; for (i = 0; i < vm_ndomains; i++) { + /* +* The cross bucket is partially filled and not part of +* the item count. Reclaim it individually here. +*/ zdom = >uz_domain[i]; + ZONE_CROSS_LOCK(zone); + bucket = zdom->uzd_cross; + zdom->uzd_cross = NULL; + ZONE_CROSS_UNLOCK(zone); + if (bucket != NULL) { + bucket_drain(zone, bucket); + bucket_free(zone, bucket, NULL); + } /* +* Shrink the zone bucket size to ensure that the per-CPU caches +* don't grow too large. +*/ + ZONE_LOCK(zone); + if (i == 0 && zone->uz_bucket_size > zone->uz_bucket_size_min) + zone->uz_bucket_size--; + + /* * If we were asked to drain the zone, we are done only once * this bucket cache is empty. Otherwise, we reclaim items in * excess of the zone's estimated working set size. If the @@ -1114,14 +1128,8 @@ bucket_cache_reclaim(uma_zone_t zone, bool drain) bucket_free(zone, bucket, NULL); ZONE_LOCK(zone); } + ZONE_UNLOCK(zone); } - - /* -* Shrink the zone bucket size to ensure that the per-CPU caches -* don't grow too large. -*/ - if (zone->uz_bucket_size > zone->uz_bucket_size_min) - zone->uz_bucket_size--; } static void @@ -1224,8 +1232,8 @@ zone_reclaim(uma_zone_t zone, int waitok, bool drain) msleep(zone, >uz_lock, PVM, "zonedrain", 1); } zone->uz_flags |= UMA_ZFLAG_RECLAIMING; - bucket_cache_reclaim(zone, drain); ZONE_UNLOCK(zone); + bucket_cache_reclaim(zone, drain); /* * The DRAINING flag protects us from being freed while @@ -2263,6 +2271,7 @@ zone_ctor(void *mem, int size, void *udata, int flags) zone_foreach(zone_count, ); zone->uz_namecnt = cnt.count; ZONE_LOCK_INIT(zone, (arg->flags & UMA_ZONE_MTXCLASS)); + ZONE_CROSS_LOCK_INIT(zone); for (i = 0; i < vm_ndomains; i++) TAILQ_INIT(>uz_domain[i].uzd_buckets); @@ -2448,6 +2457,7 @@ zone_dtor(void *arg, int size, void *udata) counter_u64_free(zone->uz_fails); free(zone->uz_ctlname, M_UMA); ZONE_LOCK_FINI(zone); + ZONE_CROSS_LOCK_FINI(zone); } /* @@ -3724,7 +3734,76 @@ zfree_item: zone_free_item(zone, item, udata, SKIP_DTOR); } +#ifdef UMA_XDOMAIN +/* + * sort crossdomain free buckets to domain correct buckets and cache + * them. + */ static void +zone_free_cross(uma_zone_t zone, uma_bucket_t bucket, void *udata) +{ + struct uma_bucketlist fullbuckets; + uma_zone_domain_t zdom; + uma_bucket_t b; + void *item; + int domain; + + CTR3(KTR_UMA, + "uma_zfree: zone %s(%p) draining cross bucket %p", + zone->uz_name, zone, bucket); + + TAILQ_INIT(); + + /* +* To avoid having ndomain * ndomain buckets for sorting we have a +* lock on the current crossfree bucket. A full matrix with
Re: svn commit: r356344 - head
> Author: jhb > Date: Sat Jan 4 00:59:47 2020 > New Revision: 356344 > URL: > https://svnweb.freebsd.org/changeset/base/356344 > . . . > +MAKE_PARAMS_powerpc?=CROSS_TOOLCHAIN=powerpc64-gcc6 > . . . > +TOOLCHAINS_powerpc= powerpc64-gcc6 > . . . (I know that for now gcc9 is not in use but I'm looking at the overall pattern going forward vs. what is expected to work shorter term, even if not yet fully.) Given the likes of: TARGET=powerpc TARGET_ARCH=powerpc TARGET=powerpc TARGET_ARCH=powerpc64 Is this going to change at some point to use powerpc-gcc9 and powerpc64-gcc9 (and the matching devel/binutils@powerpc and devel/binutils@powerpc64 related commands), picking the matching commands? (More TARGET_ARCH based?) Until then, is it really restricted to powerpc64 because of the toolchain used (and lack of various command parameters to possibly control all the required behavioral differences for targeting 32-bit powerpc)? (powerpcspe has been dropped from gcc, if I understand right. So I do not expect that it can be covered. So I did not list it as another TARGET_ARCH value above.) === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) ___ 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: r356349 - in head: lib/libmemstat sys/vm
Author: jeff Date: Sat Jan 4 03:30:08 2020 New Revision: 356349 URL: https://svnweb.freebsd.org/changeset/base/356349 Log: Use per-domain keg locks. This provides both a lock and separate space accounting for each NUMA domain. Independent keg domain locks are important with cross-domain frees. Hashed zones are non-numa and use a single keg lock to protect the hash table. Reviewed by: markj, rlibby Differential Revision:https://reviews.freebsd.org/D22829 Modified: head/lib/libmemstat/memstat_uma.c head/sys/vm/uma_core.c head/sys/vm/uma_int.h Modified: head/lib/libmemstat/memstat_uma.c == --- head/lib/libmemstat/memstat_uma.c Sat Jan 4 03:15:34 2020 (r356348) +++ head/lib/libmemstat/memstat_uma.c Sat Jan 4 03:30:08 2020 (r356349) @@ -311,10 +311,12 @@ memstat_kvm_uma(struct memory_type_list *list, void *k LIST_HEAD(, uma_keg) uma_kegs; struct memory_type *mtp; struct uma_zone_domain uzd; + struct uma_domain ukd; struct uma_bucket *ubp, ub; struct uma_cache *ucp, *ucp_array; struct uma_zone *uzp, uz; struct uma_keg *kzp, kz; + uint64_t kegfree; int hint_dontsearch, i, mp_maxid, ndomains, ret; char name[MEMTYPE_MAXNAME]; cpuset_t all_cpus; @@ -454,18 +456,29 @@ skip_percpu: for (i = 0; i < ndomains; i++) { ret = kread(kvm, _domain[i], , sizeof(uzd), 0); + if (ret != 0) + continue; for (ubp = TAILQ_FIRST(_buckets); ubp != NULL; ubp = TAILQ_NEXT(, ub_link)) { ret = kread(kvm, ubp, , sizeof(ub), 0); + if (ret != 0) + continue; mtp->mt_zonefree += ub.ub_cnt; } } if (!((kz.uk_flags & UMA_ZONE_SECONDARY) && LIST_FIRST(_zones) != uzp)) { - mtp->mt_kegfree = kz.uk_free; + kegfree = 0; + for (i = 0; i < ndomains; i++) { + ret = kread(kvm, >uk_domain[i], + , sizeof(ukd), 0); + if (ret != 0) + kegfree += ukd.ud_free; + } + mtp->mt_kegfree = kegfree; mtp->mt_free += mtp->mt_kegfree; } mtp->mt_free += mtp->mt_zonefree; Modified: head/sys/vm/uma_core.c == --- head/sys/vm/uma_core.c Sat Jan 4 03:15:34 2020(r356348) +++ head/sys/vm/uma_core.c Sat Jan 4 03:30:08 2020(r356349) @@ -740,23 +740,28 @@ static void zone_timeout(uma_zone_t zone, void *unused) { uma_keg_t keg; - u_int slabs; + u_int slabs, pages; if ((zone->uz_flags & UMA_ZONE_HASH) == 0) goto update_wss; keg = zone->uz_keg; - KEG_LOCK(keg); + /* +* Hash zones are non-numa by definition so the first domain +* is the only one present. +*/ + KEG_LOCK(keg, 0); + pages = keg->uk_domain[0].ud_pages; + + /* * Expand the keg hash table. * * This is done if the number of slabs is larger than the hash size. * What I'm trying to do here is completely reduce collisions. This * may be a little aggressive. Should I allow for two collisions max? */ - if (keg->uk_flags & UMA_ZONE_HASH && - (slabs = keg->uk_pages / keg->uk_ppera) > -keg->uk_hash.uh_hashsize) { + if ((slabs = pages / keg->uk_ppera) > keg->uk_hash.uh_hashsize) { struct uma_hash newhash; struct uma_hash oldhash; int ret; @@ -767,9 +772,9 @@ zone_timeout(uma_zone_t zone, void *unused) * I have to do everything in stages and check for * races. */ - KEG_UNLOCK(keg); + KEG_UNLOCK(keg, 0); ret = hash_alloc(, 1 << fls(slabs)); - KEG_LOCK(keg); + KEG_LOCK(keg, 0); if (ret) { if (hash_expand(>uk_hash, )) { oldhash = keg->uk_hash; @@ -777,12 +782,12 @@ zone_timeout(uma_zone_t
svn commit: r356348 - in head/sys: kern vm
Author: jeff Date: Sat Jan 4 03:15:34 2020 New Revision: 356348 URL: https://svnweb.freebsd.org/changeset/base/356348 Log: Use a separate lock for the zone and keg. This provides concurrency between populating buckets from the slab layer and fetching full buckets from the zone layer. Eliminate some nonsense locking patterns where we lock to fetch a single variable. Reviewed by: markj Differential Revision:https://reviews.freebsd.org/D22828 Modified: head/sys/kern/kern_mbuf.c head/sys/vm/uma.h head/sys/vm/uma_core.c head/sys/vm/uma_int.h Modified: head/sys/kern/kern_mbuf.c == --- head/sys/kern/kern_mbuf.c Sat Jan 4 03:04:46 2020(r356347) +++ head/sys/kern/kern_mbuf.c Sat Jan 4 03:15:34 2020(r356348) @@ -715,7 +715,7 @@ mb_dtor_pack(void *mem, int size, void *arg) * is deliberate. We don't want to acquire the zone lock for every * mbuf free. */ - if (uma_zone_exhausted_nolock(zone_clust)) + if (uma_zone_exhausted(zone_clust)) uma_zone_reclaim(zone_pack, UMA_RECLAIM_DRAIN); } Modified: head/sys/vm/uma.h == --- head/sys/vm/uma.h Sat Jan 4 03:04:46 2020(r356347) +++ head/sys/vm/uma.h Sat Jan 4 03:15:34 2020(r356348) @@ -641,7 +641,6 @@ void uma_prealloc(uma_zone_t zone, int itemcnt); * Non-zero if zone is exhausted. */ int uma_zone_exhausted(uma_zone_t zone); -int uma_zone_exhausted_nolock(uma_zone_t zone); /* * Common UMA_ZONE_PCPU zones. Modified: head/sys/vm/uma_core.c == --- head/sys/vm/uma_core.c Sat Jan 4 03:04:46 2020(r356347) +++ head/sys/vm/uma_core.c Sat Jan 4 03:15:34 2020(r356348) @@ -922,7 +922,7 @@ bucket_drain(uma_zone_t zone, uma_bucket_t bucket) /* * Drains the per cpu caches for a zone. * - * NOTE: This may only be called while the zone is being turn down, and not + * NOTE: This may only be called while the zone is being torn down, and not * during normal operation. This is necessary in order that we do not have * to migrate CPUs to drain the per-CPU caches. * @@ -1041,7 +1041,7 @@ pcpu_cache_drain_safe(uma_zone_t zone) int cpu; /* -* Polite bucket sizes shrinking was not enouth, shrink aggressively. +* Polite bucket sizes shrinking was not enough, shrink aggressively. */ if (zone) cache_shrink(zone, NULL); @@ -1222,7 +1222,7 @@ zone_reclaim(uma_zone_t zone, int waitok, bool drain) while (zone->uz_flags & UMA_ZFLAG_RECLAIMING) { if (waitok == M_NOWAIT) goto out; - msleep(zone, zone->uz_lockptr, PVM, "zonedrain", 1); + msleep(zone, >uz_lock, PVM, "zonedrain", 1); } zone->uz_flags |= UMA_ZFLAG_RECLAIMING; bucket_cache_reclaim(zone, drain); @@ -1258,8 +1258,8 @@ zone_trim(uma_zone_t zone, void *unused) /* * Allocate a new slab for a keg. This does not insert the slab onto a list. - * If the allocation was successful, the keg lock will be held upon return, - * otherwise the keg will be left unlocked. + * The keg should be locked on entry and will be dropped and reacquired on + * return. * * Arguments: * flags Wait flags for the item initialization routine @@ -1283,8 +1283,6 @@ keg_alloc_slab(uma_keg_t keg, uma_zone_t zone, int dom KASSERT(domain >= 0 && domain < vm_ndomains, ("keg_alloc_slab: domain %d out of range", domain)); KEG_LOCK_ASSERT(keg); - MPASS(zone->uz_lockptr == >uk_lock); - allocf = keg->uk_allocf; KEG_UNLOCK(keg); @@ -1293,7 +1291,7 @@ keg_alloc_slab(uma_keg_t keg, uma_zone_t zone, int dom if (keg->uk_flags & UMA_ZONE_OFFPAGE) { slab = zone_alloc_item(keg->uk_slabzone, NULL, domain, aflags); if (slab == NULL) - goto out; + goto fail; } /* @@ -1317,8 +1315,7 @@ keg_alloc_slab(uma_keg_t keg, uma_zone_t zone, int dom if (mem == NULL) { if (keg->uk_flags & UMA_ZONE_OFFPAGE) zone_free_item(keg->uk_slabzone, slab, NULL, SKIP_NONE); - slab = NULL; - goto out; + goto fail; } uma_total_inc(size); @@ -1348,8 +1345,7 @@ keg_alloc_slab(uma_keg_t keg, uma_zone_t zone, int dom break; if (i != keg->uk_ipers) { keg_free_slab(keg, slab, i); - slab = NULL; - goto out; + goto fail; } } KEG_LOCK(keg); @@ -1363,8 +1359,11 @@ keg_alloc_slab(uma_keg_t keg, uma_zone_t zone, int dom
svn commit: r356347 - head/sys/vm
Author: jeff Date: Sat Jan 4 03:04:46 2020 New Revision: 356347 URL: https://svnweb.freebsd.org/changeset/base/356347 Log: Use atomics for the zone limit and sleeper count. This relies on the sleepq to serialize sleepers. This patch retains the existing sleep/wakeup paradigm to limit 'thundering herd' wakeups. It resolves a missing wakeup in one case but otherwise should be bug for bug compatible. In particular, there are still various races surrounding adjusting the limit via sysctl that are now documented. Discussed with: markj Reviewed by: rlibby Differential Revision:https://reviews.freebsd.org/D22827 Modified: head/sys/vm/uma_core.c head/sys/vm/uma_int.h Modified: head/sys/vm/uma_core.c == --- head/sys/vm/uma_core.c Sat Jan 4 01:13:00 2020(r356346) +++ head/sys/vm/uma_core.c Sat Jan 4 03:04:46 2020(r356347) @@ -75,6 +75,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -267,8 +268,9 @@ static void hash_free(struct uma_hash *hash); static void uma_timeout(void *); static void uma_startup3(void); static void *zone_alloc_item(uma_zone_t, void *, int, int); -static void *zone_alloc_item_locked(uma_zone_t, void *, int, int); static void zone_free_item(uma_zone_t, void *, void *, enum zfreeskip); +static int zone_alloc_limit(uma_zone_t zone, int count, int flags); +static void zone_free_limit(uma_zone_t zone, int count); static void bucket_enable(void); static void bucket_init(void); static uma_bucket_t bucket_alloc(uma_zone_t zone, void *, int); @@ -290,6 +292,7 @@ static int sysctl_handle_uma_zone_allocs(SYSCTL_HANDLE static int sysctl_handle_uma_zone_frees(SYSCTL_HANDLER_ARGS); static int sysctl_handle_uma_zone_flags(SYSCTL_HANDLER_ARGS); static int sysctl_handle_uma_slab_efficiency(SYSCTL_HANDLER_ARGS); +static int sysctl_handle_uma_zone_items(SYSCTL_HANDLER_ARGS); #ifdef INVARIANTS static inline struct noslabbits *slab_dbg_bits(uma_slab_t slab, uma_keg_t keg); @@ -893,7 +896,7 @@ hash_free(struct uma_hash *hash) * * Arguments: * zone The zone to free to, must be unlocked. - * bucket The free/alloc bucket with items, cpu queue must be locked. + * bucket The free/alloc bucket with items. * * Returns: * Nothing @@ -904,20 +907,15 @@ bucket_drain(uma_zone_t zone, uma_bucket_t bucket) { int i; - if (bucket == NULL) + if (bucket == NULL || bucket->ub_cnt == 0) return; if (zone->uz_fini) for (i = 0; i < bucket->ub_cnt; i++) zone->uz_fini(bucket->ub_bucket[i], zone->uz_size); zone->uz_release(zone->uz_arg, bucket->ub_bucket, bucket->ub_cnt); - if (zone->uz_max_items > 0) { - ZONE_LOCK(zone); - zone->uz_items -= bucket->ub_cnt; - if (zone->uz_sleepers && zone->uz_items < zone->uz_max_items) - wakeup_one(zone); - ZONE_UNLOCK(zone); - } + if (zone->uz_max_items > 0) + zone_free_limit(zone, bucket->ub_cnt); bucket->ub_cnt = 0; } @@ -2096,10 +2094,11 @@ zone_alloc_sysctl(uma_zone_t zone, void *unused) */ oid = SYSCTL_ADD_NODE(NULL, SYSCTL_CHILDREN(zone->uz_oid), OID_AUTO, "limit", CTLFLAG_RD, NULL, ""); + SYSCTL_ADD_PROC(NULL, SYSCTL_CHILDREN(oid), OID_AUTO, + "items", CTLFLAG_RD | CTLTYPE_U64 | CTLFLAG_MPSAFE, + zone, 0, sysctl_handle_uma_zone_items, "QU", + "current number of allocated items if limit is set"); SYSCTL_ADD_U64(NULL, SYSCTL_CHILDREN(oid), OID_AUTO, - "items", CTLFLAG_RD, >uz_items, 0, - "current number of cached items"); - SYSCTL_ADD_U64(NULL, SYSCTL_CHILDREN(oid), OID_AUTO, "max_items", CTLFLAG_RD, >uz_max_items, 0, "Maximum number of cached items"); SYSCTL_ADD_U32(NULL, SYSCTL_CHILDREN(oid), OID_AUTO, @@ -2108,6 +2107,12 @@ zone_alloc_sysctl(uma_zone_t zone, void *unused) SYSCTL_ADD_U64(NULL, SYSCTL_CHILDREN(oid), OID_AUTO, "sleeps", CTLFLAG_RD, >uz_sleeps, 0, "Total zone limit sleeps"); + SYSCTL_ADD_U64(NULL, SYSCTL_CHILDREN(oid), OID_AUTO, + "bucket_max", CTLFLAG_RD, >uz_bkt_max, 0, + "Maximum number of items in the bucket cache"); + SYSCTL_ADD_U64(NULL, SYSCTL_CHILDREN(oid), OID_AUTO, + "bucket_cnt", CTLFLAG_RD, >uz_bkt_count, 0, + "Number of items in the bucket cache"); /* * Per-domain information. @@ -2961,15 +2966,15 @@ uma_zalloc_arg(uma_zone_t zone, void *udata, int flags domain = PCPU_GET(domain); else domain = UMA_ANYDOMAIN; - return (zone_alloc_item_locked(zone, udata, domain, flags)); + return (zone_alloc_item(zone, udata, domain, flags));
Re: svn commit: r356262 - head/sys/kern
On Thu, Jan 02, 2020 at 01:23:43AM +, Pawel Biernacki wrote: P> Author: kaktus P> Date: Thu Jan 2 01:23:43 2020 P> New Revision: 356262 P> URL: https://svnweb.freebsd.org/changeset/base/356262 P> P> Log: P> sysctl: hide 2.x era compat node P> P> r23081 introduced kern.dummy oid as a semi ABI compat for kern.maxsockbuf P> that was moved to a new namespace. It never functioned as an alias of any P> kind and was just returning 0 unconditionally, hence it was probably P> provided to keep some 3rd party programmes happy about sysctl(3) not P> reporting an error because of non-existing oid. P> After nearly 23 years it seems reasonable to just hide it from sysctl(8) P> list not to cause unnecessary confusion as for its purpose. P> P> Reported by: Antranig Vartanian P> Reviewed by: kib (mentor) P> Approved by: kib (mentor) P> Differential Revision: https://reviews.freebsd.org/D22982 Is there any reason to keep it at all even hidden after 23 years? -- Gleb Smirnoff ___ 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: r356346 - head/sys/powerpc/conf
Author: jhibbits Date: Sat Jan 4 01:13:00 2020 New Revision: 356346 URL: https://svnweb.freebsd.org/changeset/base/356346 Log: powerpc: Remove 'sec' device from QORIQ64 config The SEC crypto engine, as implemented in this driver, does not exist on any 64-bit SoC, so don't bother compiling it in. Modified: head/sys/powerpc/conf/QORIQ64 Modified: head/sys/powerpc/conf/QORIQ64 == --- head/sys/powerpc/conf/QORIQ64 Sat Jan 4 01:09:33 2020 (r356345) +++ head/sys/powerpc/conf/QORIQ64 Sat Jan 4 01:13:00 2020 (r356346) @@ -103,7 +103,6 @@ device pci device scbus device scc device sdhci -device sec device spibus device spigen device tuntap ___ 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: r356344 - head
Author: jhb Date: Sat Jan 4 00:59:47 2020 New Revision: 356344 URL: https://svnweb.freebsd.org/changeset/base/356344 Log: Use the freebsd-gcc6 toolchains instead of powerpc64-xtoolchain-gcc. Reviewed by: brooks Differential Revision:https://reviews.freebsd.org/D23029 Modified: head/Makefile Modified: head/Makefile == --- head/Makefile Sat Jan 4 00:51:03 2020(r356343) +++ head/Makefile Sat Jan 4 00:59:47 2020(r356344) @@ -509,15 +509,15 @@ TARGET_ARCHES_${target}?= ${target} MAKE_PARAMS_riscv?=CROSS_TOOLCHAIN=riscv64-gcc .if !defined(MAKE_OBSOLETE_GCC) OBSOLETE_GCC_TARGETS=${_OBSOLETE_GCC_TARGETS} -MAKE_PARAMS_mips?= CROSS_TOOLCHAIN=mips-gcc -MAKE_PARAMS_powerpc?= CROSS_TOOLCHAIN=powerpc64-gcc -MAKE_PARAMS_sparc64?= CROSS_TOOLCHAIN=sparc64-gcc +MAKE_PARAMS_mips?= CROSS_TOOLCHAIN=mips-gcc6 +MAKE_PARAMS_powerpc?= CROSS_TOOLCHAIN=powerpc64-gcc6 +MAKE_PARAMS_sparc64?= CROSS_TOOLCHAIN=sparc64-gcc6 .endif -TOOLCHAINS_mips= mips -TOOLCHAINS_powerpc=powerpc64 -TOOLCHAINS_riscv= riscv64 -TOOLCHAINS_sparc64=sparc64 +TOOLCHAINS_mips= mips-gcc6 +TOOLCHAINS_powerpc=powerpc64-gcc6 +TOOLCHAINS_riscv= riscv64-gcc +TOOLCHAINS_sparc64=sparc64-gcc6 # Remove architectures only supported by external toolchain from # universe if required toolchain packages are missing. riscv requires @@ -526,12 +526,12 @@ TOOLCHAINS_sparc64= sparc64 .for target in riscv ${OBSOLETE_GCC_TARGETS} .if ${_UNIVERSE_TARGETS:M${target}} .for toolchain in ${TOOLCHAINS_${target}} -.if !exists(/usr/local/share/toolchains/${toolchain}-gcc.mk) +.if !exists(/usr/local/share/toolchains/${toolchain}.mk) _UNIVERSE_TARGETS:= ${_UNIVERSE_TARGETS:N${target}} universe: universe_${toolchain}_skip .PHONY universe_epilogue: universe_${toolchain}_skip .PHONY universe_${toolchain}_skip: universe_prologue .PHONY - @echo ">> ${target} skipped - install ${toolchain}-xtoolchain-gcc port or package to build" + @echo ">> ${target} skipped - install ${toolchain} port or package to build" .endif .endfor .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: r356342 - head/sys/sys
Author: mjg Date: Sat Jan 4 00:44:53 2020 New Revision: 356342 URL: https://svnweb.freebsd.org/changeset/base/356342 Log: vfs: remove CTASSERT from VOP_UNLOCK_FLAGS gcc does not like it and it's not worth working around just for that compiler. Modified: head/sys/sys/vnode.h Modified: head/sys/sys/vnode.h == --- head/sys/sys/vnode.hSat Jan 4 00:44:49 2020(r356341) +++ head/sys/sys/vnode.hSat Jan 4 00:44:53 2020(r356342) @@ -960,8 +960,6 @@ void vn_fsid(struct vnode *vp, struct vattr *va); int _flags = (flags); \ int _error; \ \ - CTASSERT(__builtin_constant_p(flags) ? \ - (flags & ~(LK_INTERLOCK | LK_RELEASE)) == 0 : 1); \ if ((_flags & ~(LK_INTERLOCK | LK_RELEASE)) != 0) \ panic("%s: unsupported flags %x\n", __func__, flags); \ _error = VOP_UNLOCK(_vp); \ ___ 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: r356339 - head/share/mk
Author: jhb Date: Fri Jan 3 23:31:38 2020 New Revision: 356339 URL: https://svnweb.freebsd.org/changeset/base/356339 Log: Set correct lib32 MACHINE_ARCH for mips64el*. Use "mipsel" instead of "mips" as the 32-bit MACHINE_ARCH when building lib32 for little-endian 64-bit MIPS targets. This fixes an error where some objects were compiled as LE and others compiled as BE causing a link error for rtld32. Reviewed by: emaste Sponsored by: DARPA Differential Revision:https://reviews.freebsd.org/D23028 Modified: head/share/mk/bsd.compat.mk Modified: head/share/mk/bsd.compat.mk == --- head/share/mk/bsd.compat.mk Fri Jan 3 22:47:31 2020(r356338) +++ head/share/mk/bsd.compat.mk Fri Jan 3 23:31:38 2020(r356339) @@ -79,10 +79,11 @@ LIB32CPUFLAGS= -target mips-unknown-freebsd13.0 .endif LIB32CPUFLAGS+= -mabi=32 LIB32_MACHINE= mips -LIB32_MACHINE_ARCH=mips .if ${COMPAT_ARCH:Mmips64el*} != "" +LIB32_MACHINE_ARCH=mipsel _EMULATION=elf32ltsmip_fbsd .else +LIB32_MACHINE_ARCH=mips _EMULATION=elf32btsmip_fbsd .endif LIB32WMAKEFLAGS= LD="${XLD} -m ${_EMULATION}" ___ 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: r356338 - head/cddl/contrib/opensolaris/lib/libzpool/common/sys
Author: mjg Date: Fri Jan 3 22:47:31 2020 New Revision: 356338 URL: https://svnweb.freebsd.org/changeset/base/356338 Log: vfs: add a file missed in r356337 Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h == --- head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Fri Jan 3 22:29:58 2020(r356337) +++ head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Fri Jan 3 22:47:31 2020(r356338) @@ -526,7 +526,7 @@ extern int fop_getattr(vnode_t *vp, vattr_t *vap); #defineVN_RELE_ASYNC(vp, taskq)vn_close(vp, 0, NULL, NULL) #definevn_lock(vp, type) -#defineVOP_UNLOCK(vp, type) +#defineVOP_UNLOCK(vp) extern int vn_open(char *path, int x1, int oflags, int mode, vnode_t **vpp, int x2, int x3); ___ 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: r356337 - in head/sys: cam/ctl cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs compat/cloudabi compat/linux compat/linuxkpi/common/sr...
Author: mjg Date: Fri Jan 3 22:29:58 2020 New Revision: 356337 URL: https://svnweb.freebsd.org/changeset/base/356337 Log: vfs: drop the mostly unused flags argument from VOP_UNLOCK Filesystems which want to use it in limited capacity can employ the VOP_UNLOCK_FLAGS macro. Reviewed by: kib (previous version) Differential Revision:https://reviews.freebsd.org/D21427 Modified: head/sys/cam/ctl/ctl_backend_block.c head/sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c head/sys/cddl/compat/opensolaris/kern/opensolaris_lookup.c head/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c head/sys/cddl/compat/opensolaris/sys/vnode.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_sa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c head/sys/compat/cloudabi/cloudabi_file.c head/sys/compat/linux/linux_misc.c head/sys/compat/linuxkpi/common/src/linux_compat.c head/sys/compat/ndis/subr_ndis.c head/sys/dev/beri/virtio/virtio_block.c head/sys/dev/md/md.c head/sys/dev/veriexec/verified_exec.c head/sys/dev/xen/blkback/blkback.c head/sys/fs/autofs/autofs_vnops.c head/sys/fs/cd9660/cd9660_vfsops.c head/sys/fs/cd9660/cd9660_vnops.c head/sys/fs/devfs/devfs_devs.c head/sys/fs/devfs/devfs_vfsops.c head/sys/fs/devfs/devfs_vnops.c head/sys/fs/ext2fs/ext2_vfsops.c head/sys/fs/ext2fs/ext2_vnops.c head/sys/fs/fdescfs/fdesc_vfsops.c head/sys/fs/fdescfs/fdesc_vnops.c head/sys/fs/fifofs/fifo_vnops.c head/sys/fs/fuse/fuse_vfsops.c head/sys/fs/msdosfs/msdosfs_vfsops.c head/sys/fs/msdosfs/msdosfs_vnops.c head/sys/fs/nfs/nfs_commonsubs.c head/sys/fs/nfs/nfsport.h head/sys/fs/nfsclient/nfs_clport.c head/sys/fs/nfsclient/nfs_clvfsops.c head/sys/fs/nfsclient/nfs_clvnops.c head/sys/fs/nfsserver/nfs_nfsdport.c head/sys/fs/nfsserver/nfs_nfsdserv.c head/sys/fs/nfsserver/nfs_nfsdsocket.c head/sys/fs/nfsserver/nfs_nfsdstate.c head/sys/fs/nullfs/null_vfsops.c head/sys/fs/nullfs/null_vnops.c head/sys/fs/pseudofs/pseudofs_vncache.c head/sys/fs/pseudofs/pseudofs_vnops.c head/sys/fs/smbfs/smbfs_vfsops.c head/sys/fs/smbfs/smbfs_vnops.c head/sys/fs/tmpfs/tmpfs_vfsops.c head/sys/fs/tmpfs/tmpfs_vnops.c head/sys/fs/udf/udf_vfsops.c head/sys/fs/unionfs/union_subr.c head/sys/fs/unionfs/union_vfsops.c head/sys/fs/unionfs/union_vnops.c head/sys/i386/linux/imgact_linux.c head/sys/kern/imgact_aout.c head/sys/kern/imgact_elf.c head/sys/kern/kern_acct.c head/sys/kern/kern_alq.c head/sys/kern/kern_ctf.c head/sys/kern/kern_descrip.c head/sys/kern/kern_exec.c head/sys/kern/kern_jail.c head/sys/kern/kern_ktrace.c head/sys/kern/kern_linker.c head/sys/kern/kern_proc.c head/sys/kern/kern_sendfile.c head/sys/kern/kern_shutdown.c head/sys/kern/kern_sig.c head/sys/kern/link_elf.c head/sys/kern/link_elf_obj.c head/sys/kern/uipc_mqueue.c head/sys/kern/uipc_usrreq.c head/sys/kern/vfs_acl.c head/sys/kern/vfs_aio.c head/sys/kern/vfs_bio.c head/sys/kern/vfs_cache.c head/sys/kern/vfs_default.c head/sys/kern/vfs_extattr.c head/sys/kern/vfs_lookup.c head/sys/kern/vfs_mount.c head/sys/kern/vfs_mountroot.c head/sys/kern/vfs_subr.c head/sys/kern/vfs_syscalls.c head/sys/kern/vfs_vnops.c head/sys/kern/vnode_if.src head/sys/nfs/nfs_lock.c head/sys/nlm/nlm_advlock.c head/sys/nlm/nlm_prot_impl.c head/sys/security/audit/audit_arg.c head/sys/security/audit/audit_syscalls.c head/sys/security/audit/audit_worker.c head/sys/security/mac/mac_process.c head/sys/security/mac/mac_syscalls.c head/sys/security/mac_veriexec/mac_veriexec.c head/sys/security/mac_veriexec_parser/mac_veriexec_parser.c head/sys/sys/param.h head/sys/sys/vnode.h head/sys/ufs/ffs/ffs_alloc.c head/sys/ufs/ffs/ffs_inode.c head/sys/ufs/ffs/ffs_rawread.c head/sys/ufs/ffs/ffs_snapshot.c head/sys/ufs/ffs/ffs_softdep.c head/sys/ufs/ffs/ffs_suspend.c head/sys/ufs/ffs/ffs_vfsops.c head/sys/ufs/ufs/ufs_extattr.c head/sys/ufs/ufs/ufs_lookup.c head/sys/ufs/ufs/ufs_quota.c head/sys/ufs/ufs/ufs_vnops.c head/sys/vm/swap_pager.c head/sys/vm/vm_map.c head/sys/vm/vm_object.c head/sys/vm/vnode_pager.c Modified: head/sys/cam/ctl/ctl_backend_block.c == --- head/sys/cam/ctl/ctl_backend_block.cFri Jan 3 22:12:25 2020 (r356336) +++ head/sys/cam/ctl/ctl_backend_block.cFri Jan 3 22:29:58 2020 (r356337) @@ -592,7 +592,7 @@ ctl_be_block_flush_file(struct ctl_be_block_lun *be_lu
svn commit: r356336 - head/sys/fs/unionfs
Author: mjg Date: Fri Jan 3 22:12:25 2020 New Revision: 356336 URL: https://svnweb.freebsd.org/changeset/base/356336 Log: unionfs: fix up VOP_UNLOCK use after flags stopped being supported For the most part the code was passing the LK_RELEASE flag. The 2 cases which did not use the VOP_UNLOCK_FLAGS macro. This fixes a panic when stacking unionfs on top of e.g., tmpfs when debug is enabled. Note there are latent bugs which prevent unionfs from working with debug regardless of this change. PR: 243064 Reported by: Mason Loring Bliss Modified: head/sys/fs/unionfs/union_subr.c head/sys/fs/unionfs/union_vfsops.c head/sys/fs/unionfs/union_vnops.c Modified: head/sys/fs/unionfs/union_subr.c == --- head/sys/fs/unionfs/union_subr.cFri Jan 3 22:10:11 2020 (r356335) +++ head/sys/fs/unionfs/union_subr.cFri Jan 3 22:12:25 2020 (r356336) @@ -361,9 +361,9 @@ unionfs_noderem(struct vnode *vp, struct thread *td) VI_UNLOCK(vp); if (lvp != NULLVP) - VOP_UNLOCK(lvp, LK_RELEASE); + VOP_UNLOCK(lvp, 0); if (uvp != NULLVP) - VOP_UNLOCK(uvp, LK_RELEASE); + VOP_UNLOCK(uvp, 0); if (dvp != NULLVP && unp->un_hash.le_prev != NULL) unionfs_rem_cached_vnode(unp, dvp); @@ -551,7 +551,7 @@ unionfs_relookup(struct vnode *dvp, struct vnode **vpp cn->cn_flags |= NOCACHE; vref(dvp); - VOP_UNLOCK(dvp, LK_RELEASE); + VOP_UNLOCK(dvp, 0); if ((error = relookup(dvp, vpp, cn))) { uma_zfree(namei_zone, cn->cn_pnbuf); @@ -961,7 +961,7 @@ unionfs_vn_create_on_upper(struct vnode **vpp, struct } unionfs_vn_create_on_upper_free_out1: - VOP_UNLOCK(udvp, LK_RELEASE); + VOP_UNLOCK(udvp, 0); unionfs_vn_create_on_upper_free_out2: if (cn.cn_flags & HASBUF) { Modified: head/sys/fs/unionfs/union_vfsops.c == --- head/sys/fs/unionfs/union_vfsops.c Fri Jan 3 22:10:11 2020 (r356335) +++ head/sys/fs/unionfs/union_vfsops.c Fri Jan 3 22:12:25 2020 (r356336) @@ -167,7 +167,7 @@ unionfs_domount(struct mount *mp) uid = va.va_uid; gid = va.va_gid; } - VOP_UNLOCK(mp->mnt_vnodecovered, LK_RELEASE); + VOP_UNLOCK(mp->mnt_vnodecovered, 0); if (error) return (error); @@ -252,7 +252,7 @@ unionfs_domount(struct mount *mp) * Save reference */ if (below) { - VOP_UNLOCK(upperrootvp, LK_RELEASE); + VOP_UNLOCK(upperrootvp, 0); vn_lock(lowerrootvp, LK_EXCLUSIVE | LK_RETRY); ump->um_lowervp = upperrootvp; ump->um_uppervp = lowerrootvp; @@ -278,7 +278,7 @@ unionfs_domount(struct mount *mp) /* * Unlock the node */ - VOP_UNLOCK(ump->um_uppervp, LK_RELEASE); + VOP_UNLOCK(ump->um_uppervp, 0); /* * Get the unionfs root vnode. Modified: head/sys/fs/unionfs/union_vnops.c == --- head/sys/fs/unionfs/union_vnops.c Fri Jan 3 22:10:11 2020 (r356335) +++ head/sys/fs/unionfs/union_vnops.c Fri Jan 3 22:12:25 2020 (r356336) @@ -128,7 +128,7 @@ unionfs_lookup(struct vop_cachedlookup_args *ap) if (udvp != NULLVP) { dtmpvp = udvp; if (ldvp != NULLVP) - VOP_UNLOCK(ldvp, LK_RELEASE); + VOP_UNLOCK(ldvp, 0); } else dtmpvp = ldvp; @@ -136,7 +136,7 @@ unionfs_lookup(struct vop_cachedlookup_args *ap) error = VOP_LOOKUP(dtmpvp, , cnp); if (dtmpvp == udvp && ldvp != NULLVP) { - VOP_UNLOCK(udvp, LK_RELEASE); + VOP_UNLOCK(udvp, 0); vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY); } @@ -148,10 +148,10 @@ unionfs_lookup(struct vop_cachedlookup_args *ap) */ if (nameiop == DELETE || nameiop == RENAME || (cnp->cn_lkflags & LK_TYPE_MASK)) - VOP_UNLOCK(vp, LK_RELEASE); + VOP_UNLOCK(vp, 0); vrele(vp); - VOP_UNLOCK(dvp, LK_RELEASE); + VOP_UNLOCK(dvp, 0); *(ap->a_vpp) = dunp->un_dvp; vref(dunp->un_dvp); @@ -188,7 +188,7 @@ unionfs_lookup(struct vop_cachedlookup_args *ap) } if (nameiop == DELETE || nameiop == RENAME || (cnp->cn_lkflags &
svn commit: r356335 - head/sys/sys
Author: mjg Date: Fri Jan 3 22:10:11 2020 New Revision: 356335 URL: https://svnweb.freebsd.org/changeset/base/356335 Log: vfs: add VOP_UNLOCK_FLAGS The flags argument from VOP_UNLOCK is about to be removed and some filesystems unlock the interlock as a convienience with it. Add a helper to retain the behavior for the few cases it is needed. Modified: head/sys/sys/vnode.h Modified: head/sys/sys/vnode.h == --- head/sys/sys/vnode.hFri Jan 3 21:40:32 2020(r356334) +++ head/sys/sys/vnode.hFri Jan 3 22:10:11 2020(r356335) @@ -955,6 +955,21 @@ int vn_chown(struct file *fp, uid_t uid, gid_t gid, st void vn_fsid(struct vnode *vp, struct vattr *va); +#define VOP_UNLOCK_FLAGS(vp, flags)({ \ + struct vnode *_vp = (vp); \ + int _flags = (flags); \ + int _error; \ + \ + CTASSERT(__builtin_constant_p(flags) ? \ + (flags & ~(LK_INTERLOCK | LK_RELEASE)) == 0 : 1); \ +if ((_flags & ~(LK_INTERLOCK | LK_RELEASE)) != 0) \ +panic("%s: unsupported flags %x\n", __func__, flags); \ +_error = VOP_UNLOCK(_vp, 0); \ +if (_flags & LK_INTERLOCK) \ +VI_UNLOCK(_vp); \ +_error; \ +}) + #include #define VFS_VOP_VECTOR_REGISTER(vnodeops) \ ___ 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: r356334 - head
Author: kevans Date: Fri Jan 3 21:40:32 2020 New Revision: 356334 URL: https://svnweb.freebsd.org/changeset/base/356334 Log: Makefile.inc1: remove libcompiler_rt from _startup_libs libcompiler_rt is already present in _prereq_libs, which will get built just before _startup_libs and in advance of shared libc. Dedupe. Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Fri Jan 3 20:29:54 2020(r356333) +++ head/Makefile.inc1 Fri Jan 3 21:40:32 2020(r356334) @@ -2800,7 +2800,6 @@ _startup_libs=lib/csu .if ${MK_BSD_CRTBEGIN} == "no" _startup_libs+=gnu/lib/csu .endif -_startup_libs+=lib/libcompiler_rt _startup_libs+=lib/libc _startup_libs+=lib/libc_nonshared .if ${MK_LIBCPLUSPLUS} != "no" ___ 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: r356323 - head/share/mk
On Fri, 3 Jan 2020 at 13:20, Ed Maste wrote: > > Author: emaste > Date: Fri Jan 3 18:20:03 2020 > New Revision: 356323 > URL: https://svnweb.freebsd.org/changeset/base/356323 > > Log: > src.opts.mk: SVNLITE requires FILE It's actually libmagic(3) that's required and not file(1), but both are controlled by the FILE knob. It may be possible to configure svnlite to optionally build without libmagic support (disabling the associated functionality) but I don't think it's worth doing this. ___ 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: r356322 - head/share/mk
On Fri, 3 Jan 2020 at 14:23, Enji Cooper wrote: > > Thank you for doing this <3. FWIW, MK_TESTS:= no should have also > covered this, but no real harm nor foul in making it explicit. Hmm, it looks like MK_TESTS_SUPPORT == no turns off MK_GOOGLETEST but MK_TESTS does not. I'm happy enough if someone wants to clean this up further, but IMO it's not worth putting in a lot of effort just yet; in a few months GCC 4.2.1 and all of its build infrastructure will be out of the tree and there may be many more opportunities to simplify src.opts.mk logic. In particular all of the ${COMPILER_FEATURES:Mc++11} tests can disappear. ___ 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: r356333 - head/contrib/llvm-project/lld/ELF/Arch
Author: dim Date: Fri Jan 3 20:29:54 2020 New Revision: 356333 URL: https://svnweb.freebsd.org/changeset/base/356333 Log: Merge commit 189b7393d from llvm git (by John Baldwin): [lld][RISCV] Use an e_flags of 0 if there are only binary input files. Summary: If none of the input files are ELF object files (for example, when generating an object file from a single binary input file via "-b binary"), use a fallback value for the ELF header flags instead of crashing with an assertion failure. Reviewers: MaskRay, ruiu, espindola Reviewed By: MaskRay, ruiu Subscribers: kevans, grimar, emaste, arichardson, asb, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, lenary, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, llvm-commits, jrtc27 Tags: #llvm Differential Revision: https://reviews.llvm.org/D71101 This is a prerequisite for building and linking hard- and soft-float riscv worlds with clang and lld. Requested by: jhb MFC after:1 week X-MFC-With: r353358 Modified: head/contrib/llvm-project/lld/ELF/Arch/RISCV.cpp Modified: head/contrib/llvm-project/lld/ELF/Arch/RISCV.cpp == --- head/contrib/llvm-project/lld/ELF/Arch/RISCV.cppFri Jan 3 20:28:06 2020(r356332) +++ head/contrib/llvm-project/lld/ELF/Arch/RISCV.cppFri Jan 3 20:29:54 2020(r356333) @@ -105,7 +105,10 @@ static uint32_t getEFlags(InputFile *f) { } uint32_t RISCV::calcEFlags() const { - assert(!objectFiles.empty()); + // If there are only binary input files (from -b binary), use a + // value of 0 for the ELF header flags. + if (objectFiles.empty()) +return 0; uint32_t target = getEFlags(objectFiles.front()); ___ 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: r356332 - head/contrib/llvm-project/llvm/lib/Target/RISCV
Author: dim Date: Fri Jan 3 20:28:06 2020 New Revision: 356332 URL: https://svnweb.freebsd.org/changeset/base/356332 Log: Merge commit d7be3eab5 from llvm git (by Luís Marques): [RISCV] Handle fcopysign(f32, f64) and fcopysign(f64, f32) Summary: Adds tablegen patterns to explicitly handle fcopysign where the magnitude and sign arguments have different types, due to the sign value casts being removed the by DAGCombiner. Support for RV32IF follows in a separate commit. Adds tests for all relevant scenarios except RV32IF. Reviewers: lenary Reviewed By: lenary Tags: #llvm Differential Revision: https://reviews.llvm.org/D70678 This is a prerequisite for building and linking hard- and soft-float riscv worlds with clang and lld. Requested by: jhb MFC after:1 week X-MFC-With: r353358 Modified: head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVInstrInfoD.td Modified: head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVInstrInfoD.td == --- head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVInstrInfoD.td Fri Jan 3 20:19:17 2020(r356331) +++ head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVInstrInfoD.td Fri Jan 3 20:28:06 2020(r356332) @@ -231,6 +231,9 @@ def : Pat<(fabs FPR64:$rs1), (FSGNJX_D $rs1, $rs1)>; def : PatFpr64Fpr64; def : Pat<(fcopysign FPR64:$rs1, (fneg FPR64:$rs2)), (FSGNJN_D $rs1, $rs2)>; +def : Pat<(fcopysign FPR64:$rs1, FPR32:$rs2), (FSGNJ_D $rs1, (FCVT_D_S $rs2))>; +def : Pat<(fcopysign FPR32:$rs1, FPR64:$rs2), (FSGNJ_S $rs1, (FCVT_S_D $rs2, + 0b111))>; // fmadd: rs1 * rs2 + rs3 def : Pat<(fma FPR64:$rs1, FPR64:$rs2, FPR64:$rs3), ___ 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: r356331 - head/contrib/llvm-project/llvm/lib/Target/RISCV
Author: dim Date: Fri Jan 3 20:19:17 2020 New Revision: 356331 URL: https://svnweb.freebsd.org/changeset/base/356331 Log: Merge commit c6b09bff5 from llvm git (by Luís Marques): [RISCV] Fix wrong CFI directives Summary: Removes CFI CFA directives that could incorrectly propagate beyond the basic block they were inteded for. Specifically it removes the epilogue CFI directives. See the branch_and_tail_call test for an example of the issue. Should fix the stack unwinding issues caused by the incorrect directives. Reviewers: asb, lenary, shiva0217 Reviewed By: lenary Tags: #llvm Differential Revision: https://reviews.llvm.org/D69723 This is a prerequisite for building and linking hard- and soft-float riscv worlds with clang and lld. Requested by: jhb MFC after:1 week X-MFC-With: r353358 Modified: head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp Modified: head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp == --- head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp Fri Jan 3 20:11:40 2020(r356330) +++ head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp Fri Jan 3 20:19:17 2020(r356331) @@ -205,7 +205,6 @@ void RISCVFrameLowering::emitEpilogue(MachineFunction MachineFrameInfo = MF.getFrameInfo(); auto *RVFI = MF.getInfo(); DebugLoc DL = MBBI->getDebugLoc(); - const RISCVInstrInfo *TII = STI.getInstrInfo(); unsigned FPReg = getFPReg(STI); unsigned SPReg = getSPReg(STI); @@ -226,47 +225,8 @@ void RISCVFrameLowering::emitEpilogue(MachineFunction MachineInstr::FrameDestroy); } - if (hasFP(MF)) { -// To find the instruction restoring FP from stack. -for (auto = LastFrameDestroy; I != MBBI; ++I) { - if (I->mayLoad() && I->getOperand(0).isReg()) { -unsigned DestReg = I->getOperand(0).getReg(); -if (DestReg == FPReg) { - // If there is frame pointer, after restoring $fp registers, we - // need adjust CFA to ($sp - FPOffset). - // Emit ".cfi_def_cfa $sp, -FPOffset" - unsigned CFIIndex = MF.addFrameInst(MCCFIInstruction::createDefCfa( - nullptr, RI->getDwarfRegNum(SPReg, true), -FPOffset)); - BuildMI(MBB, std::next(I), DL, - TII->get(TargetOpcode::CFI_INSTRUCTION)) - .addCFIIndex(CFIIndex); - break; -} - } -} - } - - // Add CFI directives for callee-saved registers. - const std::vector = MFI.getCalleeSavedInfo(); - // Iterate over list of callee-saved registers and emit .cfi_restore - // directives. - for (const auto : CSI) { -unsigned Reg = Entry.getReg(); -unsigned CFIIndex = MF.addFrameInst(MCCFIInstruction::createRestore( -nullptr, RI->getDwarfRegNum(Reg, true))); -BuildMI(MBB, MBBI, DL, TII->get(TargetOpcode::CFI_INSTRUCTION)) -.addCFIIndex(CFIIndex); - } - // Deallocate stack adjustReg(MBB, MBBI, DL, SPReg, SPReg, StackSize, MachineInstr::FrameDestroy); - - // After restoring $sp, we need to adjust CFA to $(sp + 0) - // Emit ".cfi_def_cfa_offset 0" - unsigned CFIIndex = - MF.addFrameInst(MCCFIInstruction::createDefCfaOffset(nullptr, 0)); - BuildMI(MBB, MBBI, DL, TII->get(TargetOpcode::CFI_INSTRUCTION)) - .addCFIIndex(CFIIndex); } int RISCVFrameLowering::getFrameIndexReference(const MachineFunction , ___ 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: r356330 - head/contrib/llvm-project/llvm/lib/Target/RISCV
Author: dim Date: Fri Jan 3 20:11:40 2020 New Revision: 356330 URL: https://svnweb.freebsd.org/changeset/base/356330 Log: Merge commit da7b129b1 from llvm git (by James Clarke): [RISCV] Don't force Local Exec TLS for non-PIC Summary: Forcing Local Exec TLS requires the use of copy relocations. Copy relocations need special handling in the runtime linker when being used against TLS symbols, which is present in glibc, but not in FreeBSD nor musl, and so cannot be relied upon. Moreover, copy relocations are a hack that embed the size of an object in the ABI when it otherwise wouldn't be, and break protected symbols (which are expected to be DSO local), whilst also wasting space, thus they should be avoided whenever possible. As discussed in D70398, RISC-V should move away from forcing Local Exec, and instead use Initial Exec like other targets, with possible linker relaxation to follow. The RISC-V GCC maintainers also intend to adopt this more-conventional behaviour (see https://github.com/riscv/riscv-elf-psabi-doc/issues/122). Reviewers: asb, MaskRay Reviewed By: MaskRay Subscribers: emaste, krytarowski, hiraditya, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, lenary, s.egerton, pzheng, sameer.abuasal, apazos, llvm-commits, bsdjhb Tags: #llvm Differential Revision: https://reviews.llvm.org/D70649 This is a prerequisite for building and linking hard- and soft-float riscv worlds with clang and lld. Requested by: jhb MFC after:1 week X-MFC-With: r353358 Modified: head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVISelLowering.cpp Modified: head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVISelLowering.cpp == --- head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVISelLowering.cpp Fri Jan 3 20:09:38 2020(r356329) +++ head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVISelLowering.cpp Fri Jan 3 20:11:40 2020(r356330) @@ -570,10 +570,7 @@ SDValue RISCVTargetLowering::lowerGlobalTLSAddress(SDV int64_t Offset = N->getOffset(); MVT XLenVT = Subtarget.getXLenVT(); - // Non-PIC TLS lowering should always use the LocalExec model. - TLSModel::Model Model = isPositionIndependent() - ? getTargetMachine().getTLSModel(N->getGlobal()) - : TLSModel::LocalExec; + TLSModel::Model Model = getTargetMachine().getTLSModel(N->getGlobal()); SDValue Addr; switch (Model) { ___ 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: r356329 - head/contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc
Author: dim Date: Fri Jan 3 20:09:38 2020 New Revision: 356329 URL: https://svnweb.freebsd.org/changeset/base/356329 Log: Merge commit 41449c58c from llvm git (by Roger Ferrer Ibanez): [RISCV] Fix evaluation of %pcrel_lo The following testcase function: .Lpcrel_label1: auipc a0, %pcrel_hi(other_function) addia1, a0, %pcrel_lo(.Lpcrel_label1) .p2align2 # Causes a new fragment to be emitted .type other_function,@function other_function: ret exposes an odd behaviour in which only the %pcrel_hi relocation is evaluated but not the %pcrel_lo. $ llvm-mc -triple riscv64 -filetype obj t.s | llvm-objdump -d -r - : file format ELF64-riscv Disassembly of section .text: function: 0: 17 05 00 00 auipc a0, 0 4: 93 05 05 00 mv a1, a0 0004: R_RISCV_PCREL_LO12_I other_function+4 0008 other_function: 8: 67 80 00 00 ret The reason seems to be that in RISCVAsmBackend::shouldForceRelocation we only consider the fragment but in RISCVMCExpr::evaluatePCRelLo we consider the section. This usually works but there are cases where the section may still be the same but the fragment may be another one. In that case we end forcing a %pcrel_lo relocation without any %pcrel_hi. This patch makes RISCVAsmBackend::shouldForceRelocation use the section, if any, to determine if the relocation must be forced or not. Differential Revision: https://reviews.llvm.org/D60657 This is a prerequisite for building and linking hard- and soft-float riscv worlds with clang and lld. Requested by: jhb MFC after:1 week X-MFC-With: r353358 Modified: head/contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp Modified: head/contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp == --- head/contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp Fri Jan 3 20:01:36 2020(r356328) +++ head/contrib/llvm-project/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp Fri Jan 3 20:09:38 2020(r356329) @@ -64,10 +64,14 @@ bool RISCVAsmBackend::shouldForceRelocation(const MCAs case RISCV::fixup_riscv_tls_gd_hi20: ShouldForce = true; break; -case RISCV::fixup_riscv_pcrel_hi20: - ShouldForce = T->getValue()->findAssociatedFragment() != -Fixup.getValue()->findAssociatedFragment(); +case RISCV::fixup_riscv_pcrel_hi20: { + MCFragment *TFragment = T->getValue()->findAssociatedFragment(); + MCFragment *FixupFragment = Fixup.getValue()->findAssociatedFragment(); + assert(FixupFragment && "We should have a fragment for this fixup"); + ShouldForce = + !TFragment || TFragment->getParent() != FixupFragment->getParent(); break; +} } break; } ___ 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: r356328 - head/lib/csu/mips
Author: kevans Date: Fri Jan 3 20:01:36 2020 New Revision: 356328 URL: https://svnweb.freebsd.org/changeset/base/356328 Log: mips !o32: fix csu build Pointy hat to:kevans Modified: head/lib/csu/mips/crt.h Modified: head/lib/csu/mips/crt.h == --- head/lib/csu/mips/crt.h Fri Jan 3 19:59:42 2020(r356327) +++ head/lib/csu/mips/crt.h Fri Jan 3 20:01:36 2020(r356328) @@ -51,8 +51,8 @@ ".set reorder \n" \ ".cpsetup $ra, $v0, 1b \n" \ ".local" __STRING(func) "\n" \ -"jal " __STRING(func) -"nop \n" \ +"jal " __STRING(func) "\n" \ +"nop \n" #endif #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: r356327 - head/lib/csu/mips
Author: kevans Date: Fri Jan 3 19:59:42 2020 New Revision: 356327 URL: https://svnweb.freebsd.org/changeset/base/356327 Log: mips: csu: fix compilation w/ LLVM GCC issues the warning, but with LLVM it is fatal- no matching .cprestore with .cpload. Reserve some place on the stack and and add the proper .cprestore to pair it with. nop added in the !o32 branch to fill out delay slot instruction, just in case. Reviewed by: arichardson Differential Revision:https://reviews.freebsd.org/D21697 Modified: head/lib/csu/mips/crt.h Modified: head/lib/csu/mips/crt.h == --- head/lib/csu/mips/crt.h Fri Jan 3 18:48:53 2020(r356326) +++ head/lib/csu/mips/crt.h Fri Jan 3 19:59:42 2020(r356327) @@ -34,10 +34,14 @@ "bal 1f \n" \ "nop \n" \ "1:\n" \ -".cpload $ra \n" \ +".cpload $ra \n" \ +"addu $sp, $sp, -8\n" \ ".set reorder \n" \ +".cprestore4 \n" \ ".local" __STRING(func) "\n" \ -"jal " __STRING(func) +"jal " __STRING(func) "\n" \ +"nop \n" \ +"addu $sp, $sp, 8 \n" #else #defineINIT_CALL_SEQ(func) \ ".set noreorder\n" \ @@ -48,6 +52,7 @@ ".cpsetup $ra, $v0, 1b \n" \ ".local" __STRING(func) "\n" \ "jal " __STRING(func) +"nop \n" \ #endif #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"
Re: svn commit: r356322 - head/share/mk
On Fri, Jan 3, 2020 at 10:12 AM Ed Maste wrote: > > Author: emaste > Date: Fri Jan 3 18:11:55 2020 > New Revision: 356322 > URL: https://svnweb.freebsd.org/changeset/base/356322 > > Log: > src.opts.mk: GOOGLETEST requires CXX > > Reported by: Build Options Survey run by Michael Dexter Thank you for doing this <3. FWIW, MK_TESTS:= no should have also covered this, but no real harm nor foul in making it explicit. -Enji ___ 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: r356326 - head/sys/dev/md
Author: markj Date: Fri Jan 3 18:48:53 2020 New Revision: 356326 URL: https://svnweb.freebsd.org/changeset/base/356326 Log: Fix a page leak in the md(4) swap I/O path. r356147 removed a vm_page_activate() call, but this is required to ensure that pages end up in the page queues in the first place. Restore the pre-r356157 logic. Now, without the page lock, the vm_page_active() check is racy, but this race is harmless. Reviewed by: alc, kib Reported and tested by: pho Differential Revision:https://reviews.freebsd.org/D23024 Modified: head/sys/dev/md/md.c Modified: head/sys/dev/md/md.c == --- head/sys/dev/md/md.cFri Jan 3 18:29:20 2020(r356325) +++ head/sys/dev/md/md.cFri Jan 3 18:48:53 2020(r356326) @@ -1142,7 +1142,16 @@ mdstart_swap(struct md_s *sc, struct bio *bp) } if (m != NULL) { vm_page_xunbusy(m); - vm_page_reference(m); + + /* +* The page may be deactivated prior to setting +* PGA_REFERENCED, but in this case it will be +* reactivated by the page daemon. +*/ + if (vm_page_active(m)) + vm_page_reference(m); + else + vm_page_activate(m); } /* Actions on further pages start at offset 0 */ ___ 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: r356325 - head/sys/kern
Author: kevans Date: Fri Jan 3 18:29:20 2020 New Revision: 356325 URL: https://svnweb.freebsd.org/changeset/base/356325 Log: emulated atomic64: disable interrupts as the lock mechanism on !SMP Reviewed by: jhibbits, bdragon Differential Revision:https://reviews.freebsd.org/D23015 Modified: head/sys/kern/subr_atomic64.c Modified: head/sys/kern/subr_atomic64.c == --- head/sys/kern/subr_atomic64.c Fri Jan 3 18:21:00 2020 (r356324) +++ head/sys/kern/subr_atomic64.c Fri Jan 3 18:29:20 2020 (r356325) @@ -55,9 +55,12 @@ enum { }; #ifdef _KERNEL +#ifdef SMP + #defineA64_POOL_SIZE MAXCPU /* Estimated size of a cacheline */ #defineCACHE_ALIGN CACHE_LINE_SIZE +static struct mtx a64_mtx_pool[A64_POOL_SIZE]; #define GET_MUTEX(p) \ (_mtx_pool[(pmap_kextract((vm_offset_t)p) / CACHE_ALIGN) % (A64_POOL_SIZE)]) @@ -68,6 +71,13 @@ enum { #define UNLOCK_A64() if (smp_started) mtx_unlock(_amtx) +#else /* !SMP */ + +#defineLOCK_A64() { register_t s = intr_disable() +#defineUNLOCK_A64()intr_restore(s); } + +#endif /* SMP */ + #define ATOMIC64_EMU_UN(op, rt, block, ret) \ rt \ atomic_##op##_64(volatile u_int64_t *p) { \ @@ -86,8 +96,6 @@ enum { UNLOCK_A64(); \ ret; } struct hack -static struct mtx a64_mtx_pool[A64_POOL_SIZE]; - ATOMIC64_EMU_BIN(add, void, (*p = *p + v), return); ATOMIC64_EMU_BIN(clear, void, *p &= ~v, return); ATOMIC64_EMU_BIN(fetchadd, u_int64_t, (*p = *p + v, v = *p - v), return (v)); @@ -126,6 +134,7 @@ int atomic_fcmpset_64(volatile u_int64_t *p, u_int64_t return (tmp == tmp_old); } +#ifdef SMP static void atomic64_mtxinit(void *x __unused) { @@ -136,5 +145,6 @@ atomic64_mtxinit(void *x __unused) } SYSINIT(atomic64_mtxinit, SI_SUB_LOCK, SI_ORDER_MIDDLE, atomic64_mtxinit, NULL); +#endif /* SMP */ #endif /* _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: r356323 - head/share/mk
Author: emaste Date: Fri Jan 3 18:20:03 2020 New Revision: 356323 URL: https://svnweb.freebsd.org/changeset/base/356323 Log: src.opts.mk: SVNLITE requires FILE Reported by: Build Options Survey run by Michael Dexter Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk == --- head/share/mk/src.opts.mk Fri Jan 3 18:11:55 2020(r356322) +++ head/share/mk/src.opts.mk Fri Jan 3 18:20:03 2020(r356323) @@ -484,6 +484,10 @@ MK_TESTS:= no MK_BSDINSTALL:=no .endif +.if ${MK_FILE} == "no" +MK_SVNLITE:= no +.endif + .if ${MK_MAIL} == "no" MK_MAILWRAPPER:= no MK_SENDMAIL:= no ___ 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: r356324 - head/share/man/man5
Author: emaste Date: Fri Jan 3 18:21:00 2020 New Revision: 356324 URL: https://svnweb.freebsd.org/changeset/base/356324 Log: src.conf.5: regen after r356322 and r356323 For SVNLITE dependency on FILE and GOOGLETEST dependency on CXX. Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 == --- head/share/man/man5/src.conf.5 Fri Jan 3 18:20:03 2020 (r356323) +++ head/share/man/man5/src.conf.5 Fri Jan 3 18:21:00 2020 (r356324) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd December 28, 2019 +.Dd January 3, 2020 .Dt SRC.CONF 5 .Os .Sh NAME @@ -524,6 +524,8 @@ When set, it enforces these options: .It .Va WITHOUT_GNUCXX .It +.Va WITHOUT_GOOGLETEST +.It .Va WITHOUT_LLVM_COV .It .Va WITHOUT_TESTS @@ -686,6 +688,12 @@ This includes the device tree compiler (dtc) and libfd Set to not build .Xr file 1 and related programs. +When set, it enforces these options: +.Pp +.Bl -item -compact +.It +.Va WITHOUT_SVNLITE +.El .It Va WITHOUT_FINGER Set to not build or install .Xr finger 1 ___ 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: r356322 - head/share/mk
Author: emaste Date: Fri Jan 3 18:11:55 2020 New Revision: 356322 URL: https://svnweb.freebsd.org/changeset/base/356322 Log: src.opts.mk: GOOGLETEST requires CXX Reported by: Build Options Survey run by Michael Dexter Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk == --- head/share/mk/src.opts.mk Fri Jan 3 17:03:10 2020(r356321) +++ head/share/mk/src.opts.mk Fri Jan 3 18:11:55 2020(r356322) @@ -476,6 +476,7 @@ MK_KERBEROS:= no .if ${MK_CXX} == "no" MK_CLANG:= no MK_GNUCXX:=no +MK_GOOGLETEST:=no MK_TESTS:= no .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"
Re: svn commit: r356108 - head/sys/geom/vinum
On 03.01.2020 12:26, Brooks Davis wrote: > On Fri, Dec 27, 2019 at 01:36:53AM +, Alexander Motin wrote: >> Author: mav >> Date: Fri Dec 27 01:36:53 2019 >> New Revision: 356108 >> URL: https://svnweb.freebsd.org/changeset/base/356108 >> >> Log: >> Reimplement gvinum orphanization. >> >> gvinum was the only GEOM class, using consumer nstart/nend fields. Making >> it do its own accounting for orphanization purposes allows in perspective >> to remove burden of that expensive for SMP accounting from GEOM. >> >> Also the previous implementation spinned in a tight event loop, waiting >> for all active BIOs to complete, while the new one knows exactly when it >> is possible to close the consumer. > > Do you know if there are other cases of gvinum being a weird GEOM class? > If it's going to require more rounds of major refactoring, maybe we > should look into deprecating it for 14. I've never used it myself, so may not know all of its issues. From what I briefly saw I have no other major objections about its code quality, other than it probably being not very fast, considering it is single-threaded and does not support unmapped I/O. It does not support resize, but not sure it is a big issue for its use case. But mostly the same, just a bit lighter, I can say about graid too, so gvinum does not look particularly bad for me, other than unlike graid I don't have any specific use case for it. -- Alexander Motin ___ 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: r356113 - in head: libexec/rtld-elf sys/kern sys/sys
On Fri, Dec 27, 2019 at 04:07:03AM +, Justin Hibbits wrote: > Author: jhibbits > Date: Fri Dec 27 04:07:03 2019 > New Revision: 356113 > URL: https://svnweb.freebsd.org/changeset/base/356113 > > Log: > Eliminate the last MI difference in AT_* definitions (for powerpc). > > Summary: > As a transition aide, implement an alternative elfN_freebsd_fixup which > is called for old powerpc binaries. Similarly, add a translation to rtld to > convert old values to new ones (as expected by a new rtld). > > Translation of old<->new values is incomplete, but sufficient to allow an > installworld of a new userspace from an old one when a new kernel is > running. Thanks! I glad you could arrange to combine flagdays. A bit of background for those following along: once upon a time we followed other platforms (Linux, Solaris, etc) and made the AT_* macro values machine-dependent and took the actual values from those platforms. We then started adding FreeBSD specific values so our lists didn't match other OSes. This lead to almost-but-no-quite identical values between architectures that didn't provide compatibility with other OSes. John Baldwin started cleaning them up and I centralized the definitions, but powerpc had some critical values that were not identical, this change fixes that with a binary flagday. Thanks to Brandon Bergren for testing and providing the missing rtld compatibility. -- Brooks signature.asc Description: PGP signature
Re: svn commit: r356108 - head/sys/geom/vinum
On Fri, Dec 27, 2019 at 01:36:53AM +, Alexander Motin wrote: > Author: mav > Date: Fri Dec 27 01:36:53 2019 > New Revision: 356108 > URL: https://svnweb.freebsd.org/changeset/base/356108 > > Log: > Reimplement gvinum orphanization. > > gvinum was the only GEOM class, using consumer nstart/nend fields. Making > it do its own accounting for orphanization purposes allows in perspective > to remove burden of that expensive for SMP accounting from GEOM. > > Also the previous implementation spinned in a tight event loop, waiting > for all active BIOs to complete, while the new one knows exactly when it > is possible to close the consumer. Do you know if there are other cases of gvinum being a weird GEOM class? If it's going to require more rounds of major refactoring, maybe we should look into deprecating it for 14. -- Brooks signature.asc Description: PGP signature
svn commit: r356321 - head/sys/netinet
Author: markj Date: Fri Jan 3 17:03:10 2020 New Revision: 356321 URL: https://svnweb.freebsd.org/changeset/base/356321 Log: Take the ifnet's address lock in igmp_v3_cancel_link_timers(). inm_rele_locked() may remove the multicast address associated with inm. Reported by: syzbot+871c5d1fd5fac6c28...@syzkaller.appspotmail.com Reviewed by: hselasky MFC after:2 weeks Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D23009 Modified: head/sys/netinet/igmp.c Modified: head/sys/netinet/igmp.c == --- head/sys/netinet/igmp.c Fri Jan 3 16:28:10 2020(r356320) +++ head/sys/netinet/igmp.c Fri Jan 3 17:03:10 2020(r356321) @@ -1981,7 +1981,7 @@ igmp_set_version(struct igmp_ifsoftc *igi, const int v static void igmp_v3_cancel_link_timers(struct igmp_ifsoftc *igi) { - struct ifmultiaddr *ifma; + struct ifmultiaddr *ifma, *ifmatmp; struct ifnet*ifp; struct in_multi *inm; struct in_multi_head inm_free_tmp; @@ -2007,7 +2007,8 @@ igmp_v3_cancel_link_timers(struct igmp_ifsoftc *igi) * for all memberships scoped to this link. */ ifp = igi->igi_ifp; - CK_STAILQ_FOREACH(ifma, >if_multiaddrs, ifma_link) { + IF_ADDR_WLOCK(ifp); + CK_STAILQ_FOREACH_SAFE(ifma, >if_multiaddrs, ifma_link, ifmatmp) { if (ifma->ifma_addr->sa_family != AF_INET || ifma->ifma_protospec == NULL) continue; @@ -2051,6 +2052,7 @@ igmp_v3_cancel_link_timers(struct igmp_ifsoftc *igi) inm->inm_timer = 0; mbufq_drain(>inm_scq); } + IF_ADDR_WUNLOCK(ifp); inm_release_list_deferred(_free_tmp); } ___ 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: r356320 - head/share/mk
Author: emaste Date: Fri Jan 3 16:28:10 2020 New Revision: 356320 URL: https://svnweb.freebsd.org/changeset/base/356320 Log: src.opts.mk: switch LLD_BOOTSTRAP and LLD_IS_LD to opt-out More MACHINE_CPUARCH/MACHINE_ARCH cases enable these options than disable them, and several of them have work in progress to switch over. Thus, invert the sense of the test and list cases not using LLD as the exceptions. Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk == --- head/share/mk/src.opts.mk Fri Jan 3 16:06:41 2020(r356319) +++ head/share/mk/src.opts.mk Fri Jan 3 16:28:10 2020(r356320) @@ -329,8 +329,8 @@ __DEFAULT_YES_OPTIONS+=LLVM_LIBUNWIND .else __DEFAULT_NO_OPTIONS+=LLVM_LIBUNWIND .endif -.if ${__T} == "aarch64" || ${__T} == "amd64" || ${__T} == "armv6" || \ -${__T} == "armv7" || ${__T} == "i386" || ${__T} == "powerpc64" +.if ${__TT} != "mips" && ${__T} != "powerpc" && ${__T} != "powerpcspe" && \ +${__TT} != "riscv" && ${__T} != "sparc64" __DEFAULT_YES_OPTIONS+=LLD_BOOTSTRAP LLD_IS_LD .else __DEFAULT_NO_OPTIONS+=LLD_BOOTSTRAP LLD_IS_LD ___ 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: r356319 - head/share/mk
Author: emaste Date: Fri Jan 3 16:06:41 2020 New Revision: 356319 URL: https://svnweb.freebsd.org/changeset/base/356319 Log: src.opts.mk: simplify after arm/arm retirement There were a few special cases for arm v5, such as disabling LLDB due to the lack of 64-bit atomic operations. Now that arm has been retired (as of r356263) we can simplify the options logic somewhat. Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk == --- head/share/mk/src.opts.mk Fri Jan 3 15:29:32 2020(r356318) +++ head/share/mk/src.opts.mk Fri Jan 3 16:06:41 2020(r356319) @@ -285,10 +285,6 @@ __LLVM_TARGET_FILT= C/(amd64|i386)/x86/:S/sparc64/spar # Default enable the given TARGET's LLVM_TARGET support .if ${__TT:${__LLVM_TARGET_FILT}} == ${__llt} __DEFAULT_YES_OPTIONS+=LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu} -# Disable other targets for arm, to work around "relocation truncated -# to fit" errors with BFD ld, since libllvm.a will get too large to link. -.elif ${__T} == "arm" -__DEFAULT_NO_OPTIONS+=LLVM_TARGET_${__llt:tu} # aarch64 needs arm for -m32 support. .elif ${__TT} == "arm64" && ${__llt} == "arm" __DEFAULT_DEPENDENT_OPTIONS+= LLVM_TARGET_ARM/LLVM_TARGET_AARCH64 @@ -328,8 +324,7 @@ BROKEN_OPTIONS+=BINUTILS BINUTILS_BOOTSTRAP GCC GCC_BO .if ${__T:Mriscv*} != "" BROKEN_OPTIONS+=OFED .endif -.if ${__T} != "arm" && ${__T} != "armv6" && ${__T} != "armv7" && \ -${__T} != "sparc64" +.if ${__T} != "armv6" && ${__T} != "armv7" && ${__T} != "sparc64" __DEFAULT_YES_OPTIONS+=LLVM_LIBUNWIND .else __DEFAULT_NO_OPTIONS+=LLVM_LIBUNWIND @@ -344,10 +339,6 @@ __DEFAULT_NO_OPTIONS+=LLD_BOOTSTRAP LLD_IS_LD __DEFAULT_YES_OPTIONS+=LLDB .else __DEFAULT_NO_OPTIONS+=LLDB -.endif -# LLVM lacks support for FreeBSD 64-bit atomic operations for ARMv4/ARMv5 -.if ${__T} == "arm" -BROKEN_OPTIONS+=LLDB .endif # GDB in base is generally less functional than GDB in ports. Ports GDB # sparc64 kernel support has not been tested. ___ 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: r356318 - head/usr.sbin/inetd
Author: emaste Date: Fri Jan 3 15:29:32 2020 New Revision: 356318 URL: https://svnweb.freebsd.org/changeset/base/356318 Log: inetd: fix WITHOUT_TCP_WRAPPERS build after r356248 After increasing WARNS, building WITHOUT_TCP_WRAPPERS failed because of some unused variables. Reported by: Cirrus-CI (against my WIP branch) MFC with: r356248 Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/inetd/inetd.c Modified: head/usr.sbin/inetd/inetd.c == --- head/usr.sbin/inetd/inetd.c Fri Jan 3 12:54:14 2020(r356317) +++ head/usr.sbin/inetd/inetd.c Fri Jan 3 15:29:32 2020(r356318) @@ -250,9 +250,11 @@ static char*sskip(char **); static char*newstr(const char *); static voidprint_service(const char *, const struct servtab *); +#ifdef LIBWRAP /* tcpd.h */ intallow_severity; intdeny_severity; +#endif static int wrap_ex = 0; static int wrap_bi = 0; ___ 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: r356317 - head/contrib/smbfs/lib/smb
Author: arrowd (ports committer) Date: Fri Jan 3 12:54:14 2020 New Revision: 356317 URL: https://svnweb.freebsd.org/changeset/base/356317 Log: mount_smbfs: Issue a warning when .nsmbrc section name contains lowercase characters. PR: 231656 Approved by: bapt MFC after:3 days Differential Revision:https://reviews.freebsd.org/D22289 Modified: head/contrib/smbfs/lib/smb/rcfile.c Modified: head/contrib/smbfs/lib/smb/rcfile.c == --- head/contrib/smbfs/lib/smb/rcfile.c Fri Jan 3 10:03:36 2020 (r356316) +++ head/contrib/smbfs/lib/smb/rcfile.c Fri Jan 3 12:54:14 2020 (r356317) @@ -156,11 +156,19 @@ static struct rcsection * rc_addsect(struct rcfile *rcp, const char *sectname) { struct rcsection *p; + const char* sectletter = sectname; p = rc_findsect(rcp, sectname); if (p) return p; p = malloc(sizeof(*p)); if (!p) return NULL; + for(sectletter = sectname; *sectletter; sectletter++) { + if (islower(*sectletter)) { + if (strcmp(sectname, "default")) + dprintf(STDERR_FILENO, "warning: section name [%s] contains lower-case letters\n", sectname); + break; + } + } p->rs_name = strdup(sectname); SLIST_INIT(>rs_keys); SLIST_INSERT_HEAD(>rf_sect, p, rs_next); ___ 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: r356289 - head
John Baldwin jhb at FreeBSD.org wrote on Thu Jan 2 21:41:07 UTC 2020 : > On 1/2/20 1:34 PM, John Baldwin wrote: > > Author: jhb > > Date: Thu Jan 2 21:34:44 2020 > > New Revision: 356289 > > URL: https://svnweb.freebsd.org/changeset/base/356289 > > > > Log: > > Look for cross toolchain makefiles in /usr/share/toolchains. > > > > The freebsd-binutils and freebsd-gcc* packages install toolchain > > makefiles to /usr/share/toolchains rather than LOCALBASE. > > The short version is that you can do something like this to use GCC > as the system compiler (/usr/bin/cc): > > cd /usr/ports/base/binutils ; make install clean > cd ../gcc6 ; make install clean > > Then 'make CROSS_TOOLCHAIN=freebsd-gcc6 buildworld', etc. If you aren't > planning on doing cross-builds you can set CROSS_TOOLCHAIN in /etc/src.conf. > > As described elsewhere, the base/* packages can be cross-built (along > with pkg), so for any architectures not yet using clang we could fairly > easily provide a cross-built package repo (though that architecture list > is becoming rather small). I will probably add a base/gcc9 port once we > can build a full system with gcc9. Just an FYI from some experiments that I did recently: devel/binutils@powerpc and devel/binutils@powerpc64 and base/binutils@powerpc and base_binutils@powerpc64 do not put out the same content as lld or the old toolchain's ld (still used normally for 32-bit powerpc). buildkernel runs to completion but the result crashes from the kernel sseflf-loading and what was produced not matching. For example, binutils put out very few ABS symbols compared to lld/old-ld and classifies the kernel as ET_EXEC, not ET_DYN, because of the non-zero VirtAddr in: Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align . . . LOAD 0x00 0x0010 0x0010 0xd9786c 0x1083648 RWE 0x1 . . . (I'm not claiming that is all there is that matters.) These points are true using system-clang as the compiler. (I've only cross-built so far.) I do not know if other architectures have similar issues or not. But, it appears that in some cases, there is more work to allowing the GNU linker to be used, for at least buildkernel . I do not know if there is an intent to support a (modern) GNU binutils ld (in addition to lld) or not. So it may be that the effort would not be put in. (I'm not claiming which side(s) would change if the effort was put in.) === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) ___ 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: r356316 - head/sys/arm64/include
Author: andrew Date: Fri Jan 3 10:03:36 2020 New Revision: 356316 URL: https://svnweb.freebsd.org/changeset/base/356316 Log: Add the 8 and 16 bit atomic load/store functions with a barrier on arm64. Reviewed by: cem MFC after:2 weeks Sponsored by: DARPA, AFRL Differential Revision:https://reviews.freebsd.org/D22966 Modified: head/sys/arm64/include/atomic.h Modified: head/sys/arm64/include/atomic.h == --- head/sys/arm64/include/atomic.h Fri Jan 3 04:37:47 2020 (r356315) +++ head/sys/arm64/include/atomic.h Fri Jan 3 10:03:36 2020 (r356316) @@ -448,6 +448,34 @@ atomic_swap_64(volatile uint64_t *p, uint64_t val) return (ret); } +static __inline uint8_t +atomic_load_acq_8(volatile uint8_t *p) +{ + uint8_t ret; + + __asm __volatile( + "ldarb %w0, [%1] \n" + : "=" (ret) + : "r" (p) + : "memory"); + + return (ret); +} + +static __inline uint16_t +atomic_load_acq_16(volatile uint16_t *p) +{ + uint16_t ret; + + __asm __volatile( + "ldarh %w0, [%1] \n" + : "=" (ret) + : "r" (p) + : "memory"); + + return (ret); +} + static __inline uint32_t atomic_load_acq_32(volatile uint32_t *p) { @@ -474,6 +502,28 @@ atomic_load_acq_64(volatile uint64_t *p) : "memory"); return (ret); +} + +static __inline void +atomic_store_rel_8(volatile uint8_t *p, uint8_t val) +{ + + __asm __volatile( + "stlrb %w0, [%1] \n" + : + : "r" (val), "r" (p) + : "memory"); +} + +static __inline void +atomic_store_rel_16(volatile uint16_t *p, uint16_t val) +{ + + __asm __volatile( + "stlrh %w0, [%1] \n" + : + : "r" (val), "r" (p) + : "memory"); } static __inline 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"