Commit graph

27995 commits

Author SHA1 Message Date
Jakub Kicinski
e63c1822ac Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR.

Conflicts:

drivers/net/ethernet/broadcom/bnxt/bnxt.c
  e009b2efb7 ("bnxt_en: Remove mis-applied code from bnxt_cfg_ntp_filters()")
  0f2b214779 ("bnxt_en: Fix compile error without CONFIG_RFS_ACCEL")
https://lore.kernel.org/all/20240105115509.225aa8a2@canb.auug.org.au/

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-01-04 18:06:46 -08:00
Linus Torvalds
867583b399 RISC-V
- Fix a race condition in updating external interrupt for
   trap-n-emulated IMSIC swfile
 
 - Fix print_reg defaults in get-reg-list selftest
 
 ARM:
 
 - Ensure a vCPU's redistributor is unregistered from the MMIO bus
   if vCPU creation fails
 
 - Fix building KVM selftests for arm64 from the top-level Makefile
 
 x86:
 
 - Fix breakage for SEV-ES guests that use XSAVES.
 
 Selftests:
 
 - Fix bad use of strcat(), by not using strcat() at all
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmWGFv0UHHBib256aW5p
 QHJlZGhhdC5jb20ACgkQv/vSX3jHroPczAf/e6AgAnyPG1UItZqpLD+JDURcVaV1
 QyP3kc240e9dEjEkGidQ8vyekgAU9nGt2rFNPaU+5Y1E5Ky+SpZbbIzgS1cZypxT
 J1lsrVhZgNdCKEVRdrUMIzhkUEk0Kjd7OsFMQ9F6OuITSv/HCgZ1g6KobgBzUGCR
 0vcYqM74VnZiGGd5A4w8qP2F0FmF/7tf9k6iKWoYu6UpFe9z50jpIRq6dynrOHOc
 fmwsptmGzjgzuLK9sZTXYETOQvcpmXLqSZ65k1LQG224J5AYjS08Y5XLo1QS4rpV
 /g8QAgi+9ChGSzC47fqr/solAsoz/NzALPqydy+FH4u+O/O4SG5I4V8OmA==
 =4/NU
 -----END PGP SIGNATURE-----

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

Pull kvm fixes from Paolo Bonzini:
"RISC-V:

   - Fix a race condition in updating external interrupt for
     trap-n-emulated IMSIC swfile

   - Fix print_reg defaults in get-reg-list selftest

  ARM:

   - Ensure a vCPU's redistributor is unregistered from the MMIO bus if
     vCPU creation fails

   - Fix building KVM selftests for arm64 from the top-level Makefile

  x86:

   - Fix breakage for SEV-ES guests that use XSAVES

  Selftests:

   - Fix bad use of strcat(), by not using strcat() at all"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: SEV: Do not intercept accesses to MSR_IA32_XSS for SEV-ES guests
  KVM: selftests: Fix dynamic generation of configuration names
  RISCV: KVM: update external interrupt atomically for IMSIC swfile
  KVM: riscv: selftests: Fix get-reg-list print_reg defaults
  KVM: selftests: Ensure sysreg-defs.h is generated at the expected path
  KVM: Convert comment into an assertion in kvm_io_bus_register_dev()
  KVM: arm64: vgic: Ensure that slots_lock is held in vgic_register_all_redist_iodevs()
  KVM: arm64: vgic: Force vcpu vgic teardown on vcpu destroy
  KVM: arm64: vgic: Add a non-locking primitive for kvm_vgic_vcpu_destroy()
  KVM: arm64: vgic: Simplify kvm_vgic_destroy()
2023-12-22 19:22:20 -08:00
Paolo Bonzini
ef5b28372c KVM/riscv fixes for 6.7, take #1
- Fix a race condition in updating external interrupt for
   trap-n-emulated IMSIC swfile
 - Fix print_reg defaults in get-reg-list selftest
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEZdn75s5e6LHDQ+f/rUjsVaLHLAcFAmV8h2AACgkQrUjsVaLH
 LAeVKQ//TXVUf7I8y71MO7dtNu31oU1ud9HzD02iRecsOK/207OpGBrzPrOLO3sP
 Ttk0TJCk1o+BU8kS5FQGV2tiIAb3SAF4utVDNPUOzfAd4Leg3CBvkH6aQSDCmNyk
 91ZdJVmlt7LHKb9UlMIwldKDb2z51HtPotZOVVbhqtmoiWKCR1BBlgtTjQ8+P1ME
 PQorbjnRYVmjqpK/IbhXboQBiFZssnFdVuV0zftncBZECyFAI6TfZR/FTGFcRN6u
 VnW5cvyWET8DGhcpqt1BuQl8dPomDV32+HtKszyxkvUTrc1RqfFmoP02adppSU6r
 /8h5WcylzF66swDpm59ibH9c2k1f4T6fW1YQrWL4JwmL0IX5/u3ZrdbNcBtoD2fd
 81VDiJe+jjklH5EsTm1gwgNaw+qS2SNtXuQ+Phe9pSsuwtD4LL94ZcAY29dCEuPk
 GR1DKxgVR+nfwtUC3OaShjDLkto90kcpjCaiHVIXL8ZU4pMEvEbcBc7B6rxwDT98
 udziEoH42UPvf/0B2AcDJZHwPEvvY9uI/dsrEN0PZa5rhRL9Z7nBE673iRDgcp7e
 lad25lss+BbpOsGzmztEQG83rtwYTCLN5ah1eWGOzSq5xV5j+XrnK1qvWsF+OrGl
 q8CEzc7sUZ/9EVxWCAhCPV8WqMSVIsfuSmS+pt7Mo9G+oVF58uM=
 =0+bX
 -----END PGP SIGNATURE-----

Merge tag 'kvm-riscv-fixes-6.7-1' of https://github.com/kvm-riscv/linux into kvm-master

KVM/riscv fixes for 6.7, take #1

- Fix a race condition in updating external interrupt for
  trap-n-emulated IMSIC swfile
- Fix print_reg defaults in get-reg-list selftest
2023-12-22 18:05:07 -05:00
Paolo Bonzini
5c2b2176ea KVM/arm64 fixes for 6.7, part #2
- Ensure a vCPU's redistributor is unregistered from the MMIO bus
    if vCPU creation fails
 
  - Fix building KVM selftests for arm64 from the top-level Makefile
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQSNXHjWXuzMZutrKNKivnWIJHzdFgUCZYCYmAAKCRCivnWIJHzd
 FhU+AQDqIOIg3VMV+VjxhrG5aiHccq9o1mczO4LL9FQUO9AdYwD/SbTP4puBlfai
 gOFQDuvJFogTwKmYPDO2jycp1ekTuQ0=
 =RhfO
 -----END PGP SIGNATURE-----

Merge tag 'kvmarm-fixes-6.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into kvm-master

KVM/arm64 fixes for 6.7, part #2

 - Ensure a vCPU's redistributor is unregistered from the MMIO bus
   if vCPU creation fails

 - Fix building KVM selftests for arm64 from the top-level Makefile
2023-12-22 18:03:54 -05:00
Paolo Abeni
56794e5358 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR.

Adjacent changes:

drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c
  23c93c3b62 ("bnxt_en: do not map packet buffers twice")
  6d1add9553 ("bnxt_en: Modify TX ring indexing logic.")

tools/testing/selftests/net/Makefile
  2258b66648 ("selftests: add vlan hw filter tests")
  a0bc96c0cd ("selftests: net: verify fq per-band packet limit")

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2023-12-21 22:17:23 +01:00
Linus Torvalds
a4aebe9365 posix-timers: Get rid of [COMPAT_]SYS_NI() uses
Only the posix timer system calls use this (when the posix timer support
is disabled, which does not actually happen in any normal case), because
they had debug code to print out a warning about missing system calls.

Get rid of that special case, and just use the standard COND_SYSCALL
interface that creates weak system call stubs that return -ENOSYS for
when the system call does not exist.

This fixes a kCFI issue with the SYS_NI() hackery:

  CFI failure at int80_emulation+0x67/0xb0 (target: sys_ni_posix_timers+0x0/0x70; expected type: 0xb02b34d9)
  WARNING: CPU: 0 PID: 48 at int80_emulation+0x67/0xb0

Reported-by: kernel test robot <oliver.sang@intel.com>
Reviewed-by: Sami Tolvanen <samitolvanen@google.com>
Tested-by: Sami Tolvanen <samitolvanen@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2023-12-20 21:30:27 -08:00
Linus Torvalds
87c71dd604 ARM: SoC fixes for 6.7, part 2
There are only a handful of bugfixes this time, which feels almost too
 small, so I hope we are not missing something important.
 
  - One more mediatek dts warning fix after the previous larger set,
    this should finally result in a clean defconfig build.
 
  - TI OMAP dts fixes for a spurious hang on am335x and invalid data on DTA7
 
  - One DTS fix for ethernet on Oriange Pi Zero (Allwinner H616)
 
  - A regression fix for ti-sysc interconnect target module driver to
    not access registers after reset if srst_udelay quirk is needed
 
  - Reset controller driver fixes for a crash during error handling and
    a build warning
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmWC6TcACgkQYKtH/8kJ
 UidYdw/9F+yGbp71bmlq+pqrqMflw1Xg921gTSx8t4H2PwDY9EID/4TEPQKRP7rj
 FV5r0wegJZMGnu9omCUOj2v71g6eT1S/Ces58u5dp57rcCV4cnUMXumcw/hxwXXE
 hb9l941EFpp/0ARcR8X0SK56xJQiGdsEdH9CD9IpX89CjEuQ3hAgPuw3EagBYsLX
 9ncyv9ngkiaD5INNf3+bKAsHNL9AHDqGT8230RwHF9yOBoq53blSfGwN3ma9C3M/
 lGF+24FgBByXRZWVWU8aWQuD9BMp8IADwYDY7qORUbBgEdlp87n7TkdVmqmC+io7
 C+qRcwwWHy1vA8TKIU17ybicnCuI0/LSWj9OpDx63gKtw/YAyeR2GRH7VheJJT3G
 OOQDfUH2BbF74sqC+uRtP5K1Da1KjmIeSvyq0ClxqYAtvhXrsJjWm5fGvw13MPM0
 gDK4DcD3iNpSJgj7+YQ4p5aQ9LPkX3TwLZilTPFVJzZXWY7+fa/NKi5ySAUUWZU2
 vs3l072WkujAVv8OVrdeAyNEafhQG9vJDbya3dOTGdt416VIvmBAviqGI313D6u/
 neoxOeRgu4ewa8qYYhRn7YK2pFZkKFVY9Lq4kfx3Ee636zWb0QIDXS0wcFVoFLty
 Lawcqx+Jy9V14VRzRhVnIMlBl8CRdlCLC5WU0BFFveFQsFpx+pU=
 =oPLt
 -----END PGP SIGNATURE-----

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

