linux.git
7 weeks agoMerge tag 'irq-urgent-2024-03-17' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Mon, 18 Mar 2024 16:10:44 +0000 (09:10 -0700)]
Merge tag 'irq-urgent-2024-03-17' of git://git./linux/kernel/git/tip/tip

Pull irq fix from Ingo Molnar:
 "A RISC-V irqchip driver fix"

* tag 'irq-urgent-2024-03-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqchip/riscv-intc: Fix use of AIA interrupts 32-63 on riscv32

7 weeks agoMerge tag 'sound-fix-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
Linus Torvalds [Mon, 18 Mar 2024 16:05:37 +0000 (09:05 -0700)]
Merge tag 'sound-fix-6.9-rc1' of git://git./linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "Two regression fixes that had been introduced in this merge window,
  additional HD-audio quirks, and a further enhancement for the new
  kunit"

* tag 'sound-fix-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: core: add kunitconfig
  ALSA: hda/realtek: add in quirk for Acer Swift Go 16 - SFG16-71
  Revert "ALSA: usb-audio: Name feature ctl using output if input is PCM"
  ALSA: timer: Fix missing irq-disable at closing
  ALSA: hda/realtek: Add quirk for Lenovo Yoga 9 14IMH9

7 weeks agoMerge tag 'i3c/for-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux
Linus Torvalds [Sun, 17 Mar 2024 23:59:33 +0000 (16:59 -0700)]
Merge tag 'i3c/for-6.9' of git://git./linux/kernel/git/i3c/linux

Pull i3c updates from Alexandre Belloni:
 "Not much this cycle with only three patches.

  Core:
   - i3c_bus_type is now const

  Drivers:
   - dw: disabling IBI is only allowed when hot join and SIR are disabled"

* tag 'i3c/for-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux:
  i3c: Make i3c_bus_type const
  i3c: dw: Disable IBI IRQ depends on hot-join and SIR enabling
  dt-bindings: i3c: drop "master" node name suffix

7 weeks agoMerge tag 'efi-fixes-for-v6.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 17 Mar 2024 19:26:04 +0000 (12:26 -0700)]
Merge tag 'efi-fixes-for-v6.9-1' of git://git./linux/kernel/git/efi/efi

Pull EFI fix from Ard Biesheuvel:
 "This fixes an oversight on my part in the recent EFI stub rework for
  x86, which is needed to get Linux/x86 distro builds signed again for
  secure boot by Microsoft. For this reason, most of this work is being
  backported to v6.1, which is therefore also affected by this
  regression.

   - Explicitly wipe BSS in the native EFI entrypoint, so that globals
     shared with the legacy decompressor are zero-initialized correctly"

* tag 'efi-fixes-for-v6.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi:
  x86/efistub: Clear decompressor BSS in native EFI entrypoint

7 weeks agoMerge tag 'timers-urgent-2024-03-17' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 17 Mar 2024 19:19:02 +0000 (12:19 -0700)]
Merge tag 'timers-urgent-2024-03-17' of git://git./linux/kernel/git/tip/tip

Pull timer fix from Ingo Molnar:
 "Fix timer migration bug that can result in long bootup delays and
  other oddities"

* tag 'timers-urgent-2024-03-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  timer/migration: Remove buggy early return on deactivation

7 weeks agoMerge tag 'perf-urgent-2024-03-17' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 17 Mar 2024 19:12:55 +0000 (12:12 -0700)]
Merge tag 'perf-urgent-2024-03-17' of git://git./linux/kernel/git/tip/tip

Pull x86 perf event fixes from Ingo Molnar:

 - Work around AMD erratum to filter out bogus LBR stack entries

 - Fix incorrect PMU reset that can result in warnings (or worse)
   during suspend/hibernation

* tag 'perf-urgent-2024-03-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf/x86/amd/core: Avoid register reset when CPU is dead
  perf/x86/amd/lbr: Discard erroneous branch entries

7 weeks agoMerge tag 'linux-watchdog-6.9-rc1' of git://www.linux-watchdog.org/linux-watchdog
Linus Torvalds [Sun, 17 Mar 2024 19:06:10 +0000 (12:06 -0700)]
Merge tag 'linux-watchdog-6.9-rc1' of git://linux-watchdog.org/linux-watchdog

Pull watchdog updates from Wim Van Sebroeck:

 - Remove usage of the deprecated ida_simple_xx() API

 - Add kernel-doc for wdt_set_timeout()

 - Add support for R-Car V4M, StarFive's JH8100 and sam9x7-wdt

 - Fixes and small improvements

* tag 'linux-watchdog-6.9-rc1' of git://www.linux-watchdog.org/linux-watchdog:
  watchdog: intel-mid_wdt: Get platform data via dev_get_platdata()
  watchdog: intel-mid_wdt: Don't use "proxy" headers
  watchdog: intel-mid_wdt: Remove unused intel-mid.h
  dt-bindings: watchdog: sama5d4-wdt: add compatible for sam9x7-wdt
  dt-bindings: watchdog: sprd,sp9860-wdt: convert to YAML
  dt-bindings: watchdog: starfive,jh7100-wdt: Add compatible for JH8100
  watchdog: stm32_iwdg: initialize default timeout
  dt-bindings: watchdog: arm,sp805: document the reset signal
  watchdog: sp805_wdt: deassert the reset if available
  watchdog/hpwdt: Support Suspend and Resume
  dt-bindings: watchdog: renesas-wdt: Add support for R-Car V4M
  watchdog: starfive: check watchdog status before enabling in system resume
  watchdog: starfive: Check pm_runtime_enabled() before decrementing usage counter
  watchdog: qcom: fine tune the max timeout value calculation
  watchdog: Add kernel-doc for wdt_set_timeout()
  watchdog: core: Remove usage of the deprecated ida_simple_xx() API

7 weeks agoMerge tag 'pcmcia-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo...
Linus Torvalds [Sun, 17 Mar 2024 19:02:21 +0000 (12:02 -0700)]
Merge tag 'pcmcia-6.9-rc1' of git://git./linux/kernel/git/brodo/linux

Pull PCMCIA updates from Dominik Brodowski:
 "Mark some structs 'const' now that the driver core supports it
  (Ricardo B Marliere)"

* tag 'pcmcia-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux:
  pcmcia: cs: make pcmcia_socket_class constant
  pcmcia: ds: make pcmcia_bus_type const

7 weeks agoMerge tag 'input-for-v6.9-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor...
Linus Torvalds [Sun, 17 Mar 2024 18:50:54 +0000 (11:50 -0700)]
Merge tag 'input-for-v6.9-rc0' of git://git./linux/kernel/git/dtor/input

Pull input updates from Dmitry Torokhov:

 - a new driver for Goodix Berlin I2C and SPI touch controllers

 - support for IQS7222D v1.1 and v1.2 in iqs7222 driver

 - support for IST3032C and IST3038B parts in Imagis touchscreen driver

 - support for touch keys for Imagis touchscreen controllers

 - support for Snakebyte GAMEPADs in xpad driver

 - various cleanups and conversions to yaml for device tree bindings

 - assorted fixes and cleanups

 - old Synaptics navpoint driver has been removed since the only board
   that used it (HP iPAQ hx4700) was removed a while ago.

* tag 'input-for-v6.9-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (37 commits)
  Input: xpad - add support for Snakebyte GAMEPADs
  dt-bindings: input: samsung,s3c6410-keypad: convert to DT Schema
  Input: imagis - add touch key support
  dt-bindings: input: imagis: Document touch keys
  Input: imagis - use FIELD_GET where applicable
  Input: make input_class constant
  dt-bindings: input: atmel,captouch: convert bindings to YAML
  Input: iqs7222 - add support for IQS7222D v1.1 and v1.2
  dt-bindings: input: allwinner,sun4i-a10-lrad: drop redundant type from label
  Input: serio - make serio_bus const
  Input: synaptics-rmi4 - make rmi_bus_type const
  Input: xilinx_ps2 - fix kernel-doc for xps2_of_probe function
  input/touchscreen: imagis: add support for IST3032C
  dt-bindings: input/touchscreen: imagis: add compatible for IST3032C
  input/touchscreen: imagis: Add support for Imagis IST3038B
  dt-bindings: input/touchscreen: Add compatible for IST3038B
  input/touchscreen: imagis: Correct the maximum touch area value
  Input: leds - change config symbol dependency for audio mute trigger
  Input: ti_am335x_tsc - remove redundant assignment to variable config
  Input: xpad - sort xpad_device by vendor and product ID
  ...

7 weeks agoALSA: core: add kunitconfig
Takashi Sakamoto [Sun, 17 Mar 2024 02:40:50 +0000 (11:40 +0900)]
ALSA: core: add kunitconfig

It is helpful to add .kunitconfig if we work with the tools provided by
KUnit project. The file describes the series of kernel configurations to
satisfy the dependency to build the target test.

For example:

$ ./tools/testing/kunit/kunit.py run --arch=arm64 --cross_compile=aarch64-linux-gnu- --kunitconfig=sound/core/
[11:35:13] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=arm64 O=.kunit olddefconfig CROSS_COMPILE=aarch64-linux-gnu-
[11:35:19] Building KUnit Kernel ...
Populating config with:
$ make ARCH=arm64 O=.kunit olddefconfig CROSS_COMPILE=aarch64-linux-gnu-
Building with:
$ make ARCH=arm64 O=.kunit --jobs=8 CROSS_COMPILE=aarch64-linux-gnu-
[11:37:35] Starting KUnit Kernel (1/1)...
[11:37:35] ============================================================
Running tests with:
$ qemu-system-aarch64 -nodefaults -m 1024 -kernel .kunit/arch/arm64/boot/Image.gz -append 'kunit.enable=1 console=ttyAMA0 kunit_shutdown=reboot' -no-reboot -nographic -serial stdio -machine virt -cpu max,pauth-impdef=on
[11:37:35] ============== sound-core-test (10 subtests) ===============
[11:37:35] [PASSED] test_phys_format_size
[11:37:35] [PASSED] test_format_width
[11:37:35] [PASSED] test_format_endianness
[11:37:35] [PASSED] test_format_signed
[11:37:35] [PASSED] test_format_fill_silence
[11:37:35] [PASSED] test_playback_avail
[11:37:35] [PASSED] test_capture_avail
[11:37:35] [PASSED] test_card_set_id
[11:37:35] [PASSED] test_pcm_format_name
[11:37:35] [PASSED] test_card_add_component
[11:37:35] ================= [PASSED] sound-core-test =================
[11:37:35] ============================================================
[11:37:35] Testing complete. Ran 10 tests: passed: 10
[11:37:35] Elapsed time: 142.333s total, 5.617s configuring, 136.047s building, 0.630s running

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Message-ID: <20240317024050.588370-1-o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 weeks agoALSA: hda/realtek: add in quirk for Acer Swift Go 16 - SFG16-71
Ian Murphy [Sat, 16 Mar 2024 09:41:57 +0000 (09:41 +0000)]
ALSA: hda/realtek: add in quirk for Acer Swift Go 16 - SFG16-71

Keyboard has an LED that is ON/OFF when mic is muted/active
 - LED is controlled by GPIO pin
 - Patch enables led to appear in /sys/class/leds/ as hda::micmute
 - Enables LED when mic is MUTED
 - Disables LED when mic is active

[ fixed white spaces by tiwai ]

Signed-off-by: Ian Murphy <iano200@gmail.com>
Message-ID: <20240316094157.13890-1-iano200@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 weeks agoRevert "ALSA: usb-audio: Name feature ctl using output if input is PCM"
Takashi Iwai [Sat, 16 Mar 2024 08:37:30 +0000 (09:37 +0100)]
Revert "ALSA: usb-audio: Name feature ctl using output if input is PCM"

This reverts commit 1601cd53c7e3197181277326dbfc131d20a74e46.

This fix is applied globally to all devices, and it may change the
existing control names.  When the devices are managed with the fixed
configuration like UCM, such control name mismatch may lead to
significant regressions.

For avoiding that kind of regression, we would need to apply such
changes conditionally, but it'd take time to settle down.
While the original fix is a good thing in general, in order to address
the regression, let's revert the change for now.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=218605
Reported-and-tested-by: Niklāvs Koļesņikovs <pinkflames.linux@gmail.com>
Message-ID: <20240316083744.28126-1-tiwai@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 weeks agoMerge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Linus Torvalds [Sat, 16 Mar 2024 23:31:12 +0000 (16:31 -0700)]
Merge tag 'scsi-misc' of git://git./linux/kernel/git/jejb/scsi

Pull SCSI updates from James Bottomley:
 "Only a couple of driver updates this time (lpfc and mpt3sas) plus the
  usual assorted minor fixes and updates. The major core update is a set
  of patches moving retries out of the drivers and into the core"

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (84 commits)
  scsi: core: Constify the struct device_type usage
  scsi: libfc: replace deprecated strncpy() with memcpy()
  scsi: lpfc: Replace deprecated strncpy() with strscpy()
  scsi: bfa: Fix function pointer type mismatch for state machines
  scsi: bfa: Fix function pointer type mismatch for hcb_qe->cbfn
  scsi: bfa: Remove additional unnecessary struct declarations
  scsi: csiostor: Avoid function pointer casts
  scsi: qla1280: Remove redundant assignment to variable 'mr'
  scsi: core: Make scsi_bus_type const
  scsi: core: Really include kunit tests with SCSI_LIB_KUNIT_TEST
  scsi: target: tcm_loop: Make tcm_loop_lld_bus const
  scsi: scsi_debug: Make pseudo_lld_bus const
  scsi: iscsi: Make iscsi_flashnode_bus const
  scsi: fcoe: Make fcoe_bus_type const
  scsi: lpfc: Copyright updates for 14.4.0.0 patches
  scsi: lpfc: Update lpfc version to 14.4.0.0
  scsi: lpfc: Change lpfc_vport load_flag member into a bitmask
  scsi: lpfc: Change lpfc_vport fc_flag member into a bitmask
  scsi: lpfc: Protect vport fc_nodes list with an explicit spin lock
  scsi: lpfc: Change nlp state statistic counters into atomic_t
  ...

7 weeks agoMerge tag 'parisc-for-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/delle...
Linus Torvalds [Sat, 16 Mar 2024 23:25:20 +0000 (16:25 -0700)]
Merge tag 'parisc-for-6.9-rc1' of git://git./linux/kernel/git/deller/parisc-linux

Pull parisc architecture updates and fixes from Helge Deller:
 "Fixes for the IPv4 and IPv6 checksum functions, a fix for the 64-bit
  unaligned memory exception handler and various code cleanups.

  Most of the patches are tagged for stable series.

   - Fix inline assembly in ipv4 and ipv6 checksum functions (Guenter
     Roeck)

   - Rewrite 64-bit inline assembly of emulate_ldd() (Guenter Roeck)

   - Do not clobber carry/borrow bits in tophys and tovirt macros (John
     David Anglin)

   - Warn when kernel accesses unaligned memory"

* tag 'parisc-for-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
  parisc: led: Convert to platform remove callback returning void
  parisc: Strip upper 32 bit of sum in csum_ipv6_magic for 64-bit builds
  parisc: Fix csum_ipv6_magic on 64-bit systems
  parisc: Fix csum_ipv6_magic on 32-bit systems
  parisc: Fix ip_fast_csum
  parisc: Avoid clobbering the C/B bits in the PSW with tophys and tovirt macros
  parisc/unaligned: Rewrite 64-bit inline assembly of emulate_ldd()
  parisc: make parisc_bus_type const
  parisc: avoid c23 'nullptr' idenitifier
  parisc: Show kernel unaligned memory accesses
  parisc: Use irq_enter_rcu() to fix warning at kernel/context_tracking.c:367

7 weeks agotimer/migration: Remove buggy early return on deactivation
Frederic Weisbecker [Fri, 15 Mar 2024 01:14:47 +0000 (02:14 +0100)]
timer/migration: Remove buggy early return on deactivation

When a CPU enters into idle and deactivates itself from the timer
migration hierarchy without any global timer of its own to propagate,
the group event of that CPU is set to "ignore" and tmigr_update_events()
accordingly performs an early return without considering timers queued
by other CPUs.

If the hierarchy has a single level, and the CPU is the last one to
enter idle, it will ignore others' global timers, as in the following
layout:

           [GRP0:0]
         migrator = 0
         active   = 0
         nextevt  = T0i
          /         \
         0           1
      active (T0i)  idle (T1)

0) CPU 0 is active thus its event is ignored (the letter 'i') and so are
upper levels' events. CPU 1 is idle and has the timer T1 enqueued.

           [GRP0:0]
         migrator = NONE
         active   = NONE
         nextevt  = T0i
          /         \
         0           1
      idle (T0i)  idle (T1)

1) CPU 0 goes idle without global event queued. Therefore KTIME_MAX is
pushed as its next expiry and its own event kept as "ignore". As a result
tmigr_update_events() ignores T1 and CPU 0 goes to idle with T1
unhandled.

This isn't proper to single level hierarchy though. A similar issue,
although slightly different, may arise on multi-level:

                            [GRP1:0]
                         migrator = GRP0:0
                         active   = GRP0:0
                         nextevt  = T0:0i, T0:1
                         /              \
              [GRP0:0]                  [GRP0:1]
           migrator = 0              migrator = NONE
           active   = 0              active   = NONE
           nextevt  = T0i            nextevt  = T2
           /         \                /         \
          0 (T0i)     1 (T1)         2 (T2)      3
      active         idle            idle       idle

0) CPU 0 is active thus its event is ignored (the letter 'i') and so are
upper levels' events. CPU 1 is idle and has the timer T1 enqueued.
CPU 2 also has a timer. The expiry order is T0 (ignored) < T1 < T2

                            [GRP1:0]
                         migrator = GRP0:0
                         active   = GRP0:0
                         nextevt  = T0:0i, T0:1
                         /              \
              [GRP0:0]                  [GRP0:1]
           migrator = NONE           migrator = NONE
           active   = NONE           active   = NONE
           nextevt  = T0i            nextevt  = T2
           /         \                /         \
          0 (T0i)     1 (T1)         2 (T2)      3
        idle         idle            idle         idle

1) CPU 0 goes idle without global event queued. Therefore KTIME_MAX is
pushed as its next expiry and its own event kept as "ignore". As a result
tmigr_update_events() ignores T1. The change only propagated up to 1st
level so far.

                            [GRP1:0]
                         migrator = NONE
                         active   = NONE
                         nextevt  = T0:1
                         /              \
              [GRP0:0]                  [GRP0:1]
           migrator = NONE           migrator = NONE
           active   = NONE           active   = NONE
           nextevt  = T0i            nextevt  = T2
           /         \                /         \
          0 (T0i)     1 (T1)         2 (T2)      3
        idle         idle            idle         idle

2) The change now propagates up to the top. tmigr_update_events() finds
that the child event is ignored and thus removes it. The top level next
event is now T2 which is returned to CPU 0 as its next effective expiry
to take account for as the global idle migrator. However T1 has been
ignored along the way, leaving it unhandled.

Fix those issues with removing the buggy related early return. Ignored
child events must not prevent from evaluating the other events within
the same group.

Reported-by: Boqun Feng <boqun.feng@gmail.com>
Reported-by: Florian Fainelli <f.fainelli@gmail.com>
Reported-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://lore.kernel.org/r/ZfOhB9ZByTZcBy4u@lothringen
7 weeks agoMerge tag 'nfs-for-6.9-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Linus Torvalds [Sat, 16 Mar 2024 18:44:00 +0000 (11:44 -0700)]
Merge tag 'nfs-for-6.9-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs

Pull NFS client updates from Trond Myklebust:
 "Highlights include:

  Bugfixes:
   - Fix for an Oops in the NFSv4.2 listxattr handler
   - Correct an incorrect buffer size in listxattr
   - Fix for an Oops in the pNFS flexfiles layout
   - Fix a refcount leak in NFS O_DIRECT writes
   - Fix missing locking in NFS O_DIRECT
   - Avoid an infinite loop in pnfs_update_layout
   - Fix an overflow in the RPC waitqueue queue length counter
   - Ensure that pNFS I/O is also protected by TLS when xprtsec is
     specified by the mount options
   - Fix a leaked folio lock in the netfs read code
   - Fix a potential deadlock in fscache
   - Allow setting the fscache uniquifier in NFSv4
   - Fix an off by one in root_nfs_cat()
   - Fix another off by one in rpc_sockaddr2uaddr()
   - nfs4_do_open() can incorrectly trigger state recovery
   - Various fixes for connection shutdown

  Features and cleanups:
   - Ensure that containers only see their own RPC and NFS stats
   - Enable nconnect for RDMA
   - Remove dead code from nfs_writepage_locked()
   - Various tracepoint additions to track EXCHANGE_ID, GETDEVICEINFO,
     and mount options"

