Commit Graph

1235652 Commits

Author SHA1 Message Date
WANG Rui
90868ff9ca LoongArch: Enable initial Rust support
Enable initial Rust support for LoongArch.

Tested-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: WANG Rui <wangrui@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2024-01-17 12:43:00 +08:00
WANG Rui
f58b0abae8 scripts/min-tool-version.sh: Raise minimum clang version to 18.0.0 for loongarch
The existing mainline clang development version encounters difficulties
compiling the LoongArch kernel module. It is anticipated that this issue
will be resolved in the upcoming 18.0.0 release. To prevent user
confusion arising from broken builds, it is advisable to raise the
minimum required clang version for LoongArch to 18.0.0.

Suggested-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Acked-by: Nick Desaulniers <ndesaulniers@google.com>
Link: https://github.com/ClangBuiltLinux/linux/issues/1941
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: WANG Rui <wangrui@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2024-01-17 12:43:00 +08:00
WANG Xuerui
2772ae4d66 modpost: Ignore relaxation and alignment marker relocs on LoongArch
With recent trunk versions of binutils and gcc, alignment directives are
represented with R_LARCH_ALIGN relocs on LoongArch, which is necessary
for the linker to maintain alignment requirements during its relaxation
passes. And even though the kernel is built with relaxation disabled, so
far a small number of R_LARCH_RELAX marker relocs are still emitted as
part of la.* pseudo instructions in assembly. These two kinds of relocs
do not refer to symbols, which can trip up modpost's section mismatch
checks, because the r_offset of said relocs can be zero or any other
meaningless value, eventually leading to a `from == NULL` condition in
default_mismatch_handler and SIGSEGV.

As the two kinds of relocs are not concerned with symbols, just ignore
them for section mismatch check purposes.

Signed-off-by: WANG Xuerui <git@xen0n.name>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2024-01-17 12:42:59 +08:00
Linus Torvalds
0dd3ee3112 Linux 6.7 2024-01-07 12:18:38 -08:00
Linus Torvalds
52b1853b08 Improve the detection when to run atomic transfer handlers for kernels
with preemption disabled. This removes some false positive splats a
 number of users were seeing if their driver didn't have support for
 atomic transfers. Also, fix a typo in the docs while we are here.
 -----BEGIN PGP SIGNATURE-----
 
 iQJDBAABCgAtFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmWZUukPHHdzYUBrZXJu
 ZWwub3JnAAoJEBQN5MwUoCm2XUMP/Rm/6oiH7ASUOKpmLi42a68llEJuBCkK8oPW
 PmO/QmuTc6K1rDE6ehmBgTNeBQDkI7NdrUViu7xel1G0p57q5rZCdxl/BV7qmGjv
 aq46Y3omw06UybqceVlmx8NJe9r7+HXh+qJJ0UXg/+uA9VKd0jaiGo40wQjR6AxA
 Ow92+p6rUcFDGpEdXFRQJnov8p7GnCGRKumA593goju+sJRUVozjz0nifTVqdyA5
 +L3V02j5INx285sAngTPSHSn2vd0arxwumXKYusehfUtytzkI0RmBWebfqxbg5QE
 7WRnqtHe5aR78gr1RWWo/pI91yTtlfslGhj7uFQxcPpkKkyD57Z17N8rxS+u3rwH
 xAwvYG7CiWygee+q2RTDFmz49FNxRCeB3O5cjPp1Imco6MVG5ZOwZjIjn3CkDyvi
 CGQD8vXdiDfRBDSCI25XdORNsTBzrhSBAs412xGo3waflvgowtw076FYpXfNnAmZ
 z79lIlrR+Hg7ynZBs3qcjVOXvaj8rzXiLkfFWrBihGfbzVOTJv9cfetEpYcOcSaw
 Ae/wC3TKhvowdaFr43wYJrIsni93xdsCjHeIwQYozKbD6iiKWymwxzhWRDTM0cjP
 eSifFBoa1mzVqUNzSVzCHFbdKV0nlhZqxpZGrsTKhUm2EU0934sb9hBvn8o1weaR
 WRl0sHoU
 =LZdW
 -----END PGP SIGNATURE-----

Merge tag 'i2c-for-6.7-final' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c fixes from Wolfram Sang:
 "Improve the detection when to run atomic transfer handlers for kernels
  with preemption disabled. This removes some false positive splats a
  number of users were seeing if their driver didn't have support for
  atomic transfers.

  Also, fix a typo in the docs while we are here"

* tag 'i2c-for-6.7-final' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: core: Fix atomic xfer check for non-preempt config
  Documentation/i2c: fix spelling error in i2c-address-translators