Pull ARM SoC fixes from Arnd Bergmann:
 "There are only a handful of bugfixes this time, which feels almost too
  small, so I hope we are not missing something important.

   - One more mediatek dts warning fix after the previous larger set,
     this should finally result in a clean defconfig build.

   - TI OMAP dts fixes for a spurious hang on am335x and invalid data on
     DTA7

   - One DTS fix for ethernet on Oriange Pi Zero (Allwinner H616)

   - A regression fix for ti-sysc interconnect target module driver to
     not access registers after reset if srst_udelay quirk is needed

   - Reset controller driver fixes for a crash during error handling and
     a build warning"

* tag 'soc-fixes-6.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
  arm64: dts: mediatek: mt8395-genio-1200-evk: add interrupt-parent for mt6360
  ARM: dts: Fix occasional boot hang for am3 usb
  reset: Fix crash when freeing non-existent optional resets
  ARM: OMAP2+: Fix null pointer dereference and memory leak in omap_soc_device_init
  ARM: dts: dra7: Fix DRA7 L3 NoC node register size
  bus: ti-sysc: Flush posted write only after srst_udelay
  reset: hisilicon: hi6220: fix Wvoid-pointer-to-enum-cast warning
  arm64: dts: allwinner: h616: update emac for Orange Pi Zero 3
2023-12-20 16:06:40 -08:00
Macpaul Lin
fa3d6c7183
arm64: dts: mediatek: mt8395-genio-1200-evk: add interrupt-parent for mt6360
This patch fix the warning introduced by mt6360 node in
mt8395-genio-1200-evk.dts.

arch/arm64/boot/dts/mediatek/mt8195.dtsi:464.4-27: Warning (interrupts_property): /soc/i2c@11d01000/pmic@34:#interrupt-cells: size is (8), expected multiple of 16

Add a missing 'interrupt-parent' to fix this warning.

Fixes: f2b543a191 ("arm64: dts: mediatek: add device-tree for Genio 1200 EVK board")
Reported-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/linux-devicetree/20231212214737.230115-1-arnd@kernel.org/
Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-12-20 13:05:43 +00:00
Jakub Kicinski
c49b292d03 netdev
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE+soXsSLHKoYyzcli6rmadz2vbToFAmWAz2EACgkQ6rmadz2v
 bToqrw/9EwroZCc8GEHOKAlb/fzrMvn92rLo0ZW/cGN84QJPnx4zM6Zo0+fgLaaN
 oqqztwMUwdzGC3uX3FfVXaaLKbJ/MeHeL9BXFZNW8zkRHciw4R7kIBhOdPnHyET7
 uT+rQ4xPe1Mt7e9PjepKlSL5mEsxWfBkdUgsdn19Z2Vjdfr9mZMhYWYMJGcfTCD1
 TwxHKBPhq5fN3IsshmMBB8IrRp1HStUKb65MgZ4dI22LJXxTsFkx5XMFXcmuqvkH
 NhKj8jDcPEEh31bYcb6aG2Z4onw5F2lquygjk1Qyy5cyw45m/ipJKAXKdAyvJG+R
 VZCWOET/9wbRwFSK5wxwihCuKghFiofK52i2PcGtXZh0PCouyZZneSJOKM0yVWKO
 BvuJBxK4ETRnQyN6ZxhuJiEXG3/YMBBhyR2TX1LntVK9ct/k7qFVzATG49J39/sR
 SYMbptBRj4a5oMJ1qn0nFVEDFkg0jTnTDNnsEpcz60Ayt6EsJ1XosO5yz2huf861
 xgRMTKMseyG1/uV45tQ8ZPzbSPpBxjUi9Dl3coYsIm1a+y6clWUXcarONY5KVrpS
 CR98DuFgl+E7dXuisd/Kz2p2KxxSPq8nytsmLlgOvrUqhwiXqB+TKN8EHgIapVOt
 l1A5LrzXFTcGlT9MlaWBqEIy83Bu1nqQqbxrAFOE0k8A5jomXaw=
 =stU2
 -----END PGP SIGNATURE-----

Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next

Alexei Starovoitov says:

====================
pull-request: bpf-next 2023-12-18

This PR is larger than usual and contains changes in various parts
of the kernel.

The main changes are:

1) Fix kCFI bugs in BPF, from Peter Zijlstra.

End result: all forms of indirect calls from BPF into kernel
and from kernel into BPF work with CFI enabled. This allows BPF
to work with CONFIG_FINEIBT=y.

2) Introduce BPF token object, from Andrii Nakryiko.

It adds an ability to delegate a subset of BPF features from privileged
daemon (e.g., systemd) through special mount options for userns-bound
BPF FS to a trusted unprivileged application. The design accommodates
suggestions from Christian Brauner and Paul Moore.

Example:
$ sudo mkdir -p /sys/fs/bpf/token
$ sudo mount -t bpf bpffs /sys/fs/bpf/token \
             -o delegate_cmds=prog_load:MAP_CREATE \
             -o delegate_progs=kprobe \
             -o delegate_attachs=xdp

3) Various verifier improvements and fixes, from Andrii Nakryiko, Andrei Matei.

 - Complete precision tracking support for register spills
 - Fix verification of possibly-zero-sized stack accesses
 - Fix access to uninit stack slots
 - Track aligned STACK_ZERO cases as imprecise spilled registers.
   It improves the verifier "instructions processed" metric from single
   digit to 50-60% for some programs.
 - Fix verifier retval logic

4) Support for VLAN tag in XDP hints, from Larysa Zaremba.

5) Allocate BPF trampoline via bpf_prog_pack mechanism, from Song Liu.

End result: better memory utilization and lower I$ miss for calls to BPF
via BPF trampoline.

6) Fix race between BPF prog accessing inner map and parallel delete,
from Hou Tao.

7) Add bpf_xdp_get_xfrm_state() kfunc, from Daniel Xu.

It allows BPF interact with IPSEC infra. The intent is to support
software RSS (via XDP) for the upcoming ipsec pcpu work.
Experiments on AWS demonstrate single tunnel pcpu ipsec reaching
line rate on 100G ENA nics.

8) Expand bpf_cgrp_storage to support cgroup1 non-attach, from Yafang Shao.

9) BPF file verification via fsverity, from Song Liu.

It allows BPF progs get fsverity digest.

* tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (164 commits)
  bpf: Ensure precise is reset to false in __mark_reg_const_zero()
  selftests/bpf: Add more uprobe multi fail tests
  bpf: Fail uprobe multi link with negative offset
  selftests/bpf: Test the release of map btf
  s390/bpf: Fix indirect trampoline generation
  selftests/bpf: Temporarily disable dummy_struct_ops test on s390
  x86/cfi,bpf: Fix bpf_exception_cb() signature
  bpf: Fix dtor CFI
  cfi: Add CFI_NOSEAL()
  x86/cfi,bpf: Fix bpf_struct_ops CFI
  x86/cfi,bpf: Fix bpf_callback_t CFI
  x86/cfi,bpf: Fix BPF JIT call
  cfi: Flip headers
  selftests/bpf: Add test for abnormal cnt during multi-kprobe attachment
  selftests/bpf: Don't use libbpf_get_error() in kprobe_multi_test
  selftests/bpf: Add test for abnormal cnt during multi-uprobe attachment
  bpf: Limit the number of kprobes when attaching program to multiple kprobes
  bpf: Limit the number of uprobes when attaching program to multiple uprobes
  bpf: xdp: Register generic_kfunc_set with XDP programs
  selftests/bpf: utilize string values for delegate_xxx mount options
  ...
====================