* tag 'nfs-for-6.9-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (29 commits)
  nfs: fix panic when nfs4_ff_layout_prepare_ds() fails
  NFS: trace the uniquifier of fscache
  NFS: Read unlock folio on nfs_page_create_from_folio() error
  NFS: remove unused variable nfs_rpcstat
  nfs: fix UAF in direct writes
  nfs: properly protect nfs_direct_req fields
  NFS: enable nconnect for RDMA
  NFSv4: nfs4_do_open() is incorrectly triggering state recovery
  NFS: avoid infinite loop in pnfs_update_layout.
  NFS: remove sync_mode test from nfs_writepage_locked()
  NFSv4.1/pnfs: fix NFS with TLS in pnfs
  NFS: Fix an off by one in root_nfs_cat()
  nfs: make the rpc_stat per net namespace
  nfs: expose /proc/net/sunrpc/nfs in net namespaces
  sunrpc: add a struct rpc_stats arg to rpc_create_args
  nfs: remove unused NFS_CALL macro
  NFSv4.1: add tracepoint to trunked nfs4_exchange_id calls
  NFS: Fix nfs_netfs_issue_read() xarray locking for writeback interrupt
  SUNRPC: increase size of rpc_wait_queue.qlen from unsigned short to unsigned int
  nfs: fix regression in handling of fsc= option in NFSv4
  ...

7 weeks agoMerge tag 'phy-for-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy
Linus Torvalds [Sat, 16 Mar 2024 18:24:51 +0000 (11:24 -0700)]
Merge tag 'phy-for-6.9' of git://git./linux/kernel/git/phy/linux-phy

Pull phy updates from Vinod Koul:
 "New hardware support:

   - Qualcomm X1E80100 PCIe phy support, SM8550 PCIe1 PHY, SC7180 UFS
     PHY and SDM630 USBC support

   - Rockchip HDMI/eDP Combo PHY driver

   - Mediatek MT8365 CSI phy driver

  Updates:

   - Rework on Qualcomm phy PCS registers and type-c handling

   - Cadence torrent phy updates for multilink configuration

   - TI gmii resume support"

* tag 'phy-for-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: (41 commits)
  phy: constify of_phandle_args in xlate
  phy: ti: tusb1210: Define device IDs
  phy: ti: tusb1210: Use temporary variable for struct device
  phy: rockchip: Add Samsung HDMI/eDP Combo PHY driver
  dt-bindings: phy: Add Rockchip HDMI/eDP Combo PHY schema
  phy: ti: gmii-sel: add resume support
  phy: mtk-mipi-csi: add driver for CSI phy
  dt-bindings: phy: add mediatek MIPI CD-PHY module v0.5
  phy: cadence-torrent: Add USXGMII(156.25MHz) + SGMII/QSGMII(100MHz) multilink config for TI J7200
  dt-bindings: phy: cadence-torrent: Add a separate compatible for TI J7200
  phy: cadence-torrent: Add USXGMII(156.25MHz) + SGMII/QSGMII(100MHz) multilink configuration
  phy: cadence-torrent: Add PCIe(100MHz) + USXGMII(156.25MHz) multilink configuration
  dt-bindings: phy: cadence-torrent: Add optional input reference clock for PLL1
  phy: qcom-qmp-ufs: Switch to devm_clk_bulk_get_all() API
  dt-bindings: phy: qmp-ufs: Fix PHY clocks
  phy: qcom: sgmii-eth: move PCS registers to separate header
  phy: qcom: sgmii-eth: use existing register definitions
  phy: qcom: qmp-usbc: drop has_pwrdn_delay handling
  phy: qcom: qmp: move common bits definitions to common header
  phy: qcom: qmp: split DP PHY registers to separate headers
  ...

7 weeks agoMerge tag 'firewire-updates-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 16 Mar 2024 17:17:53 +0000 (10:17 -0700)]
Merge tag 'firewire-updates-6.9' of git://git./linux/kernel/git/ieee1394/linux1394

Pull firewire updates from Takashi Sakamoto:
 "Small changes to string processing in device attribute"

* tag 'firewire-updates-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394:
  firewire: core: fix build failure due to the caller of fw_csr_string()
  firewire: Convert snprintf/sprintf to sysfs_emit
  firewire: Kill unnecessary buf check in device_attribute.show

7 weeks agoMerge tag 'cxl-for-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl
Linus Torvalds [Sat, 16 Mar 2024 17:04:12 +0000 (10:04 -0700)]
Merge tag 'cxl-for-6.9' of git://git./linux/kernel/git/cxl/cxl

Pull CXL updates from Dan Williams:
 "CXL has mechanisms to enumerate the performance characteristics of
  memory devices. Those mechanisms allow Linux to build the equivalent
  of ACPI SRAT, SLIT, and HMAT tables dynamically at runtime. That
  capability is necessary because static ACPI can not represent dynamic
  CXL configurations (and reconfigurations).

  So, building on the v6.8 work to add "Quality of Service" enumeration,
  this update plumbs CXL "access coordinates" (read/write access latency
  and bandwidth) in all the same places that ACPI HMAT feeds similar
  data. Follow-on patches from the -mm side can then use that data to
  feed mechanisms like mm/memory-tiers.c. Greg has acked the touch to
  drivers/base/.

  The other feature update this cycle is support for CXL error injection
  via the ACPI EINJ module. That facility enables injection of bus
  protocol errors provided the user knows the magic address values to
  insert in the interface. To hide that magic, and make this easier to
  use, new error injection attributes were added to CXL debugfs. That
  interface injects the errors relative to a CXL object rather than
  require user tooling to know how to lookup and inject RCRB (Root
  Complex Register Block) addresses into the raw EINJ debugfs interface.
  It received some helpful review comments from Tony, but no explicit
  acks from the ACPI side. The primary user visible change for existing
  EINJ users is that they may find that einj.ko was already loaded by
  cxl_core.ko. Previously, einj.ko was only loaded on demand.

  The usual collection of miscellaneous cleanups are also present this
  cycle.

  Summary:

   - Supplement ACPI HMAT reported memory performance with native CXL
     memory performance enumeration

   - Add support for CXL error injection via the ACPI EINJ mechanism

   - Cleanup CXL DOE and CDAT integration

   - Miscellaneous cleanups and fixes"

* tag 'cxl-for-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl: (21 commits)
  Documentation/ABI/testing/debugfs-cxl: Fix "Unexpected indentation"
  lib/firmware_table: Provide buffer length argument to cdat_table_parse()
  cxl/pci: Get rid of pointer arithmetic reading CDAT table
  cxl/pci: Rename DOE mailbox handle to doe_mb
  cxl: Fix the incorrect assignment of SSLBIS entry pointer initial location
  cxl/core: Add CXL EINJ debugfs files
  EINJ, Documentation: Update EINJ kernel doc
  EINJ: Add CXL error type support
  EINJ: Migrate to a platform driver
  cxl/region: Deal with numa nodes not enumerated by SRAT
  cxl/region: Add memory hotplug notifier for cxl region
  cxl/region: Add sysfs attribute for locality attributes of CXL regions
  cxl/region: Calculate performance data for a region
  cxl: Set cxlmd->endpoint before adding port device
  cxl: Move QoS class to be calculated from the nearest CPU
  cxl: Split out host bridge access coordinates
  cxl: Split out combine_coordinates() for common shared usage
  ACPI: HMAT / cxl: Add retrieval of generic port coordinates for both access classes
  ACPI: HMAT: Introduce 2 levels of generic port access class
  base/node / ACPI: Enumerate node access class for 'struct access_coordinate'
  ...

7 weeks agonfs: fix panic when nfs4_ff_layout_prepare_ds() fails
Josef Bacik [Mon, 11 Mar 2024 15:11:53 +0000 (11:11 -0400)]
nfs: fix panic when nfs4_ff_layout_prepare_ds() fails

We've been seeing the following panic in production

BUG: kernel NULL pointer dereference, address: 0000000000000065
PGD 2f485f067 P4D 2f485f067 PUD 2cc5d8067 PMD 0
RIP: 0010:ff_layout_cancel_io+0x3a/0x90 [nfs_layout_flexfiles]
Call Trace:
 <TASK>
 ? __die+0x78/0xc0
 ? page_fault_oops+0x286/0x380
 ? __rpc_execute+0x2c3/0x470 [sunrpc]
 ? rpc_new_task+0x42/0x1c0 [sunrpc]
 ? exc_page_fault+0x5d/0x110
 ? asm_exc_page_fault+0x22/0x30
 ? ff_layout_free_layoutreturn+0x110/0x110 [nfs_layout_flexfiles]
 ? ff_layout_cancel_io+0x3a/0x90 [nfs_layout_flexfiles]
 ? ff_layout_cancel_io+0x6f/0x90 [nfs_layout_flexfiles]
 pnfs_mark_matching_lsegs_return+0x1b0/0x360 [nfsv4]
 pnfs_error_mark_layout_for_return+0x9e/0x110 [nfsv4]
 ? ff_layout_send_layouterror+0x50/0x160 [nfs_layout_flexfiles]
 nfs4_ff_layout_prepare_ds+0x11f/0x290 [nfs_layout_flexfiles]
 ff_layout_pg_init_write+0xf0/0x1f0 [nfs_layout_flexfiles]
 __nfs_pageio_add_request+0x154/0x6c0 [nfs]
 nfs_pageio_add_request+0x26b/0x380 [nfs]
 nfs_do_writepage+0x111/0x1e0 [nfs]
 nfs_writepages_callback+0xf/0x30 [nfs]
 write_cache_pages+0x17f/0x380
 ? nfs_pageio_init_write+0x50/0x50 [nfs]
 ? nfs_writepages+0x6d/0x210 [nfs]
 ? nfs_writepages+0x6d/0x210 [nfs]
 nfs_writepages+0x125/0x210 [nfs]
 do_writepages+0x67/0x220
 ? generic_perform_write+0x14b/0x210
 filemap_fdatawrite_wbc+0x5b/0x80
 file_write_and_wait_range+0x6d/0xc0
 nfs_file_fsync+0x81/0x170 [nfs]
 ? nfs_file_mmap+0x60/0x60 [nfs]
 __x64_sys_fsync+0x53/0x90
 do_syscall_64+0x3d/0x90
 entry_SYSCALL_64_after_hwframe+0x46/0xb0

Inspecting the core with drgn I was able to pull this

  >>> prog.crashed_thread().stack_trace()[0]
  #0 at 0xffffffffa079657a (ff_layout_cancel_io+0x3a/0x84) in ff_layout_cancel_io at fs/nfs/flexfilelayout/flexfilelayout.c:2021:27
  >>> prog.crashed_thread().stack_trace()[0]['idx']
  (u32)1
  >>> prog.crashed_thread().stack_trace()[0]['flseg'].mirror_array[1].mirror_ds
  (struct nfs4_ff_layout_ds *)0xffffffffffffffed

This is clear from the stack trace, we call nfs4_ff_layout_prepare_ds()
which could error out initializing the mirror_ds, and then we go to
clean it all up and our check is only for if (!mirror->mirror_ds).  This
is inconsistent with the rest of the users of mirror_ds, which have

  if (IS_ERR_OR_NULL(mirror_ds))

to keep from tripping over this exact scenario.  Fix this up in
ff_layout_cancel_io() to make sure we don't panic when we get an error.
I also spot checked all the other instances of checking mirror_ds and we
appear to be doing the correct checks everywhere, only unconditionally
dereferencing mirror_ds when we know it would be valid.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Fixes: b739a5bd9d9f ("NFSv4/flexfiles: Cancel I/O if the layout is recalled or revoked")
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
7 weeks agox86/CPU/AMD: Update the Zenbleed microcode revisions
Borislav Petkov (AMD) [Fri, 15 Mar 2024 21:42:27 +0000 (22:42 +0100)]
x86/CPU/AMD: Update the Zenbleed microcode revisions

Update them to the correct revision numbers.

Fixes: 522b1d69219d ("x86/cpu/amd: Add a Zenbleed fix")
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Cc: <stable@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
7 weeks agoMerge tag 'powerpc-6.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
Linus Torvalds [Sat, 16 Mar 2024 00:53:48 +0000 (17:53 -0700)]
Merge tag 'powerpc-6.9-1' of git://git./linux/kernel/git/powerpc/linux

Pull powerpc updates from Michael Ellerman:

 - Add AT_HWCAP3 and AT_HWCAP4 aux vector entries for future use
   by glibc

 - Add support for recognising the Power11 architected and raw PVRs

 - Add support for nr_cpus=n on the command line where the
   boot CPU is >= n

 - Add ppcxx_allmodconfig targets for all 32-bit sub-arches

 - Other small features, cleanups and fixes

Thanks to Akanksha J N, Brian King, Christophe Leroy, Dawei Li, Geoff
Levand, Greg Kroah-Hartman, Jan-Benedict Glaw, Kajol Jain, Kunwu Chan,
Li zeming, Madhavan Srinivasan, Masahiro Yamada, Nathan Chancellor,
Nicholas Piggin, Peter Bergner, Qiheng Lin, Randy Dunlap, Ricardo B.
Marliere, Rob Herring, Sathvika Vasireddy, Shrikanth Hegde, Uwe
Kleine-König, Vaibhav Jain, and Wen Xiong.

* tag 'powerpc-6.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (71 commits)
  powerpc/macio: Make remove callback of macio driver void returned
  powerpc/83xx: Fix build failure with FPU=n
  powerpc/64s: Fix get_hugepd_cache_index() build failure
  powerpc/4xx: Fix warp_gpio_leds build failure
  powerpc/amigaone: Make several functions static
  powerpc/embedded6xx: Fix no previous prototype for avr_uart_send() etc.
  macintosh/adb: make adb_dev_class constant
  powerpc: xor_vmx: Add '-mhard-float' to CFLAGS
  powerpc/fsl: Fix mfpmr() asm constraint error
  powerpc: Remove cpu-as-y completely
  powerpc/fsl: Modernise mt/mfpmr
  powerpc/fsl: Fix mfpmr build errors with newer binutils
  powerpc/64s: Use .machine power4 around dcbt
  powerpc/64s: Move dcbt/dcbtst sequence into a macro
  powerpc/mm: Code cleanup for __hash_page_thp
  powerpc/hv-gpci: Fix the H_GET_PERF_COUNTER_INFO hcall return value checks
  powerpc/irq: Allow softirq to hardirq stack transition
  powerpc: Stop using of_root
  powerpc/machdep: Define 'compatibles' property in ppc_md and use it
  of: Reimplement of_machine_is_compatible() using of_machine_compatible_match()
  ...

7 weeks agoRevert "KVM: arm64: Snapshot all non-zero RES0/RES1 sysreg fields for later checking"
Oliver Upton [Sat, 16 Mar 2024 00:24:57 +0000 (00:24 +0000)]
Revert "KVM: arm64: Snapshot all non-zero RES0/RES1 sysreg fields for later checking"

This reverts commits 99101dda29e3186b1356b0dc4dbb835c02c71ac9 and
b80b701d5a67d07f4df4a21e09cb31f6bc1feeca.

