Commit Graph

270176 Commits

Author SHA1 Message Date
Warner Losh
242d6201a6 sys/alq.h: Kernel only file, mark as such
The alq interfaces are 100% in-kernel, so make this whole file #ifdef
_KERNEL. There's no users of this in the tree outside of the kernel, nor
does it define anything that could be useful at peeking into the state
of alq.

Sponsored by:		Netflix
2021-11-24 11:26:45 -07:00
Warner Losh
b194db9355 sys/acct.h: Add sys/types.h include
There's no harm in including sys/types.h here and acct.h needs it. This
file isn't defined by any standard, so what we do here wrt namespaces
likely doesn't matter. If it does, it will be easy enough to add the
necessary __BSD_VISIBLE guards in the future.

Sponsored by:		Netflix
2021-11-24 11:26:44 -07:00
Bjoern A. Zeeb
1c55b0ce1c std.nodebug: turn off net80211 debugging as well
Add IEEE80211_DEBUG to turn off some net80211 debbugging for
no-debug builds.

Sponsored by:	The FreeBSD Foundation
MFC after:	10 days
2021-11-24 18:06:20 +00:00
Alexander Motin
f29f6b2e1f ichsmb: Add PCI IDs for Intel Alder Lake SMBus controller
Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after:	2 weeks
2021-11-24 13:07:58 -05:00
Bjoern A. Zeeb
05ea7a3e5e net80211: fix -Wunused-but-set-variable warnings
Put the offending variables under the appropriate #ifdefs
(mostly IEEE80211_DEBUG, in one case IEEE80211_SUPPORT_SUPERG, and
in two cases under __notyet__ to revisit why these had been left
there but not used).

Sponsored by:	The FreeBSD Foundation
MFC after:	10 days
2021-11-24 17:39:19 +00:00
Mateusz Guzik
e052f72691 alc: plug a set-but-not-unused var in alc_init_locked
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-11-24 16:26:57 +00:00
Mateusz Guzik
ab9d2f02a0 amd_ecc_inject: return an error instead of ignoring it in tsc_modevent
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-11-24 16:25:50 +00:00
Mateusz Guzik
cfe94aa8c1 agp: plug a set-but-not-unused var in agp_intel_gtt_map_memory
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-11-24 16:25:50 +00:00
Mateusz Guzik
3279341dc5 aesni: plug a set-but-not-unused var in aesni_newsession
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-11-24 16:25:50 +00:00
Mateusz Guzik
1caaf55585 32-bit compat: plug a set-but-not-unused var in freebsd32_copy_msg_out
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-11-24 16:25:50 +00:00
Baptiste Daroussin
5abafe4aa0 bsddialog, mark the lib as dependent on ncurses 2021-11-24 16:48:44 +01:00
Andrew Turner
3ff0419450 Fix bracketing in the arm64 minidump code
When building with gcc10 it suggests the parentheses are wrong. Set them
to be the calculated physical address or'd with page table attributes.

Reviewed by:	mhorne, imp
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33099
2021-11-24 15:31:56 +00:00
Andrew Turner
dd978721a2 Remove redundant declarations
These are already defined in the same file.

Sponsored by:	The FreeBSD Foundation
2021-11-24 15:31:50 +00:00
Mateusz Piotrowski
169e06fa78 os-release: Quote variables as documented in the manual
Variables must be quoted if they contain non-alphanumeric characters.

Warner noted in the review that the lack of quoting causing problems
here is rather an edge case. I believe that it's worth adding the quotes
here anyway because this is what the specification says and there is no
good reason not to follow it.

Reviewed by:	imp
Approved by:	imp (src)
MFC after:	7 days
2021-11-24 16:17:01 +01:00
Baptiste Daroussin
1cd0117ff6 ncurses: libform is installed as libformw
Reported by:	many
2021-11-24 13:58:17 +01:00
Baptiste Daroussin
848ee2a3a8 bsddialog: actually add directories 2021-11-24 12:13:45 +01:00
Baptiste Daroussin
7d51283f70 partedit: cleanup headers
Removed dialog.h where not needed and include headers actually used
2021-11-24 12:06:34 +01:00
Baptiste Daroussin
24b05d7a61 kbdmap: use libbsddialog instead of calling dialog(1) via system(3) 2021-11-24 11:55:26 +01:00
Baptiste Daroussin
6ea39dd6c7 tzsetup: remove dedundant declaration 2021-11-24 11:12:05 +01:00
Baptiste Daroussin
f872dde34c tzsetup: replace libdialog with libbsddialog
Reviewed by: alfix86_gmail.com (bsddialog author)
Differential Revision: https://reviews.freebsd.org/D33077
2021-11-24 11:03:33 +01:00
Baptiste Daroussin
37d0601f42 bsddialog: import new TUI widget and utility
bsddialog is an attempt to write in permissive license a replacement for
libdialog.