Link: https://lore.kernel.org/r/20231219000520.34178-1-alexei.starovoitov@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-12-18 16:46:08 -08:00
Linus Torvalds
c8e97fc6b4 arm64 fixes:
- Arm CMN perf: fix the DTC allocation failure path which can end up
   erroneously clearing live counters
 
 - arm64/mm: fix hugetlb handling of the dirty page state leading to a
   continuous fault loop in user on hardware without dirty bit management
   (DBM). That's caused by the dirty+writeable information not being
   properly preserved across a series of mprotect(PROT_NONE),
   mprotect(PROT_READ|PROT_WRITE)
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE5RElWfyWxS+3PLO2a9axLQDIXvEFAmV85TIACgkQa9axLQDI
 XvFx/A/+P0PPVvIWr1VEggXeGhalhrXnn5H3TKm3F7Vz8+VH4X/z5gTdAj1FtwTu
 MIyjGFl3dQWEq5g4qscBNPqy045AGpRBJKmOw1V6mANuyRcg+06d9qCsosb7/pcs
 sMLsS34cmWPIQemd3AAyV20DeQPkYQEVEPdZ4QM0cvhCNCYspWmuqc8lEqldl25G
 5AnwFPrWza5a/4bKZgVOlyXrZtUxX3uwN1/7IbMrJ6ncpsRn1QMjqRfSlrYlTbcw
 O0IAnLFqtXqvO7nVaBw5Jq2EYrj0oOC25Pg8fCmaLsFM2yMky4186slULHg3c63Z
 zGyMPOLWdFGa/Vj6yliB8xPrrJGgTfRbFk9LYa4BvJcU3nXxcMI/LXJzM7TZYMFr
 j1vkH4cLyf76r12xzT/UYooE+A8gMJNuns+G0RqGuPYZ7fA2ut77H1IpDxBiCCEM
 tB2ys8lV/GtkGqNseGNX75hNPgsykPsCi7HTnXjMFK84iP/6CFUE2V0haOV1cUDw
 8r1nGe5wVJ/Yc/6/62mzCQjEluhdAn0gK1b/QQyOt0QN6maPXjIF4CILbuLwdRQh
 RDYNeRK+dlqLGmBwxM99zVrb3NnPH6oTm0Vq3VK+9mTQeGXNzmWfFQk8odTKiIEA
 oksWFX91exOXhcrqkB1GCRaLjrQWeuA2eq5RrPpmDmUsPyhoeCM=
 =wq2L
 -----END PGP SIGNATURE-----

Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fixes from Catalin Marinas:

 - Arm CMN perf: fix the DTC allocation failure path which can end up
   erroneously clearing live counters

 - arm64/mm: fix hugetlb handling of the dirty page state leading to a
   continuous fault loop in user on hardware without dirty bit
   management (DBM). That's caused by the dirty+writeable information
   not being properly preserved across a series of mprotect(PROT_NONE),
   mprotect(PROT_READ|PROT_WRITE)

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: mm: Always make sw-dirty PTEs hw-dirty in pte_modify
  perf/arm-cmn: Fail DTC counter allocation correctly
2023-12-15 19:59:03 -08:00
Arnd Bergmann
81556f228c - Fix ethernet node for Orange Pi Zero 3 board
-----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQSPRixG1tysKC2PKM10Ba7+DO8kkwUCZXtSIgAKCRB0Ba7+DO8k
 k31iAP9V/Pwum1g9PaWErq2ioJ3F4SUZY/9K0w/jJXWD/NalRAD+IlB7Ep6eu44x
 nMBhGzZN5XSo7jvGAD9/bb+rPYl0EwQ=
 =Pf7/
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIyBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmV7bTsACgkQYKtH/8kJ
 Uif4tw/3VIw4ZZS/F+9EWIeonbJUv8PlBxvWV8R2ulDfi2J6oRHIMBhx9dfE7iMj
 9wdrFjd9DBAJ0ZbnPH8JXkMAm8PdNvq9g/voMyM6RLMJmyL0EY0HE7cD9fBD9/w+
 7EJPj7OAIHwZ01YnwVA2OgP9y4HgK/reQEkqJDZAnKTq7Jg2+6SJzPp5FsRNB21V
 DF19IyBmdFXIDoaW5vgrs0Jm1jRTx2cyPNGkMfWOBoQIM2KKb+pXLHAV6Kt80dAq
 1xW+LcDyTWr63tHcbf7hr3f3fGsWiAEnmz/IQtGGs0ttam9T4zTF3QKykKFZcVNA
 JlVRBjsJ+hpvC2yN0NMXatJAfS1CyDc7NTpuyRE2650pw/vIJqYtYkghbc/1VUm6
 ckI3reZZKYaWd9hcRDYjJcqvW3WcWfIRnanTNyXSzUmfjr/vdLmiluUgJ7LSpvUp
 yWf09LlizIPrVaY3QzcE2Zz+oNUwiwZIfsm1W1rYFvxMkMRikYrjlnPh7nJDlTsN
 iiZgTpimhtlhjhvEY1ObJaCqbg5tiEc4PLqV+6hpx0oDgW4XVNzp7rG54FXYY4N1
 cNOrn3v3oqy3/nj9PbrWCDoY4bJBy6S6KL7iheEbLvXXDn2mVpMl8DZshHhRfrPa
 sMRdmowpT6po/2pJe9DK6QIrJwcL87S4DM+XGC/GOS7KuJyLYA==
 =LG/f
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-fixes-for-6.7-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/fixes

- Fix ethernet node for Orange Pi Zero 3 board

* tag 'sunxi-fixes-for-6.7-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  arm64: dts: allwinner: h616: update emac for Orange Pi Zero 3

Link: https://lore.kernel.org/r/ZXtVUJ0SG2NRpPG4@archlinux
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-12-14 21:01:47 +00:00
James Houghton
3c0696076a arm64: mm: Always make sw-dirty PTEs hw-dirty in pte_modify
It is currently possible for a userspace application to enter an
infinite page fault loop when using HugeTLB pages implemented with
contiguous PTEs when HAFDBS is not available. This happens because:

1. The kernel may sometimes write PTEs that are sw-dirty but hw-clean
   (PTE_DIRTY | PTE_RDONLY | PTE_WRITE).

2. If, during a write, the CPU uses a sw-dirty, hw-clean PTE in handling
   the memory access on a system without HAFDBS, we will get a page
   fault.

3. HugeTLB will check if it needs to update the dirty bits on the PTE.
   For contiguous PTEs, it will check to see if the pgprot bits need
   updating. In this case, HugeTLB wants to write a sequence of
   sw-dirty, hw-dirty PTEs, but it finds that all the PTEs it is about
   to overwrite are all pte_dirty() (pte_sw_dirty() => pte_dirty()),
   so it thinks no update is necessary.

We can get the kernel to write a sw-dirty, hw-clean PTE with the
following steps (showing the relevant VMA flags and pgprot bits):

i.   Create a valid, writable contiguous PTE.
       VMA vmflags:     VM_SHARED | VM_READ | VM_WRITE
       VMA pgprot bits: PTE_RDONLY | PTE_WRITE
       PTE pgprot bits: PTE_DIRTY | PTE_WRITE

ii.  mprotect the VMA to PROT_NONE.
       VMA vmflags:     VM_SHARED
       VMA pgprot bits: PTE_RDONLY
       PTE pgprot bits: PTE_DIRTY | PTE_RDONLY

iii. mprotect the VMA back to PROT_READ | PROT_WRITE.
       VMA vmflags:     VM_SHARED | VM_READ | VM_WRITE
       VMA pgprot bits: PTE_RDONLY | PTE_WRITE
       PTE pgprot bits: PTE_DIRTY | PTE_WRITE | PTE_RDONLY

Make it impossible to create a writeable sw-dirty, hw-clean PTE with
pte_modify(). Such a PTE should be impossible to create, and there may
be places that assume that pte_dirty() implies pte_hw_dirty().

Signed-off-by: James Houghton <jthoughton@google.com>
Fixes: 031e6e6b4e ("arm64: hugetlb: Avoid unnecessary clearing in huge_ptep_set_access_flags")
Cc: <stable@vger.kernel.org>
Acked-by: Will Deacon <will@kernel.org>
Reviewed-by: Ryan Roberts <ryan.roberts@arm.com>
Link: https://lore.kernel.org/r/20231204172646.2541916-3-jthoughton@google.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2023-12-12 16:25:26 +00:00
Marc Zyngier
6bef365e31 KVM: arm64: vgic: Ensure that slots_lock is held in vgic_register_all_redist_iodevs()
Although we implicitly depend on slots_lock being held when registering
IO devices with the IO bus infrastructure, we don't enforce this
requirement. Make it explicit.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20231207151201.3028710-5-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
2023-12-12 07:11:38 +00:00
Marc Zyngier
02e3858f08 KVM: arm64: vgic: Force vcpu vgic teardown on vcpu destroy
When failing to create a vcpu because (for example) it has a
duplicate vcpu_id, we destroy the vcpu. Amusingly, this leaves
the redistributor registered with the KVM_MMIO bus.

This is no good, and we should properly clean the mess. Force
a teardown of the vgic vcpu interface, including the RD device
before returning to the caller.

Cc: stable@vger.kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20231207151201.3028710-4-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
2023-12-12 07:11:38 +00:00
Marc Zyngier
d26b9cb33c KVM: arm64: vgic: Add a non-locking primitive for kvm_vgic_vcpu_destroy()
As we are going to need to call into kvm_vgic_vcpu_destroy() without
prior holding of the slots_lock, introduce __kvm_vgic_vcpu_destroy()
as a non-locking primitive of kvm_vgic_vcpu_destroy().

Cc: stable@vger.kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20231207151201.3028710-3-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
2023-12-12 07:11:38 +00:00
Marc Zyngier
01ad29d224 KVM: arm64: vgic: Simplify kvm_vgic_destroy()
When destroying a vgic, we have rather cumbersome rules about
when slots_lock and config_lock are held, resulting in fun
buglets.

The first port of call is to simplify kvm_vgic_map_resources()
so that there is only one call to kvm_vgic_destroy() instead of
two, with the second only holding half of the locks.

For that, we kill the non-locking primitive and move the call
outside of the locking altogether. This doesn't change anything
(we re-acquire the locks and teardown the whole vgic), and
simplifies the code significantly.