Linus reports that the sysreg reserved bit checks in KVM have led to
build failures, arising from commit fdd867fe9b32 ("arm64/sysreg: Add
register fields for ID_AA64DFR1_EL1") giving meaning to fields that were
previously RES0.

Of course, this is a genuine issue, since KVM's sysreg emulation depends
heavily on the definition of reserved fields. But at this point the
build breakage is far more offensive, and the right course of action is
to revert and retry later.

All of these build-time assertions were on by default before
commit 99101dda29e3 ("KVM: arm64: Make build-time check of RES0/RES1
bits optional"), so deliberately revert it all atomically to avoid
introducing further breakage of bisection.

Link: https://lore.kernel.org/all/CAHk-=whCvkhc8BbFOUf1ddOsgSGgEjwoKv77=HEY1UiVCydGqw@mail.gmail.com/
Acked-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
7 weeks agoMerge branch 'next' into for-linus
Dmitry Torokhov [Fri, 15 Mar 2024 22:04:04 +0000 (15:04 -0700)]
Merge branch 'next' into for-linus

Prepare input updates for 6.9 merge window.

7 weeks agoMerge tag 'block-6.9-20240315' of git://git.kernel.dk/linux
Linus Torvalds [Fri, 15 Mar 2024 21:55:50 +0000 (14:55 -0700)]
Merge tag 'block-6.9-20240315' of git://git.kernel.dk/linux

Pull block fixes from Jens Axboe:

 - Revert of a change for mq-deadline that went into the 6.8 release,
   causing a performance regression for some (Bart)

 - Revert of the interruptible discard handling. This needs more work
   since the ioctl and fs path aren't properly split, and will happen
   for the 6.10 kernel release. For 6.9, do the minimal revert
   (Christoph)

 - Fix for an issue with the timestamp caching code (me)

 - kerneldoc fix (Jiapeng)

* tag 'block-6.9-20240315' of git://git.kernel.dk/linux:
  block: fix mismatched kerneldoc function name
  Revert "blk-lib: check for kill signal"
  Revert "block/mq-deadline: use correct way to throttling write requests"
  block: limit block time caching to in_task() context

7 weeks agoMerge tag 'v6.9-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Fri, 15 Mar 2024 21:46:54 +0000 (14:46 -0700)]
Merge tag 'v6.9-p1' of git://git./linux/kernel/git/herbert/crypto-2.6

Pull crypto updates from Herbert Xu:
 "API:

   - Avoid unnecessary copying in scomp for trivial SG lists

  Algorithms:

   - Optimise NEON CCM implementation on ARM64

  Drivers:

   - Add queue stop/query debugfs support in hisilicon/qm

   - Intel qat updates and cleanups"

* tag 'v6.9-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (79 commits)
  Revert "crypto: remove CONFIG_CRYPTO_STATS"
  crypto: scomp - remove memcpy if sg_nents is 1 and pages are lowmem
  crypto: tcrypt - add ffdhe2048(dh) test
  crypto: iaa - fix the missing CRYPTO_ALG_ASYNC in cra_flags
  crypto: hisilicon/zip - fix the missing CRYPTO_ALG_ASYNC in cra_flags
  hwrng: hisi - use dev_err_probe
  MAINTAINERS: Remove T Ambarus from few mchp entries
  crypto: iaa - Fix comp/decomp delay statistics
  crypto: iaa - Fix async_disable descriptor leak
  dt-bindings: rng: atmel,at91-trng: add sam9x7 TRNG
  dt-bindings: crypto: add sam9x7 in Atmel TDES
  dt-bindings: crypto: add sam9x7 in Atmel SHA
  dt-bindings: crypto: add sam9x7 in Atmel AES
  crypto: remove CONFIG_CRYPTO_STATS
  crypto: dh - Make public key test FIPS-only
  crypto: rockchip - fix to check return value
  crypto: jitter - fix CRYPTO_JITTERENTROPY help text
  crypto: qat - make ring to service map common for QAT GEN4
  crypto: qat - fix ring to service map for dcc in 420xx
  crypto: qat - fix ring to service map for dcc in 4xxx
  ...

7 weeks agoMerge tag 'vfio-v6.9-rc1' of https://github.com/awilliam/linux-vfio
Linus Torvalds [Fri, 15 Mar 2024 20:21:13 +0000 (13:21 -0700)]
Merge tag 'vfio-v6.9-rc1' of https://github.com/awilliam/linux-vfio

Pull VFIO updates from Alex Williamson:

 - Add warning in unlikely case that device is not captured with
   driver_override (Kunwu Chan)

 - Error handling improvements in mlx5-vfio-pci to detect firmware
   tracking object error states, logging of firmware error syndrom, and
   releasing of firmware resources in aborted migration sequence (Yishai
   Hadas)

 - Correct an un-alphabetized VFIO MAINTAINERS entry (Alex Williamson)

 - Make the mdev_bus_type const and also make the class struct const for
   a couple of the vfio-mdev sample drivers (Ricardo B. Marliere)

 - Addition of a new vfio-pci variant driver for the GPU of NVIDIA's
   Grace-Hopper superchip. During initialization of the chip-to-chip
   interconnect in this hardware module, the PCI BARs of the device
   become unused in favor of a faster, coherent mechanism for exposing
   device memory. This driver primarily changes the VFIO representation
   of the device to masquerade this coherent aperture to replace the
   physical PCI BARs for userspace drivers. This also incorporates use
   of a new vma flag allowing KVM to use write combining attributes for
   uncached device memory (Ankit Agrawal)

 - Reset fixes and cleanups for the pds-vfio-pci driver. Save and
   restore files were previously leaked if the device didn't pass
   through an error state, this is resolved and later re-fixed to
   prevent access to the now freed files. Reset handling is also
   refactored to remove the complicated deferred reset mechanism (Brett
   Creeley)

 - Remove some references to pl330 in the vfio-platform amba driver
   (Geert Uytterhoeven)

 - Remove twice redundant and ugly code to unpin incidental pins of the
   zero-page (Alex Williamson)

 - Deferred reset logic is also removed from the hisi-acc-vfio-pci
   driver as a simplification (Shameer Kolothum)

 - Enforce that mlx5-vfio-pci devices must support PRE_COPY and remove
   resulting unnecessary code. There is no device firmware that has been
   available publicly without this support (Yishai Hadas)

 - Switch over to using the .remove_new callback for vfio-platform in
   support of the broader transition for a void remove function (Uwe
   Kleine-König)

 - Resolve multiple issues in interrupt code for VFIO bus drivers that
   allow calling eventfd_signal() on a NULL context. This also remove a
   potential race in INTx setup on certain hardware for vfio-pci, races
   with various mechanisms to mask INTx, and leaked virqfds in
   vfio-platform (Alex Williamson)

* tag 'vfio-v6.9-rc1' of https://github.com/awilliam/linux-vfio: (29 commits)
  vfio/fsl-mc: Block calling interrupt handler without trigger
  vfio/platform: Create persistent IRQ handlers
  vfio/platform: Disable virqfds on cleanup
  vfio/pci: Create persistent INTx handler
  vfio: Introduce interface to flush virqfd inject workqueue
  vfio/pci: Lock external INTx masking ops
  vfio/pci: Disable auto-enable of exclusive INTx IRQ
  vfio/pds: Refactor/simplify reset logic
  vfio/pds: Make sure migration file isn't accessed after reset
  vfio/platform: Convert to platform remove callback returning void
  vfio/mlx5: Enforce PRE_COPY support
  vfio/mbochs: make mbochs_class constant
  vfio/mdpy: make mdpy_class constant
  hisi_acc_vfio_pci: Remove the deferred_reset logic
  Revert "vfio/type1: Unpin zero pages"
  vfio/nvgrace-gpu: Convey kvm to map device memory region as noncached
  vfio: amba: Rename pl330_ids[] to vfio_amba_ids[]
  vfio/pds: Always clear the save/restore FDs on reset
  vfio/nvgrace-gpu: Add vfio pci variant module for grace hopper
  vfio/pci: rename and export range_intersect_range
  ...

7 weeks agoMerge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Fri, 15 Mar 2024 20:03:13 +0000 (13:03 -0700)]
Merge tag 'for-linus' of git://git./virt/kvm/kvm

Pull kvm updates from Paolo Bonzini:
 "S390:

   - Changes to FPU handling came in via the main s390 pull request

   - Only deliver to the guest the SCLP events that userspace has
     requested

   - More virtual vs physical address fixes (only a cleanup since
     virtual and physical address spaces are currently the same)

   - Fix selftests undefined behavior

  x86:

   - Fix a restriction that the guest can't program a PMU event whose
     encoding matches an architectural event that isn't included in the
     guest CPUID. The enumeration of an architectural event only says
     that if a CPU supports an architectural event, then the event can
     be programmed *using the architectural encoding*. The enumeration
     does NOT say anything about the encoding when the CPU doesn't
     report support the event *in general*. It might support it, and it
     might support it using the same encoding that made it into the
     architectural PMU spec

   - Fix a variety of bugs in KVM's emulation of RDPMC (more details on
     individual commits) and add a selftest to verify KVM correctly
     emulates RDMPC, counter availability, and a variety of other
     PMC-related behaviors that depend on guest CPUID and therefore are
     easier to validate with selftests than with custom guests (aka
     kvm-unit-tests)

   - Zero out PMU state on AMD if the virtual PMU is disabled, it does
     not cause any bug but it wastes time in various cases where KVM
     would check if a PMC event needs to be synthesized

   - Optimize triggering of emulated events, with a nice ~10%
     performance improvement in VM-Exit microbenchmarks when a vPMU is
     exposed to the guest

   - Tighten the check for "PMI in guest" to reduce false positives if
     an NMI arrives in the host while KVM is handling an IRQ VM-Exit

   - Fix a bug where KVM would report stale/bogus exit qualification
     information when exiting to userspace with an internal error exit
     code

   - Add a VMX flag in /proc/cpuinfo to report 5-level EPT support

   - Rework TDP MMU root unload, free, and alloc to run with mmu_lock
     held for read, e.g. to avoid serializing vCPUs when userspace
     deletes a memslot

   - Tear down TDP MMU page tables at 4KiB granularity (used to be
     1GiB). KVM doesn't support yielding in the middle of processing a
     zap, and 1GiB granularity resulted in multi-millisecond lags that
     are quite impolite for CONFIG_PREEMPT kernels

   - Allocate write-tracking metadata on-demand to avoid the memory
     overhead when a kernel is built with i915 virtualization support
     but the workloads use neither shadow paging nor i915 virtualization

   - Explicitly initialize a variety of on-stack variables in the
     emulator that triggered KMSAN false positives

   - Fix the debugregs ABI for 32-bit KVM

   - Rework the "force immediate exit" code so that vendor code
     ultimately decides how and when to force the exit, which allowed
     some optimization for both Intel and AMD

   - Fix a long-standing bug where kvm_has_noapic_vcpu could be left
     elevated if vCPU creation ultimately failed, causing extra
     unnecessary work

   - Cleanup the logic for checking if the currently loaded vCPU is
     in-kernel

   - Harden against underflowing the active mmu_notifier invalidation
     count, so that "bad" invalidations (usually due to bugs elsehwere
     in the kernel) are detected earlier and are less likely to hang the
     kernel

  x86 Xen emulation:

   - Overlay pages can now be cached based on host virtual address,
     instead of guest physical addresses. This removes the need to
     reconfigure and invalidate the cache if the guest changes the gpa
     but the underlying host virtual address remains the same

   - When possible, use a single host TSC value when computing the
     deadline for Xen timers in order to improve the accuracy of the
     timer emulation

   - Inject pending upcall events when the vCPU software-enables its
     APIC to fix a bug where an upcall can be lost (and to follow Xen's
     behavior)

   - Fall back to the slow path instead of warning if "fast" IRQ
     delivery of Xen events fails, e.g. if the guest has aliased xAPIC
     IDs

  RISC-V:

   - Support exception and interrupt handling in selftests

   - New self test for RISC-V architectural timer (Sstc extension)

   - New extension support (Ztso, Zacas)

   - Support userspace emulation of random number seed CSRs

  ARM:

   - Infrastructure for building KVM's trap configuration based on the
     architectural features (or lack thereof) advertised in the VM's ID
     registers

   - Support for mapping vfio-pci BARs as Normal-NC (vaguely similar to
     x86's WC) at stage-2, improving the performance of interacting with
     assigned devices that can tolerate it

   - Conversion of KVM's representation of LPIs to an xarray, utilized
     to address serialization some of the serialization on the LPI
     injection path

   - Support for _architectural_ VHE-only systems, advertised through
     the absence of FEAT_E2H0 in the CPU's ID register

   - Miscellaneous cleanups, fixes, and spelling corrections to KVM and
     selftests

  LoongArch:

   - Set reserved bits as zero in CPUCFG

   - Start SW timer only when vcpu is blocking

   - Do not restart SW timer when it is expired

   - Remove unnecessary CSR register saving during enter guest

   - Misc cleanups and fixes as usual

  Generic:

   - Clean up Kconfig by removing CONFIG_HAVE_KVM, which was basically
     always true on all architectures except MIPS (where Kconfig
     determines the available depending on CPU capabilities). It is
     replaced either by an architecture-dependent symbol for MIPS, and
     IS_ENABLED(CONFIG_KVM) everywhere else

   - Factor common "select" statements in common code instead of
     requiring each architecture to specify it

   - Remove thoroughly obsolete APIs from the uapi headers

   - Move architecture-dependent stuff to uapi/asm/kvm.h

   - Always flush the async page fault workqueue when a work item is
     being removed, especially during vCPU destruction, to ensure that
     there are no workers running in KVM code when all references to
     KVM-the-module are gone, i.e. to prevent a very unlikely
     use-after-free if kvm.ko is unloaded

   - Grab a reference to the VM's mm_struct in the async #PF worker
     itself instead of gifting the worker a reference, so that there's
     no need to remember to *conditionally* clean up after the worker

  Selftests:

   - Reduce boilerplate especially when utilize selftest TAP
     infrastructure

   - Add basic smoke tests for SEV and SEV-ES, along with a pile of
     library support for handling private/encrypted/protected memory

   - Fix benign bugs where tests neglect to close() guest_memfd files"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (246 commits)
  selftests: kvm: remove meaningless assignments in Makefiles
  KVM: riscv: selftests: Add Zacas extension to get-reg-list test
  RISC-V: KVM: Allow Zacas extension for Guest/VM
  KVM: riscv: selftests: Add Ztso extension to get-reg-list test
  RISC-V: KVM: Allow Ztso extension for Guest/VM
  RISC-V: KVM: Forward SEED CSR access to user space
  KVM: riscv: selftests: Add sstc timer test
  KVM: riscv: selftests: Change vcpu_has_ext to a common function
  KVM: riscv: selftests: Add guest helper to get vcpu id
  KVM: riscv: selftests: Add exception handling support
  LoongArch: KVM: Remove unnecessary CSR register saving during enter guest
  LoongArch: KVM: Do not restart SW timer when it is expired
  LoongArch: KVM: Start SW timer only when vcpu is blocking
  LoongArch: KVM: Set reserved bits as zero in CPUCFG
  KVM: selftests: Explicitly close guest_memfd files in some gmem tests
  KVM: x86/xen: fix recursive deadlock in timer injection
  KVM: pfncache: simplify locking and make more self-contained
  KVM: x86/xen: remove WARN_ON_ONCE() with false positives in evtchn delivery
  KVM: x86/xen: inject vCPU upcall vector when local APIC is enabled
  KVM: x86/xen: improve accuracy of Xen timers
  ...

7 weeks agoMerge tag 'sparc-for-6.9-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/alars...
Linus Torvalds [Fri, 15 Mar 2024 19:47:21 +0000 (12:47 -0700)]
Merge tag 'sparc-for-6.9-tag1' of git://git./linux/kernel/git/alarsson/linux-sparc

Pull sparc updates from Andreas Larsson:

 - Fix missing prototype warnings in various places, including switching
   to using generic cmpdi2/ucmpdi2 and parport.h and stop selecting
   unneeded GENERIC_ISA_DMA.

 - Reduce duplicate code by using shared font data, with dependency
   fixup in separate commit touching lib/fonts.

 - Convert sbus drives to use remove callbacks returning void

 - Fix return values of __setup handlers

 - Section mismatch fix for grpci pci drivers

 - Make the vio bus type constant

 - Kconfig cleanups and fixes

 - Typo fixes

* tag 'sparc-for-6.9-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/alarsson/linux-sparc:
  lib/fonts: Allow Sparc console 8x16 font for sparc64 early boot text console
  sbus: uctrl: Convert to platform remove callback returning void
  sbus: flash: Convert to platform remove callback returning void
  sbus: envctrl: Convert to platform remove callback returning void
  sbus: display7seg: Convert to platform remove callback returning void
  sbus: bbc_i2c: Convert to platform remove callback returning void
  sbus: Add prototype for bbc_envctrl_init and bbc_envctrl_cleanup to header
  sparc32: Fix section mismatch in leon_pci_grpci
  sparc32: Fix parport build with sparc32
  sparc32: Do not select GENERIC_ISA_DMA
  mtd: maps: sun_uflash: Declare uflash_devinit static
  sparc32: Fix build with trapbase
  sparc32: Use generic cmpdi2/ucmpdi2 variants
  sparc: select FRAME_POINTER instead of redefining it
  sparc: vDSO: fix return value of __setup handler
  sparc64: NMI watchdog: fix return value of __setup handler
  sparc: vio: make vio_bus_type const
  sparc: Fix typos
  sparc: Use shared font data
  sparc: remove obsolete config ARCH_ATU

7 weeks agoMerge tag 'mips_6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux
Linus Torvalds [Fri, 15 Mar 2024 19:44:32 +0000 (12:44 -0700)]
Merge tag 'mips_6.9' of git://git./linux/kernel/git/mips/linux

Pull MIPS updates from Thomas Bogendoerfer:

 - added support for Mobileye SoCs

 - unified GPR/CP0 regs handling for uasm

 - cleanups and fixes

* tag 'mips_6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (56 commits)
  mips: cm: Convert __mips_cm_phys_base() to weak function
  mips: cm: Convert __mips_cm_l2sync_phys_base() to weak function
  mips: dts: ralink: mt7621: add cell count properties to usb
  mips: dts: ralink: mt7621: add serial1 and serial2 nodes
  mips: dts: ralink: mt7621: reorder serial0 properties
  mips: dts: ralink: mt7621: associate uart1_pins with serial0
  MIPS: ralink: Don't use "proxy" headers
  mips: sibyte: make tb_class constant
  mips: mt: make mt_class constant
  MIPS: ralink: Remove unused of_gpio.h
  bus: bt1-apb: Remove duplicate include
  MAINTAINERS: remove entry to non-existing file in MOBILEYE MIPS SOCS
  MIPS: mipsregs: Parse fp and sp register by name in parse_r
  tty: mips_ejtag_fdc: Fix passing incompatible pointer type warning
  mips: zboot: Fix "no previous prototype" build warning
  MIPS: mipsregs: Set proper ISA level for virt extensions
  MIPS: Implement microMIPS MT ASE helpers
  MIPS: Limit MIPS_MT_SMP support by ISA reversion
  MIPS: Loongson64: test for -march=loongson3a cflag
  MIPS: BMIPS: Drop unnecessary assembler flag
  ...

7 weeks agoMerge tag 'devicetree-for-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/robh...
Linus Torvalds [Fri, 15 Mar 2024 19:37:59 +0000 (12:37 -0700)]
Merge tag 'devicetree-for-6.9' of git://git./linux/kernel/git/robh/linux

Pull devicetree updates from Rob Herring:
 "DT core:

   - Add cleanup.h based auto release of struct device_node pointers via
     __free marking and new for_each_child_of_node_scoped() iterator to
     use it.

   - Always create a base skeleton DT when CONFIG_OF is enabled. This
     supports several usecases of adding DT data on non-DT booted
     systems.

   - Move around some /reserved-memory code in preparation for further
     improvements

   - Add a stub for_each_property_of_node() for !OF

   - Adjust the printk levels on some messages

   - Fix __be32 sparse warning

   - Drop RESERVEDMEM_OF_DECLARE usage from Freescale qbman driver
     (currently orphaned)

   - Add Saravana Kannan and drop Frank Rowand as DT maintainers

  DT bindings:

   - Convert Mediatek timer, Mediatek sysirq, fsl,imx6ul-tsc,
     fsl,imx6ul-pinctrl, Atmel AIC, Atmel HLCDC, FPGA region, and
     xlnx,sd-fec to DT schemas

   - Add existing, but undocumented fsl,imx-anatop binding

   - Add bunch of undocumented vendor prefixes used in compatible
     strings

   - Drop obsolete brcm,bcm2835-pm-wdt binding

   - Drop obsolete i2c.txt which as been replaced with schema in
     dtschema

   - Add DPS310 device and sort trivial-devices.yaml

   - Enable undocumented compatible checks on DT binding examples

   - More QCom maintainer fixes/updates

   - Updates to writing-schema.rst and DT submitting-patches.rst to
     cover some frequent review comments

   - Clean-up SPDX tags to use 'OR' rather than 'or'"

* tag 'devicetree-for-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (56 commits)
  dt-bindings: soc: imx: fsl,imx-anatop: add imx6q regulators
  of: unittest: Use for_each_child_of_node_scoped()
  of: Introduce for_each_*_child_of_node_scoped() to automate of_node_put() handling
  of: Add cleanup.h based auto release via __free(device_node) markings
  of: Move all FDT reserved-memory handling into of_reserved_mem.c
  of: Add KUnit test to confirm DTB is loaded
  of: unittest: treat missing of_root as error instead of fixing up
  x86/of: Unconditionally call unflatten_and_copy_device_tree()
  um: Unconditionally call unflatten_device_tree()
  of: Create of_root if no dtb provided by firmware
  of: Always unflatten in unflatten_and_copy_device_tree()
  dt-bindings: timer: mediatek: Convert to json-schema
  dt-bindings: interrupt-controller: fsl,intmux: Include power-domains support
  soc: fsl: qbman: Remove RESERVEDMEM_OF_DECLARE usage
  dt-bindings: fsl-imx-sdma: fix HDMI audio index
  dt-bindings: soc: imx: fsl,imx-iomuxc-gpr: add imx6
  dt-bindings: soc: imx: fsl,imx-anatop: add binding
  dt-bindings: input: touchscreen: fsl,imx6ul-tsc convert to YAML
  dt-bindings: pinctrl: fsl,imx6ul-pinctrl: convert to YAML
  of: make for_each_property_of_node() available to to !OF
  ...

7 weeks agoMerge tag 'mtd/for-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux
Linus Torvalds [Fri, 15 Mar 2024 19:29:57 +0000 (12:29 -0700)]
Merge tag 'mtd/for-6.9' of git://git./linux/kernel/git/mtd/linux

Pull MTD updates from Miquel Raynal:
 "MTD:

   - The Carillo Ranch driver has been removed

   - Top level mtd bindings have received a couple of improvements
     (references, selects)

   - The ssfdc driver received few minor adjustments

   - The usual load of misc/small improvements and fixes

  Raw NAND:

   - The main series brought is an update of the Broadcom support to
     support all BCMBCA SoCs and their specificity (ECC, write
     protection, configuration straps), plus a few misc fixes and
     changes in the main driver. Device tree updates are also part of
     this PR, initially because of a misunderstanding on my side.

   - The STM32_FMC2 controller driver is also upgraded to properly
     support MP1 and MP25 SoCs.

   - A new compatible is added for an Atmel flavor.

   - Among all these feature changes, there is as well a load of
     continuous read related fixes, avoiding more corner conditions and
     clarifying the logic. Finally a few miscellaneous fixes are made to
     the core, the lpx32xx_mlc, fsl_lbc, Meson and Atmel controller
     driver, as well as final one in the Hynix vendor driver.

  SPI-NAND:

   - The ESMT support has been extended to match 5 bytes ID to avoid
     collisions. Winbond support on its side receives support for
     W25N04KV chips.

  SPI NOR:

   - SPI NOR gets the non uniform erase code cleaned. We stopped using
     bitmasks for erase types and flags, and instead introduced
     dedicated members. We then passed the SPI NOR erase map to MTD.
     Users can now determine the erase regions and make informed
     decisions on partitions size.

   - An optional interrupt property is now described in the bindings"

* tag 'mtd/for-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (50 commits)
  mtd: rawnand: Ensure continuous reads are well disabled
  mtd: rawnand: Constrain even more when continuous reads are enabled
  mtd: rawnand: brcmnand: Add support for getting ecc setting from strap
  mtd: rawnand: brcmnand: fix sparse warnings
  mtd: nand: raw: atmel: Fix comment in timings preparation
  mtd: rawnand: Ensure all continuous terms are always in sync
  mtd: rawnand: Add a helper for calculating a page index
  mtd: rawnand: Fix and simplify again the continuous read derivations
  mtd: rawnand: hynix: remove @nand_technology kernel-doc description
  dt-bindings: atmel-nand: add microchip,sam9x7-pmecc
  mtd: rawnand: brcmnand: Support write protection setting from dts
  mtd: rawnand: brcmnand: Add BCMBCA read data bus interface
  mtd: rawnand: brcmnand: Rename bcm63138 nand driver
  arm64: dts: broadcom: bcmbca: Update router boards
  arm64: dts: broadcom: bcmbca: Add NAND controller node
  ARM: dts: broadcom: bcmbca: Add NAND controller node
  mtd: spi-nor: core: correct type of i
  mtd: spi-nor: core: set mtd->eraseregions for non-uniform erase map
  mtd: spi-nor: core: get rid of SNOR_OVERLAID_REGION flag
  mtd: spi-nor: core: get rid of SNOR_LAST_REGION flag
  ...

7 weeks agoMerge tag 'dmaengine-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul...
Linus Torvalds [Fri, 15 Mar 2024 19:25:13 +0000 (12:25 -0700)]
Merge tag 'dmaengine-6.9-rc1' of git://git./linux/kernel/git/vkoul/dmaengine

Pull dmaengine updates from Vinod Koul:
 "New hardware support:
   - Allwinner H616 dma support
   - Renesas r8a779h0 dma controller support
   - TI CSI2RX dma support

  Updates:
   - Freescale edma driver updates for TCD64csupport for i.MX95
   - constify of pointers and args
   - Yaml conversion for MediaTek High-Speed controller binding
   - TI k3 udma support for TX/RX DMA channels for thread IDs:

* tag 'dmaengine-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: (25 commits)
  dmaengine: of: constify of_phandle_args in of_dma_find_controller()
  dmaengine: pl08x: constify pointer to char in filter function
  MAINTAINERS: change in AMD ptdma maintainer
  MAINTAINERS: adjust file entry in MEDIATEK DMA DRIVER
  dmaengine: idxd: constify the struct device_type usage
  dt-bindings: renesas,rcar-dmac: Add r8a779h0 support
  dt-bindings: dma: convert MediaTek High-Speed controller to the json-schema
  dmaengine: idxd: make dsa_bus_type const
  dmaengine: fsl-edma: integrate TCD64 support for i.MX95
  dt-bindings: fsl-dma: fsl-edma: add fsl,imx95-edma5 compatible string
  dmaengine: mcf-edma: utilize edma_write_tcdreg() macro for TCD Access
  dmaengine: fsl-edma: add address for channel mux register in fsl_edma_chan
  dmaengine: fsl-edma: fix spare build warning
  dmaengine: fsl-edma: involve help macro fsl_edma_set(get)_tcd()
  dt-bindings: mmp-dma: convert to YAML
  dmaengine: ti: k3-psil-j721s2: Add entry for CSI2RX
  dmaengine: ti: k3-udma-glue: Add function to request RX chan for thread ID
  dmaengine: ti: k3-udma-glue: Add function to request TX chan for thread ID
  dmaengine: ti: k3-udma-glue: Update name for remote RX channel device
  dmaengine: ti: k3-udma-glue: Add function to parse channel by ID
  ...

7 weeks agoMerge tag 'soundwire-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul...
Linus Torvalds [Fri, 15 Mar 2024 19:22:52 +0000 (12:22 -0700)]
Merge tag 'soundwire-6.9-rc1' of git://git./linux/kernel/git/vkoul/soundwire

Pull soundwire updates from Vinod Koul:

 - Constify sdw_bus and sdw_master_type objects

 - use of rtd helper for better code

 - intel aux device remove redundant assignment

* tag 'soundwire-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire:
  soundwire: Use snd_soc_substream_to_rtd() to obtain rtd
  soundwire: constify the struct device_type usage
  soundwire: bus_type: make sdw_bus_type const
  soundwire: intel_auxdevice: remove redundant assignment to variable link_flags
  soundwire: stream: add missing const to Documentation

7 weeks agoMerge tag 'i2c-for-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
Linus Torvalds [Fri, 15 Mar 2024 19:09:49 +0000 (12:09 -0700)]
Merge tag 'i2c-for-6.9-rc1' of git://git./linux/kernel/git/wsa/linux

Pull i2c updates from Wolfram Sang:
 "Minor changes to the I2C core. Most changes are in drivers:

  The i801 and designware drivers received most of the changes,
  including refactorings and some additions.

  Recovery changes for the iMX and iMX-LPI2C are now utilizing the
  generic i2c support.

  The Cadence driver now supports system suspend and resume.

  The hisi, mpc, sh_mobile, and npcm drivers have undergone some
  cleanups and improvements. Meanwhile, Uwe continues his work on
  converting the "remove" callback to become a void function.

  The pca954x mux driver now supports additional configurations, such as
  isolating faulty channels and flushing stuck buses, among others.

  Support has been added for Renesas r8a779h0, i.MX95 LPI2C, and
  Microchip sam9x7. Meanwhile, Geert lays the groundwork for the
  upcoming R-Car Gen4"

* tag 'i2c-for-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (34 commits)
  i2c: sprd: Convert to platform remove callback returning void
  Documentation: i2c: Document that client auto-detection is a legacy mechanism
  i2c: remove redundant condition
  i2c: rcar: Prepare for the advent of ARCH_RCAR_GEN4
  i2c: imx-lpi2c: add generic GPIO recovery for LPI2C
  i2c: cadence: Add system suspend and resume PM support
  i2c: mpc: remove outdated macro
  i2c: mpc: use proper binding for transfer timeouts
  dt-bindings: i2c: mpc: use proper binding for transfer timeouts
  i2c: smbus: Prepare i2c_register_spd for usage on muxed segments
  i2c: constify the struct device_type usage
  i2c: designware: Implement generic polling mode code for Wangxun 10Gb NIC
  i2c: designware: Fix RX FIFO depth define on Wangxun 10Gb NIC
  i2c: designware: Move interrupt handling functions before i2c_dw_xfer()
  i2c: designware: Use accessors to DW_IC_INTR_MASK register
  i2c: designware: Do not enable interrupts shortly in polling mode
  i2c: designware: Uniform initialization flow for polling mode
  dt-bindings: i2c: at91: Add sam9x7 compatible string
  dt-bindings: i2c: imx-lpi2c: add i.MX95 LPI2C
  i2c: Remove redundant comparison in npcm_i2c_reg_slave
  ...

7 weeks agoInput: xpad - add support for Snakebyte GAMEPADs
Matt Scialabba [Fri, 15 Mar 2024 18:56:19 +0000 (11:56 -0700)]
Input: xpad - add support for Snakebyte GAMEPADs

Add Snakebyte GAMEPAD BASE X and Snakebyte GAMEPAD RGB X to the list
of supported devices.

Signed-off-by: Matt Scialabba <matt.git@fastmail.fm>
Link: https://lore.kernel.org/r/efbfb428-06b0-48f9-8701-db291c2a9d65@app.fastmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 weeks agoMerge tag 'libnvdimm-for-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm...
Linus Torvalds [Fri, 15 Mar 2024 18:58:32 +0000 (11:58 -0700)]
Merge tag 'libnvdimm-for-6.9' of git://git./linux/kernel/git/nvdimm/nvdimm

Pull libnvdimm updates from Dave Jiang:

 - ACPI_NFIT Kconfig documetation fix

 - Make nvdimm_bus_type const

 - Make dax_bus_type const

 - remove SLAB_MEM_SPREAD flag usage in DAX

* tag 'libnvdimm-for-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
  dax: remove SLAB_MEM_SPREAD flag usage
  device-dax: make dax_bus_type const
  nvdimm: make nvdimm_bus_type const
  libnvdimm: Fix ACPI_NFIT in BLK_DEV_PMEM help

7 weeks agodt-bindings: input: samsung,s3c6410-keypad: convert to DT Schema
Krzysztof Kozlowski [Tue, 12 Mar 2024 18:30:01 +0000 (19:30 +0100)]
dt-bindings: input: samsung,s3c6410-keypad: convert to DT Schema

Convert Samsung SoC Keypad bindings to DT schema with changes:
1. Rename "linux,keypad-no-autorepeat" property to
   "linux,input-no-autorepeat", because the latter was implemented in
   the Linux driver.
2. Add clocks and clock-names, already used by DTS and the Linux driver.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20240312183001.714626-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 weeks agoMerge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux
Linus Torvalds [Fri, 15 Mar 2024 18:48:01 +0000 (11:48 -0700)]
Merge tag 'clk-for-linus' of git://git./linux/kernel/git/clk/linux

Pull clk updates from Stephen Boyd:
 "Not a ton of stuff happening in the clk framework. We got some more
  devm helpers and we seem to be going in the direction of "just turn
  this stuff on already and leave me alone!" with the addition of a
  devm_clk_bulk_get_all_enable() API. I'm hoping that we can make that
  into a pmdomain that drivers attach instead, but this API should help
  drivers simplify in the meantime.

  Outside of the devm wrappers, we've got the usual clk driver updates
  that are dominated by the major phone SoC vendors (Samsung and
  Qualcomm) and the non-critical driver fixes for things like incorrect
  topology descriptions and wrong registers or bit fields. More details
  are below, but I'd say that it looks pretty ordinary. The only thing
  that really jumps out at me is the Renesas clk driver that's ignoring
  clks that are assigned to remote processors in DeviceTree. That's a
  new feature that they're using to avoid marking clks as
  CLK_IGNORE_UNUSED based on the configuration of the system.

  Core:
   - Increase dev_id len for clkdev lookups
   - Add a devm_clk_bulk_get_all_enable() API to get and enable all clks
     for a device
   - Add a devm variant of clk_rate_exclusive_get()

  New Drivers:
   - Display, TCSR, GPU, and Camera clock controllers for Qualcomm's X1
     Elite SoC
   - Google GS101 PERIC0 and PERIC1 clock controllers
   - Exynos850 PDMA clocks
   - Exynos850 CPU cluster 0 and 1 (CMU_CPUCLK0/CMU_CPUCLK1) clock
     controllers

  Removed Drivers:
   - Remove the unused Qualcomm sc7180 modem clk driver

  Updates:
   - Fix some static checker errors in the Hisilicon clk driver
   - Polarfire MSSPLL hardware has 4 output clocks (the driver supported
     previously only one output); each of these 4 outputs feed dividers
     and the output of each divider feed individual hardware blocks
     (e.g. CAN, Crypto, eMMC); individual hardware block drivers need to
     control their clocks thus clock driver support was added for all
     MSSPLL output clocks
   - Typo fixes in the Qualcomm IPQ5018 GCC driver
   - Add "qdss_at" clk on Qualcomm IPQ6018, needed for WiFi
   - Properly terminate frequency tables in different Qualcomm clk
     drivers
   - Add MDSS, crypto, and SDCC resets on Qualcomm MSM8953
   - Add missing UFS CLKREF clks on Qualcomm SC8180X
   - Avoid significant delays during boot by adding a softdep on rpmhpd
     to Qualcomm SDM845 gcc driver
   - Add QUPv3 RCGS w/ DFS and video resets to Qualcomm SM8150 GCC
     driver
   - Fix the custom GPU GX "do-nothing" method in the Qualcomm GDSC
     driver
   - Add an external regulator to GX GDSC on Qualcomm SC8280XP GPU clk
     driver
   - Switch display, GPU, video, and camera Qualcomm clk drivers to
     module_platform_driver()
   - Set a longer delay for Venus resets on many Qualcomm SoCs
   - Correct the GDSC wait times in the Qualcomm SDM845 display clk
     driver
   - Fix clock listing Oops on Amlogic axg
   - New pll-rate for Rockchip rk3568
   - i2s rate improvements for Rockchip rk3399
   - Rockchip rk3588 syscon clock fixes and removal of overall
     clock-number from the rk3588 binding header
   - A prerequisite for later improvements to the Rockchip rk3588 linked
     clocks
   - Minor clean-ups and error handling improvements in both
     composite-8m and SCU i.MX clock drivers
   - Fix for SAI_MCLK_SEL definition for i.MX8MP
   - Register the Samsung CMU MISC clock controller earlier, so the
     Multi Core Timer clocksource can use it on Google GS101
   - Propagate Exynos850 SPI IPCLK rate change to parents, so the SPI
     will get proper clock rates
   - Refactor the generic Samsung CPU clock controllers code, preparing
     it for supporting Exynos850 CPU clocks
   - Fix some clk kerneldoc warnings
   - Add Ethernet, SDHI, DMA, and HyperFLASH/QSPI (RPC-IF) clocks on
     Renesas R-Car V4M
   - Ignore all clocks which are assigned to a non-Linux system in the
     Renesas clk driver
   - Add watchdog clock on Renesas RZ/G3S
   - Add camera (CRU) clock and reset on Renesas RZ/G2UL
   - Add support for the Renesas R-Car V4M (R8A779H0) SoC
   - Convert some clk bindings to YAML so they can be validated"

* tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (150 commits)
  clk: zynq: Prevent null pointer dereference caused by kmalloc failure
  clk: fractional-divider: Use bit operations consistently
  clk: fractional-divider: Move mask calculations out of lock
  clk: Fix clk_core_get NULL dereference
  clk: starfive: jh7110-vout: Convert to platform remove callback returning void
  clk: starfive: jh7110-isp: Convert to platform remove callback returning void
  clk: imx: imx8-acm: Convert to platform remove callback returning void
  clk: qcom: gcc-ipq5018: fix register offset for GCC_UBI0_AXI_ARES reset
  clk: qcom: gcc-ipq5018: fix 'halt_reg' offset of 'gcc_pcie1_pipe_clk'
  clk: qcom: gcc-ipq5018: fix 'enable_reg' offset of 'gcc_gmac0_sys_clk'
  clk: qcom: camcc-x1e80100: Fix missing DT_IFACE enum in x1e80100 camcc
  clk: qcom: mmcc-msm8974: fix terminating of frequency table arrays
  clk: qcom: mmcc-apq8084: fix terminating of frequency table arrays
  clk: qcom: camcc-sc8280xp: fix terminating of frequency table arrays
  clk: qcom: gcc-ipq9574: fix terminating of frequency table arrays
  clk: qcom: gcc-ipq8074: fix terminating of frequency table arrays
  clk: qcom: gcc-ipq6018: fix terminating of frequency table arrays
  clk: qcom: gcc-ipq5018: fix terminating of frequency table arrays
  clk: mediatek: clk-mt8173-apmixedsys: Use common error handling code in clk_mt8173_apmixed_probe()
  clk: Add a devm variant of clk_rate_exclusive_get()
  ...

7 weeks agox86/efistub: Clear decompressor BSS in native EFI entrypoint
Ard Biesheuvel [Fri, 15 Mar 2024 15:26:16 +0000 (16:26 +0100)]
x86/efistub: Clear decompressor BSS in native EFI entrypoint

The EFI stub on x86 no longer invokes the decompressor as a subsequent
boot stage, but calls into the decompression code directly while running
in the context of the EFI boot services.

This means that when using the native EFI entrypoint (as opposed to the
EFI handover protocol, which clears BSS explicitly), the firmware PE
image loader is being relied upon to ensure that BSS is zeroed before
the EFI stub is entered from the firmware.

As Radek's report proves, this is a bad idea. Not all loaders do this
correctly, which means some global variables that should be statically
initialized to 0x0 may have junk in them.

So clear BSS explicitly when entering via efi_pe_entry(). Note that
zeroing BSS from C code is not generally safe, but in this case, the
following assignment and dereference of a global pointer variable
ensures that the memset() cannot be deferred or reordered.

Cc: <stable@kernel.org> # v6.1+
Reported-by: Radek Podgorny <radek@podgorny.cz>
Closes: https://lore.kernel.org/all/a99a831a-8ad5-4cb0-bff9-be637311f771@podgorny.cz
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
7 weeks agoMerge tag 'media/v6.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Fri, 15 Mar 2024 18:36:54 +0000 (11:36 -0700)]
Merge tag 'media/v6.9-1' of git://git./linux/kernel/git/mchehab/linux-media

Pull media updates from Mauro Carvalho Chehab:

 - DVB budget legacy API was finally documented. It took only 20+ years
   to get some documentation about it...

 - hantro driver has gained support for STM32MP25 VDEC/VENC

 - rkisp1 has gained support for i.MX8MP

 - atomisp got rid of two items from its todo list. Still 5 items
   pending for moving it out of staging

 - lots of driver fixes, cleanups and improvements

* tag 'media/v6.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (252 commits)
  media: rcar-isp: Disallow unbind of devices
  media: usbtv: Remove useless locks in usbtv_video_free()
  media: mediatek: vcodec: avoid -Wcast-function-type-strict warning
  media: ttpci: fix two memleaks in budget_av_attach
  media: go7007: fix a memleak in go7007_load_encoder
  media: dvb-frontends: avoid stack overflow warnings with clang
  media: pvrusb2: fix uaf in pvr2_context_set_notify
  media: usb: s2255: Refactor s2255_get_fx2fw
  media: ti: j721e-csi2rx: Convert to platform remove callback returning void
  media: stm32-dcmipp: Convert to platform remove callback returning void
  media: nxp: imx8-isi: Convert to platform remove callback returning void
  media: nuvoton: Convert to platform remove callback returning void
  media: chips-media: wave5: Convert to platform remove callback returning void
  media: chips-media: wave5: Remove unnecessary semicolons
  media: i2c: imx290: Fix IMX920 typo
  media: platform: replace of_graph_get_next_endpoint()
  media: i2c: replace of_graph_get_next_endpoint()
  media: ivsc: csi: Make use of sub-device state
  media: ivsc: csi: Swap SINK and SOURCE pads
  media: ipu-bridge: Serialise calls to IPU bridge init
  ...

7 weeks agoMerge tag '9p-for-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs
Linus Torvalds [Fri, 15 Mar 2024 17:10:31 +0000 (10:10 -0700)]
Merge tag '9p-for-6.9' of git://git./linux/kernel/git/ericvh/v9fs

Pull 9p updates from Eric Van Hensbergen:
 "This includes a number of patches addressing improvements in the cache
  portions of the 9p client.

  The biggest improvements have to do with fixing handling of inodes and
  eliminating duplicate structures and unnecessary allocation/release of
  inode structures and many associated unnecessary protocol traffic.
  This also dramatically reduced code complexity across the code and
  sets us up to add proper temporal cache capabilities"

* tag '9p-for-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
  fs/9p: fix dups even in uncached mode
  fs/9p: simplify iget to remove unnecessary paths
  fs/9p: rework qid2ino logic
  fs/9p: Eliminate now unused v9fs_get_inode
  fs/9p: Eliminate redundant non-cache path in mknod
  fs/9p: remove walk and inode allocation from symlink
  fs/9p: convert mkdir to use get_new_inode
  fs/9p: switch vfsmount to use v9fs_get_new_inode

7 weeks agodt-bindings: soc: imx: fsl,imx-anatop: add imx6q regulators
Alexander Stein [Thu, 14 Mar 2024 14:59:53 +0000 (15:59 +0100)]
dt-bindings: soc: imx: fsl,imx-anatop: add imx6q regulators

imx6q has additional regulators compared to imx6ul. Add them to the list
of allowed patterns.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240314145953.2957313-1-alexander.stein@ew.tq-group.com
Signed-off-by: Rob Herring <robh@kernel.org>
7 weeks agoMerge tag 'fuse-update-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi...
Linus Torvalds [Fri, 15 Mar 2024 16:47:14 +0000 (09:47 -0700)]
Merge tag 'fuse-update-6.9' of git://git./linux/kernel/git/mszeredi/fuse

Pull fuse updates from Miklos Szeredi:

 - Add passthrough mode for regular file I/O.

   This allows performing read and write (also via memory maps) on a
   backing file without incurring the overhead of roundtrips to
   userspace. For now this is only allowed to privileged servers, but
   this limitation will go away in the future (Amir Goldstein)

 - Fix interaction of direct I/O mode with memory maps (Bernd Schubert)

 - Export filesystem tags through sysfs for virtiofs (Stefan Hajnoczi)

 - Allow resending queued requests for server crash recovery (Zhao Chen)

 - Misc fixes and cleanups

* tag 'fuse-update-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: (38 commits)
  fuse: get rid of ff->readdir.lock
  fuse: remove unneeded lock which protecting update of congestion_threshold
  fuse: Fix missing FOLL_PIN for direct-io
  fuse: remove an unnecessary if statement
  fuse: Track process write operations in both direct and writethrough modes
  fuse: Use the high bit of request ID for indicating resend requests
  fuse: Introduce a new notification type for resend pending requests
  fuse: add support for explicit export disabling
  fuse: __kuid_val/__kgid_val helpers in fuse_fill_attr_from_inode()
  fuse: fix typo for fuse_permission comment
  fuse: Convert fuse_writepage_locked to take a folio
  fuse: Remove fuse_writepage
  virtio_fs: remove duplicate check if queue is broken
  fuse: use FUSE_ROOT_ID in fuse_get_root_inode()
  fuse: don't unhash root
  fuse: fix root lookup with nonzero generation
  fuse: replace remaining make_bad_inode() with fuse_make_bad()
  virtiofs: drop __exit from virtio_fs_sysfs_exit()
  fuse: implement passthrough for mmap
  fuse: implement splice read/write passthrough
  ...

7 weeks agoMerge tag 'ext4_for_linus-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 15 Mar 2024 16:20:30 +0000 (09:20 -0700)]
Merge tag 'ext4_for_linus-6.9-rc1' of git://git./linux/kernel/git/tytso/ext4

Pull ext4 updates from Ted Ts'o:
 "Ext4 bug fixes and cleanups, plus some additional kunit tests"

* tag 'ext4_for_linus-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (23 commits)
  ext4: initialize sbi->s_freeclusters_counter and sbi->s_dirtyclusters_counter before use in kunit test
  ext4: hold group lock in ext4 kunit test
  ext4: alloc test super block from sget
  ext4: kunit: use dynamic inode allocation
  ext4: enable meta_bg only when new desc blocks are needed
  ext4: remove unused parameter biop in ext4_issue_discard()
  ext4: remove SLAB_MEM_SPREAD flag usage
  ext4: verify s_clusters_per_group even without bigalloc
  ext4: fix corruption during on-line resize
  ext4: don't report EOPNOTSUPP errors from discard
  ext4: drop duplicate ea_inode handling in ext4_xattr_block_set()
  ext4: fold quota accounting into ext4_xattr_inode_lookup_create()
  ext4: correct best extent lstart adjustment logic
  ext4: forbid commit inconsistent quota data when errors=remount-ro
  ext4: add a hint for block bitmap corrupt state in mb_groups
  ext4: fix the comment of ext4_map_blocks()/ext4_ext_map_blocks()
  ext4: improve error msg for ext4_mb_seq_groups_show
  ext4: remove unused buddy_loaded in ext4_mb_seq_groups_show
  ext4: Add unit test for ext4_mb_mark_diskspace_used
  ext4: Add unit test for mb_free_blocks
  ...

7 weeks agoMerge tag 'bcachefs-2024-03-13' of https://evilpiepirate.org/git/bcachefs
Linus Torvalds [Fri, 15 Mar 2024 16:00:09 +0000 (09:00 -0700)]
Merge tag 'bcachefs-2024-03-13' of https://evilpiepirate.org/git/bcachefs

Pull bcachefs updates from Kent Overstreet:

 - Subvolume children btree; this is needed for providing a userspace
   interface for walking subvolumes, which will come later

 - Lots of improvements to directory structure checking

 - Improved journal pipelining, significantly improving performance on
   high iodepth write workloads

 - Discard path improvements: the discard path is more efficient, and no
   longer flushes the journal unnecessarily

 - Buffered write path can now avoid taking the inode lock

 - new mm helper: memalloc_flags_{save|restore}

 - mempool now does kvmalloc mempools

* tag 'bcachefs-2024-03-13' of https://evilpiepirate.org/git/bcachefs: (128 commits)
  bcachefs: time_stats: shrink time_stat_buffer for better alignment
  bcachefs: time_stats: split stats-with-quantiles into a separate structure
  bcachefs: mean_and_variance: put struct mean_and_variance_weighted on a diet
  bcachefs: time_stats: add larger units
  bcachefs: pull out time_stats.[ch]
  bcachefs: reconstruct_alloc cleanup
  bcachefs: fix bch_folio_sector padding
  bcachefs: Fix btree key cache coherency during replay
  bcachefs: Always flush write buffer in delete_dead_inodes()
  bcachefs: Fix order of gc_done passes
  bcachefs: fix deletion of indirect extents in btree_gc
  bcachefs: Prefer struct_size over open coded arithmetic
  bcachefs: Kill unused flags argument to btree_split()
  bcachefs: Check for writing superblocks with nonsense member seq fields
  bcachefs: fix bch2_journal_buf_to_text()
  lib/generic-radix-tree.c: Make nodes more reasonably sized
  bcachefs: copy_(to|from)_user_errcode()
  bcachefs: Split out bkey_types.h
  bcachefs: fix lost journal buf wakeup due to improved pipelining
  bcachefs: intercept mountoption value for bool type
  ...

7 weeks agoirqchip/riscv-intc: Fix use of AIA interrupts 32-63 on riscv32
Samuel Holland [Tue, 12 Mar 2024 21:28:08 +0000 (14:28 -0700)]
irqchip/riscv-intc: Fix use of AIA interrupts 32-63 on riscv32

riscv_intc_custom_base is initialized to BITS_PER_LONG, so the second
check passes even though AIA provides 64 interrupts. Adjust the condition to
only check the custom range for interrupts outside the standard range, and
adjust the standard range when AIA is available.

Fixes: 3c46fc5b5507 ("irqchip/riscv-intc: Add support for RISC-V AIA")
Fixes: 678c607ecf8a ("irqchip/riscv-intc: Fix low-level interrupt handler setup for AIA")
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20240312212813.2323841-1-samuel.holland@sifive.com
7 weeks agoMerge tag 'nand/for-6.9' into mtd/next
Miquel Raynal [Fri, 15 Mar 2024 11:00:45 +0000 (12:00 +0100)]
Merge tag 'nand/for-6.9' into mtd/next

Raw NAND

The main series brought is an update of the Broadcom support to support
all BCMBCA SoCs and their specificity (ECC, write protection,
configuration straps), plus a few misc fixes and changes in the main
driver. Device tree updates are also part of this PR, initially because
of a misunderstanding on my side.

The STM32_FMC2 controller driver is also upgraded to properly support
MP1 and MP25 SoCs.

A new compatible is added for an Atmel flavor.

Among all these feature changes, there is as well a load of continuous
read related fixes, avoiding more corner conditions and clarifying the
logic. Finally a few miscellaneous fixes are made to the core, the
lpx32xx_mlc, fsl_lbc, Meson and Atmel controller driver, as well as
final one in the Hynix vendor driver.

SPI-NAND

The ESMT support has been extended to match 5 bytes ID to avoid
collisions. Winbond support on its side receives support for W25N04KV
chips.

7 weeks agoselftests: kvm: remove meaningless assignments in Makefiles
Paolo Bonzini [Fri, 15 Mar 2024 10:52:55 +0000 (06:52 -0400)]
selftests: kvm: remove meaningless assignments in Makefiles

$(shell ...) expands to the output of the command. It expands to the
empty string when the command does not print anything to stdout.
Hence, $(shell mkdir ...) is sufficient and does not need any
variable assignment in front of it.

Commit c2bd08ba20a5 ("treewide: remove meaningless assignments in
Makefiles", 2024-02-23) did this to all of tools/ but ignored in-flight
changes to tools/testing/selftests/kvm/Makefile, so reapply the change.

Cc: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7 weeks agoALSA: timer: Fix missing irq-disable at closing
Takashi Iwai [Fri, 15 Mar 2024 10:14:42 +0000 (11:14 +0100)]
ALSA: timer: Fix missing irq-disable at closing

The conversion to guard macro dropped the irq-disablement at closing
mistakenly, which may lead to a race.  Fix it.

Fixes: beb45974dd49 ("ALSA: timer: Use guard() for locking")
Reported-by: syzbot+28c1a5a5b041a754b947@syzkaller.appspotmail.com
Closes: http://lore.kernel.org/r/0000000000000b9a510613b0145f@google.com
Message-ID: <20240315101447.18395-1-tiwai@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 weeks agoALSA: hda/realtek: Add quirk for Lenovo Yoga 9 14IMH9
Jichi Zhang [Fri, 15 Mar 2024 08:19:56 +0000 (01:19 -0700)]
ALSA: hda/realtek: Add quirk for Lenovo Yoga 9 14IMH9

The speakers on the Lenovo Yoga 9 14IMH9 are similar to previous generations
such as the 14IAP7, and the bass speakers can be fixed using similar methods
with one caveat: 14IMH9 uses CS35L41 amplifiers which need to be activated
separately.

Signed-off-by: Jichi Zhang <i@jichi.ca>
Message-ID: <20240315081954.45470-3-i@jichi.ca>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 weeks agoMerge branch 'for-6.9/cxl-einj' into for-6.9/cxl
Dan Williams [Fri, 15 Mar 2024 02:05:27 +0000 (19:05 -0700)]
Merge branch 'for-6.9/cxl-einj' into for-6.9/cxl

Pick up documentation build fix for v6.9.

7 weeks agoMerge tag 'mm-nonmm-stable-2024-03-14-09-36' of git://git.kernel.org/pub/scm/linux...
Linus Torvalds [Fri, 15 Mar 2024 01:03:09 +0000 (18:03 -0700)]
Merge tag 'mm-nonmm-stable-2024-03-14-09-36' of git://git./linux/kernel/git/akpm/mm

Pull non-MM updates from Andrew Morton:

 - Kuan-Wei Chiu has developed the well-named series "lib min_heap: Min
   heap optimizations".

 - Kuan-Wei Chiu has also sped up the library sorting code in the series
   "lib/sort: Optimize the number of swaps and comparisons".

 - Alexey Gladkov has added the ability for code running within an IPC
   namespace to alter its IPC and MQ limits. The series is "Allow to
   change ipc/mq sysctls inside ipc namespace".

 - Geert Uytterhoeven has contributed some dhrystone maintenance work in
   the series "lib: dhry: miscellaneous cleanups".

 - Ryusuke Konishi continues nilfs2 maintenance work in the series

"nilfs2: eliminate kmap and kmap_atomic calls"
"nilfs2: fix kernel bug at submit_bh_wbc()"

 - Nathan Chancellor has updated our build tools requirements in the
   series "Bump the minimum supported version of LLVM to 13.0.1".

 - Muhammad Usama Anjum continues with the selftests maintenance work in
   the series "selftests/mm: Improve run_vmtests.sh".

 - Oleg Nesterov has done some maintenance work against the signal code
   in the series "get_signal: minor cleanups and fix".

Plus the usual shower of singleton patches in various parts of the tree.
Please see the individual changelogs for details.

* tag 'mm-nonmm-stable-2024-03-14-09-36' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (77 commits)
  nilfs2: prevent kernel bug at submit_bh_wbc()
  nilfs2: fix failure to detect DAT corruption in btree and direct mappings
  ocfs2: enable ocfs2_listxattr for special files
  ocfs2: remove SLAB_MEM_SPREAD flag usage
  assoc_array: fix the return value in assoc_array_insert_mid_shortcut()
  buildid: use kmap_local_page()
  watchdog/core: remove sysctl handlers from public header
  nilfs2: use div64_ul() instead of do_div()
  mul_u64_u64_div_u64: increase precision by conditionally swapping a and b
  kexec: copy only happens before uchunk goes to zero
  get_signal: don't initialize ksig->info if SIGNAL_GROUP_EXIT/group_exec_task
  get_signal: hide_si_addr_tag_bits: fix the usage of uninitialized ksig
  get_signal: don't abuse ksig->info.si_signo and ksig->sig
  const_structs.checkpatch: add device_type
  Normalise "name (ad@dr)" MODULE_AUTHORs to "name <ad@dr>"
  dyndbg: replace kstrdup() + strchr() with kstrdup_and_replace()
  list: leverage list_is_head() for list_entry_is_head()
  nilfs2: MAINTAINERS: drop unreachable project mirror site
  smp: make __smp_processor_id() 0-argument macro
  fat: fix uninitialized field in nostale filehandles
  ...

7 weeks agoMerge tag 'mm-stable-2024-03-13-20-04' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 15 Mar 2024 00:43:30 +0000 (17:43 -0700)]
Merge tag 'mm-stable-2024-03-13-20-04' of git://git./linux/kernel/git/akpm/mm

Pull MM updates from Andrew Morton:

 - Sumanth Korikkar has taught s390 to allocate hotplug-time page frames
   from hotplugged memory rather than only from main memory. Series
   "implement "memmap on memory" feature on s390".

 - More folio conversions from Matthew Wilcox in the series

"Convert memcontrol charge moving to use folios"
"mm: convert mm counter to take a folio"

 - Chengming Zhou has optimized zswap's rbtree locking, providing
   significant reductions in system time and modest but measurable
   reductions in overall runtimes. The series is "mm/zswap: optimize the
   scalability of zswap rb-tree".

 - Chengming Zhou has also provided the series "mm/zswap: optimize zswap
   lru list" which provides measurable runtime benefits in some
   swap-intensive situations.

 - And Chengming Zhou further optimizes zswap in the series "mm/zswap:
   optimize for dynamic zswap_pools". Measured improvements are modest.

 - zswap cleanups and simplifications from Yosry Ahmed in the series
   "mm: zswap: simplify zswap_swapoff()".

 - In the series "Add DAX ABI for memmap_on_memory", Vishal Verma has
   contributed several DAX cleanups as well as adding a sysfs tunable to
   control the memmap_on_memory setting when the dax device is
   hotplugged as system memory.

 - Johannes Weiner has added the large series "mm: zswap: cleanups",
   which does that.

 - More DAMON work from SeongJae Park in the series

"mm/damon: make DAMON debugfs interface deprecation unignorable"
"selftests/damon: add more tests for core functionalities and corner cases"
"Docs/mm/damon: misc readability improvements"
"mm/damon: let DAMOS feeds and tame/auto-tune itself"

 - In the series "mm/mempolicy: weighted interleave mempolicy and sysfs
   extension" Rakie Kim has developed a new mempolicy interleaving
   policy wherein we allocate memory across nodes in a weighted fashion
   rather than uniformly. This is beneficial in heterogeneous memory
   environments appearing with CXL.

 - Christophe Leroy has contributed some cleanup and consolidation work
   against the ARM pagetable dumping code in the series "mm: ptdump:
   Refactor CONFIG_DEBUG_WX and check_wx_pages debugfs attribute".

 - Luis Chamberlain has added some additional xarray selftesting in the
   series "test_xarray: advanced API multi-index tests".

 - Muhammad Usama Anjum has reworked the selftest code to make its
   human-readable output conform to the TAP ("Test Anything Protocol")
   format. Amongst other things, this opens up the use of third-party
   tools to parse and process out selftesting results.

 - Ryan Roberts has added fork()-time PTE batching of THP ptes in the
   series "mm/memory: optimize fork() with PTE-mapped THP". Mainly
   targeted at arm64, this significantly speeds up fork() when the
   process has a large number of pte-mapped folios.

 - David Hildenbrand also gets in on the THP pte batching game in his
   series "mm/memory: optimize unmap/zap with PTE-mapped THP". It
   implements batching during munmap() and other pte teardown
   situations. The microbenchmark improvements are nice.

 - And in the series "Transparent Contiguous PTEs for User Mappings"
   Ryan Roberts further utilizes arm's pte's contiguous bit ("contpte
   mappings"). Kernel build times on arm64 improved nicely. Ryan's
   series "Address some contpte nits" provides some followup work.

 - In the series "mm/hugetlb: Restore the reservation" Breno Leitao has
   fixed an obscure hugetlb race which was causing unnecessary page
   faults. He has also added a reproducer under the selftest code.

 - In the series "selftests/mm: Output cleanups for the compaction
   test", Mark Brown did what the title claims.

 - Kinsey Ho has added the series "mm/mglru: code cleanup and
   refactoring".

 - Even more zswap material from Nhat Pham. The series "fix and extend
   zswap kselftests" does as claimed.

 - In the series "Introduce cpu_dcache_is_aliasing() to fix DAX
   regression" Mathieu Desnoyers has cleaned up and fixed rather a mess
   in our handling of DAX on archiecctures which have virtually aliasing
   data caches. The arm architecture is the main beneficiary.

 - Lokesh Gidra's series "per-vma locks in userfaultfd" provides
   dramatic improvements in worst-case mmap_lock hold times during
   certain userfaultfd operations.

 - Some page_owner enhancements and maintenance work from Oscar Salvador
   in his series

"page_owner: print stacks and their outstanding allocations"
"page_owner: Fixup and cleanup"

 - Uladzislau Rezki has contributed some vmalloc scalability
   improvements in his series "Mitigate a vmap lock contention". It
   realizes a 12x improvement for a certain microbenchmark.

 - Some kexec/crash cleanup work from Baoquan He in the series "Split
   crash out from kexec and clean up related config items".

 - Some zsmalloc maintenance work from Chengming Zhou in the series

"mm/zsmalloc: fix and optimize objects/page migration"
"mm/zsmalloc: some cleanup for get/set_zspage_mapping()"

 - Zi Yan has taught the MM to perform compaction on folios larger than
   order=0. This a step along the path to implementaton of the merging
   of large anonymous folios. The series is named "Enable >0 order folio
   memory compaction".

 - Christoph Hellwig has done quite a lot of cleanup work in the
   pagecache writeback code in his series "convert write_cache_pages()
   to an iterator".

 - Some modest hugetlb cleanups and speedups in Vishal Moola's series
   "Handle hugetlb faults under the VMA lock".

 - Zi Yan has changed the page splitting code so we can split huge pages
   into sizes other than order-0 to better utilize large folios. The
   series is named "Split a folio to any lower order folios".

 - David Hildenbrand has contributed the series "mm: remove
   total_mapcount()", a cleanup.

 - Matthew Wilcox has sought to improve the performance of bulk memory
   freeing in his series "Rearrange batched folio freeing".

 - Gang Li's series "hugetlb: parallelize hugetlb page init on boot"
   provides large improvements in bootup times on large machines which
   are configured to use large numbers of hugetlb pages.

 - Matthew Wilcox's series "PageFlags cleanups" does that.

 - Qi Zheng's series "minor fixes and supplement for ptdesc" does that
   also. S390 is affected.

 - Cleanups to our pagemap utility functions from Peter Xu in his series
   "mm/treewide: Replace pXd_large() with pXd_leaf()".

 - Nico Pache has fixed a few things with our hugepage selftests in his
   series "selftests/mm: Improve Hugepage Test Handling in MM
   Selftests".

 - Also, of course, many singleton patches to many things. Please see
   the individual changelogs for details.

* tag 'mm-stable-2024-03-13-20-04' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (435 commits)
  mm/zswap: remove the memcpy if acomp is not sleepable
  crypto: introduce: acomp_is_async to expose if comp drivers might sleep
  memtest: use {READ,WRITE}_ONCE in memory scanning
  mm: prohibit the last subpage from reusing the entire large folio
  mm: recover pud_leaf() definitions in nopmd case
  selftests/mm: skip the hugetlb-madvise tests on unmet hugepage requirements
  selftests/mm: skip uffd hugetlb tests with insufficient hugepages
  selftests/mm: dont fail testsuite due to a lack of hugepages
  mm/huge_memory: skip invalid debugfs new_order input for folio split
  mm/huge_memory: check new folio order when split a folio
  mm, vmscan: retry kswapd's priority loop with cache_trim_mode off on failure
  mm: add an explicit smp_wmb() to UFFDIO_CONTINUE
  mm: fix list corruption in put_pages_list
  mm: remove folio from deferred split list before uncharging it
  filemap: avoid unnecessary major faults in filemap_fault()
  mm,page_owner: drop unnecessary check
  mm,page_owner: check for null stack_record before bumping its refcount
  mm: swap: fix race between free_swap_and_cache() and swapoff()
  mm/treewide: align up pXd_leaf() retval across archs
  mm/treewide: drop pXd_large()
  ...

7 weeks agoDocumentation/ABI/testing/debugfs-cxl: Fix "Unexpected indentation"
Dan Williams [Fri, 15 Mar 2024 00:34:26 +0000 (17:34 -0700)]
Documentation/ABI/testing/debugfs-cxl: Fix "Unexpected indentation"

Stephen reported that an htmldocs build hit:

   Documentation/ABI/testing/debugfs-cxl:38: ERROR: Unexpected indentation.

It turns out that line was fine but the tool was unhappy about some line
breaks in the table of values to error types.

It turns out that:

   make V=1 SPHINXDIRS="admin-guide" htmldocs

...can not be used to get more info about what is behind a documentation
build error. It was only pure luck that reflowing the text resulted in
an error message that seemed a imply a problem later on with line breaks
around the table.

Fixes: 8039804cfa73 ("cxl/core: Add CXL EINJ debugfs files")
Cc: Jonathan Corbet <corbet@lwn.net>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Closes: http://lore.kernel.org/r/20240314141313.7ba04aff@canb.auug.org.au
Cc: Ben Cheatham <Benjamin.Cheatham@amd.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
7 weeks agoMerge tag 'perf-tools-for-v6.9-2024-03-13' of git://git.kernel.org/pub/scm/linux...
Linus Torvalds [Thu, 14 Mar 2024 23:31:23 +0000 (16:31 -0700)]
Merge tag 'perf-tools-for-v6.9-2024-03-13' of git://git./linux/kernel/git/perf/perf-tools

Pull perf tools updates from Namhyung Kim:
 "perf stat:

   - Support new 'cluster' aggregation mode for shared resources
     depending on the hardware configuration:

        $ sudo perf stat -a --per-cluster -e cycles,instructions sleep 1

         Performance counter stats for 'system wide':

        S0-D0-CLS0    2         85,051,822      cycles
        S0-D0-CLS0    2         73,909,908      instructions      #    0.87  insn per cycle
        S0-D0-CLS2    2         93,365,918      cycles
        S0-D0-CLS2    2         83,006,158      instructions      #    0.89  insn per cycle
        S0-D0-CLS4    2        104,157,523      cycles
        S0-D0-CLS4    2         53,234,396      instructions      #    0.51  insn per cycle
        S0-D0-CLS6    2         65,891,079      cycles
        S0-D0-CLS6    2         41,478,273      instructions      #    0.63  insn per cycle

               1.002407989 seconds time elapsed

   - Various fixes and cleanups for event metrics including NaN handling

  perf script:

   - Use libcapstone if available to disassemble the instructions. This
     enables 'perf script -F disasm' and 'perf script --insn-trace=disasm'
     (for Intel-PT):

        $ perf script -F event,ip,disasm
        cycles:P:  ffffffffa988d428             wrmsr
        cycles:P:  ffffffffa9839d25             movq %rax, %r14
        cycles:P:  ffffffffa9cdcaf0             endbr64
        cycles:P:  ffffffffa988d428             wrmsr
        cycles:P:  ffffffffa988d428             wrmsr
        cycles:P:  ffffffffaa401f86             iretq
        cycles:P:  ffffffffa99c4de5             movq 0x30(%rcx), %r8
        cycles:P:  ffffffffa988d428             wrmsr
        cycles:P:  ffffffffaa401f86             iretq
        cycles:P:  ffffffffa9907983             movl 0x68(%rbx), %eax
        cycles:P:  ffffffffa988d428             wrmsr

   - Expose sample ID / stream ID to python scripts

  perf test:

   - Add more perf test cases from Redhat internal test suites. This
     time it adds the base infra and a few perf probe tests. More to
     come. :)

   - Add 'perf test -p' for parallel execution and fix some issues found
     by the parallel test

   - Support symbol test to print symbols in given (active) module:

        $ perf test -F -v Symbols --dso /lib/modules/$(uname -r)/kernel/fs/ext4/ext4.ko
        --- start ---
        Testing /lib/modules/6.5.13-1rodete2-amd64/kernel/fs/ext4/ext4.ko
        Overlapping symbols:
         7a990-7a9a0 l __pfx_ext4_exit_fs
         7a990-7a9a0 g __pfx_cleanup_module
        Overlapping symbols:
         7a9a0-7aa1c l ext4_exit_fs
         7a9a0-7aa1c g cleanup_module
        ...

  JSON metric updates:

   - A new round of Intel metric updates

   - Support Power11 PVR (compatible to Power10)

   - Fix cache latency events on Zen 4 to set SliceId properly

  Internal:

   - Fix reference counting for 'map' data structure, tireless work from
     Ian!

   - More memory optimization for struct thread and annotate histogram.
     Now, 'perf report' (TUI) and 'perf annotate' should be much
     lighter-weight in terms of memory footprint

   - Support cross-arch perf register access. Clean up the build
     configuration so that it can detect arch-register support at
     runtime. This can allow to parse register data in sample which was
     recorded in a different arch

  Others:

   - Sync task state in 'perf sched' to kernel using trace event fields.
     The task states have been changed so tools cannot assume a fixed
     encoding

   - Clean up 'perf mem' to generalize the arch-specific events

   - Add support for local and global variables to data type profiling.
     This would increase the success rate of type resolution with DWARF

   - Add short option -H for --hierarchy in 'perf report' and 'perf top'"

* tag 'perf-tools-for-v6.9-2024-03-13' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools: (154 commits)
  perf annotate: Add comments in the data structures
  perf annotate: Remove sym_hist.addr[] array
  perf annotate: Calculate instruction overhead using hashmap
  perf annotate: Add a hashmap for symbol histogram
  perf threads: Reduce table size from 256 to 8
  perf threads: Switch from rbtree to hashmap
  perf threads: Move threads to its own files
  perf machine: Move machine's threads into its own abstraction
  perf machine: Move fprintf to for_each loop and a callback
  perf trace: Ignore thread hashing in summary
  perf report: Sort child tasks by tid
  perf vendor events amd: Fix Zen 4 cache latency events
  perf version: Display availability of OpenCSD support
  perf vendor events intel: Add umasks/occ_sel to PCU events.
  perf map: Fix map reference count issues
  libperf evlist: Avoid out-of-bounds access
  perf lock contention: Account contending locks too
  perf metrics: Fix segv for metrics with no events
  perf metrics: Fix metric matching
  perf pmu: Fix a potential memory leak in perf_pmu__lookup()
  ...

7 weeks agoMerge tag 'trace-ring-buffer-v6.8-rc7-2' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 14 Mar 2024 23:25:01 +0000 (16:25 -0700)]
Merge tag 'trace-ring-buffer-v6.8-rc7-2' of git://git./linux/kernel/git/trace/linux-trace

