Commit Graph

20329 Commits

Author SHA1 Message Date
Ed Maste
57f804675e remove GCC 4.2.1 build infrastructure
As described in Warner's email message[1] to the FreeBSD-arch mailing
list we have reached GCC 4.2.1's retirement date.  At this time all
supported architectures either use in-tree Clang, or rely on external
toolchain (i.e., a contemporary GCC version from ports).

GCC 4.2.1 was released July 18, 2007 and was imported into FreeBSD later
that year, in r171825.  GCC has served us well, but version 4.2.1 is
obsolete and not used by default on any architecture in FreeBSD.  It
does not support modern C and does not support arm64 or RISC-V.

Thanks to everyone responsible for maintaining, updating, and testing
GCC in the FreeBSD base system over the years.

So long, and thanks for all the fish.

[1] https://lists.freebsd.org/pipermail/freebsd-arch/2020-January/019823.html

PR:		228919
Reviewed by:	brooks, imp
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D23124
2020-02-29 03:25:51 +00:00
Dimitry Andric
75dfc66c1b Merge ^/head r358269 through r358399. 2020-02-27 19:07:10 +00:00
Warner Losh
68a229849a _Static_assert is to be preferred to CTASSERT.
Document the existing prefernce that _Static_assert be used in preference to the
old CTASSERT we used to use for compile time assertions.
2020-02-27 15:30:13 +00:00
Baptiste Daroussin
be24ad5aac Update pci_vendors to 2020.02.22
MFC after:	2 days
2020-02-27 11:23:44 +00:00
Sergio Carlavilla Delgado
757a04bf82 Add HISTORY sections to tree(3), stdarg(3) and sigevent(3)
Submitted by:	gbergling_gmail.com
Approved by:	bcr@(mentor)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D23832
2020-02-26 19:16:23 +00:00
Ed Maste
3352b550cd src.conf.5: regen after sparc64 removal 2020-02-26 19:12:36 +00:00
Ed Maste
593d80c4a0 src.opts.mk: drop MIPS special case for disabling BINUTILS_BOOTSTRAP
Binutils has already been reduced to installing ld only on powerpc32
and as only on amd64.  (Also objdump on every arch supported by binutils
2.17.50.)  Although BINUTILS_BOOTSTRAP serves no purpose on MIPS there
is no reason to have a special case for it.

Sponsored by:	The FreeBSD Foundation
2020-02-26 19:08:23 +00:00
Warner Losh
47e9f42ea3 Remove sparc64 specific buid-system hacks
Remove all the sparc64 hacks and tweaks to the build system. We don't
need them anymore.
2020-02-26 18:49:20 +00:00
Ed Maste
59ffd5eb99 style.9: update C99 commentary
Make style.9 read as a current statement of C99 preferences, rather than a
description of ongoing changes to our preferred style.  Alsu use the short
form "ISO C99" on the 2nd and later instances rather than repeating the
unwieldy `ISO/IEC 9899:1999 ("ISO C99")` each time.

Reviewed by:	cem, imp, jhb, kib
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D23648
2020-02-25 17:18:59 +00:00
Dimitry Andric
9caf7b3610 Adjust the regex used for LINKER_FREEBSD_VERSION so it captures the last
dash-separated segment from the upstream commit description.  This is
required to parse "git describe --long" output.
2020-02-24 19:11:52 +00:00
Sevan Janiyan
97b116ad0a Website announcement of the 9.0 release wasn't a Valentine's day accident. 2020-02-23 23:29:53 +00:00
Sevan Janiyan
b8bf627b18 Add NetBSD 9.0 using the date the releng announcement was made.
NetBSD-7 branch wont be receiving any more releases.
2020-02-22 23:36:10 +00:00
Lorenzo Salvadore
9b48a7bbeb Add myself (salvadore) as a ports committer
Approved by:	gerald (mentor)
2020-02-22 17:56:09 +00:00
Xin LI
f646d24c82 Actually install hwpstate_intel.4. 2020-02-20 06:45:51 +00:00
Dimitry Andric
eb834d9f1b Take LINKER_FREEBSD_VERSION from numerical field after dash
Summary:
With COMPILER_FREEBSD_VERSION, we use a numeric value that we bump each
time we make a change that requires re-bootstrapping, but with the
linker variant, we instead take the entire part after "FreeBSD", as in
this example version output:

LLD 9.0.1 (FreeBSD c1a0a213378a458fbea1a5c77b315c7dce08fd05-1300006) (compatible with GNU linkers)

E.g., LINKER_FREEBSD_VERSION is currently being set to
"c1a0a213378a458fbea1a5c77b315c7dce08fd05-1300006".  This means that
*any* new upstream lld version will cause re-bootstrapping.

We should only look at the numerical field we append after a dash
instead.  This review attempts to make it so.

The only thing I am not happy about is the post-processing of awk output
in Makefile.inc1.  I notice that our awk does not have gensub(), so it
can't substitute a numbered sub-regex with \1, \2, etc.  Suggestions
welcome. :)

MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D23691
2020-02-19 21:12:59 +00:00
Ed Maste
45181e6dba src.conf.5: regen after r358101, WITHOUT_GCOV default 2020-02-19 14:16:48 +00:00
Ed Maste
db1d8f1de4 Move GCOV option to default NO
GNU gcov will be removed along with GCC 4.2.1 at the end of the month.
Change the default to NO in preparation.
2020-02-19 14:12:59 +00:00
Sergio Carlavilla Delgado
8209febbb3 Add some HISTORY sections to manpages
environ(7) was in AT&T Version 7
ac(8): Add a HISTORY section
sa(8): Add a HISTORY section
sqrt(3): Add the actual sqrt function to the HISTORY section

Obtained from: OpenBSD

Submitted by:	gbergling@gmail.com
Approved by:	bcr@(mentor)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D23693
2020-02-19 12:49:49 +00:00
Hiroki Sato
294de6bbd6 Add _BIX (Battery Information Extended) object support.
ACPI Control Method Batteries have a _BIF and/or _BIX object which
provide static properties of the battery.  FreeBSD acpi_cmbat module
supported _BIF object only, which was deprecated as of ACPI 4.0.
_BIX is an extended version of _BIF defined in ACPI 4.0 or later.

As of writing, _BIX has two revisions.  One is in ACPI 4.0 (rev.0) and
another is in ACPI 6.0 (rev.1).  It seems that hardware vendors still
stick to _BIF only or _BIX rev.0 + _BIF for the maximum compatibility.
Microsoft requires _BIX rev.0 for Windows machines, so there are some
laptop machines with _BIX rev.0 only. In this case, FreeBSD does not
recognize the battery information.

After this change, the acpi_cmbat module gets battery information from
_BIX or _BIF object and internally uses _BIX rev.1 data structure as
the primary information store in the kernel.  ACPIIO_BATT_GET_BI[FX]
returns an acpi_bi[fx] structure built by using information obtained
from a _BIF or a _BIX object found on the system.  The revision number
field can be used to check which field is available.  The acpiconf(8)
utility will show additional information if _BIX is available.

Although ABIs of ACPIIO_BATT_* were changed, the existing APIs for
userland utilities are not changed and the backward-compatible ABIs
are provided.  This means that older versions of acpiconf(8) can also
work with the new kernel. The (union acpi_battery_ioctl_arg) was
padded to 256 byte long to avoid another ABI change in the future.
A _BIX object with its revision number >1 will be treated as
compatible with the rev.1 _BIX format.