Cc: stable@vger.kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20231207151201.3028710-2-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
2023-12-12 07:11:38 +00:00
Linus Torvalds
0aea22c7ab Generic:
* Set .owner for various KVM file_operations so that files refcount the
   KVM module until KVM is done executing _all_ code, including the last
   few instructions of kvm_put_kvm().  And then revert the misguided
   attempt to rely on "struct kvm" refcounts to pin KVM-the-module.
 
 ARM:
 
 * Do not redo the mapping of vLPIs, if they have already been mapped
 
 s390:
 
 * Do not leave bits behind in PTEs
 
 * Properly catch page invalidations that affect the prefix of a nested
   guest
 
 x86:
 
 * When checking if a _running_ vCPU is "in-kernel", i.e. running at CPL0,
   get the CPL directly instead of relying on preempted_in_kernel (which
   is valid if and only if the vCPU was preempted, i.e. NOT running).
 
 * Fix a benign "return void" that was recently introduced.
 
 Selftests:
 
 * Makefile tweak for dependency generation
 
 * -Wformat fix
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmVzhWMUHHBib256aW5p
 QHJlZGhhdC5jb20ACgkQv/vSX3jHroMd3QgArPrc1tHKb5RAv3/OGxUhgmmKcYFz
 AERbxrzcEv25MjCy6wfb+WzOTud/7KM113oVwHpkWbPaOdR/NteCeNrypCOiFnxB
 BzKOdm23A8UmjgFlwYpIlukmn51QT2iMWfIQDetDboRpRPlIZ6AOQpIHph99K0J1
 xMlXKbd4eaeIS+FoqJGD2wlKDkMZmrQD1SjndLp7xtPjRBZQzVTcMg/fKJNcDLAg
 xIfecCeeU4/lJ0fQlnnO5a4L3gCzJnSGLKYvLgBkX4sC1yFr959WAnqSn8mb+1wT
 jQtsmCg7+GCuNF5mn4nF/YnnuD7+xgbpGKVGlHhKCmmvmbi74NVm5SBNgA==
 =aZLl
 -----END PGP SIGNATURE-----

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

Pull kvm fixes from Paolo Bonzini:
 "Generic:

   - Set .owner for various KVM file_operations so that files refcount
     the KVM module until KVM is done executing _all_ code, including
     the last few instructions of kvm_put_kvm(). And then revert the
     misguided attempt to rely on "struct kvm" refcounts to pin
     KVM-the-module.

  ARM:

   - Do not redo the mapping of vLPIs, if they have already been mapped

  s390:

   - Do not leave bits behind in PTEs

   - Properly catch page invalidations that affect the prefix of a
     nested guest

  x86:

   - When checking if a _running_ vCPU is "in-kernel", i.e. running at
     CPL0, get the CPL directly instead of relying on
     preempted_in_kernel (which is valid if and only if the vCPU was
     preempted, i.e. NOT running).

   - Fix a benign "return void" that was recently introduced.

  Selftests:

   - Makefile tweak for dependency generation

   - '-Wformat' fix"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: SVM: Update EFER software model on CR0 trap for SEV-ES
  KVM: selftests: add -MP to CFLAGS
  KVM: selftests: Actually print out magic token in NX hugepages skip message
  KVM: x86: Remove 'return void' expression for 'void function'
  Revert "KVM: Prevent module exit until all VMs are freed"
  KVM: Set file_operations.owner appropriately for all such structures
  KVM: x86: Get CPL directly when checking if loaded vCPU is in kernel mode
  KVM: arm64: GICv4: Do not perform a map to a mapped vLPI
  KVM: s390/mm: Properly reset no-dat
  KVM: s390: vsie: fix wrong VIR 37 when MSO is used
2023-12-10 10:46:46 -08:00
Paolo Bonzini
c8a11a938c KVM/arm64 fixes for 6.7, take #1
- Avoid mapping vLPIs that have already been mapped
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQSNXHjWXuzMZutrKNKivnWIJHzdFgUCZWub4QAKCRCivnWIJHzd
 FnZPAP9KlyKZTy3RvczIy4imn+DebrASAApmREkAIvfmz9wFzQD+Lg8AfxPAMz8E
 e9eNpTZ48Zqzmas93/eu1t6ZpcJOZQA=
 =fyc9
 -----END PGP SIGNATURE-----

Merge tag 'kvmarm-fixes-6.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into kvm-master

KVM/arm64 fixes for 6.7, take #1

 - Avoid mapping vLPIs that have already been mapped
2023-12-08 13:11:42 -05:00
Linus Torvalds
a6adef8987 ARM: SoC fixes for v6.7
Most of the changes are devicetree fixes for NXP, Mediatek, Rockchips
 Arm machines as well as Microchip RISC-V, and most of these address
 build-time warnings for spec violations and other minor issues. One of
 the Mediatek warnings was enabled by default and prevented a clean build.
 The ones that address serious runtime issues are all on the i.MX platform:
 
  - a boot time panic on imx8qm
  - USB hanging under load on imx8
  - regressions on the imx93 ethernet phy
 
 Code fixes include a minor error handling for the i.MX PMU driver, and
 a number of firmware driver fixes:
 
  - OP-TEE fix for supplicant based device enumeration, and a new
    sysfs attribute to needed to fix a race against userspace
 
  - Arm SCMI fix for possible truncation/overflow in the frequency
    computations
 
  - Multiple FF-A fixes for the newly added notification support.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmVzIOMACgkQYKtH/8kJ
 UidsiRAAloE2O29o1VxGSpuee5pJVdm1zr+lNfC/6chb+LKu6hXQjZY0IZOQup1p
 oId8n+AiunZIDL/iBdMOqp2jWF2O6C9Ns/usdp4+V0RZ7DyjIVbR8E2RYgo/mb76
 AxBxJCZVFIgMbqKjc1zg+5UmvGrl3zXAqmANfPDWu7hdbHafpbKz4Jb8iQe2/CKc
 PFBrweit/t6icpEmmmRrQfB7EcMPNSOOMdt30PxM+V+uDME4ub4k1a4o0n9zd2LB
 p2ZcxL8TX6LJRBRdg5T+QWvoFKHCOk+fVcvGAV28L/npORMrbpG7EHjrEbrhgs3f
 PcJtorjTwkjMp2PJlvD7DBV79ViEhtpYA1gNryjoXzMlZe9VHf8oAmH+/oJY7Zv2
 kVZwMiNb/eeMET3wG6fcyprkOwq1k0Ri6IHpYkVNvpQDCbEnc28zP2z3FNhoXF8U
 PcMmUbClJFR8QJPABm/FRNTh/UDcfxU6TkIFsNbYwLxol4+sAtFV8dHkr6/1vVfX
 FTXsYABFG5UAyQCtbbOQ6MuAMSTc4ox5Rh8aBATA/DQZabrWDon1ZU39WLJOarJ3
 YB9JmgxkIhYqbh5/bsKgb7srHQwzY2Vgof2iK2PI73eLW9yiTd4ysbwSvnb/UdMP
 fKssD6GfqWc340ugycNoorXYvi/N06f7r/u2AtjQzRyNaSnR/4s=
 =mw0X
 -----END PGP SIGNATURE-----

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

Pull ARM SoC fixes from Arnd Bergmann:
 "Most of the changes are devicetree fixes for NXP, Mediatek, Rockchips
  Arm machines as well as Microchip RISC-V, and most of these address
  build-time warnings for spec violations and other minor issues. One of
  the Mediatek warnings was enabled by default and prevented a clean
  build.

  The ones that address serious runtime issues are all on the i.MX
  platform:

   - a boot time panic on imx8qm

   - USB hanging under load on imx8

   - regressions on the imx93 ethernet phy

  Code fixes include a minor error handling for the i.MX PMU driver, and
  a number of firmware driver fixes:

   - OP-TEE fix for supplicant based device enumeration, and a new sysfs
     attribute to needed to fix a race against userspace

   - Arm SCMI fix for possible truncation/overflow in the frequency
     computations

   - Multiple FF-A fixes for the newly added notification support"

* tag 'soc-fixes-6.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (55 commits)
  MAINTAINERS: change the S32G2 maintainer's email address.
  arm64: dts: rockchip: Fix eMMC Data Strobe PD on rk3588
  ARM: dts: imx28-xea: Pass the 'model' property
  ARM: dts: imx7: Declare timers compatible with fsl,imx6dl-gpt
  MAINTAINERS: reinstate freescale ARM64 DT directory in i.MX entry
  arm64: dts: imx8-apalis: set wifi regulator to always-on
  ARM: imx: Check return value of devm_kasprintf in imx_mmdc_perf_init
  arm64: dts: imx8ulp: update gpio node name to align with register address
  arm64: dts: imx93: update gpio node name to align with register address
  arm64: dts: imx93: correct mediamix power
  arm64: dts: imx8qm: Add imx8qm's own pm to avoid panic during startup
  arm64: dts: freescale: imx8-ss-dma: Fix #pwm-cells
  arm64: dts: freescale: imx8-ss-lsio: Fix #pwm-cells
  dt-bindings: pwm: imx-pwm: Unify #pwm-cells for all compatibles
  ARM: dts: imx6ul-pico: Describe the Ethernet PHY clock
  arm64: dts: imx8mp: imx8mq: Add parkmode-disable-ss-quirk on DWC3
  arm64: dts: rockchip: Fix PCI node addresses on rk3399-gru
  arm64: dts: rockchip: drop interrupt-names property from rk3588s dfi
  firmware: arm_scmi: Fix possible frequency truncation when using level indexing mode
  firmware: arm_scmi: Fix frequency truncation by promoting multiplier type
  ...