Pull tracing updates from Steven Rostedt:

 - Do not update shortest_full in rb_watermark_hit() if the watermark is
   hit. The shortest_full field was being updated regardless if the task
   was going to wait or not. If the watermark is hit, then the task is
   not going to wait, so do not update the shortest_full field (used by
   the waker).

 - Update shortest_full field before setting the full_waiters_pending
   flag

   In the poll logic, the full_waiters_pending flag was being set before
   the shortest_full field was set. If the full_waiters_pending flag is
   set, writers will check the shortest_full field which has the least
   percentage of data that the ring buffer needs to be filled before
   waking up. The writer will check shortest_full if
   full_waiters_pending is set, and if the ring buffer percentage filled
   is greater than shortest full, then it will call the irq_work to wake
   up the waiters.

   The problem was that the poll logic set the full_waiters_pending flag
   before updating shortest_full, which when zero will always trigger
   the writer to call the irq_work to wake up the waiters. The irq_work
   will reset the shortest_full field back to zero as the woken waiters
   is suppose to reset it.

 - There's some optimized logic in the rb_watermark_hit() that is used
   in ring_buffer_wait(). Use that helper function in the poll logic as
   well.

 - Restructure ring_buffer_wait() to use wait_event_interruptible()

   The logic to wake up pending readers when the file descriptor is
   closed is racy. Restructure ring_buffer_wait() to allow callers to
   pass in conditions besides the ring buffer having enough data in it
   by using wait_event_interruptible().

 - Update the tracing_wait_on_pipe() to call ring_buffer_wait() with its
   own conditions to exit the wait loop.