Reviewed by:	takawata
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D23728
2020-02-19 06:28:55 +00:00
Hiroki Sato
604d0dd551 Use 0x5c for the scan code 0x7d.
Japanese keyboards traditionally use 0x5c for
both Japanese yen sign key and backslash key.
While a Japanese yen sign is depicted on the keytop,
most of Japanese expect that the scan code 0x7d gives
a backslash (0x5c), not a Japanese yen sign (0xa5).

This is because JIS X 0201 encoding (aka ISO/IEC 646-JA,
an extended version of ASCII which is very popular
in Japan) has Japanese yen sign at 0x5c and
no backslash.  On the other hand, ISO/IEC 8859-1
has Japanese yen sign at 0xa5.  This difference has
caused a confusion after Unicode became popular since
ISO/IEC 10646 adopted 8859-1 for the plane 0.

MFC after:	1 week
2020-02-18 01:50:44 +00:00
Matt Macy
45035becfe Add zfree to zero allocation before free
Key and cookie management typically wants to
avoid information leaks by explicitly zeroing
before free. This routine simplifies that by
permitting consumers to do so without carrying
the size around.

Reviewed by:	jeff@, jhb@
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC (Netgate)
Differential Revision:	https://reviews.freebsd.org/D22790
2020-02-16 00:12:53 +00:00
Konstantin Belousov
132fb3dc99 Add pthread_peekjoin_np(3).
The function allows to peek at the thread exit status and even see
return value, without joining (and thus finally destroying) the target
thread.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation (kib)
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D23676
2020-02-15 23:25:39 +00:00
Kyle Evans
485e2f3f55 committers-ports.dot: add myself as a ports committer 2020-02-15 21:21:13 +00:00
Kyle Evans
15e4e740a6 committers-ports: add koobs@ information, somewhat belatedly 2020-02-14 14:03:44 +00:00
Ryan Moeller
0ded0d1256 Add myself (freqlabs) as a src committer
Approved by:	mav (mentor)
MFC after:	3 days
2020-02-13 01:42:13 +00:00
Brooks Davis
d3a5bf95f2 Make the warning for deprecated NO_ variables an error.
Support for NO_CTF, NO_DEBUG_FILES, NO_INSTALLLIB, NO_MAN, NO_PROFILE,
and NO_WARNS as deprecated in 2014 with a warning added for each one
found. Turn these into error in preperation for removal of compatability
support before FreeBSD 13.

This was previously committed in r354909 and reverted in r355011 due to
unforseen impacts on ports.  I've since corrected all amd64 and i386
ports reported in prior runs as well as instance of these variables I
found via grep.
2020-02-12 18:09:20 +00:00
Warner Losh
702547720c Remove sparc64 specific bits of the man pages. 2020-02-12 06:52:22 +00:00
Brooks Davis
8e2e3137a3 Mark hme(4) as deprecated.
It was saved from the initial purge of drivers in fcp-101 due to being
the onboard Ethernet device on a number of sparc64 machines.  Now that
sparc64 is gone, it serves little purpose (PCI cards exist, but are rare
and are unlikely to have been deployed outside Sun systems).

MFC after:	3 days
2020-02-12 00:58:17 +00:00
Kyle Evans
6794d1955a mips: mark GOOGLETEST broken, due to no fault of its own
As explained in the comment; GOOGLETEST cannot currently be compiled on any
mips variant at the moment due to the cross toolchain seemingly using the
wrong spec and not pulling in libgcc. We'll be fine when llvm 10 lands, at
which point this should be reverted most expeditiously.
2020-02-09 18:53:53 +00:00
Mateusz Piotrowski
676ff51e8a Add a missing word in rc.conf.5
PR:		243972
Submitted by:	PauAmma <pauamma@gundo.com>
Approved by:	bcr (mentor)
Differential Revision:	https://reviews.freebsd.org/D23584
2020-02-09 15:13:56 +00:00
Vincenzo Maffione
723180da59 netmap: improve netmap(4) and vale(4) man pages
Clean up obsolete sysctl descriptions and add missing ones.

PR:		243838
Reviewed by:	bcr
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D23546
2020-02-07 19:26:26 +00:00
Dimitry Andric
d54b0ffe9d Correctly recognize linker versions greater than 10.0.
MFC after:	3 days
2020-02-07 19:04:27 +00:00
Warner Losh
ac12771c01 Avoid the phrase 'now deprecated'
Reword this construct to be more consistent with normal man page language.
2020-02-06 16:38:06 +00:00
Warner Losh
24619588e4 'is now deprecated' -> 'is deprecated'
Man pages are written in a more timeless voice than news flashes,
so adopt the language to what we do elsewhere.
2020-02-06 16:38:02 +00:00
Ed Maste
429932bacc src.conf.5: regen after r357617, BINUTILS_BOOTSTRAP description update 2020-02-06 14:18:48 +00:00
Ed Maste
0f61170882 libssp_nonshared: use only on i386 and ppc
libssp_nonshared.a defines one symbol, __stack_chk_fail_local.  This
is used only on i386 and powerpc; other archs emit calls directly to
__stack_chk_fail.  Simplify linking on other archs by omitting it.

PR:		242941 [exp-run]
2020-02-05 20:08:01 +00:00
Ryan Libby
ec0d828071 uma: add UMA_ZONE_CONTIG, and a default contig_alloc
For now, copy the mbuf allocator.

Reviewed by:	jeff, markj (previous version)
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D23237
2020-02-04 22:40:11 +00:00
Kyle Evans
5ad886bf82 src.conf(5): regen after r357543, HTTPD removal 2020-02-04 21:28:04 +00:00
Kyle Evans
504613f246 Remove simple_httpd
simple_httpd was granted a reprieve from the picobsd removal based on having
some reported user; it turns out this user isn't actually using the version
in base and merging their changes would be difficult at this point, so the
version in base will simply continue to rot. Retire it now, it may make a
comeback to ports with the improved version.

No notice issued because its current visibility has only been for ~3
months, and a notice has been previously issued about picobsd removal.
2020-02-04 21:27:39 +00:00
Navdeep Parhar
46e1e307ed cxgbe(4): Retire the allow_mbufs_in_cluster optimization.
This simplifies the driver's rx fast path as well as the bookkeeping
code that tracks various rx buffer sizes and layouts.

MFC after:	1 week
Sponsored by:	Chelsio Communications
2020-02-04 00:51:10 +00:00
Mateusz Piotrowski
a3f02b1af7 ports.7: Update examples with install-missing-packages
The ports framework recently grew support for installing dependencies with
a dedicated target called "install-missing-packages". Let's retire the
carefully constructed one-liner that was used for getting dependencies so
far and use the official ports target instead.

Reviewed by:	bcr
Approved by:	bcr (mentor)
Differential Revision:	https://reviews.freebsd.org/D23485
2020-02-03 23:40:27 +00:00
Mateusz Piotrowski
2125f57a16 Replace *-out with star-out to ease legibility
"*-out" is a complex way of phrasing the fact, and it causes
confusion for people.

Submitted by:	debdrup
Approved by:	bcr (mentor)
Differential Revision:	https://reviews.freebsd.org/D23482
2020-02-03 23:30:47 +00:00
Warner Losh
51691e26d0 Remove vpo.4
The Parallel Port SCSI adapter was interesting for 100MB ZIP drives, but is no
longer used or maintained. Remove it from the tree.

The Parallel Port microsequencer (microseq.9) is now mostly unused in the tree,
but remains. PPI still refrences it, but doesn't use its full functionality.