2023-12-08 08:58:39 -08:00
Arnd Bergmann
fd1e5745f8 Devicetree fixes for the 6.7-cycle.
All over the place this time. From adapting the size of the vdec nodes
 on rk3328 and rk3399, fixing some wrong pinctrl settings on rk3128 and
 the Turing RK1 board, emmc-settings fixes on rk3588 and interrupt-name
 mishaps, down to some dt-cleanups.
 
 Also this adds the missing rockchip,rk3588-pmugrf compatible to the soc
 grf binding, that I somehow messed up during the pull requests for the
 -rc1 . At least with it included the dt-checker is happier.
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEE7v+35S2Q1vLNA3Lx86Z5yZzRHYEFAmVyLSQQHGhlaWtvQHNu
 dGVjaC5kZQAKCRDzpnnJnNEdgUk0CACba9tJmqxTLFf3y7jszGMf3N0ziIX8Hson
 6WSqbrkKJDzbUMYP+LO+yd0Bi8i0h2hC0XY0COnuvPS/JvWAsVrKNeoAri0XbjAr
 uoULhiFC79+JKBM8u05RIel/gR+nrCX+fm7ZX42/80TeCe9u7xnI9mF6xjwPcqdS
 XXWUboj1YOBu5x9VfqYK4ZoH160ggE612aX50tsWAoFGSPw9AatAz+TyuCN4T3Fw
 UoTIAF2z0m46mUFkTDw8jhpqNAE5nXYQsJ3EqrDZoXmCNRG7P4L+n3yhZ/hJfWDZ
 uagsKbj75eUbq1FhTlOJLK3wspK1ea1JAGemPnzk1hVHSNfXjzsu
 =xEds
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmVyx3kACgkQYKtH/8kJ
 UicKOhAAusHCVBwaZ5lx2SNE0xQE5TWmtdgNzmblr1BaBwWoQB261YY1RwvTzFXm
 PfkFRNk8ZdBJxBUrrs/3cKiYcTptgp0hBVAozlHwuhgtWftKFnWjLk40a8OsVolZ
 1pzPEIoVK3t81WwwiScLyJK5d2j4ecZvJJDPVbUpEjGZ0FNEY8vA2qfzm6TdXzEQ
 juEBrZT7T+Jge8WcTW2pwOfNqhqDvfMN7cPxuGWKfDOxa6TXuEkE6hTfhR5fG2Ds
 o4NqjBitxM4Kewlc2tY+dG6t+J1V5rZ+pNHSXvWtE9ETMWasW90dOzgLiWe7uIAq
 goB9wS1E0znZqJn5jq3w5xHBossYbRnuJRRyYNmE8na4b6D+qqgFpV3kZdGymcKa
 DpeSEeuYHY92p1ro5tI+9ZCugGBVjbbbPkuKk/3VkTplS+GIuI89CRSj7cAYVxub
 AKfEIEK/D/Y0hI+hgeudjlgAUwEM+k1D46EDFXbx7dhS5LZKz4zdvmpHVo68Ecjg
 cfNtPjrsIEsPHk2v/H+ywQJGO2mncjOJoedirjDNkIxbRXDRsv3ErG1xOaM4YD/F
 EdMGF0uWzgu1f2Y/2QW2ni1aK9YZU1vz21woFC/UHmFD1RCUca6eBx7XcJt0R8FC
 V7CPjqCsCHQ6VqLfBhpXU6ulpDkqpoq1XkkwD9hjMDOu2zYE9F4=
 =YVAn
 -----END PGP SIGNATURE-----

Merge tag 'v6.7-rockchip-dtsfixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/fixes

Devicetree fixes for the 6.7-cycle.

All over the place this time. From adapting the size of the vdec nodes
on rk3328 and rk3399, fixing some wrong pinctrl settings on rk3128 and
the Turing RK1 board, emmc-settings fixes on rk3588 and interrupt-name
mishaps, down to some dt-cleanups.

Also this adds the missing rockchip,rk3588-pmugrf compatible to the soc
grf binding, that I somehow messed up during the pull requests for the
-rc1 . At least with it included the dt-checker is happier.

* tag 'v6.7-rockchip-dtsfixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  arm64: dts: rockchip: Fix eMMC Data Strobe PD on rk3588
  arm64: dts: rockchip: Fix PCI node addresses on rk3399-gru
  arm64: dts: rockchip: drop interrupt-names property from rk3588s dfi
  arm64: dts: rockchip: Fix Turing RK1 interrupt pinctrls
  ARM: dts: rockchip: Fix sdmmc_pwren's pinmux setting for RK3128
  arm64: dts: rockchip: minor whitespace cleanup around '='
  ARM: dts: rockchip: minor whitespace cleanup around '='
  dt-bindings: soc: rockchip: grf: add rockchip,rk3588-pmugrf
  arm64: dts: rockchip: fix rk356x pcie msg interrupt name
  arm64: dts: rockchip: Expand reg size of vdec node for RK3399
  arm64: dts: rockchip: Expand reg size of vdec node for RK3328

Link: https://lore.kernel.org/r/2709704.mvXUDI8C0e@phil
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-12-08 08:36:25 +01:00
Arnd Bergmann
7c9bb19045 i.MX fixes for 6.7:
- A MAINTAINERS update to reinstate freescale ARM64 DT directory in i.MX
   entry.
 - A series from Alexander Stein to fix #pwm-cells for imx8-ss.
 - A series from Haibo Chen to fix GPIO node name for i.MX93 and
   i.MX8ULP.
 - Add parkmode-disable-ss-quirk for DWC3 on i.MX8MP and i.MX8MQ to fix
   an issue that the controller may hang when processing transactions
   under heavy USB traffic from multiple endpoints.
 - Fix mediamix block power on/off for i.MX93 by correcting the power
   domain clock to be 'nic_media'.
 - A couple of Ethernet PHY clock regression fixes for imx6ul-pico and
   imx6q-skov board.
 - Fix edma3 power domain for i.MX8QM to fix a panic during startup
   process.
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCgAyFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAmVxFsoUHHNoYXduZ3Vv
 QGtlcm5lbC5vcmcACgkQUFdYWoewfM4RoQgAnIQmAJj9heZ3tQpImqdLxQVfNFIf
 nlvLU76yf600IrUAkIT+ctQx9R5pDjIVI+9iYlgUfTI6oPLk7GqHYKyPwPwW2EUb
 vu+8tfFVDicekP4x01MidYTgx1JOq8IG/YdXDNpcA9RmavViL1xIQQDo0zbQEm8K
 Dv1WfS/hinWQZ2W9gxfr6uTXVZJYXa0LeCFLY8FVCY9J7Am2OTvYW1I5bLqUI4Wx
 g8LXPJ/iBtK4+0dxdOjmzTsAm8TVw0kGcbOcZTyalWoW6cxCPAQlNJc6sFVwa3eV
 ghdZn0ldm85jEHBphfbn+QCaYQHLjDnpZnamaKZYpgZEt7ifv4sNmb7FmQ==
 =tC65
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmVx9JIACgkQYKtH/8kJ
 UieGyRAAlQOf0PWmcLDEWeiUSgKxU9Uh/0XxDhQ00nRYhcP/WkPfdc1+55yHHb+0
 3e/7gfBvHKraPPEqtE3pgwxh3D57EZls5xnhuhcpLcxB5MkN444LcotT+6+vqMcl
 ppXBLlLJ1NGt6mXvby8t/ZR5LhxWzr69eAKF8ZrQReq1hPYq6+phWAMZmTTXgPLC
 voAOiPABn8sOysVAXBfOhPqlNtZpSEBxuwn2bHJWtaUAbYHegmF4RBMWDBhj3YGy
 v6uVv31SqH3sd0iPXwWVgBeJsxxjNnvU/YqwzPevaJV7Hq4YxG/u9Qn1g40DYyYM
 R8N+pLG8C6CUaYiCCoo/aGaeH5eeCte30j4m/VvuLgsoupOCycImSNEOx6+H7oBI
 ATHvkIifDgmPVrDF5n0+3sklEk6qts7duN534qcDY/mj9UttmMwbXUfQbCy7sbtV
 ENFJ+GYF4dXuAkQ+ISPuURYC+KX0qFPAuM0RhA6tMkepA3Q9opQpXd7M8gT3xhe3
 d+2a2WYwohCuqxS0bqWLmRqp/1fq4aSL/oiIb4Eb8NHyAoZI66rygtPQHolBZLoB
 KiIJr14VcrEKJff9ap98USwiaKb7LyndjRWNdtY6blHuonGjEi5CV6KWB9ShKe0g
 gzc0tp7TjT+kk4o03wzEsK90LgG+MhGnh9zRKm5g7BYZYy9o4RU=
 =K7FV
 -----END PGP SIGNATURE-----

Merge tag 'imx-fixes-6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes

i.MX fixes for 6.7:

- A MAINTAINERS update to reinstate freescale ARM64 DT directory in i.MX
  entry.
- A series from Alexander Stein to fix #pwm-cells for imx8-ss.
- A series from Haibo Chen to fix GPIO node name for i.MX93 and
  i.MX8ULP.
- Add parkmode-disable-ss-quirk for DWC3 on i.MX8MP and i.MX8MQ to fix
  an issue that the controller may hang when processing transactions
  under heavy USB traffic from multiple endpoints.
- Fix mediamix block power on/off for i.MX93 by correcting the power
  domain clock to be 'nic_media'.
- A couple of Ethernet PHY clock regression fixes for imx6ul-pico and
  imx6q-skov board.
- Fix edma3 power domain for i.MX8QM to fix a panic during startup
  process.

* tag 'imx-fixes-6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  ARM: dts: imx28-xea: Pass the 'model' property
  ARM: dts: imx7: Declare timers compatible with fsl,imx6dl-gpt
  MAINTAINERS: reinstate freescale ARM64 DT directory in i.MX entry
  arm64: dts: imx8-apalis: set wifi regulator to always-on
  ARM: imx: Check return value of devm_kasprintf in imx_mmdc_perf_init
  arm64: dts: imx8ulp: update gpio node name to align with register address
  arm64: dts: imx93: update gpio node name to align with register address
  arm64: dts: imx93: correct mediamix power
  arm64: dts: imx8qm: Add imx8qm's own pm to avoid panic during startup
  arm64: dts: freescale: imx8-ss-dma: Fix #pwm-cells
  arm64: dts: freescale: imx8-ss-lsio: Fix #pwm-cells
  dt-bindings: pwm: imx-pwm: Unify #pwm-cells for all compatibles
  ARM: dts: imx6ul-pico: Describe the Ethernet PHY clock
  arm64: dts: imx8mp: imx8mq: Add parkmode-disable-ss-quirk on DWC3
  ARM: dts: imx6q: skov: fix ethernet clock regression
  arm64: dt: imx93: tqma9352-mba93xxla: Fix LPUART2 pad config