* tag 'trace-ring-buffer-v6.8-rc7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  tracing/ring-buffer: Fix wait_on_pipe() race
  ring-buffer: Use wait_event_interruptible() in ring_buffer_wait()
  ring-buffer: Reuse rb_watermark_hit() for the poll logic
  ring-buffer: Fix full_waiters_pending in poll
  ring-buffer: Do not set shortest_full when full target is hit

7 weeks agoMerge tag 'probes-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux...
Linus Torvalds [Thu, 14 Mar 2024 23:16:33 +0000 (16:16 -0700)]
Merge tag 'probes-v6.9' of git://git./linux/kernel/git/trace/linux-trace

Pull probes updates from Masami Hiramatsu:
 "x86 kprobes:

   - Use boolean for some function return instead of 0 and 1

   - Prohibit probing on INT/UD. This prevents user to put kprobe on
     INTn/INT1/INT3/INTO and UD0/UD1/UD2 because these are used for a
     special purpose in the kernel

   - Boost Grp instructions. Because a few percent of kernel
     instructions are Grp 2/3/4/5 and those are safe to be executed
     without ip register fixup, allow those to be boosted (direct
     execution on the trampoline buffer with a JMP)

  tracing:

   - Add function argument access from return events (kretprobe and
     fprobe). This allows user to compare how a data structure field is
     changed after executing a function. With BTF, return event also
     accepts function argument access by name.

   - Fix a wrong comment (using "Kretprobe" in fprobe)

   - Cleanup a big probe argument parser function into three parts, type
     parser, post-processing function, and main parser

   - Cleanup to set nr_args field when initializing trace_probe instead
     of counting up it while parsing

   - Cleanup a redundant #else block from tracefs/README source code

   - Update selftests to check entry argument access from return probes

   - Documentation update about entry argument access from return
     probes"