Relnotes: Yes
Reviewed by: rgrimes@, Ihor Antonov
Discussed on: arch@
Differential Revision:  https://reviews.freebsd.org/D23389
2020-02-02 04:53:27 +00:00
Warner Losh
5a622926ea Add deprecation notice to vpo.4
This driver has seen no real changes for almost 20 years. It's for
hardware that's 25 years old. It has no reports of active use, nor
has it been seen in the NYCBug dmesg database at all. Schedule
its removal for 13.0.

Reviewed by: rgrimes@ (earlier version)
Relnote: Yes
MFC After: 3 days
Differential Revision: https://reviews.freebsd.org/D23403
2020-02-02 04:52:28 +00:00
Conrad Meyer
cd4e43b27d hwpstate_intel(4): Detect and support PKG variant
If package-level control is present, we default to using it.  Per-core
software control may be enabled by setting the machdep.hwpstate_pkg_ctrl
tunable to "0" in loader.conf(5).
2020-02-01 19:50:10 +00:00
Mateusz Piotrowski
dcac254a3a bridge.4: Remove notes about FreeBSD 6.2-7.2
Reported by:	Mateusz Kwiatkowski
Reviewed by:	brueffer
Approved by:	bcr (mentor)
Differential Revision:	 https://reviews.freebsd.org/D23393
2020-02-01 10:25:13 +00:00
Dimitry Andric
05273b1faa Merge r357345 from the clang1000-import branch:
Disable new clang 10.0.0 warnings about misleading indentation in flex.

As this is contributed code with very messy indentation, which will
almost certainly never be upgraded, just disable the warning.

MFC after:	3 days
2020-01-31 19:06:49 +00:00
Dimitry Andric
23bec42733 Merge r357342 from the clang1000-import branch:
Work around two -Werror warning issues in googletest, which have been
solved upstream in the mean time.

The first issue is because one of googletest's generated headers contain
classes with a user-declared copy assignment operator, but rely on the
generation by the compiler of an implicit copy constructor, which is now
deprecated:

/usr/obj/usr/src/amd64.amd64/tmp/usr/include/private/gtest/internal/gtest-param-util-generated.h:5284:8: error: definition of implicit copy constructor for 'CartesianProductHolder3<testing::internal::ParamGenerator<bool>, testing::internal::ValueArray3<int, int, int>, testing::internal::ValueArray4<cache_mode, cache_mode, cache_mode, cache_mode> >' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
  void operator=(const CartesianProductHolder3& other);
       ^