Link: https://lore.kernel.org/r/20231207005202.GF270430@dragon
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-12-07 17:36:34 +01:00
Song Liu
26ef208c20 bpf: Use arch_bpf_trampoline_size
Instead of blindly allocating PAGE_SIZE for each trampoline, check the size
of the trampoline with arch_bpf_trampoline_size(). This size is saved in
bpf_tramp_image->size, and used for modmem charge/uncharge. The fallback
arch_alloc_bpf_trampoline() still allocates a whole page because we need to
use set_memory_* to protect the memory.

struct_ops trampoline still uses a whole page for multiple trampolines.

With this size check at caller (regular trampoline and struct_ops
trampoline), remove arch_bpf_trampoline_size() from
arch_prepare_bpf_trampoline() in archs.

Also, update bpf_image_ksym_add() to handle symbol of different sizes.

Signed-off-by: Song Liu <song@kernel.org>
Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
Tested-by: Ilya Leoshkevich <iii@linux.ibm.com>  # on s390x
Acked-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Björn Töpel <bjorn@rivosinc.com>
Tested-by: Björn Töpel <bjorn@rivosinc.com> # on riscv
Link: https://lore.kernel.org/r/20231206224054.492250-7-song@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2023-12-06 17:17:20 -08:00
Song Liu
96d1b7c081 bpf: Add arch_bpf_trampoline_size()
This helper will be used to calculate the size of the trampoline before
allocating the memory.

arch_prepare_bpf_trampoline() for arm64 and riscv64 can use
arch_bpf_trampoline_size() to check the trampoline fits in the image.

OTOH, arch_prepare_bpf_trampoline() for s390 has to call the JIT process
twice, so it cannot use arch_bpf_trampoline_size().

Signed-off-by: Song Liu <song@kernel.org>
Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
Tested-by: Ilya Leoshkevich <iii@linux.ibm.com>  # on s390x
Acked-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Björn Töpel <bjorn@rivosinc.com>
Tested-by: Björn Töpel <bjorn@rivosinc.com> # on riscv
Link: https://lore.kernel.org/r/20231206224054.492250-6-song@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2023-12-06 17:17:20 -08:00
Song Liu
7a3d9a159b bpf: Adjust argument names of arch_prepare_bpf_trampoline()
We are using "im" for "struct bpf_tramp_image" and "tr" for "struct
bpf_trampoline" in most of the code base. The only exception is the
prototype and fallback version of arch_prepare_bpf_trampoline(). Update
them to match the rest of the code base.

We mix "orig_call" and "func_addr" for the argument in different versions
of arch_prepare_bpf_trampoline(). s/orig_call/func_addr/g so they match.

Signed-off-by: Song Liu <song@kernel.org>
Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
Tested-by: Ilya Leoshkevich <iii@linux.ibm.com>  # on s390x
Acked-by: Jiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/r/20231206224054.492250-3-song@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2023-12-06 17:17:20 -08:00
Arnd Bergmann
1133ae113d MediaTek ARM64 DeviceTree fixes for v6.7
Fixes for various MediaTek SoCs, including
 
 MT7986: - eMMC HS400 mode failures
         - Cooling trips for emergency system shutdown
         - BPI-R3 machine SFP power limit and active cooling
 
 MT8173: - EVB device tree unit_address_vs_reg warning
 
 MT8183: - unit_address_vs_reg and simple_bus_reg warnings
         - Kukui device tree nodes naming consistency and
           adhering to bindings
         - Jacuzzi device tree unnecessary cells removed as
           those were producing avoid_unnecessary_addr_size
 
 MT8186: - Power domains faults due to incorrect clocks
         - GPU speed bin nvmem cell name was wrong, producing
           issues with interpreting the speedbin with GPU OPPs
 
 MT8195: - Local Arbiter (and whole system) ability to suspend
         - Cherry device tree interrupts_property warning
 
 ...and another unit_address_vs_reg warning on MT7622.
 -----BEGIN PGP SIGNATURE-----
 
 iJ4EABYKAEYWIQQn3Xxr56ypAcSHzXSaNgTPrZeEeAUCZWcZhCgcYW5nZWxvZ2lv
 YWNjaGluby5kZWxyZWdub0Bjb2xsYWJvcmEuY29tAAoJEJo2BM+tl4R49tYBANX0
 WggACQ4isTc2G1GCfniB9V74PElrQ90WWK/+2hCGAQDbifsclG7CNBEa7gVICsPR
 +tcHAymKO/9ytwiAAwdUAA==
 =Z7D9
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmVwkd8ACgkQYKtH/8kJ
 UieCWBAAtWtGVXXCdfqo6op0wno6Ay3EH0rBkldXuh4bfZJvtds1vKHxELsfPzAs
 PDB8S57+dLYPZYAJUBLQcTZWz/WPjVR/lc2UyvTtDpGiDDrrIp3IvWN48OzN5WGH
 f82ycXLYS0y/i7JSU+26+gB2OoAKIXdhq7eKW0HJc6LF/IlevyDtQMlFy64TWSsM
 Vhvrvg38eLFqHXUjBy/o3UVXsEHkqo+2vwTETQcqaL7TPrpDlP72xhXvuQjemme+
 jiYjdjoiJzmGXo/iJljhF7sVENXNV/2aCLBNwzbZ+/yM6pGp82WU+GI+W7B0qNWm
 wC0YegjPMjTjZOfEYirxbP4n5eYCfr80u99JVcmB8RuPOMq4eMEnZIIfBbrYVmxU
 MnZTGej66TA6XEo7EX1pvrHHLJ1hFIiY9uQ/N+jLAdTEwa5mV9UTol/u4V6dA2m3
 ZLORepNT5UC8uX7xhnUBjixW5fN3yvofZHlxExXc/dozNJf3O3xIW1MwBbtyYY9M
 md4VICXbJDmWxh3BUMtTFPzIDeG5decfKcnI932j58dghK4O9DsG5slsTa8375wA
 +lcCb3SzpVYx4ABfnSBb51OMx7N7OHIrU6qUPob+LrzZhUBJLhyeFMLpxZt5h+JA
 2PyX88AZf9HR/UMzeDBz7z512ifbOGku88r+ZmZvNB+H2mL4I/Q=
 =Gh3C
 -----END PGP SIGNATURE-----

Merge tag 'mtk-dts64-fixes-for-6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux into arm/fixes

MediaTek ARM64 DeviceTree fixes for v6.7

Fixes for various MediaTek SoCs, including

MT7986: - eMMC HS400 mode failures
        - Cooling trips for emergency system shutdown
        - BPI-R3 machine SFP power limit and active cooling

MT8173: - EVB device tree unit_address_vs_reg warning

MT8183: - unit_address_vs_reg and simple_bus_reg warnings
        - Kukui device tree nodes naming consistency and
          adhering to bindings
        - Jacuzzi device tree unnecessary cells removed as
          those were producing avoid_unnecessary_addr_size

MT8186: - Power domains faults due to incorrect clocks
        - GPU speed bin nvmem cell name was wrong, producing
          issues with interpreting the speedbin with GPU OPPs

MT8195: - Local Arbiter (and whole system) ability to suspend
        - Cherry device tree interrupts_property warning

...and another unit_address_vs_reg warning on MT7622.

* tag 'mtk-dts64-fixes-for-6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux:
  arm64: dts: mediatek: cherry: Fix interrupt cells for MT6360 on I2C7
  arm64: dts: mediatek: mt8183-kukui-jacuzzi: fix dsi unnecessary cells properties
  arm64: dts: mediatek: mt7622: fix memory node warning check
  arm64: dts: mediatek: mt8186: fix clock names for power domains
  arm64: dts: mediatek: mt8186: Change gpu speedbin nvmem cell name
  arm64: dts: mt7986: change cooling trips
  arm64: dts: mt7986: define 3W max power to both SFP on BPI-R3
  arm64: dts: mt7986: fix emmc hs400 mode without uboot initialization
  arm64: dts: mt8183: kukui: Fix underscores in node names
  arm64: dts: mediatek: mt8183: Move thermal-zones to the root node
  arm64: dts: mediatek: mt8173-evb: Fix regulator-fixed node names
  arm64: dts: mediatek: mt8183-evb: Fix unit_address_vs_reg warning on ntc
  arm64: dts: mediatek: mt8183: Fix unit address for scp reserved memory
  arm64: dts: mediatek: mt8195: Fix PM suspend/resume with venc clocks

Link: https://lore.kernel.org/r/20231129113905.134732-1-angelogioacchino.delregno@collabora.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-12-06 16:23:11 +01:00
Sam Edwards
37f3d61087 arm64: dts: rockchip: Fix eMMC Data Strobe PD on rk3588
JEDEC standard JESD84-B51 defines the eMMC Data Strobe line, which is
currently used only in HS400 mode, as a device->host clock signal that
"is used only in read operation. The Data Strobe is always High-Z (not
driven by the device and pulled down by RDS) or Driven Low in write
operation, except during CRC status response." RDS is a pull-down
resistor specified in the 10K-100K ohm range. Thus per the standard, the
Data Strobe is always pulled to ground (by the eMMC and/or RDS) during
write operations.

Evidently, the eMMC host controller in the RK3588 considers an active
voltage on the eMMC-DS line during a write to be an error.