* tag 'probes-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  Documentation: tracing: Add entry argument access at function exit
  selftests/ftrace: Add test cases for entry args at function exit
  tracing/probes: Support $argN in return probe (kprobe and fprobe)
  tracing: Remove redundant #else block for BTF args from README
  tracing/probes: cleanup: Set trace_probe::nr_args at trace_probe_init
  tracing/probes: Cleanup probe argument parser
  tracing/fprobe-event: cleanup: Fix a wrong comment in fprobe event
  x86/kprobes: Boost more instructions from grp2/3/4/5
  x86/kprobes: Prohibit kprobing on INT and UD
  x86/kprobes: Refactor can_{probe,boost} return type to bool

7 weeks agoMerge tag 'lsm-pr-20240314' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm
Linus Torvalds [Thu, 14 Mar 2024 23:05:20 +0000 (16:05 -0700)]
Merge tag 'lsm-pr-20240314' of git://git./linux/kernel/git/pcmoore/lsm

Pull lsm fixes from Paul Moore:
 "Two fixes to address issues with the LSM syscalls that we shipped in
  Linux v6.8. The first patch might be a bit controversial, but the
  second is a rather straightforward fix; more on both below.

  The first fix from Casey addresses a problem that should have been
  caught during the ~16 month (?) review cycle, but sadly was not. The
  good news is that Dmitry caught it very quickly once Linux v6.8 was
  released. The core issue is the use of size_t parameters to pass
  buffer sizes back and forth in the syscall; while we could have solved
  this with a compat syscall definition, given the newness of the
  syscalls I wanted to attempt to just redefine the size_t parameters as
  u32 types and avoid the work associated with a set of compat syscalls.

  However, this is technically a change in the syscall's signature/API
  so I can understand if you're opposed to this, even if the syscalls
  are less than a week old.

   [ Fingers crossed nobody even notices - Linus ]

  The second fix is a rather trivial fix to allow userspace to call into
  the lsm_get_self_attr() syscall with a NULL buffer to quickly
  determine a minimum required size for the buffer. We do have
  kselftests for this very case, I'm not sure why I didn't notice the
  failure; I'm going to guess stupidity, tired eyes, I dunno. My
  apologies we didn't catch this earlier"

* tag 'lsm-pr-20240314' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm:
  lsm: handle the NULL buffer case in lsm_fill_user_ctx()
  lsm: use 32-bit compatible data types in LSM syscalls

7 weeks agomtd: rawnand: Ensure continuous reads are well disabled
Miquel Raynal [Thu, 7 Mar 2024 11:53:15 +0000 (12:53 +0100)]
mtd: rawnand: Ensure continuous reads are well disabled

The cont_read.ongoing flag should only be enabled at the beginning of a
read operation, and also disabled at its end, so we never end up
triggering nasty side effects outside of this scope. The mtd core being
highly serialized, we should not be bothered by parallel accesses
anyway.

In case we reach the end of a read operation and the boolean was not
properly disabled, it's a bug, but it's totally manageable. So warn, and
then fix the boolean state.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20240307115315.1942678-2-miquel.raynal@bootlin.com
7 weeks agomtd: rawnand: Constrain even more when continuous reads are enabled
Miquel Raynal [Thu, 7 Mar 2024 11:53:14 +0000 (12:53 +0100)]
mtd: rawnand: Constrain even more when continuous reads are enabled

As a matter of fact, continuous reads require additional handling at the
operation level in order for them to work properly. The core helpers do
have this additional logic now, but any time a controller implements its
own page helper, this extra logic is "lost". This means we need another
level of per-controller driver checks to ensure they can leverage
continuous reads. This is for now unsupported, so in order to ensure
continuous reads are enabled only when fully using the core page
helpers, we need to add more initial checks.

Also, as performance is not relevant during raw accesses, we also
prevent these from enabling the feature.

This should solve the issue seen with controllers such as the STM32 FMC2
when in sequencer mode. In this case, the continuous read feature would
be enabled but not leveraged, and most importantly not disabled, leading
to further operations to fail.

Reported-by: Christophe Kerello <christophe.kerello@foss.st.com>
Fixes: 003fe4b9545b ("mtd: rawnand: Support for sequential cache reads")
Cc: stable@vger.kernel.org
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Tested-by: Christophe Kerello <christophe.kerello@foss.st.com>
Link: https://lore.kernel.org/linux-mtd/20240307115315.1942678-1-miquel.raynal@bootlin.com
7 weeks agomtd: rawnand: brcmnand: Add support for getting ecc setting from strap
William Zhang [Fri, 1 Mar 2024 17:33:07 +0000 (09:33 -0800)]
mtd: rawnand: brcmnand: Add support for getting ecc setting from strap

BCMBCA broadband SoC based board design does not specify ecc setting in
dts but rather use the SoC NAND strap info to obtain the ecc strength
and spare area size setting. Add brcm,nand-ecc-use-strap dts propety for
this purpose and update driver to support this option. However these two
options can not be used at the same time.

Signed-off-by: William Zhang <william.zhang@broadcom.com>
Reviewed-by: David Regan <dregan@broadcom.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20240301173308.226004-1-william.zhang@broadcom.com
7 weeks agomtd: rawnand: brcmnand: fix sparse warnings
William Zhang [Tue, 27 Feb 2024 19:02:57 +0000 (11:02 -0800)]
mtd: rawnand: brcmnand: fix sparse warnings

Fix the following sparse warnings:
sparse warnings: (new ones prefixed by >>)
>> drivers/mtd/nand/raw/brcmnand/bcmbca_nand.c:79:41: sparse: sparse:
cast removes address space '__iomem' of expression
   drivers/mtd/nand/raw/brcmnand/bcmbca_nand.c:80:17: sparse: sparse:
cast removes address space '__iomem' of expression
   drivers/mtd/nand/raw/brcmnand/bcmbca_nand.c:80:17: sparse: sparse:
cast removes address space '__iomem' of expression
   drivers/mtd/nand/raw/brcmnand/bcmbca_nand.c:80:17: sparse: sparse:
cast removes address space '__iomem' of expression

Fixes: c52c16d1bee5 ("mtd: rawnand: brcmnand: Add BCMBCA read data bus interface")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202402270940.gmVLVRg0-lkp@intel.com/
Signed-off-by: William Zhang <william.zhang@broadcom.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20240227190258.200929-1-william.zhang@broadcom.com
7 weeks agomtd: nand: raw: atmel: Fix comment in timings preparation
Alexander Dahl [Mon, 26 Feb 2024 12:25:37 +0000 (13:25 +0100)]
mtd: nand: raw: atmel: Fix comment in timings preparation

Looks like a copy'n'paste mistake introduced when initially adding the
dynamic timings feature with commit f9ce2eddf176 ("mtd: nand: atmel: Add
->setup_data_interface() hooks").  The context around this and
especially the code itself suggests 'read' is meant instead of write.

Signed-off-by: Alexander Dahl <ada@thorsis.com>
Reviewed-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20240226122537.75097-1-ada@thorsis.com
7 weeks agomtd: rawnand: Ensure all continuous terms are always in sync
Miquel Raynal [Fri, 23 Feb 2024 11:55:45 +0000 (12:55 +0100)]
mtd: rawnand: Ensure all continuous terms are always in sync

While crossing a LUN boundary, it is probably safer (and clearer) to
keep all members of the continuous read structure aligned, including the
pause page (which is the last page of the lun or the last page of the
continuous read). Once these members properly in sync, we can use the
rawnand_cap_cont_reads() helper everywhere to "prepare" the next
continuous read if there is one.

Fixes: bbcd80f53a5e ("mtd: rawnand: Prevent crossing LUN boundaries during sequential reads")
Cc: stable@vger.kernel.org
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20240223115545.354541-4-miquel.raynal@bootlin.com
7 weeks agomtd: rawnand: Add a helper for calculating a page index
Miquel Raynal [Fri, 23 Feb 2024 11:55:44 +0000 (12:55 +0100)]
mtd: rawnand: Add a helper for calculating a page index

For LUN crossing boundaries, it is handy to know what is the index of
the last page in a LUN. This helper will soon be reused. At the same
time I rename page_per_lun to ppl in the calling function to clarify the
lines.

Cc: stable@vger.kernel.org # v6.7
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20240223115545.354541-3-miquel.raynal@bootlin.com
7 weeks agomtd: rawnand: Fix and simplify again the continuous read derivations
Miquel Raynal [Fri, 23 Feb 2024 11:55:43 +0000 (12:55 +0100)]
mtd: rawnand: Fix and simplify again the continuous read derivations

We need to avoid the first page if we don't read it entirely.
We need to avoid the last page if we don't read it entirely.
While rather simple, this logic has been failed in the previous
fix. This time I wrote about 30 unit tests locally to check each
possible condition, hopefully I covered them all.

Reported-by: Christophe Kerello <christophe.kerello@foss.st.com>
Closes: https://lore.kernel.org/linux-mtd/20240221175327.42f7076d@xps-13/T/#m399bacb10db8f58f6b1f0149a1df867ec086bb0a
Suggested-by: Christophe Kerello <christophe.kerello@foss.st.com>
Fixes: 828f6df1bcba ("mtd: rawnand: Clarify conditions to enable continuous reads")
Cc: stable@vger.kernel.org
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Tested-by: Christophe Kerello <christophe.kerello@foss.st.com>
Link: https://lore.kernel.org/linux-mtd/20240223115545.354541-2-miquel.raynal@bootlin.com
7 weeks agomtd: rawnand: hynix: remove @nand_technology kernel-doc description
Randy Dunlap [Sat, 24 Feb 2024 01:46:39 +0000 (17:46 -0800)]
mtd: rawnand: hynix: remove @nand_technology kernel-doc description

Remove the extraneous kernel-doc description for @nand_technology to
eliminate a kernel-doc warning:

nand_hynix.c:39: warning: Excess struct member 'nand_technology' description in 'hynix_nand'

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Vignesh Raghavendra <vigneshr@ti.com>
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20240224014639.16145-1-rdunlap@infradead.org
7 weeks agodt-bindings: atmel-nand: add microchip,sam9x7-pmecc
Varshini Rajendran [Fri, 23 Feb 2024 17:25:20 +0000 (22:55 +0530)]
dt-bindings: atmel-nand: add microchip,sam9x7-pmecc

Add microchip,sam9x7-pmecc to DT bindings documentation.

Signed-off-by: Varshini Rajendran <varshini.rajendran@microchip.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20240223172520.671940-1-varshini.rajendran@microchip.com
7 weeks agomtd: rawnand: brcmnand: Support write protection setting from dts
William Zhang [Fri, 23 Feb 2024 03:47:58 +0000 (19:47 -0800)]
mtd: rawnand: brcmnand: Support write protection setting from dts

The write protection feature is controlled by the module parameter wp_on
with default set to enabled. But not all the board use this feature
especially in BCMBCA broadband board. And module parameter is not
sufficient as different board can have different option.  Add a device
tree property and allow this feature to be configured through the board
dts on per board basis.

Signed-off-by: William Zhang <william.zhang@broadcom.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Kamal Dasu <kamal.dasu@broadcom.com>
Reviewed-by: David Regan <dregan@broadcom.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20240223034758.13753-14-william.zhang@broadcom.com
7 weeks agomtd: rawnand: brcmnand: Add BCMBCA read data bus interface
William Zhang [Fri, 23 Feb 2024 03:47:56 +0000 (19:47 -0800)]
mtd: rawnand: brcmnand: Add BCMBCA read data bus interface

The BCMBCA broadband SoC integrates the NAND controller differently than
STB, iProc and other SoCs.  It has different endianness for NAND cache
data.

Add a SoC read data bus shim for BCMBCA to meet the specific SoC need
and performance improvement using the optimized memcpy function on NAND
cache memory.

Signed-off-by: William Zhang <william.zhang@broadcom.com>
Reviewed-by: David Regan <dregan@broadcom.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20240223034758.13753-12-william.zhang@broadcom.com
7 weeks agomtd: rawnand: brcmnand: Rename bcm63138 nand driver
William Zhang [Fri, 23 Feb 2024 03:47:55 +0000 (19:47 -0800)]
mtd: rawnand: brcmnand: Rename bcm63138 nand driver

In preparing to support multiple BCMBCA SoCs, rename bcm63138 to bcmbca
in the driver code and driver file name.

Signed-off-by: William Zhang <william.zhang@broadcom.com>
Reviewed-by: David Regan <dregan@broadcom.com>
Acked-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20240223034758.13753-11-william.zhang@broadcom.com
7 weeks agoarm64: dts: broadcom: bcmbca: Update router boards
William Zhang [Fri, 23 Feb 2024 03:47:54 +0000 (19:47 -0800)]
arm64: dts: broadcom: bcmbca: Update router boards

Enable the nand controller and add WP pin connection property in actual
board dts as they are board level properties now that they are disabled
and moved out from SoC dtsi.

Also remove the unnecessary brcm,nand-has-wp property from AC5300 board.
This property is only needed for some old controller that this board
does not apply.

Signed-off-by: William Zhang <william.zhang@broadcom.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://lore.kernel.org/linux-mtd/20240223034758.13753-10-william.zhang@broadcom.com
7 weeks agoarm64: dts: broadcom: bcmbca: Add NAND controller node
William Zhang [Fri, 23 Feb 2024 03:47:53 +0000 (19:47 -0800)]
arm64: dts: broadcom: bcmbca: Add NAND controller node

Add support for Broadcom STB NAND controller in BCMBCA ARMv8 chip dts
files.

Signed-off-by: William Zhang <william.zhang@broadcom.com>
Reviewed-by: David Regan <dregan@broadcom.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://lore.kernel.org/linux-mtd/20240223034758.13753-9-william.zhang@broadcom.com
7 weeks agoARM: dts: broadcom: bcmbca: Add NAND controller node
William Zhang [Fri, 23 Feb 2024 03:47:52 +0000 (19:47 -0800)]
ARM: dts: broadcom: bcmbca: Add NAND controller node

Add support for Broadcom STB NAND controller in BCMBCA ARMv7 chip dts
files.

Signed-off-by: William Zhang <william.zhang@broadcom.com>
Reviewed-by: David Regan <dregan@broadcom.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://lore.kernel.org/linux-mtd/20240223034758.13753-8-william.zhang@broadcom.com
7 weeks agoMerge tag 'landlock-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mic...
Linus Torvalds [Thu, 14 Mar 2024 23:00:27 +0000 (16:00 -0700)]
Merge tag 'landlock-6.9-rc1' of git://git./linux/kernel/git/mic/linux

Pull landlock updates from Mickaël Salaün:
 "Some miscellaneous improvements, including new KUnit tests, extended
  documentation and boot help, and some cosmetic cleanups.

  Additional test changes already went through the net tree"

* tag 'landlock-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux:
  samples/landlock: Don't error out if a file path cannot be opened
  landlock: Use f_cred in security_file_open() hook
  landlock: Rename "ptrace" files to "task"
  landlock: Simplify current_check_access_socket()
  landlock: Warn once if a Landlock action is requested while disabled
  landlock: Extend documentation for kernel support
  landlock: Add support for KUnit tests
  selftests/landlock: Clean up error logs related to capabilities

7 weeks agoMerge tag 'for-linus' of https://github.com/openrisc/linux
Linus Torvalds [Thu, 14 Mar 2024 22:53:10 +0000 (15:53 -0700)]
Merge tag 'for-linus' of https://github.com/openrisc/linux

Pull OpenRISC updates from Stafford Horne:
 "Just a few cleanups and updates that were sent in:

   - Replace asm/fixmap.h with asm-generic version

   - Fix to move memblock setup up before it's used during init"

* tag 'for-linus' of https://github.com/openrisc/linux:
  openrisc: Use asm-generic's version of fix_to_virt() & virt_to_fix()
  openrisc: Call setup_memory() earlier in the init sequence

7 weeks agoMerge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64...
Linus Torvalds [Thu, 14 Mar 2024 22:35:42 +0000 (15:35 -0700)]
Merge tag 'arm64-upstream' of git://git./linux/kernel/git/arm64/linux

Pull arm64 updates from Catalin Marinas:
 "The major features are support for LPA2 (52-bit VA/PA with 4K and 16K
  pages), the dpISA extension and Rust enabled on arm64. The changes are
  mostly contained within the usual arch/arm64/, drivers/perf, the arm64
  Documentation and kselftests. The exception is the Rust support which
  touches some generic build files.

  Summary:

   - Reorganise the arm64 kernel VA space and add support for LPA2 (at
     stage 1, KVM stage 2 was merged earlier) - 52-bit VA/PA address
     range with 4KB and 16KB pages

   - Enable Rust on arm64

   - Support for the 2023 dpISA extensions (data processing ISA), host
     only

   - arm64 perf updates:

      - StarFive's StarLink (integrates one or more CPU cores with a
        shared L3 memory system) PMU support

      - Enable HiSilicon Erratum 162700402 quirk for HIP09

      - Several updates for the HiSilicon PCIe PMU driver

      - Arm CoreSight PMU support

      - Convert all drivers under drivers/perf/ to use .remove_new()

   - Miscellaneous:

      - Don't enable workarounds for "rare" errata by default

      - Clean up the DAIF flags handling for EL0 returns (in preparation
        for NMI support)

      - Kselftest update for ptrace()

      - Update some of the sysreg field definitions

      - Slight improvement in the code generation for inline asm I/O
        accessors to permit offset addressing

      - kretprobes: acquire regs via a BRK exception (previously done
        via a trampoline handler)

      - SVE/SME cleanups, comment updates

      - Allow CALL_OPS+CC_OPTIMIZE_FOR_SIZE with clang (previously
        disabled due to gcc silently ignoring -falign-functions=N)"

* tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (134 commits)
  Revert "mm: add arch hook to validate mmap() prot flags"
  Revert "arm64: mm: add support for WXN memory translation attribute"
  Revert "ARM64: Dynamically allocate cpumasks and increase supported CPUs to 512"
  ARM64: Dynamically allocate cpumasks and increase supported CPUs to 512
  kselftest/arm64: Add 2023 DPISA hwcap test coverage
  kselftest/arm64: Add basic FPMR test
  kselftest/arm64: Handle FPMR context in generic signal frame parser
  arm64/hwcap: Define hwcaps for 2023 DPISA features
  arm64/ptrace: Expose FPMR via ptrace
  arm64/signal: Add FPMR signal handling
  arm64/fpsimd: Support FEAT_FPMR
  arm64/fpsimd: Enable host kernel access to FPMR
  arm64/cpufeature: Hook new identification registers up to cpufeature
  docs: perf: Fix build warning of hisi-pcie-pmu.rst
  perf: starfive: Only allow COMPILE_TEST for 64-bit architectures
  MAINTAINERS: Add entry for StarFive StarLink PMU
  docs: perf: Add description for StarFive's StarLink PMU
  dt-bindings: perf: starfive: Add JH8100 StarLink PMU
  perf: starfive: Add StarLink PMU support
  docs: perf: Update usage for target filter of hisi-pcie-pmu
  ...

7 weeks agoMerge tag 'kvm-s390-next-6.9-1' of https://git.kernel.org/pub/scm/linux/kernel/git...
Paolo Bonzini [Thu, 14 Mar 2024 18:47:56 +0000 (14:47 -0400)]
Merge tag 'kvm-s390-next-6.9-1' of https://git./linux/kernel/git/kvms390/linux into HEAD

- Memop selftest rotate fix
- SCLP event bits over indication fix
- Missing virt_to_phys for the CRYCB fix

7 weeks agoMerge tag 'sound-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
Linus Torvalds [Thu, 14 Mar 2024 18:10:43 +0000 (11:10 -0700)]
Merge tag 'sound-6.9-rc1' of git://git./linux/kernel/git/tiwai/sound

Pull sound updates from Takashi Iwai:
 "This was a relatively calm development cycle. Most of changes are
  rather small device-specific fixes and enhancements. The only
  significant changes in ALSA core are code refactoring with the recent
  cleanup infrastructure, which should bring no functionality changes.
  Some highlights below:

  Core:
   - Lots of cleanups in ALSA core code with automatic kfree cleanup and
     locking guard macros
   - New ALSA core kunit test

  ASoC:
   - SoundWire support for AMD ACP 6.3 systems
   - Support for reporting version information for AVS firmware
   - Support DSPless mode for Intel Soundwire systems
   - Support for configuring CS35L56 amplifiers using EFI calibration
     data
   - Log which component is being operated on as part of power
     management trace events.
   - Support for Microchip SAM9x7, NXP i.MX95 and Qualcomm WCD939x

  HD- and USB-audio:
   - More Cirrus HD-audio codec support
   - TAS2781 HD-audio codec fixes
   - Scarlett2 mixer fixes

  Others:
   - Enhancement of virtio driver for audio control supports
   - Cleanups of legacy PM code with new macros
   - Firewire sound updates"

* tag 'sound-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (307 commits)
  ALSA: usb-audio: Stop parsing channels bits when all channels are found.
  ALSA: hda/tas2781: remove unnecessary runtime_pm calls
  ALSA: hda/realtek - ALC236 fix volume mute & mic mute LED on some HP models
  ALSA: aaci: Delete unused variable in aaci_do_suspend
  ALSA: scarlett2: Fix Scarlett 4th Gen input gain range again
  ALSA: scarlett2: Fix Scarlett 4th Gen input gain range
  ALSA: scarlett2: Fix Scarlett 4th Gen autogain status values
  ALSA: scarlett2: Fix Scarlett 4th Gen 4i4 low-voltage detection
  ALSA: hda/tas2781: restore power state after system_resume
  ALSA: hda/tas2781: do not call pm_runtime_force_* in system_resume/suspend
  ALSA: hda/tas2781: do not reset cur_* values in runtime_suspend
  ALSA: hda/tas2781: add lock to system_suspend
  ALSA: hda/tas2781: use dev_dbg in system_resume
  ALSA: hda/realtek: fix ALC285 issues on HP Envy x360 laptops
  platform/x86: serial-multi-instantiate: Add support for CS35L54 and CS35L57
  ALSA: hda: cs35l56: Add support for CS35L54 and CS35L57
  ASoC: cs35l56: Add support for CS35L54 and CS35L57
  ASoC: Intel: catpt: Carefully use PCI bitwise constants
  ALSA: hda: hda_component: Include sound/hda_codec.h
  ALSA: hda: hda_component: Add missing #include guards
  ...

7 weeks agoMerge tag 'pci-v6.9-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci
Linus Torvalds [Thu, 14 Mar 2024 17:58:27 +0000 (10:58 -0700)]
Merge tag 'pci-v6.9-changes' of git://git./linux/kernel/git/pci/pci

Pull PCI updates from Bjorn Helgaas:
 "Enumeration:

   - Consolidate interrupt related code in irq.c (Ilpo Järvinen)

   - Reduce kernel size by replacing sysfs resource macros with
     functions (Ilpo Järvinen)

   - Reduce kernel size by compiling sysfs support only when
     CONFIG_SYSFS=y (Lukas Wunner)

   - Avoid using Extended Tags on 3ware-9650SE Root Port to work around
     an apparent hardware defect (Jörg Wedekind)

  Resource management:

   - Fix an MMIO mapping leak in pci_iounmap() (Philipp Stanner)

   - Move pci_iomap.c and other PCI-specific devres code to drivers/pci
     (Philipp Stanner)

   - Consolidate PCI devres code in devres.c (Philipp Stanner)

  Power management:

   - Avoid D3cold on Asus B1400 PCI-NVMe bridge, where firmware doesn't
     know how to return correctly to D0, and remove previous quirk that
     wasn't as specific (Daniel Drake)

   - Allow runtime PM when the driver enables it but doesn't need any
     runtime PM callbacks (Raag Jadav)

   - Drain runtime-idle callbacks before driver removal to avoid races
     between .remove() and .runtime_idle(), which caused intermittent
     page faults when the rtsx .runtime_idle() accessed registers that
     its .remove() had already unmapped (Rafael J. Wysocki)

  Virtualization:

   - Avoid Secondary Bus Reset on LSI FW643 so it can be assigned to VMs
     with VFIO, e.g., for professional audio software on many Apple
     machines, at the cost of leaking state between VMs (Edmund Raile)

  Error handling:

   - Print all logged TLP Prefixes, not just the first, after AER or DPC
     errors (Ilpo Järvinen)

   - Quirk the DPC PIO log size for Intel Raptor Lake Root Ports, which
     still don't advertise a legal size (Paul Menzel)

   - Ignore expected DPC Surprise Down errors on hot removal (Smita
     Koralahalli)

   - Block runtime suspend while handling AER errors to avoid races that
     prevent the device form being resumed from D3hot (Stanislaw
     Gruszka)

  Peer-to-peer DMA:

   - Use atomic XA allocation in RCU read section (Christophe JAILLET)

  ASPM:

   - Collect bits of ASPM-related code that we need even without
     CONFIG_PCIEASPM into aspm.c (David E. Box)

   - Save/restore L1 PM Substates config for suspend/resume (David E.
     Box)

   - Update save_save when ASPM config is changed, so a .slot_reset()
     during error recovery restores the changed config, not the
     .probe()-time config (Vidya Sagar)

  Endpoint framework:

   - Refactor and improve pci_epf_alloc_space() API (Niklas Cassel)

   - Clean up endpoint BAR descriptions (Niklas Cassel)

   - Fix ntb_register_device() name leak in error path (Yang Yingliang)

   - Return actual error code for pci_vntb_probe() failure (Yang
     Yingliang)

  Broadcom STB PCIe controller driver:

   - Fix MDIO write polling, which previously never waited for
     completion (Jonathan Bell)

  Cadence PCIe endpoint driver:

   - Clear the ARI "Next Function Number" of last function (Jasko-EXT
     Wojciech)

  Freescale i.MX6 PCIe controller driver:

   - Simplify by replacing switch statements with function pointers for
     different hardware variants (Frank Li)

   - Simplify by using clk_bulk*() API (Frank Li)

   - Remove redundant DT clock and reg/reg-name details (Frank Li)

   - Add i.MX95 DT and driver support for both Root Complex and Endpoint
     mode (Frank Li)

  Microsoft Hyper-V host bridge driver:

   - Reduce memory usage by limiting ring buffer size to 16KB instead of
     4 pages (Michael Kelley)

  Qualcomm PCIe controller driver:

   - Add X1E80100 DT and driver support (Abel Vesa)

   - Add DT 'required-opps' for SoCs that require a minimum performance
     level (Johan Hovold)

   - Make DT 'msi-map-mask' optional, depending on how MSI interrupts
     are mapped (Johan Hovold)

   - Disable ASPM L0s for sc8280xp, sa8540p and sa8295p because the PHY
     configuration isn't tuned correctly for L0s (Johan Hovold)

   - Split dt-binding qcom,pcie.yaml into qcom,pcie-common.yaml and
     separate files for SA8775p, SC7280, SC8180X, SC8280XP, SM8150,
     SM8250, SM8350, SM8450, SM8550 for easier reviewing (Krzysztof
     Kozlowski)

   - Enable BDF to SID translation by disabling bypass mode (Manivannan
     Sadhasivam)

   - Add endpoint MHI support for Snapdragon SA8775P SoC (Mrinmay
     Sarkar)

  Synopsys DesignWare PCIe controller driver:

   - Allocate 64-bit MSI address if no 32-bit address is available (Ajay
     Agarwal)

   - Fix endpoint Resizable BAR to actually advertise the required 1MB
     size (Niklas Cassel)

  MicroSemi Switchtec management driver:

   - Release resources if the .probe() fails (Christophe JAILLET)

  Miscellaneous:

   - Make pcie_port_bus_type const (Ricardo B. Marliere)"

* tag 'pci-v6.9-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: (77 commits)
  PCI/ASPM: Update save_state when configuration changes
  PCI/ASPM: Disable L1 before configuring L1 Substates
  PCI/ASPM: Call pci_save_ltr_state() from pci_save_pcie_state()
  PCI/ASPM: Save L1 PM Substates Capability for suspend/resume
  PCI: hv: Fix ring buffer size calculation
  PCI: dwc: endpoint: Fix advertised resizable BAR size
  PCI: cadence: Clear the ARI Capability Next Function Number of the last function
  PCI: dwc: Strengthen the MSI address allocation logic
  PCI: brcmstb: Fix broken brcm_pcie_mdio_write() polling
  PCI: qcom: Add X1E80100 PCIe support
  dt-bindings: PCI: qcom: Document the X1E80100 PCIe Controller
  PCI: qcom: Enable BDF to SID translation properly
  PCI/AER: Generalize TLP Header Log reading
  PCI/AER: Use explicit register size for PCI_ERR_CAP
  PCI: qcom: Disable ASPM L0s for sc8280xp, sa8540p and sa8295p
  dt-bindings: PCI: qcom: Do not require 'msi-map-mask'
  dt-bindings: PCI: qcom: Allow 'required-opps'
  PCI/AER: Block runtime suspend when handling errors
  PCI/ASPM: Move pci_save_ltr_state() to aspm.c
  PCI/ASPM: Always build aspm.c
  ...

7 weeks agoMerge tag 'platform-drivers-x86-v6.9-1' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 14 Mar 2024 17:44:09 +0000 (10:44 -0700)]
Merge tag 'platform-drivers-x86-v6.9-1' of git://git./linux/kernel/git/pdx86/platform-drivers-x86

Pull x86 platform driver updates from Ilpo Järvinen:

 - New acer-wmi HW support

 - Support for new revision of amd/pmf heartbeat notify

 - Correctly handle asus-wmi HW without LEDs

 - fujitsu-laptop battery charge control support

 - Support for new hp-wmi thermal profiles

 - Support ideapad-laptop refresh rate key

 - Put intel/pmc AI accelerator (GNA) into D3 if it has no driver to
   allow entry into low-power modes, and temporarily removed Lunar Lake
   SSRAM support due to breaking FW changes causing probe fail (further
   breaking FW changes are still pending)

 - Report pmc/punit_atom devices that prevent reacing low power levels

 - Surface Fan speed function support

 - Support for more sperial keys and complete the list of models with
   non-standard fan registers in thinkpad_acpi

 - New DMI touchscreen HW support

 - Continued modernization efforts of wmi

 - Removal of obsoleted ledtrig-audio call and the related dependency

 - Debug & metrics interface improvements

 - Miscellaneous cleanups / fixes / improvements

* tag 'platform-drivers-x86-v6.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (87 commits)
  platform/x86/intel/pmc: Improve PKGC residency counters debug
  platform/x86: asus-wmi: Consider device is absent when the read is ~0
  Documentation/x86/amd/hsmp: Updating urls
  platform/mellanox: mlxreg-hotplug: Remove redundant NULL-check
  platform/x86/amd/pmf: Update sps power thermals according to the platform-profiles
  platform/x86/amd/pmf: Add support to get sps default APTS index values
  platform/x86/amd/pmf: Add support to get APTS index numbers for static slider
  platform/x86/amd/pmf: Add support to notify sbios heart beat event
  platform/x86/amd/pmf: Add support to get sbios requests in PMF driver
  platform/x86/amd/pmf: Disable debugfs support for querying power thermals
  platform/x86/amd/pmf: Differentiate PMF ACPI versions
  x86/platform/atom: Check state of Punit managed devices on s2idle
  platform/x86: pmc_atom: Check state of PMC clocks on s2idle
  platform/x86: pmc_atom: Check state of PMC managed devices on s2idle
  platform/x86: pmc_atom: Annotate d3_sts register bit defines
  clk: x86: Move clk-pmc-atom register defines to include/linux/platform_data/x86/pmc_atom.h
  platform/x86: make fw_attr_class constant
  platform/x86/intel/tpmi: Change vsec offset to u64
  platform/x86: intel_scu_pcidrv: Remove unused intel-mid.h
  platform/x86: intel_scu_wdt: Remove unused intel-mid.h
  ...

7 weeks agoMerge tag 'leds-next-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds
Linus Torvalds [Thu, 14 Mar 2024 17:38:25 +0000 (10:38 -0700)]
Merge tag 'leds-next-6.9' of git://git./linux/kernel/git/lee/leds

Pull LED updates from Lee Jones:
 "Core Framework:
   - Introduce ExpressWire library

  New Drivers:
   - Add support for ON Semiconductor NCP5623 RGB LED Driver

  New Device Support:
   - Add support for PM660L to Qualcomm's LPG driver

  New Functionality:
   - Dynamically load modules required for the default-trigger
   - Add some support for suspend and resume
   - Allow LEDs to remain lit during suspend

  Fix-ups:
   - Device Tree binding adaptions/conversions/creation
   - Fix include lists; alphabetise, remove unused, explicitly add used
   - Add new led_match_default_trigger to avoid duplication
   - Add module alias' to aid auto-loading
   - Default to hw_control if no others are specified
   - De-bloat the supported link speed attribute lists
   - Remove superfluous code and simplify overall
   - Constify some variables

  Bug Fixes:
   - Prevent kernel panic when renaming the net interface
   - Fix Kconfig related build errors
   - Ensure mutexes are unlocked prior to destroying them
   - Provide clean-up between state changes to avoid invalid state
   - Fix some broken kernel-doc headers"

* tag 'leds-next-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds: (41 commits)
  leds: ncp5623: Add MS suffix to time defines
  leds: Add NCP5623 multi-led driver
  dt-bindings: leds: Add NCP5623 multi-LED Controller
  leds: mlxreg: Drop an excess struct mlxreg_led_data member
  leds: leds-mlxcpld: Fix struct mlxcpld_led_priv member name
  leds: lm3601x: Fix struct lm3601_led kernel-doc warnings
  leds: Fix ifdef check for gpio_led_register_device()
  dt-bindings: leds: qcom-lpg: Narrow nvmem for other variants
  dt-bindings: leds: qcom-lpg: Drop redundant qcom,pm8550-pwm in if:then:
  dt-bindings: leds: Add LED_FUNCTION_WAN_ONLINE for Internet access
  leds: sgm3140: Add missing timer cleanup and flash gpio control
  leds: expresswire: Don't depend on NEW_LEDS
  Revert "leds: Only descend into leds directory when CONFIG_NEW_LEDS is set"
  leds: aw2013: Unlock mutex before destroying it
  leds: qcom-lpg: Add QCOM_PBS dependency
  leds: rgb: leds-group-multicolor: Allow LEDs to stay on in suspend
  leds: trigger: netdev: Fix kernel panic on interface rename trig notify
  leds: qcom-lpg: Add PM660L configuration and compatible
  leds: spi-byte: Use devm_led_classdev_register_ext()
  leds: pca963x: Add support for suspend and resume
  ...

7 weeks agoMerge tag 'backlight-next-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee...
Linus Torvalds [Thu, 14 Mar 2024 17:35:46 +0000 (10:35 -0700)]
Merge tag 'backlight-next-6.9' of git://git./linux/kernel/git/lee/backlight

Pull backlight updates from Lee Jones:
 "New Drivers:
   - Add support for Kinetic KTD2801 Backlight

  Fix-ups:
   - Fix include lists; alphabetise, remove unused, explicitly add used
   - Device Tree binding adaptions/conversions/creation
   - Use dev_err_probe() to clean-up error paths
   - Use/convert to new/better APIs/helpers/MACROs instead of hand-rolling implementations

  Bug Fixes:
   - Fix changes of NULL pointer dereference
   - Remedy a bunch of logic errors
   - Initialise (zero) Backlight properties data structures"

* tag 'backlight-next-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: (32 commits)
  backlight: pandora_bl: Drop unneeded ENOMEM error message
  backlight: lm3630a_bl: Simplify probe return on gpio request error
  backlight: lm3630a_bl: Handle deferred probe
  backlight: as3711_bl: Handle deferred probe
  backlight: bd6107: Handle deferred probe
  backlight: l4f00242t03: Simplify with dev_err_probe()
  backlight: gpio: Simplify with dev_err_probe()
  backlight: lp8788: Fully initialize backlight_properties during probe
  backlight: lm3639: Fully initialize backlight_properties during probe
  backlight: da9052: Fully initialize backlight_properties during probe
  backlight: lm3630a: Use backlight_get_brightness helper in update_status
  backlight: lm3630a: Don't set bl->props.brightness in get_brightness
  backlight: lm3630a: Initialize backlight_properties on init
  backlight: mp3309c: Fully initialize backlight_properties during probe
  backlight: mp3309c: Utilise temporary variable for struct device
  backlight: mp3309c: Use dev_err_probe() instead of dev_err()
  backlight: mp3309c: Make use of device properties
  dt-bindings: backlight: qcom-wled: Fix bouncing email addresses
  backlight: hx8357: Utilise temporary variable for struct device
  backlight: hx8357: Make use of dev_err_probe()
  ...

7 weeks agoMerge tag 'mfd-next-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd
Linus Torvalds [Thu, 14 Mar 2024 17:29:47 +0000 (10:29 -0700)]
Merge tag 'mfd-next-6.9' of git://git./linux/kernel/git/lee/mfd

