]>
CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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
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 )
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 )
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 )
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 )
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 )
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 )
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 .
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
Konstantin Belousov [Fri, 2 Sep 2022 14:00:56 +0000 (17:00 +0300)]
__swbuf(): style
(cherry picked from commit
120bacabfd4f383f028bb309581e2366110d0c28 )
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 )
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 )
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 )
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 )
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 )
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 )
Emmanuel Vadot [Wed, 7 Sep 2022 14:31:08 +0000 (16:31 +0200)]
Bump __FreeBSD_version after linuxkpi mfc
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
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 )
Emmanuel Vadot [Thu, 23 Jun 2022 07:53:55 +0000 (09:53 +0200)]
linuxkpi: Add mmu_context.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/D35566
(cherry picked from commit
a95f28800a0169d7cfbfb9aabc5ae9410c20ecd1 )
Emmanuel Vadot [Thu, 23 Jun 2022 07:52:37 +0000 (09:52 +0200)]
linuxkpi: Add media-bus-format.h
Provide macros 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/D35565
(cherry picked from commit
7e4f9ebeaab420b16a8041194c687e624be5b3f9 )
Emmanuel Vadot [Thu, 23 Jun 2022 07:51:34 +0000 (09:51 +0200)]
linuxkpi: Add kmemleak.h
Provide macros 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/D35564
(cherry picked from commit
8730ba418e050f622c32766562366729b4d775ad )