The default (i.e. hardware reset, and Rockchip BSP) behavior for the
RK3588 is to activate the eMMC-DS pin's builtin pull-down. As a result,
many RK3588 board designers do not bother adding a dedicated RDS
resistor, instead relying on the RK3588's internal bias. The current
devicetree, however, disables this bias (`pcfg_pull_none`), breaking
HS400-mode writes for boards without a dedicated RDS, but with an eMMC
chip that chooses to High-Z (instead of drive-low) the eMMC-DS line.
(The Turing RK1 is one such board.)

Fix this by changing the bias in the (common) emmc_data_strobe case to
reflect the expected hardware/BSP behavior. This is unlikely to cause
regressions elsewhere: the pull-down is only relevant for High-Z eMMCs,
and if this is redundant with a (dedicated) RDS resistor, the effective
result is only a lower resistance to ground -- where the range of
tolerance is quite high. If it does, it's better fixed in the specific
devicetrees.

Fixes: d85f8a5c79 ("arm64: dts: rockchip: Add rk3588 pinctrl data")
Signed-off-by: Sam Edwards <CFSworks@gmail.com>
Link: https://lore.kernel.org/r/20231205202900.4617-2-CFSworks@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2023-12-06 10:38:03 +01:00
Stefan Eichenberger
04179605ab arm64: dts: imx8-apalis: set wifi regulator to always-on
Make sure that the wifi regulator is always on. The wifi driver itself
puts the wifi module into suspend mode. If we cut the power the driver
will crash when resuming from suspend.

Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Fixes: ad0de4ceb7 ("arm64: dts: freescale: add initial apalis imx8 aka quadmax module support")
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2023-12-06 13:24:26 +08:00
Haibo Chen
8ae06f1366 arm64: dts: imx8ulp: update gpio node name to align with register address
Change the gpio node name to align with register address.

Fixes: ac7bcf48dd ("arm64: dts: imx8ulp: update gpio node")
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2023-12-06 13:24:25 +08:00
Haibo Chen
4af1b258b6 arm64: dts: imx93: update gpio node name to align with register address
Change the gpio node name to align with register address

Fixes: c1d0782b5f ("arm64: dts: imx93: update gpio node")
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2023-12-06 13:24:25 +08:00
Peng Fan
d4cb68a5d3 arm64: dts: imx93: correct mediamix power
"nic_media" clock should be enabled when power on/off mediamix, otherwise
power on/off will fail. Because "media_axi_root" clock is the parent of
"nic_media" clock, so replace "media_axi_clock" clock with "nic_media"
clock in mediamix node.

Link: ce18e6d007
Fixes: f2d03ba997 ("arm64: dts: imx93: reorder device nodes")
Fixes: e85d3458a8 ("arm64: dts: imx93: add src node")
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2023-12-06 13:24:25 +08:00
Xiaolei Wang
b37e75bddc arm64: dts: imx8qm: Add imx8qm's own pm to avoid panic during startup
Add imx8qm's own pm, otherwise the following panic will
occur during the startup process:

 Kernel panic - not syncing: Asynchronous SError Interrupt
 Hardware name: Freescale i.MX8QM MEK (DT)
 Workqueue: events_unbound deferred_probe_work_func
 Call trace:
  dump_backtrace+0x98/0xf0
  show_stack+0x18/0x24
  dump_stack_lvl+0x60/0xac
  dump_stack+0x18/0x24
  panic+0x340/0x3a0
  nmi_panic+0x8c/0x90
  arm64_serror_panic+0x6c/0x78
  do_serror+0x3c/0x78
  el1h_64_error_handler+0x38/0x50
  el1h_64_error+0x64/0x68
  fsl_edma_chan_mux+0x98/0xdc
  fsl_edma_probe+0x278/0x898
  platform_probe+0x68/0xd8
  really_probe+0x110/0x27c
  __driver_probe_device+0x78/0x12c
  driver_probe_device+0x3c/0x118
  __device_attach_driver+0xb8/0xf8
  bus_for_each_drv+0x84/0xe4
  __device_attach+0xfc/0x18c
  device_initial_probe+0x14/0x20

Fixes: e4d7a330fb ("arm64: dts: imx8: add edma[0..3]")
Signed-off-by: Xiaolei Wang <xiaolei.wang@windriver.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2023-12-06 13:24:25 +08:00
Alexander Stein
7cef7c0b1d arm64: dts: freescale: imx8-ss-dma: Fix #pwm-cells
i.MX8QXP supports inverted PWM output, thus #pwm-cells needs to be set
to 3.

Fixes: f1d6a6b991 ("arm64: dts: imx8qxp: add adma_pwm in adma")
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2023-12-06 13:24:25 +08:00
Alexander Stein
d863a2f4f4 arm64: dts: freescale: imx8-ss-lsio: Fix #pwm-cells
i.MX8QM/QXP supports inverted PWM output, thus #pwm-cells needs to be set
to 3.

Fixes: 23fa99b205 ("arm64: dts: freescale: imx8-ss-lsio: add support for lsio_pwm0-3")
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2023-12-06 13:23:31 +08:00
Nathan Rossi
209043cf09 arm64: dts: imx8mp: imx8mq: Add parkmode-disable-ss-quirk on DWC3
The i.MX8MP and i.MX8MQ devices both use the same DWC3 controller and
are both affected by a known issue with the controller due to specific
behaviour when park mode is enabled in SuperSpeed host mode operation.

Under heavy USB traffic from multiple endpoints the controller will
sometimes incorrectly process transactions such that some transactions
are lost, or the controller may hang when processing transactions. When
the controller hangs it does not recover.

This issue is documented partially within the linux-imx vendor kernel
which references a Synopsys STAR number 9001415732 in commits [1] and
additional details in [2]. Those commits provide some additional
controller internal implementation specifics around the incorrect
behaviour of the SuperSpeed host controller operation when park mode is
enabled.

The summary of this issue is that the host controller can incorrectly
enter/exit park mode such that part of the controller is in a state
which behaves as if in park mode even though it is not. In this state
the controller incorrectly calculates the number of TRBs available which
results in incorrect access of the internal caches causing the overwrite
of pending requests in the cache which should have been processed but
are ignored. This can cause the controller to drop the requests or hang
waiting for the pending state of the dropped requests.

The workaround for this issue is to disable park mode for SuperSpeed
operation of the controller through the GUCTL1[17] bit. This is already
available as a quirk for the DWC3 controller and can be enabled via the
'snps,parkmode-disable-ss-quirk' device tree property.

It is possible to replicate this failure on an i.MX8MP EVK with a USB
Hub connecting 4 SuperSpeed USB flash drives. Performing continuous
small read operations (dd if=/dev/sd... of=/dev/null bs=16) on the block
devices will result in device errors initially and will eventually
result in the controller hanging.

  [13240.896936] xhci-hcd xhci-hcd.0.auto: WARN Event TRB for slot 4 ep 2 with no TDs queued?
  [13240.990708] usb 2-1.3: reset SuperSpeed USB device number 5 using xhci-hcd
  [13241.015582] sd 2:0:0:0: [sdc] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=DRIVER_OK cmd_age=0s
  [13241.025198] sd 2:0:0:0: [sdc] tag#0 CDB: opcode=0x28 28 00 00 00 03 e0 00 01 00 00
  [13241.032949] I/O error, dev sdc, sector 992 op 0x0:(READ) flags 0x80700 phys_seg 25 prio class 2
  [13272.150710] usb 2-1.2: reset SuperSpeed USB device number 4 using xhci-hcd
  [13272.175469] sd 1:0:0:0: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x03 driverbyte=DRIVER_OK cmd_age=31s
  [13272.185365] sd 1:0:0:0: [sdb] tag#0 CDB: opcode=0x28 28 00 00 00 03 e0 00 01 00 00
  [13272.193385] I/O error, dev sdb, sector 992 op 0x0:(READ) flags 0x80700 phys_seg 18 prio class 2
  [13434.846556] xhci-hcd xhci-hcd.0.auto: xHCI host not responding to stop endpoint command
  [13434.854592] xhci-hcd xhci-hcd.0.auto: xHCI host controller not responding, assume dead
  [13434.862553] xhci-hcd xhci-hcd.0.auto: HC died; cleaning up

[1] 97a5349d93
[2] b4b5cbc5a1

Fixes: fb8587a2c1 ("arm64: dtsi: imx8mp: add usb nodes")
Fixes: ad37549cb5 ("arm64: dts: imx8mq: add USB nodes")
Signed-off-by: Nathan Rossi <nathan.rossi@digi.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2023-12-05 16:36:40 +08:00
Rob Herring
c13c823a78 arm64: dts: rockchip: Fix PCI node addresses on rk3399-gru
The rk3399-gru PCI node addresses are wrong.

In rk3399-gru-scarlet, the bus number in the address should be 0. This is
because bus number assignment is dynamic and not known up front. For FDT,
the bus number is simply ignored.

In rk3399-gru-chromebook, the addresses are simply invalid. The first
"reg" entry must be the configuration space for the device. The entry
should be all 0s except for device/slot and function numbers. The existing
64-bit memory space (0x83000000) entries are not valid because they must
have the BAR address in the lower byte of the first cell.

Warnings for these are enabled by adding the missing 'device_type = "pci"'
for the root port node.

Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20231130191830.2424361-1-robh@kernel.org
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2023-12-04 21:17:07 +01:00
Heiko Stuebner
815f986f33 arm64: dts: rockchip: drop interrupt-names property from rk3588s dfi
The dfi binding does not specify interrupt names, with the interrupts
just specifying channels 0-x. So drop the unspecified property.

