]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
23 months agoda.4: Add some sysctl descriptions
Felix Johnson [Sat, 10 Sep 2022 07:44:08 +0000 (09:44 +0200)]
da.4: Add some sysctl descriptions

Add descriptions for the following sysctl's:

- kern.cam.da.default_softtimeout
- kern.cam.da.disable_wp_protection
- kern.cam.da.enable_biospeedup
- kern.cam.da.enable_uma_ccbs
- kern.cam.da.poll_period
- kern.cam.da.send_ordered

While here, fix some mandocs warnings.

PR: 258727
Reported by: Felix Johnson <felix dot the dot red at gmail dot com>
Reviewed by: debdrup, pauamma, gbe
Differential Revision: https://reviews.freebsd.org/D32278

(cherry picked from commit 53af9c235f5d368ce788d99e16951a167a152bbc)

23 months agomount_nfs.8: Reword sentence so .Pa macro works
Rick Macklem [Wed, 31 Aug 2022 23:19:22 +0000 (16:19 -0700)]
mount_nfs.8: Reword sentence so .Pa macro works

Commit 603677334a64 added a sentence with a file path
in it. However, it did not use .Pa since it would leave
a space after it, where ('s) was supposed to go.

This patch rewords the sentence so that .Pa can
be used.

This is a content change.

(cherry picked from commit f46bea05fea3faf0780a9e0fb4dbeb588e32a6ea)

23 months agomount_nfs.8: Note that NFSv4 requires unique /etc/hostid's
Rick Macklem [Tue, 30 Aug 2022 14:55:32 +0000 (07:55 -0700)]
mount_nfs.8: Note that NFSv4 requires unique /etc/hostid's

Recent problems related to NFSv4 mounts has been traced
to multiple NFSv4 clients using the same /etc/hostid
(or kern.hostuuid, if you prefer).

This patch adds a sentence to the man page noting that
clients must have unique /etc/hostid's.

This is a content change.

(cherry picked from commit 603677334a6453d817df45473cedea9006b94a65)

23 months agonfscl: Add a console message for session recovery
Rick Macklem [Sun, 28 Aug 2022 21:24:39 +0000 (14:24 -0700)]
nfscl: Add a console message for session recovery

The NFSv4.1/4.2 client does recovery when it receives a
NFSERR_BADSESSION reply from the server.  If the server has
not rebooted, this is often caused by multiple clients using
the same /etc/hostid and, as such, not being recognized as
different clients by the server.

This trivial patch adds a console message to suggest that
client's /etc/hostid's need to be checked for uniqueness.

(cherry picked from commit 0685c73cfe88b94d60b1b2ddfdb36c684a008006)

23 months agonfscl: Fix setup of Sequence when all slots marked bad
Rick Macklem [Sun, 28 Aug 2022 21:36:45 +0000 (14:36 -0700)]
nfscl: Fix setup of Sequence when all slots marked bad

Commit 40ada74ee1da modified the NFSv4.1/4.2 client so
that it would issue a DestroySession to the server when
all session slots are marked bad.  Once this is done,
the Sequence operation should get a NFSERR_BADSESSION
reply from the server.

Without this patch, the code was setting ND_HASSLOTID
when, in fact, there was no slot marked in use by
nfsv4_sequencelookup().  This would result in the
code freeing a slot not in use.  The effect of this
was minimal, since the session was already destroyed.

This patch fixes the code so that it does not set
ND_HASSLOTID for this case.

(cherry picked from commit 117cea02a4dcd5757d1ed469a14110f4670dedea)

23 months agonfsd: Update console message for no session found
Rick Macklem [Sun, 28 Aug 2022 01:31:20 +0000 (18:31 -0700)]
nfsd: Update console message for no session found

The NFSv4.1/4.2 server generates a console message that indicates
that there is no session. I was until recently perplexed w.r.t. how
this could occur. It turns out that the common cause is multiple NFS
clients with the same /etc/hostid.

The host uuid is used by the FreeBSD NFSv4.1/4.2 client as a unique
identifier for the client. If multiple clients use the same host uuid,
this indicates to the NFSv4.1/4.2 server that they are the same client
and confusion occurs.

This trivial patch modifies the console message to suggest that the
client's /etc/hostid needs to be checked for uniqueness.

(cherry picked from commit b875d4f5ddcbe0ce06f22650dd471b7518546dd6)

23 months agoif_dwc: fix reinitialization with changed MAC
Jiahao LI [Thu, 8 Sep 2022 15:50:37 +0000 (12:50 -0300)]
if_dwc: fix reinitialization with changed MAC

It was observed that on RockPro64 hardware, the dwc interface is unable
to receive packets after being assigned a new MAC address. The fix is
simply to call mii_mediachg() before touching any device registers in
dwc_init_locked(). This is consistent with what the OpenBSD driver does.

PR: 263820
MFC after: 1 week

(cherry picked from commit 6501fcdc0a97faa3c59f6ece314bf7754303db6f)

23 months agobcm2835_clkman: add RPI4 compat string
Matthew Grooms [Thu, 8 Sep 2022 15:34:15 +0000 (12:34 -0300)]
bcm2835_clkman: add RPI4 compat string

This enables attachment on the RPI4, thus enabling the bcm2835_pwm
driver too. Per the device tree documentation, these compat strings are
equivalent, and no further changes to the driver are required.

https://lists.freebsd.org/archives/freebsd-arm/2021-June/000143.html

MFC after: 3 days

(cherry picked from commit 87705c5c21784c401a8d425b2780bb8b1c37d431)

23 months agorb_tree: optimize rb_insert
Doug Moore [Thu, 25 Aug 2022 07:26:04 +0000 (02:26 -0500)]
rb_tree: optimize rb_insert

In searching for where to insert a new node, RB_INSERT discards the
address of the pointer that will have to be modified, so that it must
find it again from the values of 'parent' and 'comp'. Stop discarding
that address, and so avoid having to recompute it.

Reviewed by: alc
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D36317

(cherry picked from commit b6ce129d24ffe393c43378b1c922d1e56ea2be67)

23 months agotree(3): allow the compare function to return any signed type
Gleb Smirnoff [Thu, 7 Jul 2022 05:19:08 +0000 (22:19 -0700)]
tree(3): allow the compare function to return any signed type

This allows to write very short comparison function when we are
comparing just pointer values:

return ((intptr_t)((uintptr_t)a->ptr/2 - (uintptr_t)b->ptr/2));

Reviewed by: dougm, alc
Differential revision: https://reviews.freebsd.org/D35722

(cherry picked from commit 86cdadbed44ecd36469dfbc4f1e492dfe51fcd4e)

23 months agoAdd deprecation notices for OPIE.
Dag-Erling Smørgrav [Thu, 15 Sep 2022 14:21:33 +0000 (16:21 +0200)]
Add deprecation notices for OPIE.

Differential Revision: https://reviews.freebsd.org/D36593

23 months agotail: Initialize the stat buffer used when input is stdin
Mark Johnston [Thu, 8 Sep 2022 20:21:39 +0000 (16:21 -0400)]
tail: Initialize the stat buffer used when input is stdin

PR: 266284
Reported by: Jenkins via delphij
Fixes: 7e11889959a6 ("tail: Fix -f with stdin")

(cherry picked from commit e599810ded07590708437cf58b8dd05f7cb474e5)

23 months agopf tests: test wildcard anchors
Kristof Provost [Wed, 31 Aug 2022 13:40:33 +0000 (15:40 +0200)]
pf tests: test wildcard anchors

Ensure that a wildcard anchor actually includes any nested anchors (i.e.
foo/* will call into foo/bar).

MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D36414

(cherry picked from commit d5a0bf4517c053803b266742d16be456c5393ae7)

23 months agoMFV: cherry-pick "PR/358: Fix width for -f - (jpalus)"
Xin LI [Wed, 7 Sep 2022 06:31:20 +0000 (23:31 -0700)]
MFV: cherry-pick "PR/358: Fix width for -f - (jpalus)"

PR: bin/266264
(cherry picked from commit bced4d8b3e99efd46b5496c83e11755b25913c90)

23 months agoAdd FIB_ALGO to GENERIC on amd64/arm64.
Alexander V. Chernikov [Sat, 24 Apr 2021 23:05:04 +0000 (23:05 +0000)]
Add FIB_ALGO to GENERIC on amd64/arm64.

Option `FIB_ALGO` gates new modular fib lookup functionality,
 enabling more performant routing table lookups and improving
 control plane convergence under the load.

Detailed feature description is available in D27401.

Reviewed By: olivier, gnn
Differential Revision: https://reviews.freebsd.org/D28434

(cherry picked from commit 6993187a8c30e83a408aad631a8d8629d8273c9d)

23 months agoCTL: Validate IOCTL parameters.
Alexander Motin [Wed, 7 Sep 2022 01:58:27 +0000 (21:58 -0400)]
CTL: Validate IOCTL parameters.

It was possible to cause kernel panic by passing too large args_len
or non-NULL result_nvl.

Though since the /dev/cam/ctl device is accessible only by root and
used only by limited number of tools it was not a big problem.

PR: 266115
PR: 266136
Reported by: Robert Morris <rtm@lcs.mit.edu>
MFC after: 1 week

(cherry picked from commit 0586be48a97c5af50ba4f578d33211f81cc57016)

23 months agotcp: finish SACK loss recovery on sudden lack of SACK blocks
Richard Scheffenegger [Wed, 31 Aug 2022 12:49:25 +0000 (14:49 +0200)]
tcp: finish SACK loss recovery on sudden lack of SACK blocks

While a receiver should continue sending SACK blocks for the
duration of a SACK loss recovery, if for some reason the
TCP options no longer contain these SACK blocks, but we
already started maintaining the Scoreboard, keep on handling
incoming ACKs (without SACK) as belonging to the SACK recovery.

Reported by: thj
Reviewed by: tuexen, #transport
MFC after: 2 weeks
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D36046

(cherry picked from commit c21b7b55bea2cc2bf3b420c70a9018e703ed6f00)

2 years agoRevert "tcp: finish SACK loss recovery on sudden lack of SACK blocks"
Richard Scheffenegger [Tue, 13 Sep 2022 15:28:07 +0000 (17:28 +0200)]
Revert "tcp: finish SACK loss recovery on sudden lack of SACK blocks"

This reverts commit 3d0b768cc0a07196aa6167b76b32abb928fb03be.

2 years agotcp: finish SACK loss recovery on sudden lack of SACK blocks
Richard Scheffenegger [Wed, 31 Aug 2022 12:49:25 +0000 (14:49 +0200)]
tcp: finish SACK loss recovery on sudden lack of SACK blocks

While a receiver should continue sending SACK blocks for the
duration of a SACK loss recovery, if for some reason the
TCP options no longer contain these SACK blocks, but we
already started maintaining the Scoreboard, keep on handling
incoming ACKs (without SACK) as belonging to the SACK recovery.

Reported by: thj
Reviewed by: tuexen, #transport
MFC after: 2 weeks
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D36046

(cherry picked from commit c21b7b55bea2cc2bf3b420c70a9018e703ed6f00)

2 years agosrc.conf: Introduce WITHOUT_MACHDEP_OPTIMIZATIONS knob.
Gleb Popov [Mon, 8 Aug 2022 15:16:00 +0000 (18:16 +0300)]
src.conf: Introduce WITHOUT_MACHDEP_OPTIMIZATIONS knob.

Summary:
This knob can be used to make buildsystem prefer generic C implentations of
various functions, instead of machine-specific assembler ones.

Test Plan: `make buildworld` on amd64

Reviewed by: imp, emaste

Differential Revision: https://reviews.freebsd.org/D36076

(cherry picked from commit 20adba8bc1beb125d5e5ed8f12e747ae79ca6a10)

2 years agolibpmc: add armv8 pmu-event aliases
Mitchell Horne [Wed, 6 Jul 2022 17:30:03 +0000 (14:30 -0300)]
libpmc: add armv8 pmu-event aliases

These are all "standard microarchitectural events", which in theory are
supported by every ARMv8 processor. In practice, it depends on the
pmu-event definitions being complete and accurate, which they are not
for every processor. Still, these aliases should be functional on the
majority of systems.

PR: 254532
Reported by: emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D35550

(cherry picked from commit 6f50b73ee5c11253a35bb2787f2bef627079999d)

2 years agolibpmc: import updated pmu-events for arm64
Mitchell Horne [Wed, 6 Jul 2022 17:29:55 +0000 (14:29 -0300)]
libpmc: import updated pmu-events for arm64

Thanks to the recently updated import of the jevents utility by mav@, we
can now compile the latest version of these event definitions. This
should support a wider set of common ARMv8 processors, for example, the
Cortex-A72 in the Raspberry Pi 4.

This brings this folder in sync with Linux commit 62e6eb8d5454.

Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D35549

(cherry picked from commit 9d97138e2d138bcd03dc28f45e78b13c536bed84)

2 years agomsun: Remove a double word in a source code comment
Gordon Bergling [Sat, 10 Sep 2022 10:59:10 +0000 (12:59 +0200)]
msun: Remove a double word in a source code comment

 - s/to to/to/

(cherry picked from commit 82007616d0ff186793b3b464f2708d34baa15fb5)

2 years agotools: Remove a double words
Gordon Bergling [Sat, 10 Sep 2022 10:54:33 +0000 (12:54 +0200)]
tools: Remove a double words

 - s/to to/to/
 - s/to to/to do/ in an error message

(cherry picked from commit 08cb3ac76c6e680316b561fda196e517e7bd1506)

2 years agoisp: Remove a double word in the driver manual
Gordon Bergling [Sat, 10 Sep 2022 11:03:38 +0000 (13:03 +0200)]
isp: Remove a double word in the driver manual

 - s/to to/to/

(cherry picked from commit a5beac3992fb874e57768b3c8d852a806bcb8b21)

2 years agoipf-howto: Remove a double word
Gordon Bergling [Sat, 10 Sep 2022 10:56:48 +0000 (12:56 +0200)]
ipf-howto: Remove a double word

 - s/to to/to/

(cherry picked from commit 11bc6be152e5572e289824d381c812fe90458607)

2 years agoregression-netinet: Remove a double word in a source code comment
Gordon Bergling [Sat, 10 Sep 2022 10:52:01 +0000 (12:52 +0200)]
regression-netinet: Remove a double word in a source code comment

 - s/to to/to/

(cherry picked from commit ba594e730eca14246a6c913a30b36af3126e0005)

2 years agoocs_fc(4): Remove double words in source code comments
Gordon Bergling [Sat, 10 Sep 2022 11:00:23 +0000 (13:00 +0200)]
ocs_fc(4): Remove double words in source code comments

 - s/to to/to/

(cherry picked from commit eb2f7d9a5a61588e4a218a5636cab5dd9fb8bfba)

2 years agoiscsi(4): Remove a double word in a source code comment
Gordon Bergling [Sat, 10 Sep 2022 11:04:42 +0000 (13:04 +0200)]
iscsi(4): Remove a double word in a source code comment

 - s/to to/to/

(cherry picked from commit 13604a80f7a4b0dbb2594482e233baa3f3926523)

2 years agonetinet6: Remove a double word in a source code comment
Gordon Bergling [Sat, 10 Sep 2022 11:01:44 +0000 (13:01 +0200)]
netinet6: Remove a double word in a source code comment

 - s/to to/to/

(cherry picked from commit bcb2341c7dadb1359afde776f7223fa63fd6a825)

2 years agomk: Remove a double word in a comment
Gordon Bergling [Sat, 10 Sep 2022 10:57:55 +0000 (12:57 +0200)]
mk: Remove a double word in a comment

 - s/to to/to/

(cherry picked from commit 8dcfb0282ddf28a16a29e56703009a839650e9c1)

2 years agonet80211(4): Fix a few common typos in source code comments
Gordon Bergling [Sat, 25 Sep 2021 11:57:41 +0000 (13:57 +0200)]
net80211(4): Fix a few common typos in source code comments

- s/annoucement/announcement/
- s/setings/settings/

(cherry picked from commit 2ec4c3c7f3ef7bae1d3efd314b64f493acd51642)

2 years agoigc(4): Correct the man page section
Trond Endrestol [Tue, 13 Jul 2021 13:14:24 +0000 (15:14 +0200)]
igc(4): Correct the man page section

When not specifying the man page section the man page is set to 'LOCAL'
in the header of the page.

PR: 257145
Reviewed by: gbe

(cherry picked from commit 331d4f3c0779d250292cb2d4b999bf35e32ab9d0)

2 years agoiwm(4): Remove a whitespace
Gordon Bergling [Sat, 2 Apr 2022 11:09:26 +0000 (13:09 +0200)]
iwm(4): Remove a whitespace

In 9f4dc7fd97de I accidentally added a whitespace at the
end of the line. Remove it.

Reported by: Jose Luis Duran (via github)
MFC with: 9f4dc7fd97de

(cherry picked from commit 2543276943794899eb4cc1ccab0d0235d36f2a70)

2 years agoif_clone: Fix a typo in a source code comment
Gordon Bergling [Sun, 3 Jul 2022 13:13:32 +0000 (15:13 +0200)]
if_clone: Fix a typo in a source code comment

- s/fucntions/functions/

(cherry picked from commit e8b7972cfe3ce645636e9939ec447ea7bc5bca50)

2 years agobfe(4): Fix a typo in a comment
Gordon Bergling [Sun, 27 Mar 2022 15:57:04 +0000 (17:57 +0200)]
bfe(4): Fix a typo in a comment

(cherry picked from commit f697fe65e6ba057fea8275a05a9eefb64bd28d80)

2 years agoextra_tcp_stacks: Fix two typos in source code comments
Gordon Bergling [Wed, 26 Jan 2022 17:02:55 +0000 (18:02 +0100)]
extra_tcp_stacks: Fix two typos in source code comments

- s/differnt/different/

(cherry picked from commit 9e58cca3e825bab53c9198babb102a1cda13a25f)

2 years agolibexec/rc: Add var_run rc script
Cy Schubert [Sun, 28 Aug 2022 12:48:25 +0000 (05:48 -0700)]
libexec/rc: Add var_run rc script

Users with a tmpfs /var/run will lose the directory tree state of
/var/run at reboot. This rc script will optionally (by default)
capture the state of the directory structure in /var/run prior to
shutdown and recreate it at system boot.

Alternatively a user can save the state of the /var/run directories
manually using service var_run save and disable the autosaving of
/var/run state using the var_run_autosave variable, for those
paranoid SSD users.

PR: 259585, 259699
Reported by: freebsd@walstatt-de.de,
Reviewed by: philip, gbe (previous version)
Differential Revision: https://reviews.freebsd.org/D36386

(cherry picked from commit 27b9777c28b4e9474bdc500c28d04feec48fbb84)

2 years agoipfilter: Remove unused ioctl
Cy Schubert [Tue, 6 Sep 2022 20:58:35 +0000 (13:58 -0700)]
ipfilter: Remove unused ioctl

The SIOCSTAT1 ioctl is only used in ip_auth and is unused in ip_state.
The ip_state version was likely added to support a new statistic yet
to be developed in ipfstat(8) or for some sample userspace application
(similar in fashion to the sample provided for authentication rules).
There is no need to report individual state hash table bucket lengths
to any future userspace application.

If needed for any future debugging purposes a DTrace probe would be a
better vehicle.

This unused ioctl in ip_stat results in a panic.

PR: 266124
Reported by: Robert Morris <rtm@lcs.mit.edu>

(cherry picked from commit 1f7a710ab35845049f17958c3783041c214d8a3c)

2 years agoipfilter: Remove IPL_SELECT
Cy Schubert [Fri, 25 Mar 2022 03:15:49 +0000 (20:15 -0700)]
ipfilter: Remove IPL_SELECT

IPL_SELECT was used for HP-UX >= 11.11 only. Remove this de trop code.

(cherry picked from commit 3e81ef62f9dad4bfd4acdca1963a51f9cdadb657)

2 years agousb(4): Bring back an accidently reverted grammar correction
Gordon Bergling [Wed, 7 Sep 2022 11:35:45 +0000 (13:35 +0200)]
usb(4): Bring back an accidently reverted grammar correction

- s/that that/that/

Reported by: se, danfe
MFC after: 3 days

(cherry picked from commit dfd3777085503a215632b003e917afd73e070a9a)

2 years agoRevert "usb: Remove a double words in a source code comments"
Gordon Bergling [Sun, 4 Sep 2022 15:40:25 +0000 (17:40 +0200)]
Revert "usb: Remove a double words in a source code comments"

This reverts commit 8ca67bf1273a5168f8a3787183159c477632e582.

The original comment was correct; changing it loses a key part.

Reported by: jrtc27

(cherry picked from commit 94466c432ed611a49cacae7ff99b224b37c906bb)

2 years agonet80211(4): Correct a grammar mistake in a source code comment
Gordon Bergling [Wed, 7 Sep 2022 11:13:54 +0000 (13:13 +0200)]
net80211(4): Correct a grammar mistake in a source code comment

- s/the/be the/
- s/Mhz/MHz/
- s/it'll/it will/

Reported by: bz, danfe

(cherry picked from commit d78a9076652a3ad7c93e674284b08911f9c42582)

2 years agosnd_hda: Remove duplicate erroneous HDA_INTEL_ALLKPS line
Neel Chauhan [Wed, 7 Sep 2022 18:05:01 +0000 (11:05 -0700)]
snd_hda: Remove duplicate erroneous HDA_INTEL_ALLKPS line

MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D36483

(cherry picked from commit c4e591c9abc90749f91774fda77a1a5f7ee7dad1)

2 years agosnd_hda: Add the full Intel AlderLake HD Audio PCI IDs
Neel Chauhan [Wed, 7 Sep 2022 02:35:02 +0000 (19:35 -0700)]
snd_hda: Add the full Intel AlderLake HD Audio PCI IDs

This is based off the Linux file sound/hda/intel-dsp-config.c.

Reviewed by: imp (src)
Tested on: HP Spectre x360 16-f0023dx
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D36476

(cherry picked from commit 22ecfc580b4834e3e9871944de62ce0c5ff0cd38)

2 years agorb_tree: speed-up double rotation
Doug Moore [Fri, 19 Aug 2022 23:11:29 +0000 (18:11 -0500)]
rb_tree: speed-up double rotation

RB_ROTATE_LEFT (and it symmetric twin) modify the rb-tree, adjusting
pointers so that what started as a proper tree ends up a proper
tree. When two consecutive rotations move the same node up the tree,
some of the pointers changed in the first rotation are immediately
changed again in the second - namely, the pointer from the rising node
to its new parent, and the pointer from that parent back to the rising
node. This change removes from RB_ROTATE macros the responsibility for
managing those two pointers, and leaves it to the code that calls for
rotations to fix up those pointers afterward. That drops a comparison
and a pair of assignments from every INSERT_COLOR or REMOVE_COLOR call
that ends in a double rotation.

A side-effect of this change is that the SWAP_CHILD macro must take as
a parameter a pointer to the node that is changing children, where it
is now computed from the old child. Since this macro is called in a
couple of places besides the RB_ROTATE macros, those calls are also
affected.

Reviewed by: alc
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D36266

(cherry picked from commit 02d0c43c9e53b3055b17719a184a813032040f79)

2 years agolibc/stdio: only roll FILE state back on EINTR
Konstantin Belousov [Fri, 2 Sep 2022 13:39:38 +0000 (16:39 +0300)]
libc/stdio: only roll FILE state back on EINTR

PR: 266171

(cherry picked from commit 44cf1e5eb470380442fa8e240e213a71b8fe81d4)

2 years ago__swbuf(): style
Konstantin Belousov [Fri, 2 Sep 2022 14:00:56 +0000 (17:00 +0300)]
__swbuf(): style

(cherry picked from commit 120bacabfd4f383f028bb309581e2366110d0c28)

2 years agotpm: Fix entropy harvesting logic
Kornel Dulęba [Fri, 2 Sep 2022 11:07:03 +0000 (13:07 +0200)]
tpm: Fix entropy harvesting logic

Use a taskqueue instead of a callout.
Callout functions mustn't sleep, where as the TPM driver
uses a sx lock in order to serialize accesses to the device.
Since the entropy harvesting feature is not enabled by default,
this commit should not bring any functional changes to the GENERIC
kernel.

Approved by: mw(mentor)
Sponsored by: Stormshield
Obtained from: Semihalf
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D36412

(cherry picked from commit e23ad9c4ba2d2fd235fc3dc988ca422ef4e7ca3b)

2 years agoiwn(4): Correct a typo in a kernel error message
Gordon Bergling [Sun, 4 Sep 2022 10:23:27 +0000 (12:23 +0200)]
iwn(4): Correct a typo in a kernel error message

- s/settting/setting/

(cherry picked from commit dc79640e92197b3d55174824891243dbb03e4f01)

2 years agodaemon(8): when -u option is used set USER, HOME and SHELL variables.
Maxim Sobolev [Thu, 11 Aug 2022 01:44:20 +0000 (18:44 -0700)]
daemon(8): when -u option is used set USER, HOME and SHELL variables.

This is consistent with what other uid-morphing utilities
do, i.e. jexec(1), su(1) etc.

Reviewed by:    gbe
Differential Revision:  https://reviews.freebsd.org/D36148

(cherry picked from commit 6b3ad1d737321cf6a70e957fb15d5287c378373c)

2 years agolibm: Correct some typos in source code comments
Gordon Bergling [Sat, 3 Sep 2022 17:14:02 +0000 (19:14 +0200)]
libm: Correct some typos in source code comments

- s/modfied/modified/
- s/minimun/minimum/

While here, fix some mandoc warnings:

- whitespace at end of input line
- unusual Xr punctuation
- missing comma before name

Obtained from: NetBSD

(cherry picked from commit a52f4499aec707dbe8f4f40aba1ca24ab7595834)

2 years agomlx5en(4): Correct a typo in a kernel error message
Gordon Bergling [Sat, 3 Sep 2022 17:29:33 +0000 (19:29 +0200)]
mlx5en(4): Correct a typo in a kernel error message

- s/ouput/output

(cherry picked from commit e1a40dd29427af594a733fcad7553145b4f5a7a7)

2 years agohwpmc: Avoid touching MSR_DEBUGCTLMSR inside VMs.
Alexander Motin [Thu, 1 Sep 2022 17:18:04 +0000 (13:18 -0400)]
hwpmc: Avoid touching MSR_DEBUGCTLMSR inside VMs.

At least KVM in Proxmox seems not happy about it.  Just to be safe
block it for all VMs, since it should just improve profile accuracy.

MFC after: 1 week

(cherry picked from commit 4e679d8aeaa86ce061b15c51fe9a5eae1eff7470)

2 years agoBump __FreeBSD_version after linuxkpi mfc
Emmanuel Vadot [Wed, 7 Sep 2022 14:31:08 +0000 (16:31 +0200)]
Bump __FreeBSD_version after linuxkpi mfc

2 years agolinuxkpi: unbreak linux_i2cbb
Emmanuel Vadot [Thu, 18 Aug 2022 15:34:35 +0000 (17:34 +0200)]
linuxkpi: unbreak linux_i2cbb

This is a joint work with manu.

- fixed conditions in do_i2c_transfer and i2c_transfer as linux_i2cbb
  does not set adapter->algo->master_xfer but does set
  adapter->algo_data;
- fixed parent bus specification for linux_i2cbb driver module;
- actually implemented iicbb_transfer method;
- added iicbb_pre_xfer and iicbb_post_xfer methods;
- removed unnecessary and harmful delays (and other extra logic) from
  iicbb methods as iicbb driver already has them;
- added setting of iicbb speed based on algo_data->udelay, so that iicbb
  uses correct delays;

PR: 265920
Fixes: 1961a14a4743 linuxkpi: Add i2c support
MFC after: 2 weeks
Sponsored by: Beckhoff Automation GmbH & Co. KG (manu's work)

(cherry picked from commit 6364180582b769b8fb8fba83511748af3b2c9efd)

2 years agolinuxkpi: i2c: Fix 7bit/8bit addressing
Emmanuel Vadot [Fri, 19 Aug 2022 12:37:05 +0000 (14:37 +0200)]
linuxkpi: i2c: Fix 7bit/8bit addressing

Linux is using 7 bit addressing while FreeBSD uses 8 bit addresses
internally, but i2c(8) uses 7 bit address.
This confused me when originally doing the code and I thought that
0x50 was the 8bit EDID address while it's the 7bit address and since
I did all my testing using this I didn't noticed the problem.

Reported by: avg
PR: 265920 (somewhat)

(cherry picked from commit 319a4bddb0b991377208293283a87946e4b5d055)

2 years agolinuxkpi: Add I2C_NAME_SIZE and I2C_MODULE_PREFIX defines
Emmanuel Vadot [Tue, 16 Aug 2022 12:34:20 +0000 (14:34 +0200)]
linuxkpi: Add I2C_NAME_SIZE and I2C_MODULE_PREFIX defines

Both are needed by drm-kmod

Obtained from: drm-kmod
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: //reviews.freebsd.org/D36212

(cherry picked from commit 7bf65b00c6d3ad2438e1bf40e4e76808a7bf5581)

2 years agolinuxkpi: Add linux/vgaarb.h
Emmanuel Vadot [Tue, 9 Aug 2022 09:42:43 +0000 (11:42 +0200)]
linuxkpi: Add linux/vgaarb.h

Needed by drm-kmod.

Reviewed by: bz
Obtained from: Linux
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D36104

(cherry picked from commit 4b4ab8c3107f8a95db76a7dfe50485715c8b3703)

2 years agolinuxkpi: Add video/mipi_display.h
Emmanuel Vadot [Tue, 9 Aug 2022 09:40:34 +0000 (11:40 +0200)]
linuxkpi: Add video/mipi_display.h

Needed by drm-kmod.

Reviewed by: bz
Obtained from: OpenBSD
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D36103

(cherry picked from commit 73e342328b538e5936f248c03a299884dbe22047)

2 years agolinuxkpi: acpi/video.h: Add stubs acpi_video_{register,unregister}
Emmanuel Vadot [Tue, 9 Aug 2022 09:38:13 +0000 (11:38 +0200)]
linuxkpi: acpi/video.h: Add stubs acpi_video_{register,unregister}

Needed by i915.

Reviewed by: bz
Obtained from: drm-kmod
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D36102

(cherry picked from commit afe53d7f7a9cf09c7443a979ac46f463c8f1cb17)

2 years agolinuxkpi: Add __copy_to_user_inatomic and __copy_from_user_inatomic
Emmanuel Vadot [Wed, 10 Aug 2022 06:44:14 +0000 (08:44 +0200)]
linuxkpi: Add __copy_to_user_inatomic and __copy_from_user_inatomic

Reviewed by: bz
Obtained from: drm-kmod
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D36113

(cherry picked from commit 76d93395c522e28cfa329ba57ca235929462412c)

2 years agolinuxkpi: Add add_taint stub
Emmanuel Vadot [Tue, 9 Aug 2022 13:55:19 +0000 (15:55 +0200)]
linuxkpi: Add add_taint stub

Needed by drm-kmod.

Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D36112

(cherry picked from commit bf27839aa90a4a90ef4b3e59f2a362d36f1e7051)

2 years agolinuxkpi: Add few more include in linux/kernel.h
Emmanuel Vadot [Tue, 9 Aug 2022 13:48:13 +0000 (15:48 +0200)]
linuxkpi: Add few more include in linux/kernel.h

Those are needed and also included in linux (via polution).

Reviewed by: bz
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D36111

(cherry picked from commit 4b2cb13e916218f815ee5ecc8338635c6a4f261b)

2 years agolinuxkpi: Add a bunch of dummy include
Emmanuel Vadot [Tue, 9 Aug 2022 13:34:07 +0000 (15:34 +0200)]
linuxkpi: Add a bunch of dummy include

All those are needed for drm-kmod.
Add them to base in another directory that will be append in the CFLAGS.

Reviewed by: bz
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D36110

(cherry picked from commit d4eeb02986980bf33dd56c41ceb9fc5f180c0d47)

2 years agolinuxkpi: swap.h: Fix include
Emmanuel Vadot [Tue, 9 Aug 2022 13:23:50 +0000 (15:23 +0200)]
linuxkpi: swap.h: Fix include

Add needed includes so we can use it.

Reviewed by: bz
Fixes: c3f4f28c63da ("linuxkpi: Add some basic swap functions")
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D36109

(cherry picked from commit 6d3d5653168b6c122a4858357f74dafc06e4e4ef)

2 years agolinuxkpi: Add stub kmem_cache_shrink
Emmanuel Vadot [Tue, 9 Aug 2022 12:50:04 +0000 (14:50 +0200)]
linuxkpi: Add stub kmem_cache_shrink

Needed by drm-kmod.

Reviewed by: bz
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D36108

(cherry picked from commit 35b7625ed026d8afaf3e8e27bc9d1067d38dbde6)

2 years agolinuxkpi: Add asm/processor.h
Emmanuel Vadot [Tue, 9 Aug 2022 12:21:09 +0000 (14:21 +0200)]
linuxkpi: Add asm/processor.h

Also fill the boot_cpu_data struct as drm needs it.

Reviewed by: bz
Obtained from: drm-kmod
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D36107

(cherry picked from commit b2c860060ccd6020f313f48107694ef207acfc9a)

2 years agolinuxkpi: Add dma_{un,}map_sgtable
Emmanuel Vadot [Tue, 9 Aug 2022 09:55:02 +0000 (11:55 +0200)]
linuxkpi: Add dma_{un,}map_sgtable

Variant of dma_{un,}map_sg_attrs for struct sg_table.

Reviewed by: bz
Obtained from: drm-kmod
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D36106

(cherry picked from commit 9202c95f47c2c3be8972052dc31d540924db1447)

2 years agolinuxkpi: Add linux/stackdepot.h
Emmanuel Vadot [Tue, 9 Aug 2022 09:46:01 +0000 (11:46 +0200)]
linuxkpi: Add linux/stackdepot.h

With a typedef needed by drm-kmod.

Reviewed by: bz
Obtained from: drm-kmod
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D36105

(cherry picked from commit b1c82bd4026122e2b3dc4d18005069873da6b246)

2 years agolinuxkpi: pgtable: Add more defines
Emmanuel Vadot [Tue, 9 Aug 2022 09:36:44 +0000 (11:36 +0200)]
linuxkpi: pgtable: Add more defines

Needed by drm-kmod

Reviewed by: bz
Obtained from: drm-kmod
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D36101

(cherry picked from commit fd62b3fa1e82c8de3a1abacd4587fe4142e34d96)

2 years agolinuxkpi: Add sched/mm.h
Emmanuel Vadot [Tue, 9 Aug 2022 09:30:29 +0000 (11:30 +0200)]
linuxkpi: Add sched/mm.h

With stubs needed by drm-kmod.

Obtained from: drm-kmod
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D36100

(cherry picked from commit 8828ebd6fc406520273e59807e66e24eae654f71)

2 years agolinuxkpi: Add refcount_dec_and_test
Emmanuel Vadot [Tue, 9 Aug 2022 09:03:34 +0000 (11:03 +0200)]
linuxkpi: Add refcount_dec_and_test

In Linux this takes a refcount_t argument but in linuxkpi struct kref
uses an atomic_t for the refcount and code in drm directly uses this
function with a kref so use an atomic_t here.

Reviewed by: bz
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D36099

(cherry picked from commit 1a6874e3a411c7876bee55bc631119a2e1cd09a2)

2 years agolinuxkpi: Add for_each_sgtable_{sg,page}
Emmanuel Vadot [Tue, 9 Aug 2022 08:54:19 +0000 (10:54 +0200)]
linuxkpi: Add for_each_sgtable_{sg,page}

Needed by drm-kmod.

Reviewed by: bz
Obtained from: drm-kmod
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D36098

(cherry picked from commit 4370e9f1cfce6f43f170790be96b79f3da70be13)

2 years agolinuxkpi: io.h: Only exclude armv6 and armv7 for asm/set_memory.h
Emmanuel Vadot [Mon, 8 Aug 2022 18:21:08 +0000 (20:21 +0200)]
linuxkpi: io.h: Only exclude armv6 and armv7 for asm/set_memory.h

Other arches like powerpc* needs it.

Fixes: d387a1b4b1996 ("linuxkpi: io.h: Do not include asm/set_memory.h for armv6 and armv7")
Fixes: 789dbdbb48574 ("linuxkpi: Add arch_io_{reserve,free}_memtype_wc")
Sponsored by: Beckhoff Automation GmbH & Co. KG

(cherry picked from commit 521abc32e22a74981360aa5883bb383aea9ee243)

2 years agolinuxkpi: io.h: Do not include asm/set_memory.h for armv6 and armv7
Emmanuel Vadot [Mon, 8 Aug 2022 16:54:23 +0000 (18:54 +0200)]
linuxkpi: io.h: Do not include asm/set_memory.h for armv6 and armv7

They do not have the same pmap api and this cannot work for those arch.

Fixes: 789dbdbb48574 ("linuxkpi: Add arch_io_{reserve,free}_memtype_wc")
Sponsored by: Beckhoff Automation GmbH & Co. KG

(cherry picked from commit d387a1b4b199630d76b127fded8edbcfecf5a123)

2 years agolinuxkpi: pm: Add more defines and includes
Emmanuel Vadot [Tue, 2 Aug 2022 08:49:13 +0000 (10:49 +0200)]
linuxkpi: pm: Add more defines and includes

Needed by drm-kmod.

Reviewed By: emaste, hselasky
Obtained from: drm-kmod
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D36024

(cherry picked from commit 2ff0f051498aadfe119149ae3720bef58846f3b2)

2 years agolinuxkpi: Include highmem.h in pagemap.h
Emmanuel Vadot [Tue, 2 Aug 2022 08:42:46 +0000 (10:42 +0200)]
linuxkpi: Include highmem.h in pagemap.h

Linux does the same.

Reviewed by: bz, emaste, hselasky
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D36023

(cherry picked from commit b829f450a7a3915d21031b69e83e535c1bd3248d)

2 years agolinuxkpi: Add arch_io_{reserve,free}_memtype_wc
Emmanuel Vadot [Tue, 2 Aug 2022 08:27:00 +0000 (10:27 +0200)]
linuxkpi: Add arch_io_{reserve,free}_memtype_wc

Reviewed by: hselasky
Obtained from: drm-kmod
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D36022

(cherry picked from commit 789dbdbb485749340110be550a03c6df22bc9c9c)

2 years agolinuxkpi: Add dev_info_once
Emmanuel Vadot [Tue, 2 Aug 2022 08:22:59 +0000 (10:22 +0200)]
linuxkpi: Add dev_info_once

Obtained from: drm-kmod
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D36021

(cherry picked from commit a7727e1a6d5d6120d439af222f58345b4932100c)

2 years agolinuxkpi: Add smp_mb__before/after_atomic
Emmanuel Vadot [Tue, 2 Aug 2022 08:08:33 +0000 (10:08 +0200)]
linuxkpi: Add smp_mb__before/after_atomic

Reviewed by: hselasky
Obtained from: drm-kmod
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D36020

(cherry picked from commit eca2f0f3806647f165162e6db35d1af9aba410fa)

2 years agolinuxkpi: Add trylock_page and unlock_page
Emmanuel Vadot [Tue, 2 Aug 2022 07:33:47 +0000 (09:33 +0200)]
linuxkpi: Add trylock_page and unlock_page

Simple wrapper around vm_page_trylock and vm_page_unlock.

Reviewed by: hselasky
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D36019

(cherry picked from commit d1c3cfd79da148755ef0fa51f65cd8d0d64b9a88)

2 years agolinuxkpi: Add more notifier defines
Emmanuel Vadot [Wed, 27 Jul 2022 07:55:06 +0000 (09:55 +0200)]
linuxkpi: Add more notifier defines

Needded by drm-kmod.

Reviewed by: bz, emaste, hselasky
Obtained from: drm-kmod
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D36018

(cherry picked from commit 7d2702a1983945210a1daa30b6e09ea7eb7b24d3)

2 years agolinuxkpi: errno: Add EHWPOISON
Emmanuel Vadot [Wed, 27 Jul 2022 07:50:25 +0000 (09:50 +0200)]
linuxkpi: errno: Add EHWPOISON

Needed by drm-kmod.

Reviewed by: bz, hselasky
Obtained from: drm-kmod
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D36017

(cherry picked from commit 2d4b17685fd2891ffc28590a408df4b96d218b05)

2 years agolinuxkpi: Add compat_ptr and ptr_to_compat
Emmanuel Vadot [Wed, 27 Jul 2022 07:48:32 +0000 (09:48 +0200)]
linuxkpi: Add compat_ptr and ptr_to_compat

Needed by drm-kmod.

Obtained from: drm-kmod
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D36016

(cherry picked from commit 37cda2837c004e743e9262e2e0ea409766df2a09)

2 years agolinuxkpi: Add try_cmpxchg and atomic_try_cmpxchg
Emmanuel Vadot [Wed, 27 Jul 2022 07:41:04 +0000 (09:41 +0200)]
linuxkpi: Add try_cmpxchg and atomic_try_cmpxchg

Needed by drm-kmod

Obtain from: drm-kmod
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D36015

(cherry picked from commit 39da3678b1ce2d4fac300e022e544b1db5c117c0)

2 years agolinuxkpi: Add some memset functions
Emmanuel Vadot [Tue, 26 Jul 2022 09:28:11 +0000 (11:28 +0200)]
linuxkpi: Add some memset functions

Needed by drm-kmod

Obtained from: OpenBSD
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D35943

(cherry picked from commit fa1f02baafd3d46e9d09a3715be23e96b601d9c9)

2 years agolinuxkpi: Add io.h
Emmanuel Vadot [Tue, 26 Jul 2022 08:15:45 +0000 (10:15 +0200)]
linuxkpi: Add io.h

out* arguments are different on Linux and the i915 driver uses them.

Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D35942

(cherry picked from commit 96b917bfcf2c558340f8f6e620e64efededa1daf)

2 years agolinuxkpi: Add pagevec implementation
Emmanuel Vadot [Tue, 26 Jul 2022 08:15:12 +0000 (10:15 +0200)]
linuxkpi: Add pagevec implementation

Needed by drm-kmod.

Reviewed by: hselasky
Obtained from: OpenBSD
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D35941

(cherry picked from commit a0c171328f6689fb88e3881b8b5ee61d813b8c6d)

2 years agolinuxkpi: Add linux/nospec.h
Emmanuel Vadot [Tue, 26 Jul 2022 08:13:49 +0000 (10:13 +0200)]
linuxkpi: Add linux/nospec.h

Needed by drm-kmod.

Reviewed by: hselasky
Obtained from: OpenBSD
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D35940

(cherry picked from commit aec6a64c68b9ebadeacfba3dae2348b6b6aa90e4)

2 years agolinuxkpi: Add mapping_clear_unevictable stub
Emmanuel Vadot [Tue, 26 Jul 2022 08:13:16 +0000 (10:13 +0200)]
linuxkpi: Add mapping_clear_unevictable stub

Reviewed by: hselasky
Obtained from: drm-kmod
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D35939

(cherry picked from commit 4aa82e4358c0cefffbcc30ef63bfb787ffc6030c)

2 years agolinuxkpi: pci: Add more functions needed by drm
Emmanuel Vadot [Tue, 26 Jul 2022 08:07:39 +0000 (10:07 +0200)]
linuxkpi: pci: Add more functions needed by drm

Mostly stubs to satisfy building

Reviewed by: hselasky
Obtained from: drm-kmod
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D35938

(cherry picked from commit 6890e327a86da0c268f2b21637bce4891626ada0)

2 years agolinuxkpi: math.h: Add mul_u64_u32_div and mul_u64_u32_shr
Emmanuel Vadot [Tue, 26 Jul 2022 08:06:56 +0000 (10:06 +0200)]
linuxkpi: math.h: Add mul_u64_u32_div and mul_u64_u32_shr

Needed by drm-kmod.

Reviewed by: hselasky
Obtained from: OpenBSD
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D35937

(cherry picked from commit 885ab0dba28b799c5c70923c2cb0ee162b5b75b1)

2 years agolinuxkpi: atomic: Add atomic_fetch_inc
Emmanuel Vadot [Tue, 26 Jul 2022 08:00:42 +0000 (10:00 +0200)]
linuxkpi: atomic: Add atomic_fetch_inc

Reviewed by: hselasky
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D35936

(cherry picked from commit 6be89cc88d63263b51bfb0271e2119cccbc86f16)

2 years agolinuxkpi: Add pwm.h
Emmanuel Vadot [Thu, 23 Jun 2022 08:25:23 +0000 (10:25 +0200)]
linuxkpi: Add pwm.h

Provide dummy functions needed for drm-kmod.

Reviewed by: bz
MFC after:      1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D35572

(cherry picked from commit 2b743f65f1c9352686ba0396f8ca3914a8025c4a)

2 years agolinuxkpi: Add asm/set_memory.h
Emmanuel Vadot [Thu, 23 Jun 2022 08:14:30 +0000 (10:14 +0200)]
linuxkpi: Add asm/set_memory.h

Provide functions needed for drm-kmod.

MFC after:      1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D35571

(cherry picked from commit 0e45856f9a2d4f136cbfb4091ad254d0461f4614)

2 years agolinuxkpi: Add asm/iosfmbi.h
Emmanuel Vadot [Thu, 23 Jun 2022 08:12:27 +0000 (10:12 +0200)]
linuxkpi: Add asm/iosfmbi.h

Provide dummy functions needed for drm-kmod.

Obtain from: OpenBSD (via drm-kmod)
MFC after:      1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D35570

(cherry picked from commit 137e91dbf68969ffb1762286889e2e22dd8d1118)

2 years agolinuxkpi: Add typecheck.h
Emmanuel Vadot [Thu, 23 Jun 2022 08:10:07 +0000 (10:10 +0200)]
linuxkpi: Add typecheck.h

typecheck macro check if the type of a variable matches a type.

MFC after:      1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D35569

(cherry picked from commit 631bf94fe9dffb48377061e5b95812990f687b3d)

2 years agolinuxkpi: Add pm_runtime.h
Emmanuel Vadot [Thu, 23 Jun 2022 07:59:11 +0000 (09:59 +0200)]
linuxkpi: Add pm_runtime.h

Provide dummy functions needed for drm-kmod.

Obtain from: OpenBSD (via drm-kmod)
MFC after:      1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D35568

(cherry picked from commit 456a92d5d38b498340c2ce5a0c40c84063948c33)

2 years agolinuxkpi: Add mmu_notifier.h
Emmanuel Vadot [Thu, 23 Jun 2022 07:56:04 +0000 (09:56 +0200)]
linuxkpi: Add mmu_notifier.h

Provide dummy structure needed for drm-kmod.

MFC after:      1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D35567

(cherry picked from commit cfe72b9f09f36c38702bf56388fa3e1b49da218a)