]> Gentwo Git Trees - linux/.git/log
linux/.git
10 months agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo...
Stephen Rothwell [Mon, 24 Feb 2025 23:38:47 +0000 (10:38 +1100)]
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git

10 months agoMerge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux...
Stephen Rothwell [Mon, 24 Feb 2025 23:38:45 +0000 (10:38 +1100)]
Merge branch 'for-next' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl.git

10 months agoMerge branch 'davinci/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git...
Stephen Rothwell [Mon, 24 Feb 2025 23:38:44 +0000 (10:38 +1100)]
Merge branch 'davinci/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git

10 months agoMerge branch 'next' of https://github.com/Broadcom/stblinux.git
Stephen Rothwell [Mon, 24 Feb 2025 23:38:44 +0000 (10:38 +1100)]
Merge branch 'next' of https://github.com/Broadcom/stblinux.git

10 months agoMerge branch 'at91-next' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux.git
Stephen Rothwell [Mon, 24 Feb 2025 23:38:43 +0000 (10:38 +1100)]
Merge branch 'at91-next' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux.git

10 months agoMerge branch 'asahi-soc/for-next' of https://github.com/AsahiLinux/linux.git
Stephen Rothwell [Mon, 24 Feb 2025 23:38:41 +0000 (10:38 +1100)]
Merge branch 'asahi-soc/for-next' of https://github.com/AsahiLinux/linux.git

10 months agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/amlogic...
Stephen Rothwell [Mon, 24 Feb 2025 23:38:40 +0000 (10:38 +1100)]
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux.git

10 months agoMerge branch 'for-next/core' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64...
Stephen Rothwell [Mon, 24 Feb 2025 23:38:38 +0000 (10:38 +1100)]
Merge branch 'for-next/core' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

10 months agoMerge branch 'perf-tools-next' of git://git.kernel.org/pub/scm/linux/kernel/git/perf...
Stephen Rothwell [Mon, 24 Feb 2025 23:36:18 +0000 (10:36 +1100)]
Merge branch 'perf-tools-next' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git

10 months agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy...
Stephen Rothwell [Mon, 24 Feb 2025 23:36:16 +0000 (10:36 +1100)]
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git

10 months agoMerge branch 'mm-everything' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Stephen Rothwell [Mon, 24 Feb 2025 23:11:25 +0000 (10:11 +1100)]
Merge branch 'mm-everything' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

10 months agoMerge branch 'for-linux-next-fixes' of https://gitlab.freedesktop.org/drm/misc/kernel.git linux-next/pending-fixes
Stephen Rothwell [Mon, 24 Feb 2025 22:46:41 +0000 (09:46 +1100)]
Merge branch 'for-linux-next-fixes' of https://gitlab.freedesktop.org/drm/misc/kernel.git

10 months agoMerge branch 'tip/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
Stephen Rothwell [Mon, 24 Feb 2025 22:46:39 +0000 (09:46 +1100)]
Merge branch 'tip/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git

10 months agoMerge branch 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git
Stephen Rothwell [Mon, 24 Feb 2025 22:46:36 +0000 (09:46 +1100)]
Merge branch 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git

10 months agoMerge branch 'perf-tools' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf...
Stephen Rothwell [Mon, 24 Feb 2025 22:46:35 +0000 (09:46 +1100)]
Merge branch 'perf-tools' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools

10 months agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas...
Stephen Rothwell [Mon, 24 Feb 2025 22:46:34 +0000 (09:46 +1100)]
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel.git

# Conflicts:
# MAINTAINERS

10 months agoMerge branch 'riscv-dt-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/conor...
Stephen Rothwell [Mon, 24 Feb 2025 22:46:27 +0000 (09:46 +1100)]
Merge branch 'riscv-dt-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git

10 months agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git
Stephen Rothwell [Mon, 24 Feb 2025 22:46:26 +0000 (09:46 +1100)]
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git

10 months agoMerge branch 'hyperv-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv...
Stephen Rothwell [Mon, 24 Feb 2025 22:46:25 +0000 (09:46 +1100)]
Merge branch 'hyperv-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git

10 months agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git
Stephen Rothwell [Mon, 24 Feb 2025 22:46:24 +0000 (09:46 +1100)]
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git

10 months agoMerge branch 'hwmon' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux...
Stephen Rothwell [Mon, 24 Feb 2025 22:46:22 +0000 (09:46 +1100)]
Merge branch 'hwmon' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git

10 months agoMerge branch 'master' of git://git.kernel.org/pub/scm/virt/kvm/kvm.git
Stephen Rothwell [Mon, 24 Feb 2025 22:46:21 +0000 (09:46 +1100)]
Merge branch 'master' of git://git.kernel.org/pub/scm/virt/kvm/kvm.git

10 months agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux...
Stephen Rothwell [Mon, 24 Feb 2025 22:46:20 +0000 (09:46 +1100)]
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap.git

10 months agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git
Stephen Rothwell [Mon, 24 Feb 2025 22:46:19 +0000 (09:46 +1100)]
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git

# Conflicts:
# drivers/dma/tegra210-adma.c