Pull MFD updates from Lee Jones:
 "New Device Support:
   - Add support for Watchdog to ChromeOS Embedded Controller
   - Add support for GPIOs to ChromeOS Embedded Controller
   - Add supprt for Sound to MediaTek MT6357 CODEC

  New Functionality:
   - Add power-off functionality to Texas Instruments TWL series CODECs

  Fix-ups:
   - Device Tree binding adaptions/conversions/creation
   - Use/convert to new/better APIs/helpers/MACROs instead of
     hand-rolling implementations
   - Trivial; spelling, whitespace, clean-ups, etc
   - Remove superfluous code and simplify overall
   - Fix include lists; alphabetise, remove unused, explicitly add used
   - Use dev_err_probe() to clean-up error paths
   - Convert used cache type over to the Maple Tree in many instances
   - Constify a bunch of static structs
   - Refrain from over-riding resources provided via the firmware

  Bug Fixes:
   - Fix a clock related firmware bug on Dell XPS 9530 et al.
   - Repair incorrect IRQ designations
   - Increase buffer sizes to omit various snprintf compiler errors
   - Ensure errors are handled properly
   - Balance references and prevent resource leaks
   - Rectify Power Key interrupt processing
   - Fix Kconfig related build errors
   - Correct a bunch of register start-up default values"

* tag 'mfd-next-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (65 commits)
  mfd: cs42l43: Fix wrong GPIO_FN_SEL and SPI_CLK_CONFIG1 defaults
  mfd: cs42l43: Fix wrong register defaults
  mfd: mt6397-core: Register mt6357 sound codec
  dt-bindings: mfd: syscon: Add ti,am62-usb-phy-ctrl compatible
  dt-bindings: mfd: dlg,da9063: Make #interrupt-cells required
  dt-bindings: mfd: Convert atmel-flexcom to json-schema
  mfd: kempld-core: Don't replace resources provided by ACPI
  mfd: cros_ec_dev: Add GPIO device if feature present on EC
  dt-bindings: mfd: cros-ec: Add properties for GPIO controller
  mfd: twl: Select MFD_CORE
  mfd: core: Constify the struct device_type usage
  mfd: rk8xx-core: Fix interrupt processing order for power key button
  mfd: twl4030-power: Accept standard property for power controller
  mfd: twl-core: Add power off implementation for twl603x
  dt-bindings: mfd: ti,twl: Document system-power-controller
  mfd: altera-sysmgr: Call of_node_put() only when of_parse_phandle() takes a ref
  mfd: syscon: Remove extern from function prototypes
  mfd: syscon: Call of_node_put() only when of_parse_phandle() takes a ref
  mfd: mc13xxx: Use bitfield helpers
  mfd: rc5t583: Convert to use maple tree register cache
  ...

7 weeks agoMerge tag 'pinctrl-v6.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw...
Linus Torvalds [Thu, 14 Mar 2024 17:22:26 +0000 (10:22 -0700)]
Merge tag 'pinctrl-v6.9-1' of git://git./linux/kernel/git/linusw/linux-pinctrl

Pull pin control updates from Linus Walleij:
 "No core changes this time around.

  New drivers:

   - New driver for Renesas R8A779H0 also known as R-Car V4M.

   - New driver for the Awinic AW9523/B I2C GPIO expander. I found this
     living out-of-tree in OpenWrt as an upstream attempt had stalled on
     the finishing line, so I picked it up and finished the job.

  Improvements:

   - The Nomadik pin control driver was for years re-used out of tree
     for the ST STA chips, and now the IP was re-used in a MIPS
     automotive SoC called MobilEyeq5, so it has been split in pin
     control and GPIO drivers so the latter can be reused by MobilEyeq5.
     (Along with a long list of cleanups)

   - A lot of overall cleanup and tidying up"

* tag 'pinctrl-v6.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (87 commits)
  drivers/gpio/nomadik: move dummy nmk_gpio_dbg_show_one() to header
  gpio: nomadik: remove BUG_ON() in nmk_gpio_populate_chip()
  dt-bindings: pinctrl: qcom: update compatible name for match with driver
  pinctrl: aw9523: Make the driver tristate
  pinctrl: nomadik: fix dereference of error pointer
  gpio: nomadik: Back out some managed resources
  pinctrl: aw9523: Add proper terminator
  pinctrl: core: comment that pinctrl_add_gpio_range() is deprecated
  pinctrl: pinmux: Suppress error message for -EPROBE_DEFER
  pinctrl: Add driver for Awinic AW9523/B I2C GPIO Expander
  dt-bindings: pinctrl: Add bindings for Awinic AW9523/AW9523B
  gpio: nomadik: Finish conversion to use firmware node APIs
  gpio: nomadik: fix Kconfig dependencies inbetween pinctrl & GPIO
  pinctrl: da9062: Add OF table
  dt-bindings: pinctrl: at91: add sam9x7
  pinctrl: ocelot: remove redundant assignment to variable ret
  gpio: nomadik: grab optional reset control and deassert it at probe
  gpio: nomadik: support mobileye,eyeq5-gpio
  gpio: nomadik: handle variadic GPIO count
  gpio: nomadik: support shared GPIO IRQs
  ...

7 weeks agoMerge tag 'for-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power...
Linus Torvalds [Thu, 14 Mar 2024 17:19:48 +0000 (10:19 -0700)]
Merge tag 'for-v6.9' of git://git./linux/kernel/git/sre/linux-power-supply

Pull power supply and reset updates from Sebastian Reichel:
 "New features:
   - axp20x_usb_power: report USB type

  Cleanups:
   - convert lots of drivers to use devm_power_supply_register()
   - convert lots of reset drivers to use devm_register_sys_off_handler()
   - constify device_type and power_supply_class
   - axp20x_usb_power: use correct property to report input current limit
   - mm8013: correct handling of "not charging" status register
   - core: fix charge_behaviour formatting
   - minor fixes cleanups"

* tag 'for-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (66 commits)
  power: supply: core: fix charge_behaviour formatting
  power: supply: core: ease special formatting implementations
  power: supply: mm8013: fix "not charging" detection
  power: supply: move power_supply_attr_groups definition back to sysfs
  power: supply: core: simplify power_supply_class_init
  power: supply: core: add power_supply_for_each_device()
  power: supply: core: make power_supply_class constant
  power: supply: bq2415x_charger: report online status
  power: supply: core: move power_supply_attr_group into #ifdef block
  power: supply: core: Fix power_supply_init_attrs() stub
  power: supply: bq27xxx: Report charge full state correctly
  power: reset: rmobile-reset: Make sysc_base2 local
  power: supply: core: constify the struct device_type usage
  power: supply: axp288_fuel_gauge: Deny ROCK Pi X
  power: reset: rmobile-reset: Map correct MMIO resource
  power: reset: xgene-reboot: Fix a NULL vs IS_ERR() test
  power: supply: axp288_fuel_gauge: Add STCK1A* Intel Compute Sticks to the deny-list
  power: reset: syscon-poweroff: Use devm_register_sys_off_handler(POWER_OFF)
  power: reset: syscon-poweroff: Move device data into a struct
  power: reset: restart-poweroff: Use devm_register_sys_off_handler(POWER_OFF)
  ...

7 weeks agoMerge tag 'hsi-for-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi
Linus Torvalds [Thu, 14 Mar 2024 17:16:37 +0000 (10:16 -0700)]
Merge tag 'hsi-for-6.9' of git://git./linux/kernel/git/sre/linux-hsi

Pull HSI updates from Sebastian Reichel:

 - fix kernel-doc warning

 - make hsi_bus_type const

[ And as always I had to remind myself about the acronyn, so to avoid
  that for others: "HSI" is High Speed Synchronous Serial Interface,
  because of course it is.     - Linus ]

* tag 'hsi-for-6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi:
  HSI: ssi_protocol: fix struct members kernel-doc warnings
  hsi: hsi_core: make hsi_bus_type const

7 weeks agoMerge tag 'hid-for-linus-2024031301' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 14 Mar 2024 16:56:15 +0000 (09:56 -0700)]
Merge tag 'hid-for-linus-2024031301' of git://git./linux/kernel/git/hid/hid

Pull HID updates from Jiri Kosina:

 - support for the following Bluetooth devices from Samsung: Samsung
   wireless {Keyboard, GamePad, Action Mouse, Book Cover, Universal
   Keyboard, HOGP Keyboard} (Sandeep C S)

 - second version of code for applying proper quirk depending on
   firmware version for lenovo/cptkbd (Mikhail Khvainitski)

 - lenovo/cptkbd firmware-dependent quirk (Mikhail Khvainitski)

 - assorted fixes and optimizations for amd-sfh (Basavaraj Natikar)

 - dead code and dead data structures removal (Jiri Slaby, Jiapeng
   Chong)

* tag 'hid-for-linus-2024031301' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: (25 commits)
  HID: amd_sfh: Set the AMD SFH driver to depend on x86
  HID: input: avoid polling stylus battery on Chromebook Pompom
  HID: amd_sfh: Extend MP2 register access to SFH
  HID: amd_sfh: Improve boot time when SFH is available
  HID: amd_sfh: Avoid disabling the interrupt
  HID: amd_sfh: Update HPD sensor structure elements
  HID: amd_sfh: Increase sensor command timeout
  HID: intel-ish-hid: ipc: Add Arrow Lake PCI device ID
  HID: nintendo: Remove some unused functions
  HID: hid-prodikeys: remove struct pk_device
  HID: hid-prodikeys: remove unused struct pcmidi_snd members
  HID: hid-multitouch: remove unused mt_application::dev_time
  HID: hid-lg3ff: remove unused struct lg3ff_device
  HID: protect hid_device::bpf by CONFIG_HID_BPF
  HID: wacom: remove unused hid_data::pressure
  HID: apple: remove unused members from struct apple_sc_backlight
  HID: wacom: Clean up use of struct->wacom_wac
  HID: samsung: Add Samsung wireless bookcover and universal keyboard support
  HID: samsung: Add Samsung wireless action mouse support
  HID: samsung: Add Samsung wireless gamepad support
  ...

7 weeks agoMerge tag 'auxdisplay-v6.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/andy...
Linus Torvalds [Thu, 14 Mar 2024 16:43:51 +0000 (09:43 -0700)]
Merge tag 'auxdisplay-v6.9-1' of git://git./linux/kernel/git/andy/linux-auxdisplay

Pull auxdisplay updates from Andy Shevchenko:

 - New driver for GPIO based 7-segment LED display (Chris Packham)

 - New driver for Maxim MAX6958/6959 I²C 7-segment LED display
   controller

 - Refactor linedisp library to make the above happen

 - Update Holtek HT16k33 driver to follow the linedisp refactoring

 - Convert .remove to return void in platform drivers (Uwe Kleine-König)

 - Fix DT schemas (Krzysztof Kozlowski)

 - Refresh MAINTAINERS database

* tag 'auxdisplay-v6.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-auxdisplay: (27 commits)
  auxdisplay: img-ascii-lcd: Convert to platform remove callback returning void
  auxdisplay: hd44780: Convert to platform remove callback returning void
  auxdisplay: cfag12864bfb: Convert to platform remove callback returning void
  auxdisplay: seg-led-gpio: Import linedisp namespace
  dt-bindings: auxdisplay: Add bindings for generic 7-segment LED
  auxdisplay: Add 7-segment LED display driver
  auxdisplay: Add driver for MAX695x 7-segment LED controllers
  dt-bindings: auxdisplay: Add Maxim MAX6958/6959
  auxdisplay: ht16k33: Drop struct ht16k33_seg
  auxdisplay: ht16k33: Switch to use line display character mapping
  auxdisplay: ht16k33: Define a few helper macros
  auxdisplay: ht16k33: Move ht16k33_linedisp_ops down
  auxdisplay: ht16k33: Add default to switch-cases
  auxdisplay: linedisp: Allocate buffer for the string
  auxdisplay: linedisp: Add support for overriding character mapping
  auxdisplay: linedisp: Provide struct linedisp_ops for future extension
  auxdisplay: linedisp: Move exported symbols to a namespace
  auxdisplay: linedisp: Add missing header(s)
  auxdisplay: linedisp: Unshadow error codes in ->store()
  auxdisplay: linedisp: Use unique number for id
  ...

7 weeks agonilfs2: prevent kernel bug at submit_bh_wbc()
Ryusuke Konishi [Wed, 13 Mar 2024 10:58:27 +0000 (19:58 +0900)]
nilfs2: prevent kernel bug at submit_bh_wbc()

Fix a bug where nilfs_get_block() returns a successful status when
searching and inserting the specified block both fail inconsistently.  If
this inconsistent behavior is not due to a previously fixed bug, then an
unexpected race is occurring, so return a temporary error -EAGAIN instead.

This prevents callers such as __block_write_begin_int() from requesting a
read into a buffer that is not mapped, which would cause the BUG_ON check
for the BH_Mapped flag in submit_bh_wbc() to fail.

Link: https://lkml.kernel.org/r/20240313105827.5296-3-konishi.ryusuke@gmail.com
Fixes: 1f5abe7e7dbc ("nilfs2: replace BUG_ON and BUG calls triggerable from ioctl")
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
7 weeks agonilfs2: fix failure to detect DAT corruption in btree and direct mappings
Ryusuke Konishi [Wed, 13 Mar 2024 10:58:26 +0000 (19:58 +0900)]
nilfs2: fix failure to detect DAT corruption in btree and direct mappings

Patch series "nilfs2: fix kernel bug at submit_bh_wbc()".

This resolves a kernel BUG reported by syzbot.  Since there are two
flaws involved, I've made each one a separate patch.

The first patch alone resolves the syzbot-reported bug, but I think
both fixes should be sent to stable, so I've tagged them as such.

This patch (of 2):

Syzbot has reported a kernel bug in submit_bh_wbc() when writing file data
to a nilfs2 file system whose metadata is corrupted.

There are two flaws involved in this issue.

The first flaw is that when nilfs_get_block() locates a data block using
btree or direct mapping, if the disk address translation routine
nilfs_dat_translate() fails with internal code -ENOENT due to DAT metadata
corruption, it can be passed back to nilfs_get_block().  This causes
nilfs_get_block() to misidentify an existing block as non-existent,
causing both data block lookup and insertion to fail inconsistently.

The second flaw is that nilfs_get_block() returns a successful status in
this inconsistent state.  This causes the caller __block_write_begin_int()
or others to request a read even though the buffer is not mapped,
resulting in a BUG_ON check for the BH_Mapped flag in submit_bh_wbc()
failing.

This fixes the first issue by changing the return value to code -EINVAL
when a conversion using DAT fails with code -ENOENT, avoiding the
conflicting condition that leads to the kernel bug described above.  Here,
code -EINVAL indicates that metadata corruption was detected during the
block lookup, which will be properly handled as a file system error and
converted to -EIO when passing through the nilfs2 bmap layer.

Link: https://lkml.kernel.org/r/20240313105827.5296-1-konishi.ryusuke@gmail.com
Link: https://lkml.kernel.org/r/20240313105827.5296-2-konishi.ryusuke@gmail.com
Fixes: c3a7abf06ce7 ("nilfs2: support contiguous lookup of blocks")
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Reported-by: syzbot+cfed5b56649bddf80d6e@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=cfed5b56649bddf80d6e
Tested-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
7 weeks agoocfs2: enable ocfs2_listxattr for special files
Su Yue [Tue, 12 Mar 2024 04:29:08 +0000 (12:29 +0800)]
ocfs2: enable ocfs2_listxattr for special files

For special files in S_IFBLK/S_IFCHR/S_IFIFO type, we already have
ocfs2_setattr and ocfs2_getattr enabled.  It's confusing for user space if
it can use setattr/getattr to control one attribute appointed but can not
list attributes using listxattr for above type files:

$ mknod /mnt/b b 0 0
$ setfattr -h -n trusted.name -v 0xbabe /mnt/b
$ getfattr -n trusted.name  /mnt/b
getfattr: Removing leading '/' from absolute path names
trusted.name=0sur4=

$ getfattr -m trusted  /mnt/b
$

Fix it by enabling ocfs2_listxattr for ocfs2_special_file_iops.  After the
commit, fstests/generic/062 will pass.

Link: https://lkml.kernel.org/r/20240312042908.8889-1-l@damenly.org
Signed-off-by: Su Yue <glass.su@suse.com>
Acked-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Cc: Mark Fasheh <mark@fasheh.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Changwei Ge <gechangwei@live.cn>
Cc: Gang He <ghe@suse.com>
Cc: Jun Piao <piaojun@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
7 weeks agoocfs2: remove SLAB_MEM_SPREAD flag usage
Chengming Zhou [Sat, 24 Feb 2024 13:50:08 +0000 (13:50 +0000)]
ocfs2: remove SLAB_MEM_SPREAD flag usage

The SLAB_MEM_SPREAD flag is already a no-op as of 6.8-rc1, remove
its usage so we can delete it from slab. No functional change.

Link: https://lkml.kernel.org/r/20240224135008.829878-1-chengming.zhou@linux.dev
Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com>
Acked-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Cc: Mark Fasheh <mark@fasheh.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Changwei Ge <gechangwei@live.cn>
Cc: Gang He <ghe@suse.com>
Cc: Jun Piao <piaojun@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
7 weeks agoblock: fix mismatched kerneldoc function name
Jiapeng Chong [Thu, 14 Mar 2024 02:56:15 +0000 (10:56 +0800)]
block: fix mismatched kerneldoc function name

No functional modification involved.

block/blk-settings.c:281: warning: expecting prototype for queue_limits_commit_set(). Prototype was for queue_limits_set() instead.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=8539
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Link: https://lore.kernel.org/r/20240314025615.71269-1-jiapeng.chong@linux.alibaba.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 weeks agolsm: handle the NULL buffer case in lsm_fill_user_ctx()
Paul Moore [Thu, 14 Mar 2024 01:37:48 +0000 (21:37 -0400)]
lsm: handle the NULL buffer case in lsm_fill_user_ctx()

Passing a NULL buffer into the lsm_get_self_attr() syscall is a valid
way to quickly determine the minimum size of the buffer needed to for
the syscall to return all of the LSM attributes to the caller.
Unfortunately we/I broke that behavior in commit d7cf3412a9f6
("lsm: consolidate buffer size handling into lsm_fill_user_ctx()")
such that it returned an error to the caller; this patch restores the
original desired behavior of using the NULL buffer as a quick way to
correctly size the attribute buffer.

Cc: stable@vger.kernel.org
Fixes: d7cf3412a9f6 ("lsm: consolidate buffer size handling into lsm_fill_user_ctx()")
Signed-off-by: Paul Moore <paul@paul-moore.com>
7 weeks agolsm: use 32-bit compatible data types in LSM syscalls
Casey Schaufler [Thu, 14 Mar 2024 15:31:26 +0000 (11:31 -0400)]
lsm: use 32-bit compatible data types in LSM syscalls

Change the size parameters in lsm_list_modules(), lsm_set_self_attr()
and lsm_get_self_attr() from size_t to u32. This avoids the need to
have different interfaces for 32 and 64 bit systems.

Cc: stable@vger.kernel.org
Fixes: a04a1198088a ("LSM: syscalls for current process attributes")
Fixes: ad4aff9ec25f ("LSM: Create lsm_list_modules system call")
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Reported-and-reviewed-by: Dmitry V. Levin <ldv@strace.io>
[PM: subject and metadata tweaks, syscall.h fixes]
Signed-off-by: Paul Moore <paul@paul-moore.com>
7 weeks agoRevert "blk-lib: check for kill signal"
Christoph Hellwig [Thu, 14 Mar 2024 02:16:23 +0000 (19:16 -0700)]
Revert "blk-lib: check for kill signal"

This reverts commit 8a08c5fd89b447a7de7eb293a7a274c46b932ba2.

It turns out while this is a perfectly valid and long overdue thing to do
for user initiated discards / zeroing from the ioctl handler, it actually
breaks file system use of the discard helper by interrupting in places
the file system doesn't expect, and by leaving the bio chain in a state
that the file system callers of (at least) __blkdev_issue_discard do
not expect.

Revert the change for now, we'll redo it for the next merge window
after refactoring the code to better split the file system vs ioctl
callers and cleaning up a few other loose ends.

Reported-by: Chandan Babu R <chandanbabu@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Keith Busch <kbusch@kernel.org>
Link: https://lore.kernel.org/r/20240314021623.1908895-1-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
7 weeks agobcachefs: time_stats: shrink time_stat_buffer for better alignment
Darrick J. Wong [Mon, 5 Feb 2024 21:48:21 +0000 (13:48 -0800)]
bcachefs: time_stats: shrink time_stat_buffer for better alignment

Shrink this percpu object by one array element so that the object size
becomes exactly 512 bytes.  This will lead to more efficient memory use,
hopefully.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
7 weeks agobcachefs: time_stats: split stats-with-quantiles into a separate structure
Darrick J. Wong [Thu, 1 Feb 2024 20:41:42 +0000 (12:41 -0800)]
bcachefs: time_stats: split stats-with-quantiles into a separate structure

Currently, struct time_stats has the optional ability to quantize the
information that it collects.  This is /probably/ useful for callers who
want to see quantized information, but it more than doubles the size of
the structure from 224 bytes to 464.  For users who don't care about
that (e.g. upcoming xfs patches) and want to avoid wasting 240 bytes per
counter, split the two into separate pieces.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>