ifconfig: Do not build geneve with WITHOUT_NETLINK_SUPPORT
geneve(4) is netlink-only, therefore, don't build it with
WITHOUT_NETLINK_SUPPORT=1 set.
Reported by: kp
Fixes: 688e289ee904 ("ifconfig: Add support for geneve (netlink)")
Differential Revision: https://reviews.freebsd.org/D55184
powerpc/intr setup: Don't check intr name for IPI
Since whether or not the irq is an IPI is passed into
powerpc_setup_intr_int(), use this as the check for IPI instead of
checking the name string.
powerpc/pmap: Add support for page sizes found on E6500
E6500 cores (MMUv2) support all powers-of-2 page sizes from 4k to 1TB,
not just powers of 4. By using the other page sizes (8k, 32k, etc) we
can save on TLB1 space, saving up to ~1/3 of used TLB1 entries.
yacc: Fix SYSTEM_NAME
This usually gets bumped by re@ when the version number changes in
sys/conf/newvers.sh, but apparently we forgot for the past two major
versions.
file: Fix a format string assertion
Reported by: Jenkins
Fixes: e75b324c93a1 ("kern_descrip.c: Clarify allocation and freeing of fd map in fdgrowtable()")
rtadvd(8): Set route info lifetime to 0 during shutdown
RFC 4191 section 3.1: if the received route's lifetime
is zero, the route is removed from the Routing Table if present.
Also, do not tell route information option is unknown.
PR: 263982
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D55448
nd6: Add support for route information (RFC 4191)
Implement RFC 4191 by handling received Router Adverisement (RA)
packets with route information option.
For default routes, use the route information's lifetime and
preference to overwrite the RA's lifetime/preference.
Also install and update more-specific route prefixes with the
option's lifetime and expire them when their lifetime elapses.
PR: 263982
Reviewed by: markj
Tested by: Marek Zarychta <zarychtam at plan-b.pwste.edu.pl>
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D55449
stand/libofw: make OF_hasprop() part of the library
Currently it is only needed by powerpc ofwfdt.c, and defined statically
there. Make it available as part of libofw, mirroring what we have in
the kernel.
Two small tweaks are made to the implementation:
1. Return type is changed to bool
2. Return 'true' when OF_getproplen() == 0. This matches the expected
semantics of the kernel version, described in OF_hasprop(9).
Reviewed by: manu, imp, adrian
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56429
pkru.3: Note that the kernel may not respect PKRU protections
There are cases where the kernel will be able to access memory covered
by a PKRU key which nomially prohibits accesses. I believe regular
copyin()/copyout() are subject to the contents of PKRU, but memory
accesses via uiomove_fromphys() will not be. This can arise when
performing fault I/O, for instance. I didn't test, but I suspect AIO is
another case.
Update the man page to acknowledge this.
Reviewed by: alc, kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D56416
pkru.3: Remove a qualifier
Now that i386 kernels are deprecated, we don't really need to mention
this limitation. It's also a bit dated since PKRU is supported with
5-level paging as well.
Reviewed by: alc, kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D56415
mlx5e: Ensure rx timestamps are monotonically increasing
The clock calibration routine currently can result in rx timestamps
jumping backwards, which can confuse the TCP stack.
Ensure they are monotonically increasing by estimating what
we'd calculate as the next timestamp and clamp the calibration
so new timestamps are no earlier in time.
Reviewed by: kib, nickbanks_netflix.com
Tested by: nickbanks_netflix.com
Differential Revision: https://reviews.freebsd.org/D56427
Sponsored by: Netflix
raspberry_virtgpio: fix OF_hasprop() usage
The function returns a bool. This driver was merged recently (by me) and
I missed this instance.
While here, adjust the ofw_bus_status_okay() call similarly. This
function still returns an int, but this usage is more widely used in our
drivers.
No functional change intended.
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Fixes: b60cd486a652 ("ofw: bool-ify OF_hasprop()")
OF_getprop.9: update OF_hasprop() signature
The return type has been converted to a bool.
Reported by: manu
Sponsored by: The FreeBSD Foundation
Fixes: b60cd486a652 ("ofw: bool-ify OF_hasprop()")
pmap: Do not use PMAP_LOCK_INIT with kernel_pmap
The kernel_pmap lock is a bit special: it does not need the DUPOK flag,
and it really belongs to a different lock class. If it belongs to the
same class as regular pmap locks, then witness may report warnings when
performing UMA allocations under a regular pmap lock, if the allocation
triggers a pmap_growkernel() call.
Replace instances of PMAP_LOCK_INIT(kernel_pmap) with inline mtx_init()
calls to silence some witness warnings for harmless behaviour I see with
some uncommitted test programs.
Reviewed by: alc, kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D56185
(cherry picked from commit c6a1c1260f02e44b7f44b1e3735ce5dbd785544d)
imgact_elf: Unconditionally initialize a variable in a note handler
In the sb == NULL case, we are computing the size of the note using a
dummy sbuf drain handler which counts bytes and discards the contents of
the buffer, so the fact that "structsize" is uninitialized doesn't
matter. But, the compiler may complain about this, so we might as well
just initialize it unconditionally to silence the warning, as other
handlers already do.
PR: 292811
MFC after: 1 week
(cherry picked from commit 8a68c2509c00ae0dbeab64064bb600cfac787a73)
freebsd32: Fix freebsd11_nstat copyout condition
freebsd11_freebsd32_nstat() invoked copyout(2) when
freebsd11_cvtnstat32() failed and skipped copyout on success. This is
backwards.
Fix this to match freebsd11_freebsd32_nlstat() and freebsd11_nstat(),
and only copy the nstat32 result to userspace when conversion succeeds.
Signed-off-by: Weixie Cui <cuiweixie at gmail.com>
Reviewed by: mhorne
MFC after: 1 week
Pull Request: https://github.com/freebsd/freebsd-src/pull/2109
(cherry picked from commit c6224994ac70b4f71ef9e11903bb2e50ed2b1bfe)
bcm2835_virtgpio: Add driver for virtual GPIO controller on some RPi models
This driver enables bcm2835-virtgpio GPIO controller found on RPi3B and
some CM boards. On which, the ACT (green) LED is connected to this
controller. It is essential for FreeBSD to have this driver to control
this LED.
It will be exposed via gpioled(4).
Reviewed by: mhorne
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D51456
(cherry picked from commit 84c68dbb59df81d5371f0d1eea888d30561d428d)
malloc.9: adjust flag table indentation
The current indentation is shorter than all but one of these flags. This
renders much more nicely.
MFC after: 3 days
(cherry picked from commit be79a42275cad21c6087d8bbd6a328735ea813fa)
conf: Mark vchiq as depending on fdt
Fix an ACPI only kernel by only building the vchiq files when FDT is
enabled.
Fixes: 745c4aa5e8f0 ("Make BRCM2837 port conform FreeBSD/ARM64 guidelines")
Sponsored by: Arm Ltd
(cherry picked from commit 7446569bbcb42c08c650a5e1015f544f13066d7f)