10 months agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git
Stephen Rothwell [Mon, 24 Feb 2025 22:46:17 +0000 (09:46 +1100)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git

10 months agoMerge branch 'char-misc-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregk...
Stephen Rothwell [Mon, 24 Feb 2025 22:46:14 +0000 (09:46 +1100)]
Merge branch 'char-misc-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git

10 months agoMerge branch 'fixes-togreg' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23...
Stephen Rothwell [Mon, 24 Feb 2025 22:46:13 +0000 (09:46 +1100)]
Merge branch 'fixes-togreg' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git

10 months agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy.git
Stephen Rothwell [Mon, 24 Feb 2025 22:46:12 +0000 (09:46 +1100)]
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy.git

10 months agoMerge branch 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Stephen Rothwell [Mon, 24 Feb 2025 22:46:11 +0000 (09:46 +1100)]
Merge branch 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git

10 months agoMerge branch 'driver-core-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Stephen Rothwell [Mon, 24 Feb 2025 22:46:10 +0000 (09:46 +1100)]
Merge branch 'driver-core-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git

10 months agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Stephen Rothwell [Mon, 24 Feb 2025 22:46:09 +0000 (09:46 +1100)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git

10 months agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Stephen Rothwell [Mon, 24 Feb 2025 22:46:08 +0000 (09:46 +1100)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git

10 months agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
Stephen Rothwell [Mon, 24 Feb 2025 22:46:07 +0000 (09:46 +1100)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git

10 months agoMerge branch 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git
Stephen Rothwell [Mon, 24 Feb 2025 22:46:06 +0000 (09:46 +1100)]
Merge branch 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git

10 months agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless...
Stephen Rothwell [Mon, 24 Feb 2025 22:46:05 +0000 (09:46 +1100)]
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless.git

10 months agoMerge branch 'main' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git
Stephen Rothwell [Mon, 24 Feb 2025 22:46:03 +0000 (09:46 +1100)]
Merge branch 'main' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git

10 months agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git
Stephen Rothwell [Mon, 24 Feb 2025 22:46:02 +0000 (09:46 +1100)]
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git

10 months agoMerge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux...
Stephen Rothwell [Mon, 24 Feb 2025 22:46:01 +0000 (09:46 +1100)]
Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl.git

10 months agoMerge branch 'fs-current' of linux-next
Stephen Rothwell [Mon, 24 Feb 2025 22:45:59 +0000 (09:45 +1100)]
Merge branch 'fs-current' of linux-next

10 months agoMerge branch 'mm-hotfixes-unstable' of git://git.kernel.org/pub/scm/linux/kernel...
Stephen Rothwell [Mon, 24 Feb 2025 22:45:58 +0000 (09:45 +1100)]
Merge branch 'mm-hotfixes-unstable' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

10 months agoMerge branch 'next-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave... linux-next/fs-current
Stephen Rothwell [Mon, 24 Feb 2025 22:23:25 +0000 (09:23 +1100)]
Merge branch 'next-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git

10 months agoMerge branch 'vfs.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
Stephen Rothwell [Mon, 24 Feb 2025 22:23:24 +0000 (09:23 +1100)]
Merge branch 'vfs.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git

10 months agoselftests: drv-net: test XDP, HDS auto and the ioctl path
Jakub Kicinski [Fri, 21 Feb 2025 02:51:41 +0000 (18:51 -0800)]
selftests: drv-net: test XDP, HDS auto and the ioctl path

Test XDP and HDS interaction. While at it add a test for using the IOCTL,
as that turned out to be the real culprit.

Testing bnxt:

  # NETIF=eth0 ./ksft-net-drv/drivers/net/hds.py
  KTAP version 1
  1..12
  ok 1 hds.get_hds
  ok 2 hds.get_hds_thresh
  ok 3 hds.set_hds_disable # SKIP disabling of HDS not supported by the device
  ok 4 hds.set_hds_enable
  ok 5 hds.set_hds_thresh_zero
  ok 6 hds.set_hds_thresh_max
  ok 7 hds.set_hds_thresh_gt
  ok 8 hds.set_xdp
  ok 9 hds.enabled_set_xdp
  ok 10 hds.ioctl
  ok 11 hds.ioctl_set_xdp
  ok 12 hds.ioctl_enabled_set_xdp
  # Totals: pass:11 fail:0 xfail:0 xpass:0 skip:1 error:0

and netdevsim:

  # ./ksft-net-drv/drivers/net/hds.py
  KTAP version 1
  1..12
  ok 1 hds.get_hds
  ok 2 hds.get_hds_thresh
  ok 3 hds.set_hds_disable
  ok 4 hds.set_hds_enable
  ok 5 hds.set_hds_thresh_zero
  ok 6 hds.set_hds_thresh_max
  ok 7 hds.set_hds_thresh_gt
  ok 8 hds.set_xdp
  ok 9 hds.enabled_set_xdp
  ok 10 hds.ioctl
  ok 11 hds.ioctl_set_xdp
  ok 12 hds.ioctl_enabled_set_xdp
  # Totals: pass:12 fail:0 xfail:0 xpass:0 skip:0 error:0

Netdevsim needs a sane default for tx/rx ring size.

ethtool 6.11 is needed for the --disable-netlink option.

Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Tested-by: Taehee Yoo <ap420073@gmail.com>
Link: https://patch.msgid.link/20250221025141.1132944-2-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
10 months agonet: ethtool: fix ioctl confusing drivers about desired HDS user config
Jakub Kicinski [Fri, 21 Feb 2025 02:51:40 +0000 (18:51 -0800)]
net: ethtool: fix ioctl confusing drivers about desired HDS user config

The legacy ioctl path does not have support for extended attributes.
So we issue a GET to fetch the current settings from the driver,
in an attempt to keep them unchanged. HDS is a bit "special" as
the GET only returns on/off while the SET takes a "ternary" argument
(on/off/default). If the driver was in the "default" setting -
executing the ioctl path binds it to on or off, even tho the user
did not intend to change HDS config.

Factor the relevant logic out of the netlink code and reuse it.

Fixes: 87c8f8496a05 ("bnxt_en: add support for tcp-data-split ethtool command")
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Tested-by: Daniel Xu <dxu@dxuuu.xyz>
Tested-by: Taehee Yoo <ap420073@gmail.com>
Link: https://patch.msgid.link/20250221025141.1132944-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
10 months agoMerge branch into tip/master: 'perf/urgent'
Ingo Molnar [Mon, 24 Feb 2025 19:40:17 +0000 (20:40 +0100)]
Merge branch into tip/master: 'perf/urgent'

 # New commits in perf/urgent:
    bddf10d26e6e ("uprobes: Reject the shared zeropage in uprobe_write_opcode()")
    2016066c6619 ("perf/core: Order the PMU list to fix warning about unordered pmu_ctx_list")
    0fe8813baf4b ("perf/core: Add RCU read lock protection to perf_iterate_ctx()")

Signed-off-by: Ingo Molnar <mingo@kernel.org>
10 months agoMerge branch into tip/master: 'locking/urgent'
Ingo Molnar [Mon, 24 Feb 2025 19:40:17 +0000 (20:40 +0100)]
Merge branch into tip/master: 'locking/urgent'

 # New commits in locking/urgent:
    b9a49520679e ("rcuref: Plug slowpath race in rcuref_put()")

Signed-off-by: Ingo Molnar <mingo@kernel.org>
10 months agouprobes: Reject the shared zeropage in uprobe_write_opcode()
Tong Tiangen [Mon, 24 Feb 2025 03:11:49 +0000 (11:11 +0800)]
uprobes: Reject the shared zeropage in uprobe_write_opcode()

We triggered the following crash in syzkaller tests:

  BUG: Bad page state in process syz.7.38  pfn:1eff3
  page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1eff3
  flags: 0x3fffff00004004(referenced|reserved|node=0|zone=1|lastcpupid=0x1fffff)
  raw: 003fffff00004004 ffffe6c6c07bfcc8 ffffe6c6c07bfcc8 0000000000000000
  raw: 0000000000000000 0000000000000000 00000000fffffffe 0000000000000000
  page dumped because: PAGE_FLAGS_CHECK_AT_FREE flag(s) set
  Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014
  Call Trace:
   <TASK>
   dump_stack_lvl+0x32/0x50
   bad_page+0x69/0xf0
   free_unref_page_prepare+0x401/0x500
   free_unref_page+0x6d/0x1b0
   uprobe_write_opcode+0x460/0x8e0
   install_breakpoint.part.0+0x51/0x80
   register_for_each_vma+0x1d9/0x2b0
   __uprobe_register+0x245/0x300
   bpf_uprobe_multi_link_attach+0x29b/0x4f0
   link_create+0x1e2/0x280
   __sys_bpf+0x75f/0xac0
   __x64_sys_bpf+0x1a/0x30
   do_syscall_64+0x56/0x100
   entry_SYSCALL_64_after_hwframe+0x78/0xe2

   BUG: Bad rss-counter state mm:00000000452453e0 type:MM_FILEPAGES val:-1

The following syzkaller test case can be used to reproduce:

  r2 = creat(&(0x7f0000000000)='./file0\x00', 0x8)
  write$nbd(r2, &(0x7f0000000580)=ANY=[], 0x10)
  r4 = openat(0xffffffffffffff9c, &(0x7f0000000040)='./file0\x00', 0x42, 0x0)
  mmap$IORING_OFF_SQ_RING(&(0x7f0000ffd000/0x3000)=nil, 0x3000, 0x0, 0x12, r4, 0x0)
  r5 = userfaultfd(0x80801)
  ioctl$UFFDIO_API(r5, 0xc018aa3f, &(0x7f0000000040)={0xaa, 0x20})
  r6 = userfaultfd(0x80801)
  ioctl$UFFDIO_API(r6, 0xc018aa3f, &(0x7f0000000140))
  ioctl$UFFDIO_REGISTER(r6, 0xc020aa00, &(0x7f0000000100)={{&(0x7f0000ffc000/0x4000)=nil, 0x4000}, 0x2})
  ioctl$UFFDIO_ZEROPAGE(r5, 0xc020aa04, &(0x7f0000000000)={{&(0x7f0000ffd000/0x1000)=nil, 0x1000}})
  r7 = bpf$PROG_LOAD(0x5, &(0x7f0000000140)={0x2, 0x3, &(0x7f0000000200)=ANY=[@ANYBLOB="1800000000120000000000000000000095"], &(0x7f0000000000)='GPL\x00', 0x7, 0x0, 0x0, 0x0, 0x0, '\x00', 0x0, @fallback=0x30, 0xffffffffffffffff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, @void, @value}, 0x94)
  bpf$BPF_LINK_CREATE_XDP(0x1c, &(0x7f0000000040)={r7, 0x0, 0x30, 0x1e, @val=@uprobe_multi={&(0x7f0000000080)='./file0\x00', &(0x7f0000000100)=[0x2], 0x0, 0x0, 0x1}}, 0x40)

The cause is that zero pfn is set to the PTE without increasing the RSS
count in mfill_atomic_pte_zeropage() and the refcount of zero folio does
not increase accordingly. Then, the operation on the same pfn is performed
in uprobe_write_opcode()->__replace_page() to unconditional decrease the
RSS count and old_folio's refcount.

Therefore, two bugs are introduced:

 1. The RSS count is incorrect, when process exit, the check_mm() report
    error "Bad rss-count".

 2. The reserved folio (zero folio) is freed when folio->refcount is zero,
    then free_pages_prepare->free_page_is_bad() report error
    "Bad page state".

There is more, the following warning could also theoretically be triggered:

  __replace_page()
    -> ...
      -> folio_remove_rmap_pte()
        -> VM_WARN_ON_FOLIO(is_zero_folio(folio), folio)

Considering that uprobe hit on the zero folio is a very rare case, just
reject zero old folio immediately after get_user_page_vma_remote().

[ mingo: Cleaned up the changelog ]

Fixes: 7396fa818d62 ("uprobes/core: Make background page replacement logic account for rss_stat counters")
Fixes: 2b1444983508 ("uprobes, mm, x86: Add the ability to install and remove uprobes breakpoints")
Signed-off-by: Tong Tiangen <tongtiangen@huawei.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Link: https://lore.kernel.org/r/20250224031149.1598949-1-tongtiangen@huawei.com
10 months agoperf/core: Order the PMU list to fix warning about unordered pmu_ctx_list
Luo Gengkun [Wed, 22 Jan 2025 07:33:56 +0000 (07:33 +0000)]
perf/core: Order the PMU list to fix warning about unordered pmu_ctx_list

Syskaller triggers a warning due to prev_epc->pmu != next_epc->pmu in
perf_event_swap_task_ctx_data(). vmcore shows that two lists have the same
perf_event_pmu_context, but not in the same order.

The problem is that the order of pmu_ctx_list for the parent is impacted by
the time when an event/PMU is added. While the order for a child is
impacted by the event order in the pinned_groups and flexible_groups. So
the order of pmu_ctx_list in the parent and child may be different.

To fix this problem, insert the perf_event_pmu_context to its proper place
after iteration of the pmu_ctx_list.

The follow testcase can trigger above warning:

 # perf record -e cycles --call-graph lbr -- taskset -c 3 ./a.out &
 # perf stat -e cpu-clock,cs -p xxx // xxx is the pid of a.out

 test.c

 void main() {
        int count = 0;
        pid_t pid;

        printf("%d running\n", getpid());
        sleep(30);
        printf("running\n");

        pid = fork();
        if (pid == -1) {
                printf("fork error\n");
                return;
        }
        if (pid == 0) {
                while (1) {
                        count++;
                }
        } else {
                while (1) {
                        count++;
                }
        }
 }

The testcase first opens an LBR event, so it will allocate task_ctx_data,
and then open tracepoint and software events, so the parent context will
have 3 different perf_event_pmu_contexts. On inheritance, child ctx will
insert the perf_event_pmu_context in another order and the warning will
trigger.

[ mingo: Tidied up the changelog. ]

Fixes: bd2756811766 ("perf: Rewrite core context handling")
Signed-off-by: Luo Gengkun <luogengkun@huaweicloud.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Kan Liang <kan.liang@linux.intel.com>
Link: https://lore.kernel.org/r/20250122073356.1824736-1-luogengkun@huaweicloud.com
10 months agoMerge tag 'kvm-riscv-fixes-6.14-1' of https://github.com/kvm-riscv/linux into HEAD
Paolo Bonzini [Mon, 24 Feb 2025 18:20:30 +0000 (13:20 -0500)]
Merge tag 'kvm-riscv-fixes-6.14-1' of https://github.com/kvm-riscv/linux into HEAD

KVM/riscv fixes for 6.14, take #1

- Fix hart status check in SBI HSM extension
- Fix hart suspend_type usage in SBI HSM extension
- Fix error returned by SBI IPI and TIME extensions for
  unsupported function IDs
- Fix suspend_type usage in SBI SUSP extension
- Remove unnecessary vcpu kick after injecting interrupt
  via IMSIC guest file

10 months agoMerge tag 'kvmarm-fixes-6.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git...
Paolo Bonzini [Mon, 24 Feb 2025 18:20:00 +0000 (13:20 -0500)]
Merge tag 'kvmarm-fixes-6.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD

KVM/arm64 fixes for 6.14, take #3

- Fix TCR_EL2 configuration to not use the ASID in TTBR1_EL2
  and not mess-up T1SZ/PS by using the HCR_EL2.E2H==0 layout.

- Bring back the VMID allocation to the vcpu_load phase, ensuring
  that we only setup VTTBR_EL2 once on VHE. This cures an ugly
  race that would lead to running with an unallocated VMID.

10 months agoperf/core: Add RCU read lock protection to perf_iterate_ctx()
Breno Leitao [Fri, 17 Jan 2025 14:41:07 +0000 (06:41 -0800)]
perf/core: Add RCU read lock protection to perf_iterate_ctx()

The perf_iterate_ctx() function performs RCU list traversal but
currently lacks RCU read lock protection. This causes lockdep warnings
when running perf probe with unshare(1) under CONFIG_PROVE_RCU_LIST=y:

WARNING: suspicious RCU usage
kernel/events/core.c:8168 RCU-list traversed in non-reader section!!

 Call Trace:
  lockdep_rcu_suspicious
  ? perf_event_addr_filters_apply
  perf_iterate_ctx
  perf_event_exec
  begin_new_exec
  ? load_elf_phdrs
  load_elf_binary
  ? lock_acquire
  ? find_held_lock
  ? bprm_execve
  bprm_execve
  do_execveat_common.isra.0
  __x64_sys_execve
  do_syscall_64
  entry_SYSCALL_64_after_hwframe

This protection was previously present but was removed in commit
bd2756811766 ("perf: Rewrite core context handling"). Add back the
necessary rcu_read_lock()/rcu_read_unlock() pair around
perf_iterate_ctx() call in perf_event_exec().

[ mingo: Use scoped_guard() as suggested by Peter ]

Fixes: bd2756811766 ("perf: Rewrite core context handling")
Signed-off-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250117-fix_perf_rcu-v1-1-13cb9210fc6a@debian.org
10 months agoASoC: es8328: fix route from DAC to output
Nicolas Frattaroli [Sat, 22 Feb 2025 19:39:57 +0000 (20:39 +0100)]
ASoC: es8328: fix route from DAC to output

The ES8328 codec driver, which is also used for the ES8388 chip that
appears to have an identical register map, claims that the output can
either take the route from DAC->Mixer->Output or through DAC->Output
directly. To the best of what I could find, this is not true, and
creates problems.

Without DACCONTROL17 bit index 7 set for the left channel, as well as
DACCONTROL20 bit index 7 set for the right channel, I cannot get any
analog audio out on Left Out 2 and Right Out 2 respectively, despite the
DAPM routes claiming that this should be possible. Furthermore, the same
is the case for Left Out 1 and Right Out 1, showing that those two don't
have a direct route from DAC to output bypassing the mixer either.

Those control bits toggle whether the DACs are fed (stale bread?) into
their respective mixers. If one "unmutes" the mixer controls in
alsamixer, then sure, the audio output works, but if it doesn't work
without the mixer being fed the DAC input then evidently it's not a
direct output from the DAC.

ES8328/ES8388 are seemingly not alone in this. ES8323, which uses a
separate driver for what appears to be a very similar register map,
simply flips those two bits on in its probe function, and then pretends
there is no power management whatsoever for the individual controls.
Fair enough.

My theory as to why nobody has noticed this up to this point is that
everyone just assumes it's their fault when they had to unmute an
additional control in ALSA.

Fix this in the es8328 driver by removing the erroneous direct route,
then get rid of the playback switch controls and have those bits tied to
the mixer's widget instead, which until now had no register to play
with.

Fixes: 567e4f98922c ("ASoC: add es8328 codec driver")
Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Link: https://patch.msgid.link/20250222-es8328-route-bludgeoning-v1-1-99bfb7fb22d9@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
10 months agoMerge branch 'at91-dt' into at91-next
Claudiu Beznea [Mon, 24 Feb 2025 10:17:17 +0000 (12:17 +0200)]
Merge branch 'at91-dt' into at91-next

10 months agoMerge branch 'at91-soc' into at91-next
Claudiu Beznea [Mon, 24 Feb 2025 10:17:13 +0000 (12:17 +0200)]
Merge branch 'at91-soc' into at91-next

10 months agoARM: at91: Add Support in SoC driver for SAMA7D65
Ryan Wanner [Fri, 14 Feb 2025 18:08:17 +0000 (11:08 -0700)]
ARM: at91: Add Support in SoC driver for SAMA7D65

Add support for SAMA7D65 SoC in the SoC driver.

Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
Link: https://lore.kernel.org/r/84b4a7ec0025741bc3ab647671fd4e880b2ed1d5.1739555984.git.Ryan.Wanner@microchip.com
[claudiu.beznea: add a space after compatibles to comply with the
 existing format]
Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev>
10 months agodt-bindings: atmel-sysreg: Add SAMA7D65 Chip ID
Ryan Wanner [Fri, 14 Feb 2025 18:08:14 +0000 (11:08 -0700)]
dt-bindings: atmel-sysreg: Add SAMA7D65 Chip ID

Add compatible string for SAMA7D65 SoC ChipID dt-bindings.

Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/008e4e49c9fd315cc96a185662b31eca1a64a614.1739555984.git.Ryan.Wanner@microchip.com
Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev>
10 months agoARM: dts: microchip: sama7d65: Enable DMAs
Ryan Wanner [Fri, 14 Feb 2025 18:08:21 +0000 (11:08 -0700)]
ARM: dts: microchip: sama7d65: Enable DMAs

Enable DMA interface for sama7d65_curiosity board.

Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
Link: https://lore.kernel.org/r/e233ab028123bd91b1de7b0f02eb966d719cc0af.1739555984.git.Ryan.Wanner@microchip.com
Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev>
10 months agoARM: dts: microchip: sama7d65: Add DMAs to sama7d65 SoC
Ryan Wanner [Fri, 14 Feb 2025 18:08:20 +0000 (11:08 -0700)]
ARM: dts: microchip: sama7d65: Add DMAs to sama7d65 SoC

Add DMAs to the SAMA7D65 SoC device tree.

Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
Link: https://lore.kernel.org/r/78da4125a991c6f4081fce78825f1f983091e0f5.1739555984.git.Ryan.Wanner@microchip.com
[claudiu.beznea: dropped extra space in reg property of dma0]
Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev>
10 months agoARM: dts: microchip: sama7d65: Add chipID for sama7d65
Ryan Wanner [Fri, 14 Feb 2025 18:08:18 +0000 (11:08 -0700)]
ARM: dts: microchip: sama7d65: Add chipID for sama7d65

Add chipID for the sama7d65 SoC to the device tree.

Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com>
Link: https://lore.kernel.org/r/14e6cafb64df345e6bd79ac96961248cc266770c.1739555984.git.Ryan.Wanner@microchip.com
Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev>
10 months agonet: dsa: rtl8366rb: Fix compilation problem
Linus Walleij [Thu, 20 Feb 2025 18:48:15 +0000 (19:48 +0100)]
net: dsa: rtl8366rb: Fix compilation problem

When the kernel is compiled without LED framework support the
rtl8366rb fails to build like this:

rtl8366rb.o: in function `rtl8366rb_setup_led':
rtl8366rb.c:953:(.text.unlikely.rtl8366rb_setup_led+0xe8):
  undefined reference to `led_init_default_state_get'
rtl8366rb.c:980:(.text.unlikely.rtl8366rb_setup_led+0x240):
  undefined reference to `devm_led_classdev_register_ext'

As this is constantly coming up in different randconfig builds,
bite the bullet and create a separate file for the offending
code, split out a header with all stuff needed both in the
core driver and the leds code.

Add a new bool Kconfig option for the LED compile target, such
that it depends on LEDS_CLASS=y || LEDS_CLASS=RTL8366RB
which make LED support always available when LEDS_CLASS is
compiled into the kernel and enforce that if the LEDS_CLASS
is a module, then the RTL8366RB driver needs to be a module
as well so that modprobe can resolve the dependencies.

Fixes: 32d617005475 ("net: dsa: realtek: add LED drivers for rtl8366rb")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202502070525.xMUImayb-lkp@intel.com/
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 months agoLinux 6.14-rc4 linux-next/stable v6.14-rc4
Linus Torvalds [Sun, 23 Feb 2025 20:32:57 +0000 (12:32 -0800)]
Linux 6.14-rc4

10 months agoMerge tag 'i2c-for-6.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
Linus Torvalds [Sun, 23 Feb 2025 18:37:18 +0000 (10:37 -0800)]
Merge tag 'i2c-for-6.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c fix from Wolfram Sang:
 "Revert one cleanup which turned out to eat too much stack space"

* tag 'i2c-for-6.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: core: Allocate temporary client dynamically

10 months agoMerge tag 'edac_urgent_for_v6.14_rc4' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 23 Feb 2025 17:50:57 +0000 (09:50 -0800)]
Merge tag 'edac_urgent_for_v6.14_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras

Pull EDAC fix from Borislav Petkov:

 - Have qcom_edac use the correct interrupt enable register to configure
   the RAS interrupt lines

* tag 'edac_urgent_for_v6.14_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras:
  EDAC/qcom: Correct interrupt enable register configuration

10 months agoefivarfs: Defer PM notifier registration until .fill_super
Ard Biesheuvel [Sun, 23 Feb 2025 15:48:54 +0000 (16:48 +0100)]
efivarfs: Defer PM notifier registration until .fill_super

syzbot reports an issue that turns out to be caused by the fact that the
efivarfs PM notifier may be invoked before the efivarfs_fs_info::sb
field is populated, resulting in a NULL deference.

So defer the registration until efivarfs_fill_super() is invoked.

Reported-by: syzbot+00d13e505ef530a45100@syzkaller.appspotmail.com
Tested-by: syzbot+00d13e505ef530a45100@syzkaller.appspotmail.com
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
10 months agoefi/cper: Fix cper_arm_ctx_info alignment
Patrick Rudolph [Fri, 21 Feb 2025 11:15:16 +0000 (12:15 +0100)]
efi/cper: Fix cper_arm_ctx_info alignment

According to the UEFI Common Platform Error Record appendix, the
processor context information structure is a variable length structure,
but "is padded with zeros if the size is not a multiple of 16 bytes".

Currently this isn't honoured, causing all but the first structure to
be garbage when printed. Thus align the size to be a multiple of 16.

Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
10 months agoefi/cper: Fix cper_ia_proc_ctx alignment
Patrick Rudolph [Fri, 21 Feb 2025 08:12:42 +0000 (09:12 +0100)]
efi/cper: Fix cper_ia_proc_ctx alignment

According to the UEFI Common Platform Error Record appendix, the
IA32/X64 Processor Context Information Structure is a variable length
structure, but "is padded with zeros if the size is not a multiple
of 16 bytes".

Currently this isn't honoured, causing all but the first structure to
be garbage when printed. Thus align the size to be a multiple of 16.

Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
10 months agoMerge branch 'imx/dt64' into for-next
Shawn Guo [Sun, 23 Feb 2025 12:23:24 +0000 (20:23 +0800)]
Merge branch 'imx/dt64' into for-next

10 months agoMerge branch 'imx/dt' into for-next
Shawn Guo [Sun, 23 Feb 2025 12:23:23 +0000 (20:23 +0800)]
Merge branch 'imx/dt' into for-next

10 months agoMerge branch 'imx/bindings' into for-next
Shawn Guo [Sun, 23 Feb 2025 12:23:23 +0000 (20:23 +0800)]
Merge branch 'imx/bindings' into for-next

10 months agoMerge branch 'imx/drivers' into for-next
Shawn Guo [Sun, 23 Feb 2025 12:23:22 +0000 (20:23 +0800)]
Merge branch 'imx/drivers' into for-next

10 months agoRDMA/bnxt_re: Fix the page details for the srq created by kernel consumers
Kashyap Desai [Sat, 22 Feb 2025 15:20:21 +0000 (07:20 -0800)]
RDMA/bnxt_re: Fix the page details for the srq created by kernel consumers

While using nvme target with use_srq on, below kernel panic is noticed.

[  549.698111] bnxt_en 0000:41:00.0 enp65s0np0: FEC autoneg off encoding: Clause 91 RS(544,514)
[  566.393619] Oops: divide error: 0000 [#1] PREEMPT SMP NOPTI
..
[  566.393799]  <TASK>
[  566.393807]  ? __die_body+0x1a/0x60
[  566.393823]  ? die+0x38/0x60
[  566.393835]  ? do_trap+0xe4/0x110
[  566.393847]  ? bnxt_qplib_alloc_init_hwq+0x1d4/0x580 [bnxt_re]
[  566.393867]  ? bnxt_qplib_alloc_init_hwq+0x1d4/0x580 [bnxt_re]
[  566.393881]  ? do_error_trap+0x7c/0x120
[  566.393890]  ? bnxt_qplib_alloc_init_hwq+0x1d4/0x580 [bnxt_re]
[  566.393911]  ? exc_divide_error+0x34/0x50
[  566.393923]  ? bnxt_qplib_alloc_init_hwq+0x1d4/0x580 [bnxt_re]
[  566.393939]  ? asm_exc_divide_error+0x16/0x20
[  566.393966]  ? bnxt_qplib_alloc_init_hwq+0x1d4/0x580 [bnxt_re]
[  566.393997]  bnxt_qplib_create_srq+0xc9/0x340 [bnxt_re]
[  566.394040]  bnxt_re_create_srq+0x335/0x3b0 [bnxt_re]
[  566.394057]  ? srso_return_thunk+0x5/0x5f
[  566.394068]  ? __init_swait_queue_head+0x4a/0x60
[  566.394090]  ib_create_srq_user+0xa7/0x150 [ib_core]
[  566.394147]  nvmet_rdma_queue_connect+0x7d0/0xbe0 [nvmet_rdma]
[  566.394174]  ? lock_release+0x22c/0x3f0
[  566.394187]  ? srso_return_thunk+0x5/0x5f

Page size and shift info is set only for the user space SRQs.
Set page size and page shift for kernel space SRQs also.

Fixes: 0c4dcd602817 ("RDMA/bnxt_re: Refactor hardware queue memory allocation")
Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Link: https://patch.msgid.link/1740237621-29291-1-git-send-email-selvin.xavier@broadcom.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
10 months agoRDMA/mlx5: Fix bind QP error cleanup flow
Patrisious Haddad [Thu, 20 Feb 2025 06:47:10 +0000 (08:47 +0200)]
RDMA/mlx5: Fix bind QP error cleanup flow

When there is a failure during bind QP, the cleanup flow destroys the
counter regardless if it is the one that created it or not, which is
problematic since if it isn't the one that created it, that counter could
still be in use.

Fix that by destroying the counter only if it was created during this call.

Fixes: 45842fc627c7 ("IB/mlx5: Support statistic q counter configuration")
Signed-off-by: Patrisious Haddad <phaddad@nvidia.com>
Reviewed-by: Mark Zhang <markzhang@nvidia.com>
Link: https://patch.msgid.link/25dfefddb0ebefa668c32e06a94d84e3216257cf.1740033937.git.leon@kernel.org
Reviewed-by: Zhu Yanjun <yanjun.zhu@linux.dev>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
10 months agoarm64: dts: imx8mm-phycore-som: Add overlay to disable SPI NOR flash
Teresa Remmet [Tue, 18 Feb 2025 07:41:56 +0000 (08:41 +0100)]
arm64: dts: imx8mm-phycore-som: Add overlay to disable SPI NOR flash

There are SoM variants with no SPI NOR flash populated. Add overlay to be
able to support this.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Andrej Picej <andrej.picej@norik.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
10 months agoarm64: dts: imx8mm-phycore-som: Add no-eth phy overlay
Teresa Remmet [Tue, 18 Feb 2025 07:41:55 +0000 (08:41 +0100)]
arm64: dts: imx8mm-phycore-som: Add no-eth phy overlay

There are SoM variants with no eth phy populated. Add overlay to be
able to support this.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Andrej Picej <andrej.picej@norik.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
10 months agoarm64: dts: imx8mm-phycore-som: Add overlay for rproc
Dominik Haller [Tue, 18 Feb 2025 07:41:54 +0000 (08:41 +0100)]
arm64: dts: imx8mm-phycore-som: Add overlay for rproc

Adds a devicetree overlay containing reserved memory regions used
for intercore communication between A53 and M4 cores.

Signed-off-by: Dominik Haller <d.haller@phytec.de>
Signed-off-by: Andrej Picej <andrej.picej@norik.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
10 months agoarm64: dts: imx8mm-phyboard-polis: Add overlay for PEB-EVAL-01
Janine Hagemann [Tue, 18 Feb 2025 07:41:53 +0000 (08:41 +0100)]
arm64: dts: imx8mm-phyboard-polis: Add overlay for PEB-EVAL-01

Add support for the PEB-EVAL-01 expansion board for
phyBOARD-Polis-i.MX8MM.

Signed-off-by: Janine Hagemann <j.hagemann@phytec.de>
Signed-off-by: Andrej Picej <andrej.picej@norik.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
10 months agoarm64: dts: imx8mm-phyboard-polis: Add support for PEB-AV-10
Teresa Remmet [Tue, 18 Feb 2025 07:41:52 +0000 (08:41 +0100)]
arm64: dts: imx8mm-phyboard-polis: Add support for PEB-AV-10

PEB-AV-10 is an Audio/Video extension module which extends
phyBOARD-Polis i.MX8MM.
With MIPI DSI to LVDS bridge already populated on SoM the PEB-AV-10 adds
support for:
- connecting 10" display,
- audio with TLV320AIC and
- EEPROM.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Andrej Picej <andrej.picej@norik.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
10 months agoarm64: dts: imx8mm-phyboard-polis: Assign missing regulator for bluetooth
Yashwanth Varakala [Tue, 18 Feb 2025 07:41:51 +0000 (08:41 +0100)]
arm64: dts: imx8mm-phyboard-polis: Assign missing regulator for bluetooth

Assign the missing regulator to the bluetooth node. Absence of
this regulator triggers the warning message from kernel as driver
uses a fallback dummy regulator when there is no regulator assigned.

Signed-off-by: Yashwanth Varakala <y.varakala@phytec.de>
Signed-off-by: Andrej Picej <andrej.picej@norik.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
10 months agoarm64: dts: imx8mm: move bulk of rtc properties to carrierboards
Yannic Moog [Tue, 18 Feb 2025 07:41:50 +0000 (08:41 +0100)]
arm64: dts: imx8mm: move bulk of rtc properties to carrierboards

Move properties from SoM's dtsi to carrierboard's dts as they are
actually defined by the carrier board design.

Signed-off-by: Yannic Moog <y.moog@phytec.de>
Signed-off-by: Andrej Picej <andrej.picej@norik.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
10 months agoarm64: dts: imx8mm-phygate-tauri-l: Set RTC as wakeup-source
Andrej Picej [Tue, 18 Feb 2025 07:41:49 +0000 (08:41 +0100)]
arm64: dts: imx8mm-phygate-tauri-l: Set RTC as wakeup-source

RV-3028 RTC can be used to wakeup the system on phyGATE-Tauri-L-i.MX8MM,
mark the device as wakeup source.

Signed-off-by: Andrej Picej <andrej.picej@norik.com>
Reviewed-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
10 months agoarm64: dts: imx8mm-phyboard-polis: Set RTC as wakeup-source
Andrej Picej [Tue, 18 Feb 2025 07:41:48 +0000 (08:41 +0100)]
arm64: dts: imx8mm-phyboard-polis: Set RTC as wakeup-source

RV-3028 RTC can be used to wakeup the system on phyBOARD-Polis-i.MX8MM,
mark the device as wakeup source.

Signed-off-by: Andrej Picej <andrej.picej@norik.com>
Reviewed-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
10 months agoarm64: dts: imx8mm-phyboard-polis: add RTC description
Yannic Moog [Tue, 18 Feb 2025 07:41:47 +0000 (08:41 +0100)]
arm64: dts: imx8mm-phyboard-polis: add RTC description

Add RTC description.

Signed-off-by: Yannic Moog <y.moog@phytec.de>
Signed-off-by: Andrej Picej <andrej.picej@norik.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
10 months agoarm64: dts: imx8mm-phycore-som: add descriptions to nodes
Yannic Moog [Tue, 18 Feb 2025 07:41:46 +0000 (08:41 +0100)]
arm64: dts: imx8mm-phycore-som: add descriptions to nodes

Add missing EEPROM and RTC descriptions. Also use eMMC with
lower-case "e".

Signed-off-by: Yannic Moog <y.moog@phytec.de>
Signed-off-by: Andrej Picej <andrej.picej@norik.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
10 months agoarm64: dts: imx8mm-phycore-som: Assign regulator for dsi to lvds bridge
Yashwanth Varakala [Tue, 18 Feb 2025 07:41:45 +0000 (08:41 +0100)]
arm64: dts: imx8mm-phycore-som: Assign regulator for dsi to lvds bridge

Add a missing voltage regulator of 1.8v to the sn65dsi83
(dsi_lvds bridge) node. Due to the absence of this regulator, a fallback
dummy regulator is used and that triggers a warning message from the
kernel. Assigning the appropriate regulator avoids the warning.

Signed-off-by: Yashwanth Varakala <y.varakala@phytec.de>
Signed-off-by: Andrej Picej <andrej.picej@norik.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
10 months agoarm64: dts: imx8mm-phycore-som: Remove magic-packet property
Teresa Remmet [Tue, 18 Feb 2025 07:41:44 +0000 (08:41 +0100)]
arm64: dts: imx8mm-phycore-som: Remove magic-packet property

Remove device tree property "fsl,magic-packet" as WoL is not working
on the SoM and so not required. This also saves a significant amount of
power during suspend as the ethernet phy is not powered down otherwise.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Andrej Picej <andrej.picej@norik.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
10 months agoarm64: dts: imx8mm-phycore-som: Fix bluetooth wakeup source
Andrej Picej [Tue, 18 Feb 2025 07:41:43 +0000 (08:41 +0100)]
arm64: dts: imx8mm-phycore-som: Fix bluetooth wakeup source

Not using pull-up on the host wake-up line triggers the wake up
immediately after device enters suspend. Fix this by enabling internal
pull-up and setting interrupt triggering on the falling edge.

Signed-off-by: Andrej Picej <andrej.picej@norik.com>
Reviewed-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
10 months agoarm64: dts: imx8mm-phycore-som: Keep LDO3 on in suspend
Teresa Remmet [Tue, 18 Feb 2025 07:41:42 +0000 (08:41 +0100)]
arm64: dts: imx8mm-phycore-som: Keep LDO3 on in suspend

LDO3 is also used as switch for enabling VDD_3V3_S and need to
be kept on during suspend. Disabling this can lead to an unwanted
reset during resume.

Set LDO3 to 2,5V as the voltage should be fix.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Andrej Picej <andrej.picej@norik.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
10 months agoarm64: dts: freescale: imx8mm-verdin-dahlia: add Microphone Jack to sound card
Stefan Eichenberger [Mon, 17 Feb 2025 14:56:41 +0000 (15:56 +0100)]
arm64: dts: freescale: imx8mm-verdin-dahlia: add Microphone Jack to sound card

The simple-audio-card's microphone widget currently connects to the
headphone jack. Routing the microphone input to the microphone jack
allows for independent operation of the microphone and headphones.

This resolves the following boot-time kernel log message, which
indicated a conflict when the microphone and headphone functions were
not separated:
  debugfs: File 'Headphone Jack' in directory 'dapm' already present!

Fixes: 6a57f224f734 ("arm64: dts: freescale: add initial support for verdin imx8m mini")
Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
10 months agoarm64: dts: freescale: imx8mp-verdin-dahlia: add Microphone Jack to sound card
Stefan Eichenberger [Mon, 17 Feb 2025 14:56:40 +0000 (15:56 +0100)]
arm64: dts: freescale: imx8mp-verdin-dahlia: add Microphone Jack to sound card

The simple-audio-card's microphone widget currently connects to the
headphone jack. Routing the microphone input to the microphone jack
allows for independent operation of the microphone and headphones.

This resolves the following boot-time kernel log message, which
indicated a conflict when the microphone and headphone functions were
not separated:
  debugfs: File 'Headphone Jack' in directory 'dapm' already present!

Fixes: 874958916844 ("arm64: dts: freescale: verdin-imx8mp: dahlia: add sound card")
Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
10 months agoarm64: dts: freescale: imx8mm-verdin: Remove LVDS panel and backlight
Francesco Dolcini [Fri, 14 Feb 2025 09:26:34 +0000 (10:26 +0100)]
arm64: dts: freescale: imx8mm-verdin: Remove LVDS panel and backlight

Remove LVDS panel and backlight nodes from the Verdin iMX8M Mini SoM
dtsi file, those two hardware components are not part of the SoM,
therefore they should not be present in this file.

This is solving a dtb checker warning about panel-lvds compatible.

Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
10 months agosoc: imx8m: Unregister cpufreq and soc dev in cleanup path
Peng Fan [Fri, 14 Feb 2025 08:47:51 +0000 (16:47 +0800)]
soc: imx8m: Unregister cpufreq and soc dev in cleanup path

Unregister the cpufreq device and soc device when resource unwinding,
otherwise there will be warning when do removing test:
sysfs: cannot create duplicate filename '/devices/platform/imx-cpufreq-dt'
CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.13.0-rc1-next-20241204
Hardware name: NXP i.MX8MPlus EVK board (DT)

Fixes: 9cc832d37799 ("soc: imx8m: Probe the SoC driver as platform driver")
Cc: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
10 months agoarm64: dts: colibri-imx8x: Add missing gpio-line-names
Rafael Beims [Mon, 10 Feb 2025 12:30:50 +0000 (09:30 -0300)]
arm64: dts: colibri-imx8x: Add missing gpio-line-names

Add missing gpio-line-names for SODIMM_79 and SODIMM_97

Signed-off-by: Rafael Beims <rafael.beims@toradex.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
10 months agoARM: dts: imx28-sps1: Fix GPIO LEDs description
Fabio Estevam [Mon, 3 Feb 2025 17:30:20 +0000 (14:30 -0300)]
ARM: dts: imx28-sps1: Fix GPIO LEDs description

According to leds-gpio.yaml, the LED nodes should not contain
unit addresses. Remove them.

Also, 'default-trigger' is not a valid property. Change it to
'linux,default-trigger'.

These changes fix the following dt-schema warnings:

led@1: Unevaluated properties are not allowed ('reg' was unexpected)
led@2: Unevaluated properties are not allowed ('reg' was unexpected)
led@3: Unevaluated properties are not allowed ('default-trigger', 'reg' were unexpected)
leds: '#address-cells', '#size-cells' do not match any of the regexes: '(^led-[0-9a-f]$|led)', 'pinctrl-[0-9]+'

Signed-off-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
10 months agoARM: dts: vf610-bk4: Use the more specific "lwn,bk4-spi"
Fabio Estevam [Mon, 3 Feb 2025 12:05:11 +0000 (09:05 -0300)]
ARM: dts: vf610-bk4: Use the more specific "lwn,bk4-spi"

Currently, the compatible string used for the spidev device is "lwn,bk4",
which is the same as the board compatible string documented at fsl.yaml.

This causes several dt-schema warnings:

make dtbs_check DT_SCHEMA_FILES=fsl.yaml
...

['lwn,bk4'] is too short
'lwn,bk4' is not one of ['tq,imx8dxp-tqma8xdp-mba8xx']
'lwn,bk4' is not one of ['tq,imx8qxp-tqma8xqp-mba8xx']
'lwn,bk4' is not one of ['armadeus,imx1-apf9328', 'fsl,imx1ads']

Use a more specific "lwn,bk4-spi" compatible string to fix the problem.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
10 months agofoo
Andrew Morton [Sun, 23 Feb 2025 06:26:22 +0000 (22:26 -0800)]
foo

10 months agocpu: remove needless return in void API suspend_enable_secondary_cpus()
Zijun Hu [Fri, 21 Feb 2025 13:02:07 +0000 (05:02 -0800)]
cpu: remove needless return in void API suspend_enable_secondary_cpus()

Remove needless 'return' in void API suspend_enable_secondary_cpus() since
both the API and thaw_secondary_cpus() are void functions.

Link: https://lkml.kernel.org/r/20250221-rmv_return-v1-2-cc8dff275827@quicinc.com
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 months agorhashtable: remove needless return in three void APIs
Zijun Hu [Fri, 21 Feb 2025 13:02:21 +0000 (05:02 -0800)]
rhashtable: remove needless return in three void APIs

Remove needless 'return' in the following void APIs:

 rhltable_walk_enter()
 rhltable_free_and_destroy()
 rhltable_destroy()

Since both the API and callee involved are void functions.

Link: https://lkml.kernel.org/r/20250221-rmv_return-v1-16-cc8dff275827@quicinc.com
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 months agoscripts/gdb: add $lx_per_cpu_ptr()
Brendan Jackman [Thu, 20 Feb 2025 12:23:40 +0000 (12:23 +0000)]
scripts/gdb: add $lx_per_cpu_ptr()

We currently have $lx_per_cpu() which works fine for stuff that kernel
code would access via per_cpu().  But this doesn't work for stuff that
kernel code accesses via per_cpu_ptr():

(gdb) p $lx_per_cpu(node_data[1].node_zones[2]->per_cpu_pageset)
Cannot access memory at address 0xffff11105fbd6c28

This is because we take the address of the pointer and use that as the
offset, instead of using the stored value.

Add a GDB version that mirrors the kernel API, which uses the pointer
value.

To be consistent with per_cpu_ptr(), we need to return the pointer value
instead of dereferencing it for the user.  Therefore, move the existing
dereference out of the per_cpu() Python helper and do that only in the
$lx_per_cpu() implementation.

Link: https://lkml.kernel.org/r/20250220-lx-per-cpu-ptr-v2-1-945dee8d8d38@google.com
Signed-off-by: Brendan Jackman <jackmanb@google.com>
Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Florian Rommel <mail@florommel.de>
Cc: Kieran Bingham <kbingham@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 months agopid: optional first-fit pid allocation
Michal Koutný [Fri, 21 Feb 2025 17:02:49 +0000 (18:02 +0100)]
pid: optional first-fit pid allocation

Noone would need to use this allocation strategy (it's slower, pid
numbers collide sooner). Its primary purpose are pid namespaces in
conjunction with pids.max cgroup limit which keeps (virtual) pid numbers
below the given limit. This is for 32-bit userspace programs that may
not work well with pid numbers above 65536.

Link: https://lore.kernel.org/r/20241122132459.135120-1-aleksandr.mikhalitsyn@canonical.com/
Link: https://lkml.kernel.org/r/20250221170249.890014-3-mkoutny@suse.com
Cc: Alexander Mikhalitsyn <alexander@mihalicyn.com>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Kees Cook <kees@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
10 months agoRevert "pid: allow pid_max to be set per pid namespace"
Michal Koutný [Fri, 21 Feb 2025 17:02:48 +0000 (18:02 +0100)]
Revert "pid: allow pid_max to be set per pid namespace"

Patch series "Alternative "pid_max" for 32-bit userspace".

pid_max is sort of a legacy limit (its value and partially the concept
too, given the existence of pids cgroup controller).  It is tempting to
make the pid_max value part of a pid namespace to provide compat
environment for 32-bit applications [1].  On the other hand, it provides
yet another mechanism for limitation of task count.  Even without
namespacing of pid_max value, the configuration of conscious limit is
confusing for users [2].

This series builds upon the idea of restricting the number (amount) of
tasks by pids controller and ensuring that number (pid) never exceeds the
amount of tasks.  This would not currently work out of the box because
next-fit pid allocation would continue to assign numbers (pids) higher
than the actual amount (there would be gaps in the lower range of the
interval).  The patch 2/2 implements this idea by extending semantics of
ns_last_pid knob to allow first-fit numbering.  (The implementation has
clumsy ifdefery, which can might be dropped since it's too x86-centric.)

The patch 1/2 is a mere revert to simplify pid_max to one global limit
only.

[1] https://lore.kernel.org/r/20241122132459.135120-1-aleksandr.mikhalitsyn@canonical.com/
[2] https://lore.kernel.org/r/bnxhqrq7tip6jl2hu6jsvxxogdfii7ugmafbhgsogovrchxfyp@kagotkztqurt/

This patch (of 2):

This reverts commit 7863dcc72d0f4b13a641065670426435448b3d80.

It is already difficult for users to troubleshoot which of multiple pid
limits restricts their workload.  I'm afraid making pid_max
per-(hierarchical-)NS will contribute to confusion.  Also, the
implementation copies the limit upon creation from parent, this pattern
showed cumbersome with some attributes in legacy cgroup controllers --
it's subject to race condition between parent's limit modification and
children creation and once copied it must be changed in the descendant.

This is very similar to what pids.max of a cgroup (already) does that can
be used as an alternative.

Link: https://lkml.kernel.org/r/20250221170249.890014-1-mkoutny@suse.com
Link: https://lore.kernel.org/r/bnxhqrq7tip6jl2hu6jsvxxogdfii7ugmafbhgsogovrchxfyp@kagotkztqurt/
Link: https://lkml.kernel.org/r/20250221170249.890014-2-mkoutny@suse.com
Signed-off-by: Michal Koutný <mkoutny@suse.com>
Cc: Alexander Mikhalitsyn <alexander@mihalicyn.com>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Kees Cook <kees@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>