Fixes: 5a6976b104 ("arm64: dts: rockchip: Add DFI to rk3588s")
Reported-by: Jagan Teki <jagan@edgeble.ai>
Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
Link: https://lore.kernel.org/r/20231201134859.322491-1-heiko@sntech.de
2023-12-04 20:46:55 +01:00
Sam Edwards
9f6acd2b4d arm64: dts: rockchip: Fix Turing RK1 interrupt pinctrls
The pinctrls for the hym8563 interrupt line and fan-tach input
were both mistakenly defined as `pcfg_pull_none`. As these are
active-low signals (level-triggered, in the hym8563 case) which
may not be driven at times, these should really be pull-up. The
lack of any bias results in spurious interrupts.

Fix this by modifying the `rockchip,pins` properties as necessary
to enable the pull-up resistors.

Fixes: 2806a69f3f ("arm64: dts: rockchip: Add Turing RK1 SoM support")
Signed-off-by: Sam Edwards <CFSworks@gmail.com>
Link: https://lore.kernel.org/r/20231202071212.1606800-1-CFSworks@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2023-12-02 17:07:15 +01:00
Ard Biesheuvel
f5259997f3 arm64: Avoid enabling KPTI unnecessarily
Commit 42c5a3b04b refactored the KPTI init code in a way that results
in the use of non-global kernel mappings even on systems that have no
need for it, and even when KPTI has been disabled explicitly via the
command line.

Ensure that this only happens when we have decided (based on the
detected system-wide CPU features) that KPTI should be enabled.

Fixes: 42c5a3b04b ("arm64: Split kpti_install_ng_mappings()")
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Will Deacon <will@kernel.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20231127120049.2258650-6-ardb@google.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2023-11-30 19:07:33 +00:00
AngeloGioacchino Del Regno
5943b8f744
arm64: dts: mediatek: cherry: Fix interrupt cells for MT6360 on I2C7
Change interrupt cells to 2 to suppress interrupts_property warning.

Cc: stable@vger.kernel.org
Fixes: 0de0fe950f ("arm64: dts: mediatek: cherry: Enable MT6360 sub-pmic on I2C7")
Link: https://lore.kernel.org/r/20231127132026.165027-1-angelogioacchino.delregno@collabora.com
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2023-11-29 10:37:53 +01:00
Eugen Hristev
74543b303a
arm64: dts: mediatek: mt8183-kukui-jacuzzi: fix dsi unnecessary cells properties
dtbs_check throws a warning at the dsi node:
Warning (avoid_unnecessary_addr_size): /soc/dsi@14014000: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property

Other DTS have a panel child node with a reg, so the parent dtsi
must have the address-cells and size-cells, however this specific DT
has the panel removed, but not the cells, hence the warning above.

If panel is deleted then the cells must also be deleted since they are
tied together, as the child node in this DT does not have a reg.

Cc: stable@vger.kernel.org
Fixes: cabc71b08e ("arm64: dts: mt8183: Add kukui-jacuzzi-damu board")
Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20230814071053.5459-1-eugen.hristev@collabora.com
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2023-11-29 10:37:53 +01:00
Eugen Hristev
8e6ecbfd44
arm64: dts: mediatek: mt7622: fix memory node warning check
dtbs_check throws a warning at the memory node:
Warning (unit_address_vs_reg): /memory: node has a reg or ranges property, but no unit name

fix by adding the address into the node name.

Cc: stable@vger.kernel.org
Fixes: 0b6286dd96 ("arm64: dts: mt7622: add bananapi BPI-R64 board")
Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20230814065042.4973-1-eugen.hristev@collabora.com
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2023-11-29 10:37:52 +01:00
Eugen Hristev
9adf7580f6
arm64: dts: mediatek: mt8186: fix clock names for power domains
Clocks for each power domain are split into big categories: pd clocks
and subsys clocks.
According to the binding, all clocks which have a dash '-' in their name
are treated as subsys clocks, and must be placed at the end of the list.
The other clocks which are pd clocks must come first.
Fixed the naming and the placing of all clocks in the power domains.
For the avoidance of doubt, prefixed all subsys clocks with the 'subsys'
prefix. The binding does not enforce strict clock names, the driver
uses them in bulk, only making a difference for pd clocks vs subsys clocks.

The above problem appears to be trivial, however, it leads to incorrect
power up and power down sequence of the power domains, because some
clocks will be mistakenly taken for subsys clocks and viceversa.
One consequence is the fact that if the DIS power domain goes power down
and power back up during the boot process, when it comes back up, there
are still transactions left on the bus which makes the display inoperable.

Some of the clocks for the DIS power domain were wrongly using '_' instead
of '-', which again made these clocks being treated as pd clocks instead of
subsys clocks.

Cc: stable@vger.kernel.org
Fixes: d9e43c1e7a ("arm64: dts: mt8186: Add power domains controller")
Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
Tested-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Link: https://lore.kernel.org/r/20231005103041.352478-1-eugen.hristev@collabora.com
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2023-11-29 10:37:52 +01:00
AngeloGioacchino Del Regno
59fa1e51ba
arm64: dts: mediatek: mt8186: Change gpu speedbin nvmem cell name
MT8186's GPU speedbin value must be interpreted, or the value will not
be meaningful.
Use the correct "gpu-speedbin" nvmem cell name for the GPU speedbin to
allow triggering the cell info fixup handler, hence feeding the right
speedbin number to the users.

Cc: stable@vger.kernel.org
Fixes: 263d2fd02a ("arm64: dts: mediatek: mt8186: Add GPU speed bin NVMEM cells")
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://lore.kernel.org/r/20231005151150.355536-1-angelogioacchino.delregno@collabora.com
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2023-11-29 10:37:52 +01:00
Frank Wunderlich
1fcda8ceb0
arm64: dts: mt7986: change cooling trips
Add Critical and hot trips for emergency system shutdown and limiting
system load.

Change passive trip to active to make sure fan is activated on the
lowest trip.

Cc: stable@vger.kernel.org
Fixes: 1f5be05132 ("arm64: dts: mt7986: add thermal-zones")
Fixes: c26f779a22 ("arm64: dts: mt7986: add pwm-fan and cooling-maps to BPI-R3 dts")
Suggested-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20231025170832.78727-4-linux@fw-web.de
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2023-11-29 10:37:52 +01:00
Frank Wunderlich
6413cbc17f
arm64: dts: mt7986: define 3W max power to both SFP on BPI-R3
All SFP power supplies are connected to the system VDD33 which is 3v3/8A.
Set 3A per SFP slot to allow SFPs work which need more power than the
default 1W.

Cc: stable@vger.kernel.org
Fixes: 8e01fb15b8 ("arm64: dts: mt7986: add Bananapi R3")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20231025170832.78727-3-linux@fw-web.de
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2023-11-29 10:37:52 +01:00
Eric Woudstra
8dfe51c3f6
arm64: dts: mt7986: fix emmc hs400 mode without uboot initialization
Eric reports errors on emmc with hs400 mode when booting linux on bpi-r3
without uboot [1]. Booting with uboot does not show this because clocks
seem to be initialized by uboot.

Fix this by adding assigned-clocks and assigned-clock-parents like it's
done in uboot [2].

[1] https://forum.banana-pi.org/t/bpi-r3-kernel-fails-setting-emmc-clock-to-416m-depends-on-u-boot/15170
[2] https://github.com/u-boot/u-boot/blob/master/arch/arm/dts/mt7986.dtsi#L287

Cc: stable@vger.kernel.org
Fixes: 513b49d19b ("arm64: dts: mt7986: add mmc related device nodes")
Signed-off-by: Eric Woudstra <ericwouds@gmail.com>
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20231025170832.78727-2-linux@fw-web.de
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2023-11-29 10:37:52 +01:00
Hsin-Yi Wang
8980c30141
arm64: dts: mt8183: kukui: Fix underscores in node names
Replace underscores with hyphens in pinctrl node names both for consistency
and to adhere to the bindings.

Cc: stable@vger.kernel.org
Fixes: cd894e274b ("arm64: dts: mt8183: Add krane-sku176 board")
Fixes: 1652dbf736 ("arm64: dts: mt8183: add scp node")
Fixes: 27eaf34df3 ("arm64: dts: mt8183: config dsi node")
Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20231026191343.3345279-2-hsinyi@chromium.org
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2023-11-29 10:37:51 +01:00
AngeloGioacchino Del Regno
5a60d63439
arm64: dts: mediatek: mt8183: Move thermal-zones to the root node
The thermal zones are not a soc bus device: move it to the root
node to solve simple_bus_reg warnings.

Cc: stable@vger.kernel.org
Fixes: b325ce3978 ("arm64: dts: mt8183: add thermal zone node")
Link: https://lore.kernel.org/r/20231025093816.44327-9-angelogioacchino.delregno@collabora.com
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2023-11-29 10:37:51 +01:00
AngeloGioacchino Del Regno
24165c5dad
arm64: dts: mediatek: mt8173-evb: Fix regulator-fixed node names
Fix a unit_address_vs_reg warning for the USB VBUS fixed regulators
by renaming the regulator nodes from regulator@{0,1} to regulator-usb-p0
and regulator-usb-p1.

Cc: stable@vger.kernel.org
Fixes: c0891284a7 ("arm64: dts: mediatek: add USB3 DRD driver")
Link: https://lore.kernel.org/r/20231025093816.44327-8-angelogioacchino.delregno@collabora.com
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2023-11-29 10:37:51 +01:00
AngeloGioacchino Del Regno
9dea1c724f
arm64: dts: mediatek: mt8183-evb: Fix unit_address_vs_reg warning on ntc
The NTC is defined as ntc@0 but it doesn't need any address at all.
Fix the unit_address_vs_reg warning by dropping the unit address: since
the node name has to be generic also fully rename it from ntc@0 to
thermal-sensor.

Cc: stable@vger.kernel.org
Fixes: ff9ea5c622 ("arm64: dts: mediatek: mt8183-evb: Add node for thermistor")
Link: https://lore.kernel.org/r/20231025093816.44327-7-angelogioacchino.delregno@collabora.com
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
2023-11-29 10:37:51 +01:00