/usr/obj/usr/src/amd64.amd64/tmp/usr/include/private/gtest/gtest-param-test.h:1277:10: note: in implicit copy constructor for 'testing::internal::CartesianProductHolder3<testing::internal::ParamGenerator<bool>, testing::internal::ValueArray3<int, int, int>, testing::internal::ValueArray4<cache_mode, cache_mode, cache_mode, cache_mode> >' first required here
  return internal::CartesianProductHolder3<Generator1, Generator2, Generator3>(
         ^
/usr/src/tests/sys/fs/fusefs/io.cc:534:2: note: in instantiation of function template specialization 'testing::Combine<testing::internal::ParamGenerator<bool>, testing::internal::ValueArray3<int, int, int>, testing::internal::ValueArray4<cache_mode, cache_mode, cache_mode, cache_mode> >' requested here
        Combine(Bool(),                                 /* async read */
        ^

For now, silence the warning using -Wno-deprecated-copy.

The second issue is because one of the googlemock test programs attempts
to use "unsigned wchar_t" and "signed wchar_t", which are non-standard
and at best, hazily defined:

contrib/googletest/googlemock/test/gmock-actions_test.cc:111:37: error: 'wchar_t' cannot be signed or unsigned [-Wsigned-unsigned-wchar]
  EXPECT_EQ(0U, BuiltInDefaultValue<unsigned wchar_t>::Get());
                                    ^
contrib/googletest/googlemock/test/gmock-actions_test.cc:112:36: error: 'wchar_t' cannot be signed or unsigned [-Wsigned-unsigned-wchar]
  EXPECT_EQ(0, BuiltInDefaultValue<signed wchar_t>::Get());
                                   ^

For now, silence the warning using -Wno-signed-unsigned-wchar.

MFC after:	3 days
2020-01-31 19:06:01 +00:00
Dimitry Andric
533a4a6296 Disable new clang 10.0.0 warnings about misleading indentation in flex.
As this is contributed code with very messy indentation, which will
almost certainly never be upgraded, just disable the warning.

MFC after:	3 days
2020-01-31 19:02:53 +00:00
Dimitry Andric
7b5814e175 Work around two -Werror warning issues in googletest, which have been
solved upstream in the mean time.

The first issue is because one of googletest's generated headers contain
classes with a user-declared copy assignment operator, but rely on the
generation by the compiler of an implicit copy constructor, which is now
deprecated:

/usr/obj/usr/src/amd64.amd64/tmp/usr/include/private/gtest/internal/gtest-param-util-generated.h:5284:8: error: definition of implicit copy constructor for 'CartesianProductHolder3<testing::internal::ParamGenerator<bool>, testing::internal::ValueArray3<int, int, int>, testing::internal::ValueArray4<cache_mode, cache_mode, cache_mode, cache_mode> >' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
  void operator=(const CartesianProductHolder3& other);
       ^
/usr/obj/usr/src/amd64.amd64/tmp/usr/include/private/gtest/gtest-param-test.h:1277:10: note: in implicit copy constructor for 'testing::internal::CartesianProductHolder3<testing::internal::ParamGenerator<bool>, testing::internal::ValueArray3<int, int, int>, testing::internal::ValueArray4<cache_mode, cache_mode, cache_mode, cache_mode> >' first required here
  return internal::CartesianProductHolder3<Generator1, Generator2, Generator3>(
         ^
/usr/src/tests/sys/fs/fusefs/io.cc:534:2: note: in instantiation of function template specialization 'testing::Combine<testing::internal::ParamGenerator<bool>, testing::internal::ValueArray3<int, int, int>, testing::internal::ValueArray4<cache_mode, cache_mode, cache_mode, cache_mode> >' requested here
        Combine(Bool(),                                 /* async read */
        ^

For now, silence the warning using -Wno-deprecated-copy.

The second issue is because one of the googlemock test programs attempts
to use "unsigned wchar_t" and "signed wchar_t", which are non-standard
and at best, hazily defined:

contrib/googletest/googlemock/test/gmock-actions_test.cc:111:37: error: 'wchar_t' cannot be signed or unsigned [-Wsigned-unsigned-wchar]
  EXPECT_EQ(0U, BuiltInDefaultValue<unsigned wchar_t>::Get());
                                    ^
contrib/googletest/googlemock/test/gmock-actions_test.cc:112:36: error: 'wchar_t' cannot be signed or unsigned [-Wsigned-unsigned-wchar]
  EXPECT_EQ(0, BuiltInDefaultValue<signed wchar_t>::Get());
                                   ^

For now, silence the warning using -Wno-signed-unsigned-wchar.

MFC after:	3 days
2020-01-31 18:26:23 +00:00
Ed Maste
3d8a8d1fb0 regen src.conf.5 after r357338 BSD_CRTBEGIN retirement 2020-01-31 18:26:13 +00:00
Ed Maste
43e8403953 retire BSD_CRTBEGIN option
BSD crt is currently used on all architectures (other than sparc64).
Remove the option and use BSD crt everywhere as part of the GCC 4.2.1
retirement plan.

https://lists.freebsd.org/pipermail/freebsd-arch/2020-January/019823.html

PR:		239851
Reviewed by:	andrew, brooks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D23122
2020-01-31 18:04:04 +00:00
Conrad Meyer
43524989c5 hwpstate(4): Ignore CurPstateLimit by default
Add a sysctl knob to allow users to re-enable it, and document the knob and
default in cpufreq.4.  (While here, add a few unrelated updates to
cpufreq.4.)

It seems that the register value in some hardware simply reflects the
configured P-state.  This results in an inadvertent and unintended outcome
where the P-state can only walk down, and then the driver becomes "stuck" in
the slowest possible P-state.

The Linux driver never consults this register, so that's some evidence that
ignoring the contents are relatively harmless.

PR:		234733
Reported by:	sigsys AT gmail.com, Erich Dollanksy <freebsd.ed.lists AT
		sumeritec.com>
2020-01-31 17:40:41 +00:00
Mark Johnston
1c29da0279 Reimplement stack capture of running threads on i386 and amd64.
After r355784 the td_oncpu field is no longer synchronized by the thread
lock, so the stack capture interrupt cannot be delievered precisely.
Fix this using a loop which drops the thread lock and restarts if the
wrong thread was sampled from the stack capture interrupt handler.

Change the implementation to use a regular interrupt instead of an NMI.
Now that we drop the thread lock, there is no advantage to the latter.

Simplify the KPIs.  Remove stack_save_td_running() and add a return
value to stack_save_td().  On platforms that do not support stack
capture of running threads, stack_save_td() returns EOPNOTSUPP.  If the
target thread is running in user mode, stack_save_td() returns EBUSY.

Reviewed by:	kib
Reported by:	mjg, pho
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D23355
2020-01-31 15:43:33 +00:00
Alfredo Dal'Ava Junior
d8a85b4237 Add myself (alfredo) to committers-src.dot and calendar.freebsd
Approved by:	jhibbits (mentor)
2020-01-29 17:39:38 +00:00
Warner Losh
4a53357f4d Remove old device list
The device list hasn't aged well. All these devices are over a decade old. umass
supports thunb drives almost universally, and the list is too long to try to
list here.

Remove some obsolete advice as well. This isn't the place to talk about how to
create FAT filesystems, nor now to mount them. The only advice that's still
useful is the rescanning of a multi-slot flash adapater.

MFC After: 3 days
2020-01-28 00:36:46 +00:00
Alex Richardson
d2c32def56 Build hard-float lib32 for mips64hf/mips64elhf
This should fix linker errors when building with clang+lld.
After this change the lib32 compat libraries are now buildt with
-mhard-float instead of -msoft-float

Reviewed By:	brooks, jhb
Differential Revision: https://reviews.freebsd.org/D23229
2020-01-27 12:02:47 +00:00
Nick Hibma
197f150c0c Fix a few spacing issues to make the page more readable. 2020-01-24 11:22:33 +00:00
John Baldwin
03fd4409c7 Correct the return types of fueword*().
MFC after:	1 week
Sponsored by:	DARPA
2020-01-23 23:36:58 +00:00
Mark Johnston
66351f5126 ng_nat: Pass IPv6 packets through.
ng_nat implements NAT for IPv4 traffic only.  When connected to an
ng_ether node it erroneously handled IPv6 packets as well.

This change is not sufficient: ng_nat does not do any validation of IP
packets in this mode, even though they have not yet passed through
ip_input().

PR:		243096
Reported by:	Robert James Hernandez <rob@sarcasticadmin.com>
Reviewed by:	julian
Differential Revision:	https://reviews.freebsd.org/D23080
2020-01-23 16:45:48 +00:00
Conrad Meyer
4577cf3744 cpufreq(4): Add support for Intel Speed Shift
Intel Speed Shift is Intel's technology to control frequency in hardware,
with hints from software.

Let's get a working version of this in the tree and we can refine it from
here.

Submitted by:	bwidawsk, scottph
Reviewed by:	bcr (manpages), myself
Discussed with:	jhb, kib (earlier versions)
With feedback from:	Greg V, gallatin, freebsdnewbie AT freenet.de
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D18028
2020-01-22 23:28:42 +00:00
Ed Maste
cea7cfd20d Tag etc/termcap with package=runtime
/etc/termcap is a symlink to /usr/share/misc/termcap, which is in the
runtime package.  Tag the symlink with the same package so that it is
handled correctly on pkgbase-installed/updated systems.

Sponsored by:	The FreeBSD Foundation
2020-01-22 18:55:36 +00:00
Gleb Smirnoff
a7f12fce22 Remove struct callout_handle. Should have gone with r355732. 2020-01-22 05:47:59 +00:00
Gleb Smirnoff
1d11092814 Change argument order of epoch_call() to more natural, first function,
then its argument.

A miss from r356826.
2020-01-22 02:28:39 +00:00
Mikael Urankar
9932f32f32 Add myself (mikael) as a ports committer
Approved by:	manu (mentor)
Differential Revision:	https://reviews.freebsd.org/D23227
2020-01-20 19:38:29 +00:00
Baptiste Daroussin
6e4cafd1be The ports tree now accepts /usr/local/share/man as a directory for manpage
and will slowly transition from /usr/local/man to it. To reflect this remove
the documentation of the manpages being an exception in the layout of /usr/local

Reported by:	Dan Nelson <dnelson_1901@yahoo.com> (via IRC)
MFC after:	3 days
2020-01-20 16:59:39 +00:00
Ed Maste
fa3c36d362 src.conf.5: regen after BINUTILS defaults and description changes 2020-01-19 19:57:14 +00:00
Ed Maste
9d0e1b8a20 src.opts.mk: default BINUTILS_BOOTSTRAP to NO except for x86 and powerpc
x86 needs bootstrap GNU as for assembling a few files, and powerpc needs
GNU ld.bfd for linking 32-bit objects.  All other targets either fully
use in-tree Clang and lld, or rely on external toolchain.

Sponsored by:	The FreeBSD Foundation
2020-01-19 19:56:05 +00:00
Sergio Carlavilla Delgado
b46595affc Add myself as a mentee of bcr
Patch by:	carlavilla@(doc-committer)
Approved by:	bcr@(mentor)
2020-01-19 16:24:25 +00:00
Ed Maste
9f4e04c193 src.conf.5: regen after r356836, DMAGENT dependency on OPENSSL 2020-01-17 17:56:31 +00:00
Ed Maste
df502acc73 src.opts.mk: force DMAGENT off under WITHOUT_OPENSSL
dma(8) depends on OpenSSL unconditionally.

Reported by:	Michael Dexter's Build Options Survey run
MFC after:	1 weeks
Sponsored by:	The FreeBSD Foundation
2020-01-17 17:53:13 +00:00
Bryan Drewery
844939d743 META_MODE: Allow 'make all install' to work with filemon.
Filemon will add the ability to ignore the cookie if the installed file is
missing. Without filemon that's not possible though so if the cookie is present
an the command unchanged then the install wouldn't run.

Sponsored by:	DellEMC
MFC after:	2 weeks
2020-01-17 14:29:27 +00:00
Emmanuel Vadot
94292d7e95 fdt_pinctrl: Add new methods for gpios
Most of the gpio controller cannot configure or get the configuration
of the pin muxing as it's usually handled in the pinctrl driver.
But they can know what is the pinmuxing driver either because they are
child of it or via the gpio-range property.
Add some new methods to fdt_pinctrl that a pin controller can implement.
Some methods are :
fdt_pinctrl_is_gpio: Use to know if the pin in the gpio mode
fdt_pinctrl_set_flags: Set the flags of the pin (pullup/pulldown etc ...)
fdt_pinctrl_get_flags: Get the flags of the pin (pullup/pulldown etc ...)

The defaults method returns EOPNOTSUPP.

Reviewed by:	ian, bcr (manpages)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D23093
2020-01-16 21:19:27 +00:00
Ed Maste
f112a185b1 pkgbase: move profiling _p.a libs into -development packages
Profiling library archives are part of the development environment; they
don't need to be in separate -profile packages.

(In fact we can probably just eliminate the _p.a archives assuming that
profiling will be done using hwpmc etc., but that is a change for later.)

Discussed with:	bapt, manu
Sponsored by:	The FreeBSD Foundation
2020-01-16 17:27:08 +00:00
Glen Barber
2e67e6ffa3 Update release(7) to note OSRELEASE is only relevant when the
'install' target is invoked.

While here, bump the sample output version name, and explicitly
add the 'obj' target to avoid polluting the src checkout.

Submitted by:	Trond Endrestol
PR:		243287 (related)
MFC after:	3 days
Sponsored by:	Rubicon Communications, LLC (netgate.com)
2020-01-16 15:07:52 +00:00
Leandro Lupori
d4633a9e3c [PowerPC64] Enable virtio drivers
This enables virtio modules on PowerPC* target.
On PowerPC64, drivers are also kernel builtin.

QEMU currently needs to be patched to in order to work on LE hosts due to known
issue affecting pre-1.0 (legacy) virtio drivers.

The patch was submitted to QEMU mail list by @afscoelho_gmail.com, available at
https://lists.nongnu.org/archive/html/qemu-devel/2020-01/msg01496.html

Submitted by:	Alfredo Dal'Ava Junior <alfredo.junior@eldorado.org.br>
Reviewed by:	luporl
Differential Revision:	https://reviews.freebsd.org/D22833
2020-01-16 11:33:15 +00:00
Ed Maste
8c5cb4ce25 acpi_ibm: reference ThinkPad instead of IBM
These are now Lenovo ThinkPads, not IBM ThinkPads.

PR:		234403
Submitted by:	Kevin Zheng <kevinz5000@gmail.com> (original)
2020-01-15 19:43:45 +00:00
Ed Maste
0002146228 src.conf.5: regen after r356736, limiting ld.bfd to powerpc 2020-01-14 18:06:09 +00:00
Kyle Evans
4b50c45172 Revert r353140: Re-add ALLOW_MIPS_SHARED_TEXTREL, sprinkle it around
arichardson has an actual fix for the same issue that this was working
around; given that we don't build with llvm today, go ahead and revert the
workaround in advance.
2020-01-14 17:50:13 +00:00
Ed Maste
8683408cec src.conf.5: regen after option description updates 2020-01-14 17:38:34 +00:00
Kyle Evans
2a345f61da tap(4): also note that we drop configured addresses
This provides a specific pointer for users of tap(4) to understand why their
interfaces are losing their addresses, and specifically how to workaround
this if they need different behavior.

This manpage received a .Dd bump earlier today in r35688, so no bump occurs
this time.

Submitted by:	sigsys@gmail.com (via IRC)
2020-01-13 18:26:27 +00:00
Kyle Evans
6e6161d220 Install tap(4) manpage as vmnet(4) as well
If one comes across a vmnet interface, this is a useful pointer to have
towards what it actually is if they're otherwise unfamiliar.

MFC after:	3 days
2020-01-13 17:02:42 +00:00
Ed Maste
fb27d7ae7c src.conf.5: regen after r356615, KERBEROS_SUPPORT dep on KERBEROS 2020-01-13 14:50:22 +00:00
Ed Maste
0ce9d0af5b src.opts.mk: force KERBEROS_SUPPORT off where KERBEROS forced off
Explicitly setting WITHOUT_KERBEROS implies WITHOUT_KERBEROS_SUPPORT,
but previously other cases that forced KERBEROS off (such as
WITHOUT_CRYPT) did not also set KERBEROS_SUPPORT off.  Because the
_SUPPORT dependent options (KERBEROS/KERBEROS_SUPPORT) are processed
before other dependencies (CRYPT/KERBEROS) it's not easy to make this
happen automatically.  Instead just explicitly set KERBEROS_SUPPORT
off where we set KERBEROS off.

Reported by:	Michael Dexter's Build Option Survey run
2020-01-10 22:00:39 +00:00
Loïc Bartoletti
1cd24ac42b Add myself (lbartoletti) as a ports commiter
Step 5 (Update Mentor and Mentee Information) from Commiters guide.

I also alphababetize mentees from tcberner.

Approved by:	tcberner (mentor)
Differential Revision:	https://reviews.freebsd.org/D23125
2020-01-10 20:53:58 +00:00
Jung-uk Kim
4c8095b1d5 Catch up with Clang 9.0. 2020-01-09 20:07:38 +00:00
Warner Losh
dea247463c Add note to remind me there are three choices for arm32 floating point.
hard	use floating point hardware, pass registers to functions in
	floating point registers.
softfp	use floating point hardware, but pass registers to functions
	in integer registers.
soft	do floating point calcuations without using floating point
	hardware. Pass arguments in integer registers.

FreeBSD 11 and newer assumes hard. 10 and earlier assumed softfp.  We have no
real support, at the moment, for soft. It's untested, though, if softfp still
works.

Add a note here since this is a whack-a-doodle combination relative to all other
platforms.

softfp is likely to go away in the future because it was retained for people
using FreeBSD 10 + armv6 needing to transition more slowly from softfp -> hard
than the project. It likely is no longer needed, and may be getting in the
way of people needing 'soft' support.
2020-01-09 18:14:48 +00:00
Ed Maste
f8c319da66 Revert r356515 - add LLVM_LIBUNWIND back to sparc64 BROKEN_OPTIONS
r356552 reverted the untested build fix for LLVM libunwind on sparc64,
so mark it broken again.
2020-01-09 14:12:57 +00:00
Kyle Evans
20e8d8d554 md(4): improve documentation of preloading
It's not immediately clear by what mechanism loader(8) will be loading the
preloaded file. Specifically name-drop loader.conf(5) with a pointer to the
module loading section and a description of what the 'name' should look
like, because that certainly isn't clear from the loader.conf(5) standpoint.

The default loader.conf already has a pointer to md(4) where it appears and
the reference to loader.conf in the new version of this manpage should make
it more clear that this is where one should look for information.

Reported by:	swills
Reviewed by:	swills, manpages (bcr)
With revision by:	imp
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D22844
2020-01-09 04:39:37 +00:00
Ryan Libby
54c5ae804f uma: reorganize flags
- Garbage collect UMA_ZONE_PAGEABLE & UMA_ZONE_STATIC.
 - Move flag VTOSLAB from public to private.
 - Introduce public NOTPAGE flag and make HASH private.
 - Introduce public NOTOUCH flag and make OFFPAGE private.
 - Update man page.

The net effect of this should be to make the contract with clients more
clear.  Clients should choose constraints, UMA will figure out how to
implement them.  This also breaks the confusing double meaning of
OFFPAGE.

Reviewed by:	jeff, markj
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D23016
2020-01-09 02:03:03 +00:00
Ed Maste
3b957e38ef src.opts.mk: Remove sparc64 LLVM_LIBUNWIND BROKEN_OPTIONS
After r356513 it should build.
2020-01-08 20:51:07 +00:00
Ed Maste
b05bd0b93b src.opts.mk: enable LLVM_UNWIND by default for all archs
Only sparc64 did not enable LLVM_LIBUNWIND. After r356513 LLVM_LIBUNWIND
should at least build on sparc64. The old DWARF unwinder will be removed
along with GCC 4.2.1 in the near future, so switch sparc64 to use LLVM's
unwinder in advance of the removal.  Someone with access to the obsolete
sparc64 hardware supported by FreeBSD will have to test, and investigate
any failures. I will gladly help, but I don't have any suitable hardware
myself.

PR:		233405
2020-01-08 20:45:18 +00:00
Ed Maste
4cee74df63 src.conf.5: regen after r356423 and r356499
riscv now using Clang/lld, riscv64sf reenabled, and googletest adjusted
to avoid only the affected fuse test on mips
2020-01-08 17:54:44 +00:00
John Baldwin
79f5991559 Add -mno-relax to CFLAGS in bsd.prog/lib.mk instead of bsd.cpu.mk.
bsd.cpu.mk is included by bsd.init.mk before bsd.linker.mk, so it
was always setting the flag since LINKER_FEATURES wasn't defined.

Reported by:	mhorne
Reviewed by:	imp, mhorne
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D23076
2020-01-08 17:49:34 +00:00
John Baldwin
8d1df20821 Remove a mention of MAKE_OBSOLETE_GCC.
This should have been included in r356452.
2020-01-08 17:31:18 +00:00
John Baldwin
e48503fffd Use clang and lld as the default toolchain for RISCV.
- Enable clang and lld as system toolchains.
- Don't use external GCC for universe by default.
- Re-enable riscv64sf since it builds fine with clang + lld.

Reviewed by:	emaste, mhorne
Relnotes:	yes
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D23089
2020-01-08 17:25:59 +00:00
Michal Meloun
2138e99bf5 Switch 32-bit arm back to LLVM libunwind.
Actual LLVM libunwind passed all testing without issues, switch back to it.

PR:	233664
2020-01-08 07:25:37 +00:00
Alexander Motin
6de4e458fa Minor adjustments to r356474 and r356480.
Reported by:	jkim, imp
MFC after:	2 weeks
X-MFC-with:	r356474
2020-01-07 23:29:54 +00:00
Alexander Motin
67abaee9fc Add Host Memory Buffer support to nvme(4).
This allows cheapest DRAM-less NVMe SSDs to use some of host RAM (about
1MB per 1GB on the devices I have) for its metadata cache, significantly
improving random I/O performance.  Device reports minimal and preferable
size of the buffer.  The code limits it to 1% of physical RAM by default.
If the buffer can not be allocated or below minimal size, the device will
just have to work without it.

MFC after:	2 weeks
Relnotes:	yes
Sponsored by:	iXsystems, Inc.
2020-01-07 21:17:11 +00:00
Kyle Evans
d679c71970 Refine fusefs test workaround for mips+llvm
This re-enables building the googletest suite by default on mips and instead
specifically doesn't build fusefs tests for mips+clang builds.  clang will
easily spent >= 1.5 hours compiling a single file due to a bug in
optimization (see LLVM PR 43263), so turn these off for now while that's
hashed out.

GCC builds are unaffected and build the fusefs tests as-is. Clang builds
only happen by early adopters attempting to hash out the remaining issues.

The comment has been updated to reflect its new position and use less strong
wording about imposing on people.

Discussed with:	ngie, asomers
Reviewed by:	ngie
2020-01-06 18:25:58 +00:00
Ed Maste
f87832257d src.conf.5: regen after r356419, reenabling powerpc in universe 2020-01-06 18:07:54 +00:00
Ed Maste
dd8a62f058 arch.7: correct overzealous claims of external binutils use
powerpc and powerpcspe still use in-tree ld 2.17.50
2020-01-05 18:06:32 +00:00
Ed Maste
1d91d58f58 arch.7: update toolchain table for external ld use
As of r356379 and r356381 mips* and sparc64 now use external Binutils
ld as their linker.
2020-01-05 18:03:53 +00:00
Ed Maste
463aed9acb src.conf.5: regen after r356381, disable BINUTILS_BOOTSTRAP more widely 2020-01-05 18:01:52 +00:00
Ed Maste
6eb84c961a src.opts.mk: disable BINUTILS_BOOTSTRAP on all mips* and sparc64
Extend r356379 to include 32-bit mips and sparc64.  Using a decade-old
binutils linker with a contemporary compiler (either Clang or GCC) is
a combination unlikely to be used by anyone else, and it's not going
to be a good use of our time investigating and addressing any issues
that arise.  Expect that all architectures newly migrated to external
GCC will also use external binutils.
2020-01-05 18:01:15 +00:00
Ed Maste
895dd2f8fa src.conf.5: regen after r356379, disable BINUTILS_BOOTSTRAP on mips64* 2020-01-05 17:12:41 +00:00
Ed Maste
a69473e38c src.opts.mk: disable BINUTILS_BOOTSTRAP on mips64*
After GCC was disabled by default in r356367, mips and sparc64 started
relying external GCC.  However, the in-tree Binutils ld 2.17.50 is not
compatible with GCC for some mips64 targets, so turn off
BINUTILS_BOOTSTRAP and rely on external binutils (linker) as well.
2020-01-05 16:59:24 +00:00
Ed Maste
984f2f3bf0 arch.7: update to show mips* and sparc64 use external GCC after r356367 2020-01-05 03:07:59 +00:00
Ed Maste
a01517e538 src.conf.5: regen after r356367, default to GCC off 2020-01-05 03:03:34 +00:00
Ed Maste
5a0a85974a Do not build GCC 4.2.1 by default for any CPU architecture
By default set to NO:

GCC
GCC_BOOTSTRAP
GNUCXX

As described by imp@ on the freebsd-arch mailing list Aug 13, 2019 with
Subject: Gcc 4.2.1 to be removed before FreeBSD 13, a firm timeline
https://lists.freebsd.org/pipermail/freebsd-arch/2019-August/019674.html

Reviewed by:	jhb, imp
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D23026
2020-01-05 02:47:56 +00:00
Michael Tuexen
ae7cc6c9f8 Make the message size limit used for SCTP_SENDALL configurable via
a sysctl variable instead of a compiled in constant.

This is based on a patch provided by nwhitehorn@.
2020-01-04 20:33:12 +00:00
Kyle Evans
cd0d51baaa Provide libssp based on libc
For libssp.so, rebuild stack_protector.c with FORTIFY_SOURCE stubs that just
abort built into it.

For libssp_nonshared.a, steal stack_protector_compat.c from
^/lib/libc/secure and massage it to maintain that __stack_chk_fail_local
is a hidden symbol.

libssp is now built unconditionally regardless of {WITH,WITHOUT}_SSP in the
build environment, and the gcclibs version has been disconnected from the
build in favor of this one.

PR:		242950 (exp-run)
Reviewed by:	kib, emaste, pfg, Oliver Pinter (earlier version)
Also discussed with:	kan
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D22943
2020-01-04 20:19:25 +00:00
John Baldwin
64a3ba61a5 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
2020-01-03 23:31:38 +00:00
Ed Maste
770379b92c src.conf.5: regen after r356322 and r356323
For SVNLITE dependency on FILE and GOOGLETEST dependency on CXX.
2020-01-03 18:21:00 +00:00
Ed Maste
b4f20f20d5 src.opts.mk: SVNLITE requires FILE
Reported by:	Build Options Survey run by Michael Dexter
2020-01-03 18:20:03 +00:00
Ed Maste
9ed13baa5e src.opts.mk: GOOGLETEST requires CXX
Reported by:	Build Options Survey run by Michael Dexter
2020-01-03 18:11:55 +00:00
Ed Maste
78a576cbe8 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.
2020-01-03 16:28:10 +00:00
Ed Maste
4ad9b9fa8e 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.
2020-01-03 16:06:41 +00:00
Ian Lepore
422d05da14 Add support for i2c bus mux hardware.
An i2c bus can be divided into segments which can be selectively connected
and disconnected from the main bus. This is usually done to enable using
multiple slave devices having the same address, by isolating the devices
onto separate bus segments, only one of which is connected to the main bus
at once.

There are several types of i2c bus muxes, which break down into two general
categories...

 - Muxes which are themselves i2c slaves. These devices respond to i2c
   commands on their upstream bus, and based on those commands, connect
   various downstream buses to the upstream. In newbus terms, they are both
   a child of an iicbus and the parent of one or more iicbus instances.
 - Muxes which are not i2c devices themselves. Such devices are part of the
   i2c bus electrically, but in newbus terms their parent is some other
   bus. The association with the upstream bus must be established by
   separate metadata (such as FDT data).

In both cases, the mux driver has one or more iicbus child instances
representing the downstream buses. The mux driver implements the iicbus_if
interface, as if it were an iichb host bridge/i2c controller driver. It
services the IO requests sent to it by forwarding them to the iicbus
instance representing the upstream bus, after electrically connecting the
upstream bus to the downstream bus that hosts the i2c slave device which
made the IO request.

The net effect is automatic mux switching which is transparent to slaves on
the downstream buses. They just do i2c IO they way they normally do, and the
bus is electrically connected for the duration of the IO and then idled when
it is complete.

The existing iicbus_if callback() method is enhanced so that the parameter
passed to it can be a struct which contains a device_t for the requesting
bus and slave devices. This change is done by adding a flag that indicates
the extra values are present, and making the flags field the first field of
a new args struct. If the flag is set, the iichb or mux driver can recast
the pointer-to-flags into a pointer-to-struct and access the extra
fields. Thus abi compatibility with older drivers is retained (but a mux
cannot exist on the bus with the older iicbus driver in use.)

A new set of core support routines exists in iicbus.c. This code will help
implement mux drivers for any type of mux hardware by supplying all the
boilerplate code that forwards IO requests upstream. It also has code for
parsing metadata and instantiating the child iicbus instances based on it.

Two new hardware mux drivers are added. The ltc430x driver supports the
LTC4305/4306 mux chips which are controlled via i2c commands. The
iic_gpiomux driver supports any mux hardware which is controlled by
manipulating the state of one or more gpio pins.  Test Plan

Tested locally using a variety of mux'd bus configurations involving both
ltc4305 and a homebrew gpio-controlled mux. Tested configurations included
cascaded muxes (unlikely in the real world, but useful to prove that 'it all
just works' in terms of the automatic switching and upstream forwarding of
IO requests).
2020-01-02 17:51:49 +00:00
John Baldwin
2e4b206f90 Some minor tweaks to arch(7).
- Drop mention of _LP64.  FreeBSD's source generally uses __LP64__
  instead of _LP64, and the relevant macros are better covered in the
  "Predefined Macros" section.
- Fix a noun/verb disagreement.

Reviewed by:	emaste
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D22975
2020-01-02 16:27:15 +00:00
Warner Losh
bad7e1e85c Remove MACHINE_ARCH arm where appropriate from the tables to reflect armv5's
retirement.
2020-01-02 03:25:37 +00:00
John Baldwin
15d641f076 Formatting fixes for tables, no content changes.
- Add missing .Pp after the end of some lists so that there is a blank
  line before the subsequent paragraph.
- Use a more typical '-tag' bullet list of the make variable descriptions
  at the end.  This adds separation between bullets and is the formatting
  typically used in manpages for this sort of list.
2019-12-30 22:05:57 +00:00
Kyle Evans
d8fa560202 Regenerate src.conf(5) after r356164 2019-12-29 02:12:18 +00:00
Conrad Meyer
2c1962aba6 epoch.9: Add missing functions, clean up documentation
Various rototilling.
2019-12-28 01:35:32 +00:00
Ed Maste
742654c958 src.conf.5: regen after r356127, disable GPL_DTC by default 2019-12-27 17:12:06 +00:00
Ed Maste
cb9da00eb7 Switch GPL_DTC to default off
We use the BSDL devicetree compiler as long as we have a C++11 compiler.
dtc is not needed as a build tool on the platforms that are still using
GCC 4.2.1 (and it is being disabled very soon, anyhow).

Discussed with:	imp, kevans
2019-12-27 16:59:26 +00:00
Ed Maste
d3a549991a src.opts.mk: switch LLVM_LIBUNWIND to opt-out
PowerPC switched to LLVM_LIBUNWIND along with the switch to Clang/LLVM
in r356111.  This leaves only 32-bit Arm and sparc64 not using LLVM's
unwinder, so switch the sense to opt-out.

I elected to list the individual arm MACHINE_ARCHs so future changes
are more clear if LLVM_LIBUNWIND is enabled for one or two but not all
32-bit Arm targets (see PR 233664).
2019-12-27 16:28:43 +00:00
Ed Maste
897dc64400 src.opts.mk: switch LLVM toolchain to opt-out
After PowerPC switched in r356111, the list of targets using LLVM as the
default toolchain is much longer than those not using it.  Switch the
sense of the test to exclude those not using LLVM.

Targets not using LLVM is currently mips, riscv5, and sparc64; work is
in progress to migrate the first two to LLVM.
2019-12-27 15:47:32 +00:00
Ed Maste
da39b3adfb src.conf.5: regenerate after recent changes
r355588 Fix WITHOUT_CLANG build
r355646 Revert r354348
r355943 add LDNS build knob dependency on OPENSSL
r356111 Use LLVM as default toolchain for all PowerPC targets
2019-12-27 15:33:43 +00:00
Mateusz Guzik
1f162fef76 Add read-mostly sleepable locks
To be used when like rmlocks, except when sleeping for readers needs to be
allowed. See the manpage for more information.

Reviewed by:	kib (previous version)
Differential Revision:	https://reviews.freebsd.org/D22823
2019-12-27 11:19:57 +00:00
Justin Hibbits
678da4a274 Use LLVM as default toolchain for all PowerPC targets
This enables LLVM as the default compiler for powerpc, powerpc64, and
powerpcspe, as well as LLD as the default linker for powerpc64.

LLD is not yet ready for prime time for powerpc and powerpcspe, but work is
continuing on it.

Submitted by:	alfredo.junior_eldorado.org.br
Relnotes:	YES
Differential Revision:	https://reviews.freebsd.org/D20378
2019-12-27 03:54:27 +00:00
Conrad Meyer
f3bae413e9 random(9): Deprecate random(9), remove meaningless srandom(9)
srandom(9) is meaningless on SMP systems or any system with, say,
interrupts.  One could never rely on random(9) to produce a reproducible
sequence of outputs on the basis of a specific srandom() seed because the
global state was shared by all kernel contexts.  As such, removing it is
literally indistinguishable to random(9) consumers (as compared with
retaining it).

Mark random(9) as deprecated and slated for quick removal.  This is not to
say we intend to remove all fast, non-cryptographic PRNG(s) in the kernel.
It/they just won't be random(9), as it exists today, in either name or
implementation.

Before random(9) is removed, a replacement will be provided and in-tree
consumers will be converted.

Note that despite the name, the random(9) interface does not bear any
resemblance to random(3).  Instead, it is the same crummy 1988 Park-Miller
LCG used in libc rand(3).
2019-12-26 19:41:09 +00:00
Conrad Meyer
fea73412a0 sleep(9), sleepqueue(9): const'ify wchan pointers
_sleep(9), wakeup(9), sleepqueue(9), et al do not dereference or modify the
channel pointers provided in any way; they are merely used as intptrs into a
dictionary structure to match waiters with wakers.  Correctly annotate this
such that _sleep() and wakeup() may be used on const pointers without
invoking ugly patterns like __DECONST().  Plumb const through all of the
underlying sleepqueue bits.

No functional change.

Reviewed by:	rlibby
Discussed with:	kib, markj
Differential Revision:	https://reviews.freebsd.org/D22914
2019-12-24 16:19:33 +00:00
Justin Hibbits
b451cd4544 [PowerPC64] Use ld.bfd to build LIB32 and STAND - when using llvm
Summary:
This patch is to support ongoing work for replacing "GCC/BFD" by "CLANG/LLD" on
target PowerPC64 [1], by proposing a way to specify and/or locate a secondary
ld.bfd linker.
This is necessary as LLD currently doesn't support PowerPC 32 bits, so we keep
using BFD for the 32 bit stuff on PowePC64(LIB32 compatibility and
STAND/slof/loader.)

- creates LD_BFD variable pointing to ld.bfd
- use LD_BFD as linker for LIB32/compat
- Default behavior for other platforms aren't changed.

[1] https://wiki.freebsd.org/powerpc/llvm-elfv2

Submitted by:	alfredo.junior_eldorado.org.br
Reviewed by:	imp
Differential Revision: https://reviews.freebsd.org/D20261
2019-12-24 16:03:33 +00:00
Scott Long
757d4fbaa7 Introduce the concept of busdma tag templates. A template can be allocated
off the stack, initialized to default values, and then filled in with
driver-specific values, all without having to worry about the numerous
other fields in the tag. The resulting template is then passed into
busdma and the normal opaque tag object created.  See the man page for
details on how to initialize a template.

Templates do not support tag filters.  Filters have been broken for many
years, and only existed for an ancient make/model of hardware that had a
quirky DMA engine.  Instead of breaking the ABI/API and changing the
arugment signature of bus_dma_tag_create() to remove the filter arguments,
templates allow us to ignore them, and also significantly reduce the
complexity of creating and managing tags.

Reviewed by:	imp, kib
Differential Revision:	https://reviews.freebsd.org/D22906
2019-12-24 14:48:46 +00:00
Mark Johnston
c104c2990d lagg: Clean up handling of the rr_limit option.
- Don't allow an unprivileged user to set the stride. [1]
- Only set the stride under the softc lock.
- Rename the internal fields to accurately reflect their use.  Keep
  ro_bkt to avoid changing the user API.
- Simplify the implementation.  The port index is just sc_seq / stride.
- Document rr_limit in ifconfig.8.

Reported by:	Ilja Van Sprundel <ivansprundel@ioactive.com> [1]
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D22857
2019-12-22 21:56:47 +00:00
Ryan Libby
fc41af14c8 gcc9: quiet Waddress-of-packed-member for user build
Disable the warning for WARNS <= 3.  This is lame, but it's what we
already do for the clang build.

Reviewed by:	dim
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D22889
2019-12-21 02:43:49 +00:00
Ed Maste
37516d3b1b add LDNS build knob dependency on OPENSSL
Reported by:	Michael Dexter's run of the Build Options Survey
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2019-12-20 20:23:59 +00:00
Dimitry Andric
0b57cec536 Move all sources from the llvm project into contrib/llvm-project.
This uses the new layout of the upstream repository, which was recently
migrated to GitHub, and converted into a "monorepo".  That is, most of
the earlier separate sub-projects with their own branches and tags were
consolidated into one top-level directory, and are now branched and
tagged together.

Updating the vendor area to match this layout is next.
2019-12-20 19:53:05 +00:00
Simon J. Gerraty
b114e8fcd7 Tweaks for DIRDEPS_BUILD
libmagic only depend on mkmagic if not DIRDEPS_BUILD

libpmc fix -I for libpmcstat

local.dirdeps.mk be even more careful about adding gnu/lib/csu to DIRDEPS

Reviewed by:	bdrewery
Differential Revision:	https://reviews.freebsd.org/D22872
2019-12-19 02:40:04 +00:00
John Baldwin
f236a86702 Bump Dd for changes in r355866.
Pointy hat to:	jhb
MFC after:	2 weeks
2019-12-18 01:27:49 +00:00
John Baldwin
284789e871 Update the crypto(4) and crypto(9) manpages.
There are probably bits that are still wrong, but this fixes some
things at least:
- Add named arguments to the functions in crypto(9).
- Add missing algorithms.
- Don't mention arguments that don't exist in crypto_register.
- Add CIOGSESSION2.
- Remove CIOCNFSESSION.
- Clarify some stale language that assumed an fd had only one sesson.
- Note that you have to use CRIOGET and add a note in BUGS lamenting
  that one has to use CRIOGET.
- Various other cleanups.

Reviewed by:	cem (earlier version)
MFC after:	2 weeks
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D22784
2019-12-17 22:58:07 +00:00
Edward Tomasz Napierala
2cf9eb6c4e Add a hack to make ^T work for Linux binaries, enabled with
'compat.linux.preserve_vstatus=1' sysctl.

MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D21967
2019-12-16 20:15:44 +00:00
Edward Tomasz Napierala
b5f20658ee Add compat.linux.emul_path, so it can be set to something other
than "/compat/linux".  Useful when you have several compat directories
with different Linux versions and you don't want to clash with files
installed by linux-c7 packages.

Reviewed by:	bcr (manpages)
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D22574
2019-12-16 20:07:04 +00:00
Warner Losh
c0834910ca Better copyright advice
Document the common practices around copyrights with "all rights reserved" in
them as new copyright notices get added.

It's an open question qhether to point people at the fact that since the Berne
convention was ratified, All rights reserved is largely obsolete.
https://en.wikipedia.org/wiki/All_rights_reserved#Obsolescence has the
details. The committer's guide will be revised shortly, and it's likely that's a
better place for this discussion. If not, I'll add a blurb here.

Reviewed by: jhb@, brooks@
Differential Review: https://reviews.freebsd.org/D22800
2019-12-13 22:32:05 +00:00
Warner Losh
16db09d8c1 Don't use contractions. Fix the date.
Contractions cause problems for translators, so s/aren't/are not/ in the one
place this slipped through.

While here, noticed I commited with the date I did the work, not today's
date. Fix that too.

Noticed by: bjk@
2019-12-13 21:39:10 +00:00
John Baldwin
4b28d96e5d Remove the deprecated timeout(9) interface.
All in-tree consumers have been converted to callout(9).

Reviewed by:	kib, markj
Differential Revision:	https://reviews.freebsd.org/D22602
2019-12-13 21:03:12 +00:00
Warner Losh
b832a7e505 Create new wrapper function: bus_delayed_attach_children()
Delay the attachment of children, when requested, until after interrutps are
running. This is often needed to allow children to run transactions on i2c or
spi busses. It's a common enough idiom that it will be useful to have its own
wrapper.

Reviewed by: ian
Differential Revision: https://reviews.freebsd.org/D21465
2019-12-13 19:39:33 +00:00
Ryan Libby
9825eadf2c bitset: rename confusing macro NAND to ANDNOT
s/BIT_NAND/BIT_ANDNOT/, and for CPU and DOMAINSET too.  The actual
implementation is "and not" (or "but not"), i.e. A but not B.
Fortunately this does appear to be what all existing callers want.

Don't supply a NAND (not (A and B)) operation at this time.

Discussed with:	jeff
Reviewed by:	cem
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D22791
2019-12-13 09:32:16 +00:00
Conrad Meyer
5fa85bcd67 Revert r354348
Switch ARM32 default libunwind back to old GPL2 libgcc version.  Reportedly,
the llvm-libunwind code is nonfunctional.

Requested by:	mmel
2019-12-12 04:47:02 +00:00