While it is still in early stage it is good enough to already be used in
many areas, it is imported as private lib until it matures enough to be
considered as having a stable ABI
2021-11-24 11:03:31 +01:00
Baptiste Daroussin
c76f07938c Add 'contrib/bsddialog/' from commit '857c66bb5f3c5651b012beb1b5ea6ba39354ea94'
git-subtree-dir: contrib/bsddialog
git-subtree-mainline: a46722b580
git-subtree-split: 857c66bb5f
2021-11-24 11:03:17 +01:00
Baptiste Daroussin
a46722b580 ncurses: register formw as usable lib for LIBADD 2021-11-24 11:02:22 +01:00
Baptiste Daroussin
fde3fc69cd ncurses: to not create a libncursesw.a in the OBJDIR
It breaks intree partial builds for every library depending on ncurses
because ncursesw.a (built without PIC) will be the first the library
path for the linker to resolve -lncursesw
2021-11-24 11:02:22 +01:00
Warner Losh
a2b53e53a3 sys/file.h: Allow inclusion when compiling for a strict namespace
Although not part of the standard, this file is sometimes included with
-D_POSIX_C_SOURCE=<value> or -D_XOPEN_SOURCE=<value>. Limit those
sturctures that use types hidden by __BSD_VISIBLE to when they are
visible.

PR:			259975, 234205
Sponsored by:		Netflix
2021-11-24 02:38:09 -07:00
Warner Losh
b3fab41830 devctl.h: Spelling typo
Spell identifier correctly. While I'm here, further simplify.

Fixes:		ee2c52fd3f
Sponsored by:	Netflix
2021-11-24 02:37:51 -07:00
Warner Losh
1bc9ca3b35 cam: Unbreak CAM_IO_STATS build
Fixes:		6637b74600
Sponsored by:	Netflix
2021-11-24 02:36:48 -07:00
Baptiste Daroussin
857c66bb5f bsddialog: import snapshot as of 2021-11-24 2021-11-24 09:46:56 +01:00
Hubert Mazur
26d6547567 Pcf85063: Add RTC driver
Add driver for pcf85063 real time clock. Register set and get time
methods. Parse data obtained from bus according to specification
and fill kernel structures.

Obtained from: Semihalf
Sponsored by: Alstom Group
Differential revision: https://reviews.freebsd.org/D32817
2021-11-24 07:40:38 +01:00
Hubert Mazur
cb35af13f9 TCA6408: Add driver for tca6408 gpio expander
Driver for tca6408 gpio expander over i2c bus. Expose API for
manipulating pin's direction, state and polarity inversion.

Obtained from: Semihalf
Sponsored by: Alstom Group
Differential revision: https://reviews.freebsd.org/D32819
2021-11-24 07:40:38 +01:00
Kornel Duleba
0f84feb9fb felix: Add support for PHY interrupts
- Replace miibus with newly created miibus_fdt.
- Use generic passthrough resource allocation devmethods.

Obtained from: Semihalf
Sponsored by: Alstom Group
2021-11-24 07:40:37 +01:00
Kornel Duleba
6802a86cb0 enetc: Add support for PHY interrupts
- Replace miibus with newly created miibus_fdt.
- Use generic passthrough resource allocation devmethods.

Obtained from: Semihalf
Sponsored by: Alstom Group
2021-11-24 07:40:37 +01:00
Kornel Duleba
89595c1791 vscphy: Add support for PHY interrupts
They're allocated using standard newbus API,
which means that we rely on miibus to handle the allocation.
Add VSC8504 to the list of supported PHYs, as it is similar enough
to the VSC8501 that is already supported by this driver.

Obtained from: Semihalf
Sponsored by: Alstom Group
Differential revision: https://reviews.freebsd.org/D32816
2021-11-24 07:40:37 +01:00
Kornel Duleba
0c9156faec Introduce DP83822 PHY driver
DP83822 is a 10/100 Texas Instruments PHY.
Link status change interrupts are supported by the driver,
however not all boards have the PHY interrupt wired.
Because of that if failure to allocate an IRQ is not treated as an error.

Obtained from: Semihalf
Sponsored by: Alstom Group
Differential revision: https://reviews.freebsd.org/D32815
2021-11-24 07:40:36 +01:00
Kornel Duleba
e85c94b8d6 Introduce DP83867 PHY driver
DP83867 is a 10/100/1000 Texas Instruments PHY.
Only SGMII mode is supported.
Link status changes can be checked through an interrupt generated by the PHY,
if available

Obtained from: Semihalf
Sponsored by: Alstom Group
Differential revision: https://reviews.freebsd.org/D32813
2021-11-24 07:40:36 +01:00
Kornel Duleba
9174eab414 miibus: Add support for mapping OFW nodes to PHY devices
Create a new miibus OFW specific layer leveraging miibus_fdt.c code.
PHY drivers can than read the properties using device_get_property(9) API.
Resource(interrupt) allocation is also supported.
In order to enable this each NIC/switch driver will have to be modified,
because of how miibus is attached to the parent driver.

Obtained from: Semihalf
Sponsored by: Alstom Group
Differential revision: https://reviews.freebsd.org/D32812
2021-11-24 07:40:36 +01:00
Kornel Duleba
89fb4802f9 vscphy: Fill in new mii_maxspeed field
It is used to limit the max advertised speed.
The value is read from DT by mii_fdt code.