2024-01-06 11:35:37 -08:00
Benjamin Bara
a3368e1186 i2c: core: Fix atomic xfer check for non-preempt config
Since commit aa49c90894 ("i2c: core: Run atomic i2c xfer when
!preemptible"), the whole reboot/power off sequence on non-preempt kernels
is using atomic i2c xfer, as !preemptible() always results to 1.

During device_shutdown(), the i2c might be used a lot and not all busses
have implemented an atomic xfer handler. This results in a lot of
avoidable noise, like:

[   12.687169] No atomic I2C transfer handler for 'i2c-0'
[   12.692313] WARNING: CPU: 6 PID: 275 at drivers/i2c/i2c-core.h:40 i2c_smbus_xfer+0x100/0x118
...

Fix this by allowing non-atomic xfer when the interrupts are enabled, as
it was before.

Link: https://lore.kernel.org/r/20231222230106.73f030a5@yea
Link: https://lore.kernel.org/r/20240102150350.3180741-1-mwalle@kernel.org
Link: https://lore.kernel.org/linux-i2c/13271b9b-4132-46ef-abf8-2c311967bb46@mailbox.org/
Fixes: aa49c90894 ("i2c: core: Run atomic i2c xfer when !preemptible")
Cc: stable@vger.kernel.org # v5.2+
Signed-off-by: Benjamin Bara <benjamin.bara@skidata.com>
Tested-by: Michael Walle <mwalle@kernel.org>
Tested-by: Tor Vic <torvic9@mailbox.org>
[wsa: removed a comment which needs more work, code is ok]
Signed-off-by: Wolfram Sang <wsa@kernel.org>
2024-01-06 14:10:10 +01:00
Linus Torvalds
95c8a35f1c 12 hotfixes. 2 are cc:stable and the remainder either address post-6.7
issues or aren't considered necessary for earlier kernel versions.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQTTMBEPP41GrTpTJgfdBJ7gKXxAjgUCZZhbAwAKCRDdBJ7gKXxA
 jiFeAQD20H8wGT9hbMUYr/PxE4rOxyDXlhnv/mZ0Av3neve4SQD/YlgCFWYpEu8G
 F5rEAtq89UYE13qlgS3o9KjYOPzhtgQ=
 =vZ0P
 -----END PGP SIGNATURE-----

Merge tag 'mm-hotfixes-stable-2024-01-05-11-35' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Pull misc mm fixes from Andrew Morton:
 "12 hotfixes.

  Two are cc:stable and the remainder either address post-6.7 issues or
  aren't considered necessary for earlier kernel versions"

* tag 'mm-hotfixes-stable-2024-01-05-11-35' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
  mm: shrinker: use kvzalloc_node() from expand_one_shrinker_info()
  mailmap: add entries for Mathieu Othacehe
  MAINTAINERS: change vmware.com addresses to broadcom.com
  arch/mm/fault: fix major fault accounting when retrying under per-VMA lock
  mm/mglru: skip special VMAs in lru_gen_look_around()
  MAINTAINERS: hand over hwpoison maintainership to Miaohe Lin
  MAINTAINERS: remove hugetlb maintainer Mike Kravetz
  mm: fix unmap_mapping_range high bits shift bug
  mm: memcg: fix split queue list crash when large folio migration
  mm: fix arithmetic for max_prop_frac when setting max_ratio
  mm: fix arithmetic for bdi min_ratio
  mm: align larger anonymous mappings on THP boundaries
2024-01-05 13:46:18 -08:00
Linus Torvalds
0d3ac66ed8 nfsd-6.7 fixes:
- Fix another regression in the NFSD administrative API
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEKLLlsBKG3yQ88j7+M2qzM29mf5cFAmWYCHIACgkQM2qzM29m
 f5c7FRAAoXVRhP/vyua6PcfF8Je0bg83fhvqG8ppbLE6EjFzbMM7fZ9G5MudtY7/
 w4PuDJ8rhQFl8oQTy004qkqV3JfZGo7buCumKoj8IA8m67cQ0WyB6Lz1fSW9BGHq
 cc0PWQR/z88laRvCPViW+jOsLx5f+VvvyEsDUvEYdG6xXtTVhDfNxYQFPc3bRfd0
 Sf5cPBuBbMAlz9PZm/c276y46rkBP3+2ONx+zHz0k/ZR/EgJ0RoxmzZIrAUguCRy
 fAUW0xvrAuTMY6LMb/0YyKH6IOqYoImKWMGjhi0VFFG5AuxbmU7lLVo/S9tUlWMs
 aAcyEtyuVU1422dikF/FRtstswfz64fj+PqIwiq8qjt14WB+BX/tV1tjwAjuI2py
 YVt9T50FkhG42IG+Nkub7SXm6OuinfiUBcAilPMfBnSapT5l6BvVwrSXGIApcF87
 NmQvRqjO4tEYE6/aYsUV/jZGQVYPTspvhv5kzXMQnL/6h/KlhrNLvTF9gTJFs+xM
 ahY7I2nVmXayoLfrweaWX/a1VNMeYLvVOUPqm/DFiWWw51TqkmD8CHQwCsBiR0i9
 iVu10eh0x9gakPBDVFuCLG+BOL+vsUxfgbeAOJdHYC0s78YLRovyFsDTHxRNv7hW
 hDp+eblGUb+v5kNPbEZJKMmWXCwivOHnacc2EJyA1UcGRLL7I24=
 =TKjN
 -----END PGP SIGNATURE-----

Merge tag 'nfsd-6.7-3' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux

Pull nfsd fix from Chuck Lever:

 - Fix another regression in the NFSD administrative API

* tag 'nfsd-6.7-3' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux:
  nfsd: drop the nfsd_put helper
2024-01-05 13:12:29 -08:00
Linus Torvalds
a4ab2706bb firewire fixes for 6.7-final
This pull request includes a single patch to suppress unexpected system
 reboot in AMD Ryzen machines with PCIe card consisting of Asmedia
 ASM1083/1085 and VT6306/6307/6308. When 1394 OHCI driver for the card
 accesses to a specific register in PCI memory space, the system reboot
 often occurs. The issue affects all versions of Linux kernel as long as
 the 1394 OHCI driver is included. The mechanism of unexpected system
 reboot is not clear, so the driver is changed to avoid the access itself
 when detecting the combination of hardware.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQE66IEYNDXNBPeGKSsLtaWM8LwEwUCZZf7jQAKCRCsLtaWM8Lw
 E7D2AP9JXU29+5HRNDYBonC1tEItRK8auF+wbAOe7HcOjRXoUgEA2ghLbA6I2bot
 iQ/VjH/45TPyo7YAfLw1Kx+vpaysIwU=
 =EGMc
 -----END PGP SIGNATURE-----

Merge tag 'firewire-fixes-6.7-final' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394

Pull firewire fix from Takashi Sakamoto:
 "A single patch to suppress unexpected system reboot in AMD Ryzen
  machines with PCIe card consisting of Asmedia ASM1083/1085 and
  VT6306/6307/6308.

  When the 1394 OHCI driver for the card accesses a specific register
  in PCI memory space, the system reboot often occurs.

  The issue affects all versions of Linux kernel as long as the 1394
  OHCI driver is included. The mechanism of unexpected system reboot is
  not clear, so the driver is changed to avoid the access itself when
  detecting the combination of hardware"

* tag 'firewire-fixes-6.7-final' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394:
  firewire: ohci: suppress unexpected system reboot in AMD Ryzen machines and ASM108x/VT630x PCIe cards
2024-01-05 12:26:26 -08:00
Linus Torvalds
6c23529c08 MMC core:
- Fix path when releasing the host by canceling the delayed work
  - Fix pause retune on all RPMB partitions
 
 MMC host:
  - meson-mx-sdhc: Fix HW hang during card initialization
  - sdhci-sprd: Fix eMMC init failure after HW reset
 -----BEGIN PGP SIGNATURE-----
 
 iQJLBAABCgA1FiEEugLDXPmKSktSkQsV/iaEJXNYjCkFAmWXzxQXHHVsZi5oYW5z
 c29uQGxpbmFyby5vcmcACgkQ/iaEJXNYjCnUiA/+Nirp2Jemjr/UqAvs4+yh++Ib
 wRaUtvPaZbGxB1JTPoGG5s5S8WZfz1neSax8xS++/A/PVFtpSDnNtUiY6YIZ4TPm
 E2PkhsCPDkgYfPtikMmzJbRvrh60EhdaWfd4A8BT/SsZnJxJHAwpvc5a3ayxbYxj
 TreNbnzK0JidJxaEtZQpjZ9fSxViMQ8OB04QpiWG2c5tXlgEJDX8R76nv5/4pdTK
 3y3jcy1FztUz0vAkAbQ0qvaP32PlJZ1Yei5mToHLOE0cYgwdtSfgYt89jT1GeePZ
 fiBS6ODURh5npZeS55DWq8lgQRbEzJxuDQcZgYoa85ZO5MDRFOlYdGdyvDB458s4
 HqUvZyO5aMIMwREXDXixynZj4WVde1XYDUGRoWu3N/pjfB/qVIMry+cTSNeGobhk
 yHvS3WCROXG3/wy4Nb5QN7r6UogaIoxITINP5vCgHpxUW8c1tYes/NmL05joeHUT
 61dxsXrIGMGMQaTeUuC6CTqbzhG/xOYLo51K8jVnAKshJsZlGdPj3tIyND4Xo4Mm
 MuVfCtEr7vyMwBjkOF2nDTdj5Kn67jmuNXY9zf6NNN+bgYcWC3zvrRk+OiVzz8mF
 MkjbIadWLJ2J5gpQtjYFpKs4oAUPth0wHiVI9c5mXhVR3qapA9v7kOTXycWUVrfu
 mO5oaJvuBzM3DSlwTJw=
 =SfSL
 -----END PGP SIGNATURE-----

Merge tag 'mmc-v6.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc

Pull MMC fixes from Ulf Hansson:
 "MMC core:
   - Fix releasing the host by canceling the delayed work
   - Fix pause retune on all RPMB partitions

  MMC host:
   - meson-mx-sdhc: Fix HW hang during card initialization
   - sdhci-sprd: Fix eMMC init failure after HW reset"

* tag 'mmc-v6.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
  mmc: sdhci-sprd: Fix eMMC init failure after hw reset
  mmc: core: Cancel delayed work before releasing host
  mmc: rpmb: fixes pause retune on all RPMB partitions.
  mmc: meson-mx-sdhc: Fix initialization frozen issue
2024-01-05 12:12:33 -08:00
Linus Torvalds
2b5bd1498d drm fixes for 6.7 final (part 2 - correct version)
amdgpu:
 - DP MST fix
 - SMU 13.0.6 fixes
 - Fix displays on macbooks using vega12
 - Fix VSC and colorimetry on DP/eDP
 
 nouveau:
 - fix deadlock between fence signalling and irq paths
 - fix GSP memory leaks
 - fix GSP leftover debug
 - hide some GSP callback messages
 - fix GSP display disable path
 - fix GSP ACPI interaction
 - handle errors in ctrl messages
 - use errors info to fix DP link training
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEEKbZHaGwW9KfbeusDHTzWXnEhr4FAmWXdSIACgkQDHTzWXnE
 hr5kOhAAlmRnc42SX802l+pLwP4uxFMySPVRRhrX0bfldwRdE5OnxuC0c86Foi3Z
 31AiQnq+oJJ35TuArwe4ktDehurkOIan3BBzQ3x62tJbx7GQzK69L5XwhRc6Hicd
 jLnMeQzKbCofG5MvnpcWLYlOYmYHjb4lluB1SAtngBRuueXZPBuhGQ+PvVNfK/mk
 1Wq2767P8xwzLBBqlF3j7+2N7iU5t2VEtjlgYYNYQI2wx3/GDVUrSUk64o+5wBAX
 Bw3yZ1lHuSV5Nczd2KKLxUoXAocqpn0GbVscD6TQ2i5m1ZHUMC6Fn1ijZHLSAqD2
 XIICUxOI0ieTREDeA8xTKUHGhz5db9QFfxE7zgZPSKvWeiL4y0gJZ0MxyoPIPTWK
 7WbPzHAQxI3iQeeOqcAbW4juIsXSAuhq6Ex8SP0lZ2O1ZGsLd3FVoy7i/xWr14ui
 LtOCMS9D5oK4aC+ZOo41LZZY4TgdLQ22EBbEnKChQi4Rt7t/++1hj/PmEE6vLigW
 WFk67tqAQFuA1kZfjnIu9/Oft+wMwD7/b29PjTCOdsi7c21gmOSWONjj8Xvd1NbK
 7WhRC5DZX6pgFHjb7jRqYxqa70IL91VzfUqAt63PSNv+/joP8r06Bqoi1tyUfxkJ
 8yPrWleT8f+skE2zkHwsw8UUqR5eKbTek8aeS0Mp5udNQZYB2dg=
 =94nf
 -----END PGP SIGNATURE-----

Merge tag 'drm-fixes-2024-01-05' of git://anongit.freedesktop.org/drm/drm

Pull more drm fixes from Dave Airlie:
 "The amdgpu ones are fairly normal, the one that is a bit large is a
  fix for a newly introduced IP in 6.7 so unlikely to cause regressions.

  The nouveau ones are mostly memory leaks and debugging cleanups from
  the GSP (new nvidia firmware) enablement. There are some GSP changes
  to the message passing code and a subsequent fix for eDP panel turn
  on, that means my laptop can turn on the panel in GSP mode. These are
  fairly low chance of disrupting things since GSP is new in 6.7. The
  final not all in GSP fix is a deadlock seen with i915/nouveau when GSP
  is used where the the fence and irq paths have locking inversions,
  I've pushed some irq enablement out to a workqueue, and this has seen
  some fairly decent testing.

  amdgpu:
   - DP MST fix
   - SMU 13.0.6 fixes
   - fix displays on macbooks using vega12
   - fix VSC and colorimetry on DP/eDP

  nouveau:
   - fix deadlock between fence signalling and irq paths
   - fix GSP memory leaks
   - fix GSP leftover debug
   - hide some GSP callback messages
   - fix GSP display disable path
   - fix GSP ACPI interaction
   - handle errors in ctrl messages
   - use errors info to fix DP link training"

* tag 'drm-fixes-2024-01-05' of git://anongit.freedesktop.org/drm/drm:
  drm/nouveau/dp: Honor GSP link training retry timeouts
  nouveau: push event block/allowing out of the fence context
  nouveau/gsp: always free the alloc messages on r535
  nouveau/gsp: don't free ctrl messages on errors
  nouveau/gsp: convert gsp errors to generic errors
  drm/nouveau/gsp: Fix ACPI MXDM/MXDS method invocations
  nouveau/gsp: free userd allocation.
  nouveau/gsp: free acpi object after use
  nouveau: fix disp disabling with GSP
  nouveau/gsp: drop some acpi related debug
  nouveau/gsp: add three notifier callbacks that we see in normal operation (v2)
  drm/amd/pm: Use gpu_metrics_v1_5 for SMUv13.0.6
  drm/amd/pm: Add gpu_metrics_v1_5
  drm/amd/pm: Add mem_busy_percent for GCv9.4.3 apu
  drm/amd/display: Fix sending VSC (+ colorimetry) packets for DP/eDP displays without PSR
  drm/amdgpu: skip gpu_info fw loading on navi12
  drm/amd/display: add nv12 bounding box
  drm/amd/pm: Update metric table for jpeg/vcn data
  drm/amd/pm: Use separate metric table for APU
  drm/amd/display: pbn_div need be updated for hotplug event
2024-01-05 12:02:20 -08:00
Tetsuo Handa
7fba9420b7 mm: shrinker: use kvzalloc_node() from expand_one_shrinker_info()
syzbot is reporting uninit-value at shrinker_alloc(), for commit
307bececcd ("mm: shrinker: add a secondary array for
shrinker_info::{map, nr_deferred}") which assumed that the ->unit was
allocated with __GFP_ZERO forgot to replace kvmalloc_node() in
expand_one_shrinker_info() with kvzalloc_node().

Link: https://lkml.kernel.org/r/9226cc0a-10e0-4489-80c5-58c3b5b4359c@I-love.SAKURA.ne.jp
Reported-by: syzbot <syzbot+1e0ed05798af62917464@syzkaller.appspotmail.com>
Closes: https://syzkaller.appspot.com/bug?extid=1e0ed05798af62917464
Fixes: 307bececcd ("mm: shrinker: add a secondary array for shrinker_info::{map, nr_deferred}")
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Acked-by: Qi Zheng <zhengqi.arch@bytedance.com>
Cc: Muchun Song <songmuchun@bytedance.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-01-05 09:58:32 -08:00
Linus Torvalds
6d0dc8559c ARM: SoC fixes for 6.7, part 3
These are two correctness fixes for handing DT input in the Allwinner
 (sunxi) SMP startup code.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmWYEHsACgkQYKtH/8kJ
 UicbzhAAjO5EfKY506Uj6h/JrNc3Te70qpRCCayq9w7oO4oWABEDbQNWRaw2pWDY
 /HCreQN1369adEnEKk03RLgL62HlbDfLdy5i69hQNy6itvHg8Id/3xX5NKfsu5yz
 gsqc4hBtOw31D+TsS0LI/q2k9lW5Ob1F7/iObxXBQUaQoHEe+SYnAPPJbP388Ro5
 Ae/5Y9fKvVHZ14EmzdU5vha8qyY2I3CFpWegf3ca99yE0S46kSlXwOblNJ/600Lr
 mrrcq90/qAuOAfYsU8U1KwkLpHFPgFe9l2v/xxqYxytNufeW5lvU083Fx+NZcybt
 KJrENFPm6Jsnn8pIbWKX80CViP3I/3qad4wL4kFIRE0c7eCNcz+uxH87zFo32vCh
 h5ajTCL7q++v3hLk/t2jIq5UdXLJy/eqv3kMJ5rjuWJszFzcOaAvqvn7GEKJoQ/3
 B6KWafapYfv3WRoxA9f9OQ+yhIR8ALr3T9omrVoMfX+Yo+Eobev2LgKIP3MSxVjo
 3u3FssdfqpSVCmytwVkCc46kcPKYKTr/K9vhY6DcFJkypIdMylNrZ7aTfFkN4kBC
 tA9Cg1pCrnWyQKSzXSo1NE5z8qSGO+eNzLaMrnyuvKeRuXMrQPOxGz20R/pDYyVS
 C780YbdaI3buMtpFYliX4+dYxTfL/TmkAKTBG7UtzpybtS+baO4=
 =//KH
 -----END PGP SIGNATURE-----

Merge tag 'soc-fixes-6.7-3a' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull ARM SoC fixes from Arnd Bergmann:
 "These are two correctness fixes for handing DT input in the
  Allwinner (sunxi) SMP startup code"

* tag 'soc-fixes-6.7-3a' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
  ARM: sun9i: smp: fix return code check of of_property_match_string
  ARM: sun9i: smp: Fix array-index-out-of-bounds read in sunxi_mc_smp_init
2024-01-05 09:39:24 -08:00
Linus Torvalds
7987b8b75f * Fix Boolean logic in intel_guest_get_msrs
-----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmWWz4QUHHBib256aW5p
 QHJlZGhhdC5jb20ACgkQv/vSX3jHroNYSQgAjHhbUUUHqpkl4vO+zcJiPlQN3i14
 M/71Hgdvh+936UlyqBoEx9wrHcbzw0+vaxKsri/yIGLkieaU7ZtVtyeWfoc4DkDd
 0Al4OTIkyydPmaKjC3terRwlCxRWbut30yRlkz4LzC/oWb2NN19j3Yq6omwBBAOu
 vCqK2chNCIEetYBmX3G2CDG7DJ6mVvSLZx/vQXP3dj3jQWxT8eFxTH52eNtdIJXN
 0U4EVgp21hah+ur8U/VGNlqkc5govovSKtV3eAeE1WF0coBTLZcFadnHVjcG65lz
 QOKVCU9Aw31M7qddTAqztC9OpyaD8oDEhyRKZoVSkGhiP/2crK83AAf/7w==
 =J0fU
 -----END PGP SIGNATURE-----

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull kvm fix from Paolo Bonzini:

 - Fix boolean logic in intel_guest_get_msrs

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: x86/pmu: fix masking logic for MSR_CORE_PERF_GLOBAL_CTRL
2024-01-05 09:16:15 -08:00
Linus Torvalds
7131c2e9bb Probes fixes for 6.7-rc8:
- Kprobes/x86: Fix to emulate indirect call which size is not 5 byte.
    Current code expects the indirect call instructions are 5 bytes, but
    that is incorrect. Usually indirect call based on register is shorter
    than that, thus the emulation causes a kernel crash by accessing
    wrong instruction boundary. This uses the instruction size to
    calculate the return address correctly.
 -----BEGIN PGP SIGNATURE-----
 
 iQFPBAABCgA5FiEEh7BulGwFlgAOi5DV2/sHvwUrPxsFAmWWxCIbHG1hc2FtaS5o
 aXJhbWF0c3VAZ21haWwuY29tAAoJENv7B78FKz8brzYH+wZnk8UnJk8VmCp+BFwf
 kHfzDruVLnsjiehMPIniu/DUoDpwZnUw3/uFWzMEnH0y14GfTgS5D0m1ctybtpnR
 PgUeWSRI0XAxOXhExJLGd+/29V2E1FAjpR2kQx/U5hObzUtDNR2n0zLGO4qcJq0a
 laNXnkc5OgkZ9KAcJp2dT4WNsUFalRUbr4PmeVUSxYxmI1L1/+Q74vyGywRBgqkB
 lENLCbzubhp9T4pLBmCrDoRRPshjr/TYPRYvEJ5gEH9c+KuVOdZXa6Drr1Y5sADe
 zsycxjPi2ETxJtMCf67IzBjNbYn/wGLg2u00FtRdt+JK6p0I+Wgm+cKb6ifPDLPN
 PXU=
 =CmiU
 -----END PGP SIGNATURE-----

Merge tag 'probes-fixes-v6.7-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull kprobes/x86 fix from Masami Hiramatsu:

 - Fix to emulate indirect call which size is not 5 byte.

   Current code expects the indirect call instructions are 5 bytes, but
   that is incorrect. Usually indirect call based on register is shorter
   than that, thus the emulation causes a kernel crash by accessing
   wrong instruction boundary. This uses the instruction size to
   calculate the return address correctly.

* tag 'probes-fixes-v6.7-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  x86/kprobes: fix incorrect return address calculation in kprobe_emulate_call_indirect
2024-01-05 09:07:59 -08:00
Linus Torvalds
3eca89454a Three important multichannel smb3 client fixes
-----BEGIN PGP SIGNATURE-----
 
 iQGyBAABCgAdFiEE6fsu8pdIjtWE/DpLiiy9cAdyT1EFAmWWRDMACgkQiiy9cAdy
 T1E+tAv4g15Kh9JeSaO/x1oyujKSDnEALWGvriwj9EC6+Z+MzQQyyPxB4uUyRuSN
 uts/QgvpK4LW2jIhyTaBfU9xRfhJYup1B+vaBtij6NwKfnxYo1PJCdAj8yelAfCW
 7mgqSiIGMRbRFz3jnFbb5vQS3H32Hpje0h32Rh3LiKrS6q+9exCJDHA6jqQ5JwvP
 /BrDeJ0vykyUjvjxcYQaeWZDkXEy7bysVVq+3qOEr9HSwX7Jv1f6JOLLpUoTTWx9
 LPkBus02JOAWX6FUWewVdx1ar9cTafA54rzS3hrpT2lxjuMhSmL6v9Br9MCsAMnI
 oWMWfjyefAM6ss4m/pAD178WZ61f1urIRrTRJJUwcWA+XjXTF6dXXZvMFdzqjYW5
 k6nMhDfFXzSzywwSFmlQwh/00NPVzX7DuGjgd3ZdJ7z6bvFvltwZtkRPMVK7zvHc
 X8LWAWYuaLku4yj3PJa3FiBrSYPsztTX3NLqQq+5vcxxTDCOcFduXComvvEosSiq
 4UbhxHU=
 =0P5G
 -----END PGP SIGNATURE-----

Merge tag '6.7-rc8-smb3-mchan-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client fixes from Steve French:
 "Three important multichannel smb3 client fixes found in recent
  testing:

   - fix oops due to incorrect refcounting of interfaces after
     disabling multichannel

   - fix possible unrecoverable session state after disabling
     multichannel with active sessions

   - fix two places that were missing use of chan_lock"

* tag '6.7-rc8-smb3-mchan-fixes' of git://git.samba.org/sfrench/cifs-2.6:
  cifs: do not depend on release_iface for maintaining iface_list
  cifs: cifs_chan_is_iface_active should be called with chan_lock held
  cifs: after disabling multichannel, mark tcon for reconnect
2024-01-05 08:52:25 -08:00
Takashi Sakamoto
ac9184fbb8 firewire: ohci: suppress unexpected system reboot in AMD Ryzen machines and ASM108x/VT630x PCIe cards
VIA VT6306/6307/6308 provides PCI interface compliant to 1394 OHCI. When
the hardware is combined with Asmedia ASM1083/1085 PCIe-to-PCI bus bridge,
it appears that accesses to its 'Isochronous Cycle Timer' register (offset
0xf0 on PCI memory space) often causes unexpected system reboot in any
type of AMD Ryzen machine (both 0x17 and 0x19 families). It does not
appears in the other type of machine (AMD pre-Ryzen machine, Intel
machine, at least), or in the other OHCI 1394 hardware (e.g. Texas
Instruments).

The issue explicitly appears at a commit dcadfd7f7c ("firewire: core:
use union for callback of transaction completion") added to v6.5 kernel.
It changed 1394 OHCI driver to access to the register every time to
dispatch local asynchronous transaction. However, the issue exists in
older version of kernel as long as it runs in AMD Ryzen machine, since
the access to the register is required to maintain bus time. It is not
hard to imagine that users experience the unexpected system reboot when
generating bus reset by plugging any devices in, or reading the register
by time-aware application programs; e.g. audio sample processing.

This commit suppresses the unexpected system reboot in the combination of
hardware. It avoids the access itself. As a result, the software stack can
not provide the hardware time anymore to unit drivers, userspace
applications, and nodes in the same IEEE 1394 bus. It brings apparent
disadvantage since time-aware application programs require it, while
time-unaware applications are available again; e.g. sbp2.

Cc: stable@vger.kernel.org
Reported-by: Jiri Slaby <jirislaby@kernel.org>
Closes: https://bugzilla.suse.com/show_bug.cgi?id=1215436
Reported-by: Mario Limonciello <mario.limonciello@amd.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217994
Reported-by: Tobias Gruetzmacher <tobias-lists@23.gs>
Closes: https://sourceforge.net/p/linux1394/mailman/message/58711901/
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2240973
Closes: https://bugs.launchpad.net/linux/+bug/2043905
Link: https://lore.kernel.org/r/20240102110150.244475-1-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
2024-01-05 21:28:08 +09:00
Jeff Layton
64e6304169 nfsd: drop the nfsd_put helper
It's not safe to call nfsd_put once nfsd_last_thread has been called, as
that function will zero out the nn->nfsd_serv pointer.

Drop the nfsd_put helper altogether and open-code the svc_put in its
callers instead. That allows us to not be reliant on the value of that
pointer when handling an error.

Fixes: 2a501f55cd ("nfsd: call nfsd_last_thread() before final nfsd_put()")
Reported-by: Zhi Li <yieli@redhat.com>
Cc: NeilBrown <neilb@suse.de>
Signed-off-by: Jeffrey Layton <jlayton@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2024-01-04 22:52:27 -05:00
Lyude Paul
eb284f4b37 drm/nouveau/dp: Honor GSP link training retry timeouts
Turns out that one of the ways that Nvidia's driver handles the pre-LT
timeout for eDP panels is by providing a retry timeout in their link
training callbacks that we're expected to wait for. Up until now we didn't
pay any attention to this parameter.

So, start honoring the timeout if link training fails - and retry up to 3
times. The "3 times" bit comes from OpenRM's link training code.

[airlied: this fixes the panel on one of my laptops]

Signed-off-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231222043308.3090089-12-airlied@gmail.com
2024-01-05 12:27:53 +10:00
Dave Airlie
eacabb5462 nouveau: push event block/allowing out of the fence context
There is a deadlock between the irq and fctx locks,
the irq handling takes irq then fctx lock
the fence signalling takes fctx then irq lock

This splits the fence signalling path so the code that hits
the irq lock is done in a separate work queue.

This seems to fix crashes/hangs when using nouveau gsp with
i915 primary GPU.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231222043308.3090089-11-airlied@gmail.com
2024-01-05 12:27:53 +10:00
Dave Airlie
9c9dd22ba5 nouveau/gsp: always free the alloc messages on r535
Fixes a memory leak seen with kmemleak.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231222043308.3090089-10-airlied@gmail.com
2024-01-05 12:27:53 +10:00
Dave Airlie
4ae3a20102 nouveau/gsp: don't free ctrl messages on errors
It looks like for some messages the upper layers need to get access to the
results of the message so we can interpret it.

Rework the ctrl push interface to not free things and cleanup properly
whereever it errors out.

Requested-by: Lyude
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231222043308.3090089-9-airlied@gmail.com
2024-01-05 12:27:53 +10:00
Dave Airlie
59f6a3d8db nouveau/gsp: convert gsp errors to generic errors
This should let the upper layers retry as needed on EAGAIN.

There may be other values we will care about in the future, but
this covers our present needs.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231222043308.3090089-8-airlied@gmail.com
2024-01-05 12:27:53 +10:00
Lyude Paul
cf22fc2846 drm/nouveau/gsp: Fix ACPI MXDM/MXDS method invocations
Currently we get an error from ACPI because both of these arguments expect
a single argument, and we don't provide one. I'm not totally clear on what
that argument does, but we're able to find the missing value from
_acpiCacheMethodData() in src/kernel/platform/acpi_common.c in nvidia's
driver. So, let's add that - which doesn't get eDP displays to power on
quite yet, but gets rid of the argument warning at least.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231222043308.3090089-7-airlied@gmail.com
2024-01-05 12:27:53 +10:00
Dave Airlie
3108cc0323 nouveau/gsp: free userd allocation.
This was being leaked.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231222043308.3090089-6-airlied@gmail.com
2024-01-05 12:27:53 +10:00
Dave Airlie
a9b9b42b54 nouveau/gsp: free acpi object after use
This fixes a memory leak for the acpi dod object.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231222043308.3090089-5-airlied@gmail.com
2024-01-05 12:27:53 +10:00
Dave Airlie
7854ea0e40 nouveau: fix disp disabling with GSP
This func ptr here is normally static allocation, but gsp r535
uses a dynamic pointer, so we need to handle that better.

This fixes a crash with GSP when you use config=disp=0 to avoid
disp problems.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231222043308.3090089-4-airlied@gmail.com
2024-01-05 12:27:52 +10:00
Dave Airlie
34ce62a51e nouveau/gsp: drop some acpi related debug
These were leftover debug, if we need to bring them back do so
for debugging later.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231222043308.3090089-3-airlied@gmail.com
2024-01-05 12:27:52 +10:00
Dave Airlie
24ab185d98 nouveau/gsp: add three notifier callbacks that we see in normal operation (v2)
Add NULL callbacks for some things GSP calls that we don't handle, but know about
so we avoid the logging.

v2: Timur suggested allowing null fn.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231222043308.3090089-2-airlied@gmail.com
2024-01-05 12:27:52 +10:00
Dave Airlie
ed9895d8d4 amdgpu:
- DP MST fix
 - SMU 13.0.6 fixes
 - Fix displays on macbooks using vega12
 - Fix VSC and colorimetry on DP/eDP
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQQgO5Idg2tXNTSZAr293/aFa7yZ2AUCZZbK/wAKCRC93/aFa7yZ
 2FPZAPsGssJUobVzIwQN2UzXGvwALU14soHe+tT4nUADmPnPLAEA05D5GUozpGez
 wjHvu/xDQQFwx4TViwB/c4RdTXA9WQs=
 =vhTM
 -----END PGP SIGNATURE-----

Merge tag 'amd-drm-fixes-6.7-2024-01-04' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes

amdgpu:
- DP MST fix
- SMU 13.0.6 fixes
- Fix displays on macbooks using vega12
- Fix VSC and colorimetry on DP/eDP

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240104152139.4931-1-alexander.deucher@amd.com
2024-01-05 12:24:55 +10:00
Linus Torvalds
1f874787ed Including fixes from wireless and netfilter.
Current release - regressions:
 
  - Revert "net: ipv6/addrconf: clamp preferred_lft to the minimum
    required", it caused issues on networks where routers send prefixes
    with preferred_lft=0
 
  - wifi:
    - iwlwifi: pcie: don't synchronize IRQs from IRQ, prevent deadlock
    - mac80211: fix re-adding debugfs entries during reconfiguration
 
 Current release - new code bugs:
 
  - tcp: print AO/MD5 messages only if there are any keys
 
 Previous releases - regressions:
 
  - virtio_net: fix missing dma unmap for resize, prevent OOM
 
 Previous releases - always broken:
 
  - mptcp: prevent tcp diag from closing listener subflows
 
  - nf_tables:
    - set transport header offset for egress hook, fix IPv4 mangling
    - skip set commit for deleted/destroyed sets, avoid double deactivation
 
  - nat: make sure action is set for all ct states, fix openvswitch
    matching on ICMP packets in related state
 
  - eth: mlxbf_gige: fix receive hang under heavy traffic
 
  - eth: r8169: fix PCI error on system resume for RTL8168FP
 
  - net: add missing getsockopt(SO_TIMESTAMPING_NEW) and cmsg handling
 
 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE6jPA+I1ugmIBA4hXMUZtbf5SIrsFAmWW9ngACgkQMUZtbf5S
 Iru1fQ//fP/aAFlv65Vm5EQKFUxw4jGuNz214xQ7kaufyVxSy7CcUSRIZX7JLHmJ
 URRgIrYtuqoovIeNp5WqLNDcQgiuhpnnQamE2jnH4JiNdEtWADhUFwQVNle+zd6u
 9oGVSgOMYi10z26CPeQXTf97OtZH1HmowmnzdjvvgD0oUuCbxBfsfVjn7flnNY9O
 EePeMVasoFxFJasx1YnlNcVDAJsh3P/idp4nEkCrYcyBCebr8TkYFIDKy9q7U+xi
 +RfBwD5pEdBQD7bWTF9UlAM9R8bOVTQDsnjFhgXl+YFchg9RySi7ZYQCYWItIpEk
 oadYV4Bw4y9IFqoMDPKOsFCQvESNetSys7zIL9QoPDp1eEEl1JinYwdkz3xq5SE/
 sWN6XgERLOZHu5FlTwyEE4CHKofzW6wViFHsPnGSbdyfOjpnB1twuf/3hZWBMTuU
 Iza1m7kTjWuQTI9H8z4AuWL3Kyhn6ocGy2S0QJJNyUkBJ2w8/rFMUrSIsRjoUUX4
 y+UBznUt5OvsXyGlwISat/dYqtS5h7oVbAmLIlYi1yVURYQArUFTueeUy6y00YOd
 OymE3vOonoXxCbBNuHXWbd9C+RZZrPMoWab3K9DAvLXdZx1UHlDnscesMjTexwkB
 NxWAWobYyXBUCqyfNGsSzZ5Lc07w7ppqPP5uYQK7XGFWC+wJev0=
 =+se8
 -----END PGP SIGNATURE-----

Merge tag 'net-6.7-rc9' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net

Pull networking fixes from Jakub Kicinski:
 "Including fixes from wireless and netfilter.

  We haven't accumulated much over the break. If it wasn't for the
  uninterrupted stream of fixes for Intel drivers this PR would be very
  slim. There was a handful of user reports, however, either they stood
  out because of the lower traffic or users have had more time to test
  over the break. The ones which are v6.7-relevant should be wrapped up.

  Current release - regressions:

   - Revert "net: ipv6/addrconf: clamp preferred_lft to the minimum
     required", it caused issues on networks where routers send prefixes
     with preferred_lft=0

   - wifi:
      - iwlwifi: pcie: don't synchronize IRQs from IRQ, prevent deadlock
      - mac80211: fix re-adding debugfs entries during reconfiguration

  Current release - new code bugs:

   - tcp: print AO/MD5 messages only if there are any keys

  Previous releases - regressions:

   - virtio_net: fix missing dma unmap for resize, prevent OOM

  Previous releases - always broken:

   - mptcp: prevent tcp diag from closing listener subflows

   - nf_tables:
      - set transport header offset for egress hook, fix IPv4 mangling
      - skip set commit for deleted/destroyed sets, avoid double deactivation

   - nat: make sure action is set for all ct states, fix openvswitch
     matching on ICMP packets in related state

   - eth: mlxbf_gige: fix receive hang under heavy traffic

   - eth: r8169: fix PCI error on system resume for RTL8168FP

   - net: add missing getsockopt(SO_TIMESTAMPING_NEW) and cmsg handling"

* tag 'net-6.7-rc9' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (52 commits)
  net/tcp: Only produce AO/MD5 logs if there are any keys
  net: Implement missing SO_TIMESTAMPING_NEW cmsg support
  bnxt_en: Remove mis-applied code from bnxt_cfg_ntp_filters()
  net: ravb: Wait for operating mode to be applied
  asix: Add check for usbnet_get_endpoints
  octeontx2-af: Re-enable MAC TX in otx2_stop processing
  octeontx2-af: Always configure NIX TX link credits based on max frame size
  net/smc: fix invalid link access in dumping SMC-R connections
  net/qla3xxx: fix potential memleak in ql_alloc_buffer_queues
  virtio_net: fix missing dma unmap for resize
  igc: Fix hicredit calculation
  ice: fix Get link status data length
  i40e: Restore VF MSI-X state during PCI reset
  i40e: fix use-after-free in i40e_aqc_add_filters()
  net: Save and restore msg_namelen in sock_sendmsg
  netfilter: nft_immediate: drop chain reference counter on error
  netfilter: nf_nat: fix action not being set for all ct states
  net: bcmgenet: Fix FCS generation for fragmented skbuffs
  mptcp: prevent tcp diag from closing listener subflows
  MAINTAINERS: add Geliang as reviewer for MPTCP
  ...
2024-01-04 16:34:50 -08:00
Linus Torvalds
a476aae3f1 x86/csum: clean up `csum_partial' further
Commit 688eb8191b ("x86/csum: Improve performance of `csum_partial`")
ended up improving the code generation for the IP csum calculations, and
in particular special-casing the 40-byte case that is a hot case for
IPv6 headers.

It then had _another_ special case for the 64-byte unrolled loop, which
did two chains of 32-byte blocks, which allows modern CPU's to improve
performance by doing the chains in parallel thanks to renaming the carry
flag.

This just unifies the special cases and combines them into just one
single helper the 40-byte csum case, and replaces the 64-byte case by a
80-byte case that just does that single helper twice.  It avoids having
all these different versions of inline assembly, and actually improved
performance further in my tests.

There was never anything magical about the 64-byte unrolled case, even
though it happens to be a common size (and typically is the cacheline
size).

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2024-01-04 15:42:30 -08:00
Noah Goldstein
5d4acb6285 x86/csum: Remove unnecessary odd handling
The special case for odd aligned buffers is unnecessary and mostly
just adds overhead. Aligned buffers is the expectations, and even for
unaligned buffer, the only case that was helped is if the buffer was
1-byte from word aligned which is ~1/7 of the cases. Overall it seems
highly unlikely to be worth to extra branch.

It was left in the previous perf improvement patch because I was
erroneously comparing the exact output of `csum_partial(...)`, but
really we only need `csum_fold(csum_partial(...))` to match so its
safe to remove.

All csum kunit tests pass.

Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: David Laight <david.laight@aculab.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2024-01-04 15:33:14 -08:00
Linus Torvalds
5eff55d725 platform-drivers-x86 for v6.7-7
Revert P2SB / PCI deadlock fix due issue with older HW w/o P2SB.
 
 The following is an automated shortlog grouped by driver:
 
 p2sb:
  - Revert: Allow p2sb_bar() calls during PCI device probe
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQSCSUwRdwTNL2MhaBlZrE9hU+XOMQUCZZbdygAKCRBZrE9hU+XO
 MX6wAQDFPp8Ko9EGGfBtBn3AoZZ12bcj1DOHi3FIafnfrFiBpAD/Q0v9qpL6PwI1
 dIS55gNAsv6RdOcBRSjXWJoySg3EcwA=
 =ILxf
 -----END PGP SIGNATURE-----

Merge tag 'platform-drivers-x86-v6.7-7' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86

Pull x86 platform driver fix from Ilpo Järvinen:
 "Unfortunately the P2SB deadlock fix broke some older HW and we need
  some time to figure out the best way to fix the issue so reverting the
  deadlock fix for now"

* tag 'platform-drivers-x86-v6.7-7' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
  Revert "platform/x86: p2sb: Allow p2sb_bar() calls during PCI device probe"
2024-01-04 10:58:51 -08:00
Linus Torvalds
08bd31ece0 sound fixes for 6.7-final
It became more than wished, partly because of vacations.
 But all changes are fairly device-specific and should be safe to
 apply.
 
 - A regression fix for Oops at ASoC HD-audio probe
 - A series of TAS2781 HD-audio codec fixes
 - A random build regression fix with SPI helpers
 - Minor endianness fix for USB-audio mixer code
 - ASoC FSL driver error handling fix
 - ASoC Mediatek driver register fix
 - A series of ASoC meson g12a driver fixes
 - A few usual HD-audio oneliner quirks
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAmWWcX4OHHRpd2FpQHN1
 c2UuZGUACgkQLtJE4w1nLE8FQRAAsZJ9O/FnNa/di4pJC+bmvADm/82swu3B1FUk
 bW/yMA25JvFU0aHv5LatoRzhzv3T5AawG85qTIL93zo+sBtputtu4rtmFnj0MY5Q
 uoOHV9PAgE1GhGvw4fOuxq2AqNViW7R9wsvDThEouqqO3/U11f4h3CEtKNS9AykG
 fdhvzfkq3wUeHOrWIcRn9ZFR2ej9Ziypc95CZ2ORR1RcOmGh3ZJ8jgSs1rGBYB1i
 F8y5kK1rl3nt1vDgBpCxj6pSPYNqsSNtgQRZw6Ie0oFuqxFQQ36Fxi4Hg0KLLFIp
 JrX9TPV9/s1JVO8qlhAtZ+frWFWmEcyvImh2Vzjg0/zXNULR/kxJ5W2b7XbGZxNS
 6jwp+6fgoRCqFfpXxyGSTM+GmoSWZhKKFgyGyCuXAMWK0XQC/om0aZv/+DYvn/sr
 X8fNBqGv4qMub60JfGsMCA/0StC1RYzGAGCcUCVL2Ihq4Rbf4jYd1T+/9pzFT1Fx
 hURnvlz2RDJH0CxsU4EVCKyz7aQ4PLYmKg1M8X4ow2MsGX2gx2plGbcBkPLN3Ta3
 kaqVSWk8YA1zG62xhAvI/UbKRGn7hv2AidIBN4daNMV23aHmRFqhgubLFRZCWHEo
 QPSzrBTJqfL+ySNxgtFvAS0AgVbM27HuF//I1nnvF8YrlwUHos+IH5ls54BFQLg0
 LYTQKIk=
 =+Nvo
 -----END PGP SIGNATURE-----

Merge tag 'sound-6.7-final' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "It became more than wished, partly because of vacations. But all
  changes are fairly device-specific and should be safe to apply:

   - A regression fix for Oops at ASoC HD-audio probe

   - A series of TAS2781 HD-audio codec fixes

   - A random build regression fix with SPI helpers

   - Minor endianness fix for USB-audio mixer code

   - ASoC FSL driver error handling fix

   - ASoC Mediatek driver register fix

   - A series of ASoC meson g12a driver fixes

   - A few usual HD-audio oneliner quirks"

* tag 'sound-6.7-final' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda/realtek: Fix mute and mic-mute LEDs for HP ProBook 440 G6
  ASoC: meson: g12a-tohdmitx: Fix event generation for S/PDIF mux
  ASoC: meson: g12a-toacodec: Fix event generation
  ASoC: meson: g12a-tohdmitx: Validate written enum values
  ASoC: meson: g12a-toacodec: Validate written enum values
  ASoC: SOF: Intel: hda-codec: Delay the codec device registration
  ALSA: hda: cs35l41: fix building without CONFIG_SPI
  ALSA: hda/realtek: fix mute/micmute LEDs for a HP ZBook
  ALSA: hda/realtek: enable SND_PCI_QUIRK for hp pavilion 14-ec1xxx series
  ASoC: mediatek: mt8186: fix AUD_PAD_TOP register and offset
  ALSA: scarlett2: Convert meter levels from little-endian
  ALSA: hda/tas2781: remove sound controls in unbind
  ALSA: hda/tas2781: move set_drv_data outside tasdevice_init
  ALSA: hda/tas2781: fix typos in comment
  ALSA: hda/tas2781: do not use regcache
  ASoC: fsl_rpmsg: Fix error handler with pm_runtime_enable
2024-01-04 10:51:16 -08:00
Linus Torvalds
5939a693dc drm fixes for 6.8
qaic:
 - fix GEM import
 - add quirk for soc version
 
 bridge:
 - parade-ps8640, ti-sn65dsi86: fix aux reads bounds
 
 mgag200:
 - fix gamma LUT init
 
 i915:
 - Fix bogus DPCD rev usage for DP phy test pattern setup
 - Fix handling of MMIO triggered reports in the OA buffer
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEEKbZHaGwW9KfbeusDHTzWXnEhr4FAmWWDXMACgkQDHTzWXnE
 hr7EVw/9FHVVtslSRNgVUL2Jy1Y0wgw7pBb698HLw8pfpjeG9sGeyK26PYX1I1sz
 jRfnqqEsr87ymwAkvCGbYvrnS4Ljq8OGvU+FsxwuGWgrSD5HG87On1xHBmaQN29m
 V5Y8XDt6xUGvdB2p8qtERcfiKkw0GldsYhA1ZXi0TFkipPPHHK3ewiwSB5gGWeZF
 /b9ss1mAPUGB6K0169CfTjQpQoDzon4w+NRsVZnAuliodrIV8+jtAoU3La8ME60r
 Zfbf7zmYLfgMW0oWU+CYuhWolwZqsWWjBXer+lG3GytQ83BN7ggj5AZd+vfudv7T
 pnmnuSEy6QJrT3JkHQLM7hn5WXALrYQALMGxj6RxDcEVrziXWRvN5FmgTyR839kN
 PHmsRPdZtxs/smc6RjTYTQUeN6KSNGj0SK2zNVjxPBVMmo9vWeWPFiURQLDbxj49
 OMpNypSKHCXMhOG31HTrfoQ0K6q+dN9zDSxSP7oxO2cm05ZMoQOQK2lHBVz1BxBg
 hkwGadXKpRlKGbgDWLgGh+Ga0FDmHEC+0NWgJPiA2TbwUJp/9E5QWN+y9swxfRT/
 oEYscWasKenJJQZGaHaAsmDbTx9AdzX6YlXmER6aPwcq7zSv4NN6INGSln+oyfAf
 I+CruL0UmbOrdaQbt2jrWdK89NtBrFXJTF6U1Ks//Oa7k4RYnJY=
 =OvB8
 -----END PGP SIGNATURE-----

Merge tag 'drm-fixes-2024-01-04' of git://anongit.freedesktop.org/drm/drm

Pull drm fixes from Dave Airlie:
 "These were from over the holiday period, mainly i915, a couple of
  qaic, bridge and an mgag200.

  qaic:
   - fix GEM import
   - add quirk for soc version

  bridge:
   - parade-ps8640, ti-sn65dsi86: fix aux reads bounds

  mgag200:
   - fix gamma LUT init

  i915:
   - Fix bogus DPCD rev usage for DP phy test pattern setup
   - Fix handling of MMIO triggered reports in the OA buffer"

* tag 'drm-fixes-2024-01-04' of git://anongit.freedesktop.org/drm/drm:
  drm/i915/perf: Update handling of MMIO triggered reports
  drm/i915/dp: Fix passing the correct DPCD_REV for drm_dp_set_phy_test_pattern
  drm/mgag200: Fix gamma lut not initialized for G200ER, G200EV, G200SE
  drm/bridge: ps8640: Fix size mismatch warning w/ len
  drm/bridge: ti-sn65dsi86: Never store more than msg->size bytes in AUX xfer
  drm/bridge: parade-ps8640: Never store more than msg->size bytes in AUX xfer
  accel/qaic: Implement quirk for SOC_HW_VERSION
  accel/qaic: Fix GEM import path code
2024-01-04 10:48:03 -08:00
Dmitry Safonov
4c8530dc7d net/tcp: Only produce AO/MD5 logs if there are any keys
User won't care about inproper hash options in the TCP header if they
don't use neither TCP-AO nor TCP-MD5. Yet, those logs can add up in
syslog, while not being a real concern to the host admin:
> kernel: TCP: TCP segment has incorrect auth options set for XX.20.239.12.54681->XX.XX.90.103.80 [S]

Keep silent and avoid logging when there aren't any keys in the system.

Side-note: I also defined static_branch_tcp_*() helpers to avoid more
ifdeffery, going to remove more ifdeffery further with their help.

Reported-by: Christian Kujau <lists@nerdbynature.de>
Closes: https://lore.kernel.org/all/f6b59324-1417-566f-a976-ff2402718a8d@nerdbynature.de/
Signed-off-by: Dmitry Safonov <dima@arista.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Fixes: 2717b5adea ("net/tcp: Add tcp_hash_fail() ratelimited logs")
Link: https://lore.kernel.org/r/20240104-tcp_hash_fail-logs-v1-1-ff3e1f6f9e72@arista.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-01-04 09:07:04 -08:00
Jakub Kicinski
2e957f9c32 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue
Tony Nguyen says:

====================
Intel Wired LAN Driver Updates 2024-01-03 (i40e, ice, igc)

This series contains updates to i40e, ice, and igc drivers.

Ke Xiao fixes use after free for unicast filters on i40e.

Andrii restores VF MSI-X flag after PCI reset on i40e.

Paul corrects admin queue link status structure to fulfill firmware
expectations for ice.

Rodrigo Cataldo corrects value used for hicredit calculations on igc.

* '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue:
  igc: Fix hicredit calculation
  ice: fix Get link status data length
  i40e: Restore VF MSI-X state during PCI reset
  i40e: fix use-after-free in i40e_aqc_add_filters()
====================

Link: https://lore.kernel.org/r/20240103193254.822968-1-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-01-04 08:19:14 -08:00
Thomas Lange
382a32018b net: Implement missing SO_TIMESTAMPING_NEW cmsg support
Commit 9718475e69 ("socket: Add SO_TIMESTAMPING_NEW") added the new
socket option SO_TIMESTAMPING_NEW. However, it was never implemented in
__sock_cmsg_send thus breaking SO_TIMESTAMPING cmsg for platforms using
SO_TIMESTAMPING_NEW.

Fixes: 9718475e69 ("socket: Add SO_TIMESTAMPING_NEW")
Link: https://lore.kernel.org/netdev/6a7281bf-bc4a-4f75-bb88-7011908ae471@app.fastmail.com/
Signed-off-by: Thomas Lange <thomas@corelatus.se>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://lore.kernel.org/r/20240104085744.49164-1-thomas@corelatus.se
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-01-04 08:18:55 -08:00
Shin'ichiro Kawasaki
b20712e853
Revert "platform/x86: p2sb: Allow p2sb_bar() calls during PCI device probe"
This reverts commit b28ff7a7c3.

The commit introduced P2SB device scan and resource cache during the
boot process to avoid deadlock. But it caused detection failure of
IDE controllers on old systems [1]. The IDE controllers on old systems
and P2SB devices on newer systems have same PCI DEVFN. It is suspected
the confusion between those two is the failure cause. Revert the change
at this moment until the proper solution gets ready.

Link: https://lore.kernel.org/platform-driver-x86/CABq1_vjfyp_B-f4LAL6pg394bP6nDFyvg110TOLHHb0x4aCPeg@mail.gmail.com/T/#m07b30468d9676fc5e3bb2122371121e4559bb383 [1]
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Link: https://lore.kernel.org/r/20240104114050.3142690-1-shinichiro.kawasaki@wdc.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2024-01-04 18:16:51 +02:00
Paolo Bonzini
9710794640 KVM: x86/pmu: fix masking logic for MSR_CORE_PERF_GLOBAL_CTRL
When commit c59a1f106f ("KVM: x86/pmu: Add IA32_PEBS_ENABLE
MSR emulation for extended PEBS") switched the initialization of
cpuc->guest_switch_msrs to use compound literals, it screwed up
the boolean logic:

+	u64 pebs_mask = cpuc->pebs_enabled & x86_pmu.pebs_capable;
...
-	arr[0].guest = intel_ctrl & ~cpuc->intel_ctrl_host_mask;
-	arr[0].guest &= ~(cpuc->pebs_enabled & x86_pmu.pebs_capable);
+               .guest = intel_ctrl & (~cpuc->intel_ctrl_host_mask | ~pebs_mask),

Before the patch, the value of arr[0].guest would have been intel_ctrl &
~cpuc->intel_ctrl_host_mask & ~pebs_mask.  The intent is to always treat
PEBS events as host-only because, while the guest runs, there is no way
to tell the processor about the virtual address where to put PEBS records
intended for the host.

Unfortunately, the new expression can be expanded to

	(intel_ctrl & ~cpuc->intel_ctrl_host_mask) | (intel_ctrl & ~pebs_mask)

which makes no sense; it includes any bit that isn't *both* marked as
exclude_guest and using PEBS.  So, reinstate the old logic.  Another
way to write it could be "intel_ctrl & ~(cpuc->intel_ctrl_host_mask |
pebs_mask)", presumably the intention of the author of the faulty.
However, I personally find the repeated application of A AND NOT B to
be a bit more readable.

This shows up as guest failures when running concurrent long-running
perf workloads on the host, and was reported to happen with rcutorture.
All guests on a given host would die simultaneously with something like an
instruction fault or a segmentation violation.

Reported-by: Paul E. McKenney <paulmck@kernel.org>
Analyzed-by: Sean Christopherson <seanjc@google.com>
Tested-by: Paul E. McKenney <paulmck@kernel.org>
Cc: stable@vger.kernel.org
Fixes: c59a1f106f ("KVM: x86/pmu: Add IA32_PEBS_ENABLE MSR emulation for extended PEBS")
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-01-04 16:31:27 +01:00
Asad Kamal
f71cee97a6 drm/amd/pm: Use gpu_metrics_v1_5 for SMUv13.0.6
Use gpu_metrics_v1_5 for SMUv13.0.6 to fill
gpu metric info

Signed-off-by: Asad Kamal <asad.kamal@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Le Ma <le.ma@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2024-01-04 09:51:24 -05:00
Asad Kamal
43d7e8b012 drm/amd/pm: Add gpu_metrics_v1_5
Add new gpu_metrics_v1_5 to acquire vcn/jpeg activity
& pcie nak error counters

Signed-off-by: Asad Kamal <asad.kamal@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Le Ma <le.ma@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2024-01-04 09:51:16 -05:00
Asad Kamal
21ff3cc851 drm/amd/pm: Add mem_busy_percent for GCv9.4.3 apu
Expose sysfs entry mem_busy_percent for GC version
9.4.3 APU system

Signed-off-by: Asad Kamal <asad.kamal@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2024-01-04 09:50:03 -05:00
Joshua Ashton
202260f645 drm/amd/display: Fix sending VSC (+ colorimetry) packets for DP/eDP displays without PSR
The check for sending the vsc infopacket to the display was gated behind
PSR (Panel Self Refresh) being enabled.

The vsc infopacket also contains the colorimetry (specifically the
container color gamut) information for the stream on modern DP.

PSR is typically only supported on mobile phone eDP displays, thus this
was not getting sent for typical desktop monitors or TV screens.

This functionality is needed for proper HDR10 functionality on DP as it
wants BT2020 RGB/YCbCr for the container color space.

Cc: stable@vger.kernel.org
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Xaver Hugl <xaver.hugl@gmail.com>
Cc: Melissa Wen <mwen@igalia.com>
Fixes: 15f9dfd545 ("drm/amd/display: Register Colorspace property for DP and HDMI")
Tested-by: Simon Berz <simon@berz.me>
Tested-by: Xaver Hugl <xaver.hugl@kde.org>
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2024-01-04 09:48:15 -05:00
Alex Deucher
21f6137c64 drm/amdgpu: skip gpu_info fw loading on navi12
It's no longer required.

Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2318
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
2024-01-04 09:46:56 -05:00
Alex Deucher
7e725c20fe drm/amd/display: add nv12 bounding box
This was included in gpu_info firmware, move it into the
driver for consistency with other nv1x parts.

Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2318
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
2024-01-04 09:46:47 -05:00
Michael Chan
e009b2efb7 bnxt_en: Remove mis-applied code from bnxt_cfg_ntp_filters()
The 2 lines to check for the BNXT_HWRM_PF_UNLOAD_SP_EVENT bit was
mis-applied to bnxt_cfg_ntp_filters() and should have been applied to
bnxt_sp_task().

Fixes: 1924136844 ("bnxt_en: Send PF driver unload notification to all VFs.")
Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2024-01-04 11:09:59 +00:00
Claudiu Beznea
9039cd4c61 net: ravb: Wait for operating mode to be applied
CSR.OPS bits specify the current operating mode and (according to
documentation) they are updated by HW when the operating mode change
request is processed. To comply with this check CSR.OPS before proceeding.

Commit introduces ravb_set_opmode() that does all the necessities for
setting the operating mode (set CCC.OPC (and CCC.GAC, CCC.CSEL, if any) and
wait for CSR.OPS) and call it where needed. This should comply with all the
HW manuals requirements as different manual variants specify that different
modes need to be checked in CSR.OPS when setting CCC.OPC.

If gPTP active in config mode is supported and it needs to be enabled, the
CCC.GAC and CCC.CSEL needs to be configured along with CCC.OPC in the same
write access. For this, ravb_set_opmode() allows passing GAC and CSEL as
part of opmode and the function updates accordingly CCC register.

Fixes: c156633f13 ("Renesas Ethernet AVB driver proper")
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
2024-01-04 10:54:36 +00:00
Chen Ni
eaac6a2d26 asix: Add check for usbnet_get_endpoints
Add check for usbnet_get_endpoints() and return the error if it fails
in order to transfer the error.

Fixes: 16626b0cc3 ("asix: Add a new driver for the AX88172A")
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
2024-01-04 10:50:57 +00:00