Obtained from: Semihalf
Sponsored by: Alstom Group
Differential revision: https://reviews.freebsd.org/D32816
2021-11-24 07:40:35 +01:00
Kornel Duleba
b38de28a77 mii_physubr: Add support for limiting PHY max speed
In some cases we might want to limit the max speed advertised below of what
the PHY is capable of.
This is usually the case when we connect 1G capable PHY to 100M MAC, or when
some exotic physical connection is used.
Add a new mii_maxspeed field to mii_softc and parse it in mii_phy_dev_attach.
Speed limit is normally located in DT.
The property is already parsed in mii_fdt.c, but its value still has to be
passed by the PHY driver.

Obtained from: Semihalf
Sponsored by: Alstom Group
Differential revision: https://reviews.freebsd.org/D32727
2021-11-24 07:40:35 +01:00
Warner Losh
6637b74600 cam: Remove all the write-only variables
Delete all the write only variables in CAM. At worst, the only behavior
change would be to prevent core dumps from chasing NULL pointers (though
I think in all these cases the pointers can't be NULL).

Sponsored by:		Netflix
2021-11-23 21:21:18 -07:00
Warner Losh
09f1ead230 Fix copyright to be like all my others in the tree 2021-11-23 21:21:18 -07:00
Warner Losh
ee2c52fd3f sys/devctl.h: Only declare kernel functions in kernel.
Also, while I'm here, switch to newer, shorter format and fix my
copyright to match the others in the tree.

Sponsored by:		Netflix
2021-11-23 21:21:18 -07:00
Warner Losh
76d6bb6a6e powerpc: Make machine/reg.h self-contained
Make powerpc*'s machine/reg.h self-contained so that sys/reg.h can be
self-contained.

Sponsored by:		Netflix
2021-11-23 21:21:18 -07:00
Warner Losh
d2bf8c544a riscv: Make machine/regs.h self-contained
Make sys/reg.h self-contained by making riscv's machine/reg.h
self-contained.

Sponsored by:		Netflix
2021-11-23 21:21:17 -07:00
Warner Losh
8ee8271e22 arm64: Make machine/reg.h self contained
Make sys/reg.h includable on aarch64 by making machine/reg.h
self-contained: Include sys/_types.h and use __uint* instead of uint*.

Sponsored by:		Netflix
2021-11-23 21:21:17 -07:00
Warner Losh
b57e0aa4ef arm: Make machine/reg.h self-contained
Allow inclusion of sys/reg.h w/o pre-requisites by making arm's machine/reg.h
self-contained.

Sponsored by:		Netflix
2021-11-23 21:21:17 -07:00
Ed Maste
c0aa5f6a32 mgb: remove set but not used variables
Sponsored by:	The FreeBSD Foundation
2021-11-23 20:56:53 -05:00
Piotr Kubaj
3a60869237 Add assembly optimized code for OpenSSL on powerpc, powerpc64 and powerpc64le
Summary:
1. 34ab13b7d8
needs to be merged for ELFv2 support on big-endian.
2. crypto/openssl/crypto/ppccap.c needs to be patched.
Same reason as in https://github.com/openssl/openssl/pull/17082.

Approved by:	jkim, jhibbits
MFC after:	1 month
Differential Revision: https://reviews.freebsd.org/D33076
2021-11-23 23:26:53 +01:00
Eric Joyner
9cf1841c4a
ice(4): Update to version 0.29.4-k
Includes various feature improvements and bug fixes.

Notable changes include:
- Firmware logging support
- Link management flow changes
- New sysctl to report aggregated error counts
- Health Status Event reporting from firmware (Use the new read-only
  tunables hw.ice.enable_health_events / dev.ice.#.enable_health_events
  to turn this off)

Signed-off-by: Eric Joyner <erj@FreeBSD.org>

Sponsored by:	Intel Corporation
2021-11-23 14:09:29 -08:00
Warner Losh
afc5ab870d Basic signal tests: Can we deliver a signal?
Basic signal tests that tests can we deliver a signal via raise() and
can we deliver one via SIGALARM asynchronously.

In addition, tests whether or not on ARM T32 (Thumb) code can interrupt
A32 (normal) and vice versa.

While this test is aimed at ensuring basic qemu signals are working,
it's good to have in the base.

Sponsored by:		Netflix
Discussed with:		kevans, cognet
Differential Revision:	https://reviews.freebsd.org/D33078
2021-11-23 13:37:14 -07:00
Warner Losh
9109192197 kqueue: Define older kqueue event types better
struct kqueue is designed to live in a restricted namespace, but the
older compat versions are not. Shift to using unsigned short instead
of u_short, unsigned int instead of u_int and the __*int*_t types
instead of the unprefiexed versions.

Sponsored by:		Netflix
Reviewed by:		brooks
Differential Revision:	https://reviews.freebsd.org/D33056
2021-11-23 13:29:24 -07:00