linux-block.git
35 hours agoMerge tag 'sched-core-2024-09-19' of git://git.kernel.org/pub/scm/linux/kernel/git... master
Linus Torvalds [Thu, 19 Sep 2024 13:55:58 +0000 (15:55 +0200)]
Merge tag 'sched-core-2024-09-19' of git://git./linux/kernel/git/tip/tip

Pull scheduler updates from Ingo Molnar:

 - Implement the SCHED_DEADLINE server infrastructure - Daniel Bristot
   de Oliveira's last major contribution to the kernel:

     "SCHED_DEADLINE servers can help fixing starvation issues of low
      priority tasks (e.g., SCHED_OTHER) when higher priority tasks
      monopolize CPU cycles. Today we have RT Throttling; DEADLINE
      servers should be able to replace and improve that."

   (Daniel Bristot de Oliveira, Peter Zijlstra, Joel Fernandes, Youssef
   Esmat, Huang Shijie)

 - Preparatory changes for sched_ext integration:
     - Use set_next_task(.first) where required
     - Fix up set_next_task() implementations
     - Clean up DL server vs. core sched
     - Split up put_prev_task_balance()
     - Rework pick_next_task()
     - Combine the last put_prev_task() and the first set_next_task()
     - Rework dl_server
     - Add put_prev_task(.next)

   (Peter Zijlstra, with a fix by Tejun Heo)

 - Complete the EEVDF transition and refine EEVDF scheduling:
     - Implement delayed dequeue
     - Allow shorter slices to wakeup-preempt
     - Use sched_attr::sched_runtime to set request/slice suggestion
     - Document the new feature flags
     - Remove unused and duplicate-functionality fields
     - Simplify & unify pick_next_task_fair()
     - Misc debuggability enhancements

   (Peter Zijlstra, with fixes/cleanups by Dietmar Eggemann, Valentin
   Schneider and Chuyi Zhou)

 - Initialize the vruntime of a new task when it is first enqueued,
   resulting in significant decrease in latency of newly woken tasks
   (Zhang Qiao)

 - Introduce SM_IDLE and an idle re-entry fast-path in __schedule()
   (K Prateek Nayak, Peter Zijlstra)

 - Clean up and clarify the usage of Clean up usage of rt_task()
   (Qais Yousef)

 - Preempt SCHED_IDLE entities in strict cgroup hierarchies
   (Tianchen Ding)

 - Clarify the documentation of time units for deadline scheduler
   parameters (Christian Loehle)

 - Remove the HZ_BW chicken-bit feature flag introduced a year ago,
   the original change seems to be working fine (Phil Auld)

 - Misc fixes and cleanups (Chen Yu, Dan Carpenter, Huang Shijie,
   Peilin He, Qais Yousefm and Vincent Guittot)

* tag 'sched-core-2024-09-19' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (64 commits)
  sched/cpufreq: Use NSEC_PER_MSEC for deadline task
  cpufreq/cppc: Use NSEC_PER_MSEC for deadline task
  sched/deadline: Clarify nanoseconds in uapi
  sched/deadline: Convert schedtool example to chrt
  sched/debug: Fix the runnable tasks output
  sched: Fix sched_delayed vs sched_core
  kernel/sched: Fix util_est accounting for DELAY_DEQUEUE
  kthread: Fix task state in kthread worker if being frozen
  sched/pelt: Use rq_clock_task() for hw_pressure
  sched/fair: Move effective_cpu_util() and effective_cpu_util() in fair.c
  sched/core: Introduce SM_IDLE and an idle re-entry fast-path in __schedule()
  sched: Add put_prev_task(.next)
  sched: Rework dl_server
  sched: Combine the last put_prev_task() and the first set_next_task()
  sched: Rework pick_next_task()
  sched: Split up put_prev_task_balance()
  sched: Clean up DL server vs core sched
  sched: Fixup set_next_task() implementations
  sched: Use set_next_task(.first) where required
  sched/fair: Properly deactivate sched_delayed task upon class change
  ...

37 hours agoMerge tag 'Smack-for-6.12' of https://github.com/cschaufler/smack-next
Linus Torvalds [Thu, 19 Sep 2024 11:09:19 +0000 (13:09 +0200)]
Merge tag 'Smack-for-6.12' of https://github.com/cschaufler/smack-next

Pull smack updates from Casey Schaufler:
 "Two patches: one is a simple indentation correction, the other
  corrects a potentially rcu unsafe pointer assignment"

* tag 'Smack-for-6.12' of https://github.com/cschaufler/smack-next:
  smackfs: Use rcu_assign_pointer() to ensure safe assignment in smk_set_cipso
  security: smack: Fix indentation in smack_netfilter.c

38 hours agoMerge tag 'i2c-for-6.11-final-but-missed-it' of git://git.kernel.org/pub/scm/linux...
Linus Torvalds [Thu, 19 Sep 2024 10:52:23 +0000 (12:52 +0200)]
Merge tag 'i2c-for-6.11-final-but-missed-it' of git://git./linux/kernel/git/wsa/linux

Pull i2c fixes from Wolfram Sang:
 "The Aspeed driver tracks the controller's state (stop, pending, start,
  etc.). Previously, when the stop command was sent, the state was not
  updated. The fix ensures the driver's state is aligned with the device
  status.

  The Intel SCH driver receives a new look, and among the cleanups,
  there is a fix where, due to an oversight, an if/else statement was
  missing the else, causing it to move forward instead of exiting the
  function in case of an error.

  The Qualcomm GENI I2C driver adds the IRQF_NO_AUTOEN flag to the IRQ
  setup to prevent unwanted interrupts during probe.

  The Xilinx XPS controller fixes TX FIFO handling to avoid missed NAKs.
  Another fix ensures the controller is reinitialized when the bus
  appears busy"

* tag 'i2c-for-6.11-final-but-missed-it' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: qcom-geni: Use IRQF_NO_AUTOEN flag in request_irq()
  i2c: isch: Add missed 'else'
  i2c: xiic: Try re-initialization on bus busy timeout
  i2c: xiic: Wait for TX empty to avoid missed TX NAKs
  i2c: aspeed: Update the stop sw state when the bus recovery occurs

39 hours agoMerge tag 'mm-hotfixes-stable-2024-09-19-00-31' of git://git.kernel.org/pub/scm/linux...
Linus Torvalds [Thu, 19 Sep 2024 09:35:31 +0000 (11:35 +0200)]
Merge tag 'mm-hotfixes-stable-2024-09-19-00-31' of git://git./linux/kernel/git/akpm/mm

Pull misc hotfixes from Andrew Morton:
 "12 hotfixes, 11 of which are cc:stable.

  Four fixes for longstanding ocfs2 issues and the remainder address
  random MM things"

* tag 'mm-hotfixes-stable-2024-09-19-00-31' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
  mm/madvise: process_madvise() drop capability check if same mm
  mm/huge_memory: ensure huge_zero_folio won't have large_rmappable flag set
  mm/hugetlb.c: fix UAF of vma in hugetlb fault pathway
  mm: change vmf_anon_prepare() to __vmf_anon_prepare()
  resource: fix region_intersects() vs add_memory_driver_managed()
  zsmalloc: use unique zsmalloc caches names
  mm/damon/vaddr: protect vma traversal in __damon_va_thre_regions() with rcu read lock
  mm: vmscan.c: fix OOM on swap stress test
  ocfs2: cancel dqi_sync_work before freeing oinfo
  ocfs2: fix possible null-ptr-deref in ocfs2_set_buffer_uptodate
  ocfs2: remove unreasonable unlock in ocfs2_read_blocks
  ocfs2: fix null-ptr-deref when journal load failed.

39 hours agoMerge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Linus Torvalds [Thu, 19 Sep 2024 09:28:51 +0000 (11:28 +0200)]
Merge tag 'scsi-misc' of git://git./linux/kernel/git/jejb/scsi

Pull SCSI updates from James Bottomley:
 "Updates to the usual drivers (ufs, smartpqi, NCR5380, mac_scsi, lpfc,
  mpi3mr).

  There are no user visible core changes and a whole series of minor
  updates and fixes. The largest core change is probably the
  simplification of the workqueue allocation path"

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (86 commits)
  scsi: smartpqi: update driver version to 2.1.30-031
  scsi: smartpqi: fix volume size updates
  scsi: smartpqi: fix rare system hang during LUN reset
  scsi: smartpqi: add new controller PCI IDs
  scsi: smartpqi: add counter for parity write stream requests
  scsi: smartpqi: correct stream detection
  scsi: smartpqi: Add fw log to kdump
  scsi: bnx2fc: Remove some unused fields in struct bnx2fc_rport
  scsi: qla2xxx: Remove the unused 'del_list_entry' field in struct fc_port
  scsi: ufs: core: Remove ufshcd_urgent_bkops()
  scsi: core: Remove obsoleted declaration for scsi_driverbyte_string()
  scsi: bnx2i: Remove unused declarations
  scsi: core: Simplify an alloc_workqueue() invocation
  scsi: ufs: Simplify alloc*_workqueue() invocation
  scsi: stex: Simplify an alloc_ordered_workqueue() invocation
  scsi: scsi_transport_fc: Simplify alloc_workqueue() invocations
  scsi: snic: Simplify alloc_workqueue() invocations
  scsi: qedi: Simplify an alloc_workqueue() invocation
  scsi: qedf: Simplify alloc_workqueue() invocations
  scsi: myrs: Simplify an alloc_ordered_workqueue() invocation
  ...

39 hours agoMerge tag 'dma-mapping-6.12-2024-09-19' of git://git.infradead.org/users/hch/dma...
Linus Torvalds [Thu, 19 Sep 2024 09:12:49 +0000 (11:12 +0200)]
Merge tag 'dma-mapping-6.12-2024-09-19' of git://git.infradead.org/users/hch/dma-mapping

Pull dma-mapping updates from Christoph Hellwig:

 - support DMA zones for arm64 systems where memory starts at > 4GB
   (Baruch Siach, Catalin Marinas)

 - support direct calls into dma-iommu and thus obsolete dma_map_ops for
   many common configurations (Leon Romanovsky)

 - add DMA-API tracing (Sean Anderson)

 - remove the not very useful return value from various dma_set_* APIs
   (Christoph Hellwig)

 - misc cleanups and minor optimizations (Chen Y, Yosry Ahmed, Christoph
   Hellwig)

* tag 'dma-mapping-6.12-2024-09-19' of git://git.infradead.org/users/hch/dma-mapping:
  dma-mapping: reflow dma_supported
  dma-mapping: reliably inform about DMA support for IOMMU
  dma-mapping: add tracing for dma-mapping API calls
  dma-mapping: use IOMMU DMA calls for common alloc/free page calls
  dma-direct: optimize page freeing when it is not addressable
  dma-mapping: clearly mark DMA ops as an architecture feature
  vdpa_sim: don't select DMA_OPS
  arm64: mm: keep low RAM dma zone
  dma-mapping: don't return errors from dma_set_max_seg_size
  dma-mapping: don't return errors from dma_set_seg_boundary
  dma-mapping: don't return errors from dma_set_min_align_mask
  scsi: check that busses support the DMA API before setting dma parameters
  arm64: mm: fix DMA zone when dma-ranges is missing
  dma-mapping: direct calls for dma-iommu
  dma-mapping: call ->unmap_page and ->unmap_sg unconditionally
  arm64: support DMA zone above 4GB
  dma-mapping: replace zone_dma_bits by zone_dma_limit
  dma-mapping: use bit masking to check VM_DMA_COHERENT

40 hours agoMerge tag 'drm-next-2024-09-19' of https://gitlab.freedesktop.org/drm/kernel
Linus Torvalds [Thu, 19 Sep 2024 08:18:15 +0000 (10:18 +0200)]
Merge tag 'drm-next-2024-09-19' of https://gitlab.freedesktop.org/drm/kernel

Pull drm updates from Dave Airlie:
 "This adds a couple of patches outside the drm core, all should be
  acked appropriately, the string and pstore ones are the main ones that
  come to mind.

  Otherwise it's the usual drivers, xe is getting enabled by default on
  some new hardware, we've changed the device number handling to allow
  more devices, and we added some optional rust code to create QR codes
  in the panic handler, an idea first suggested I think 10 years ago :-)

  string:
   - add mem_is_zero()

  core:
   - support more device numbers
   - use XArray for minor ids
   - add backlight constants
   - Split dma fence array creation into alloc and arm

  fbdev:
   - remove usage of old fbdev hooks

  kms:
   - Add might_fault() to drm_modeset_lock priming
   - Add dynamic per-crtc vblank configuration support

  dma-buf:
   - docs cleanup

  buddy:
   - Add start address support for trim function

  printk:
   - pass description to kmsg_dump

  scheduler:
   - Remove full_recover from drm_sched_start

  ttm:
   - Make LRU walk restartable after dropping locks
   - Allow direct reclaim to allocate local memory

  panic:
   - add display QR code (in rust)

  displayport:
   - mst: GUID improvements

  bridge:
   - Silence error message on -EPROBE_DEFER
   - analogix: Clean aup
   - bridge-connector: Fix double free
   - lt6505: Disable interrupt when powered off
   - tc358767: Make default DP port preemphasis configurable
   - lt9611uxc: require DRM_BRIDGE_ATTACH_NO_CONNECTOR
   - anx7625: simplify OF array handling
   - dw-hdmi: simplify clock handling
   - lontium-lt8912b: fix mode validation
   - nwl-dsi: fix mode vsync/hsync polarity

  xe:
   - Enable LunarLake and Battlemage support
   - Introducing Xe2 ccs modifiers for integrated and discrete graphics
   - rename xe perf to xe observation
   - use wb caching on DGFX for system memory
   - add fence timeouts
   - Lunar Lake graphics/media/display workarounds
   - Battlemage workarounds
   - Battlemage GSC support
   - GSC and HuC fw updates for LL/BM
   - use dma_fence_chain_free
   - refactor hw engine lookup and mmio access
   - enable priority mem read for Xe2
   - Add first GuC BMG fw
   - fix dma-resv lock
   - Fix DGFX display suspend/resume
   - Use xe_managed for kernel BOs
   - Use reserved copy engine for user binds on faulting devices
   - Allow mixing dma-fence jobs and long-running faulting jobs
   - fix media TLB invalidation
   - fix rpm in TTM swapout path
   - track resources and VF state by PF

  i915:
   - Type-C programming fix for MTL+
   - FBC cleanup
   - Calc vblank delay more accurately
   - On DP MST, Enable LT fallback for UHBR<->non-UHBR rates
   - Fix DP LTTPR detection
   - limit relocations to INT_MAX
   - fix long hangs in buddy allocator on DG2/A380

  amdgpu:
   - Per-queue reset support
   - SDMA devcoredump support
   - DCN 4.0.1 updates
   - GFX12/VCN4/JPEG4 updates
   - Convert vbios embedded EDID to drm_edid
   - GFX9.3/9.4 devcoredump support
   - process isolation framework for GFX 9.4.3/4
   - take IOMMU mappings into account for P2P DMA

  amdkfd:
   - CRIU fixes
   - HMM fix
   - Enable process isolation support for GFX 9.4.3/4
   - Allow users to target recommended SDMA engines
   - KFD support for targetting queues on recommended SDMA engines

  radeon:
   - remove .load and drm_dev_alloc
   - Fix vbios embedded EDID size handling
   - Convert vbios embedded EDID to drm_edid
   - Use GEM references instead of TTM
   - r100 cp init cleanup
   - Fix potential overflows in evergreen CS offset tracking

  msm:
   - DPU:
      - implement DP/PHY mapping on SC8180X
      - Enable writeback on SM8150, SC8180X, SM6125, SM6350
   - DP:
      - Enable widebus on all relevant chipsets
      - MSM8998 HDMI support
   - GPU:
      - A642L speedbin support
      - A615/A306/A621 support
      - A7xx devcoredump support

  ast:
   - astdp: Support AST2600 with VGA
   - Clean up HPD
   - Fix timeout loop for DP link training
   - reorganize output code by type (VGA, DP, etc)
   - convert to struct drm_edid
   - fix BMC handling for all outputs

  exynos:
   - drop stale MAINTAINERS pattern
   - constify struct

  loongson:
   - use GEM refcount over TTM

  mgag200:
   - Improve BMC handling
   - Support VBLANK intterupts
   - transparently support BMC outputs

  nouveau:
   - Refactor and clean up internals
   - Use GEM refcount over TTM's

  gm12u320:
   - convert to struct drm_edid

  gma500:
   - update i2c terms

  lcdif:
   - pixel clock fix

  host1x:
   - fix syncpoint IRQ during resume
   - use iommu_paging_domain_alloc()

  imx:
   - ipuv3: convert to struct drm_edid

  omapdrm:
   - improve error handling
   - use common helper for_each_endpoint_of_node()

  panel:
   - add support for BOE TV101WUM-LL2 plus DT bindings
   - novatek-nt35950: improve error handling
   - nv3051d: improve error handling
   - panel-edp:
      - add support for BOE NE140WUM-N6G
      - revert support for SDC ATNA45AF01
   - visionox-vtdr6130:
      - improve error handling
      - use devm_regulator_bulk_get_const()
   - boe-th101mb31ig002:
      - Support for starry-er88577 MIPI-DSI panel plus DT
      - Fix porch parameter
   - edp: Support AOU B116XTN02.3, AUO B116XAN06.1, AOU B116XAT04.1, BOE
     NV140WUM-N41, BOE NV133WUM-N63, BOE NV116WHM-A4D, CMN N116BCA-EA2,
     CMN N116BCP-EA2, CSW MNB601LS1-4
   - himax-hx8394: Support Microchip AC40T08A MIPI Display panel plus DT
   - ilitek-ili9806e: Support Densitron DMT028VGHMCMI-1D TFT plus DT
   - jd9365da:
      - Support Melfas lmfbx101117480 MIPI-DSI panel plus DT
      - Refactor for code sharing
   - panel-edp: fix name for HKC MB116AN01
   - jd9365da: fix "exit sleep" commands
   - jdi-fhd-r63452: simplify error handling with DSI multi-style
     helpers
   - mantix-mlaf057we51: simplify error handling with DSI multi-style
     helpers
   - simple:
      - support Innolux G070ACE-LH3 plus DT bindings
      - support On Tat Industrial Company KD50G21-40NT-A1 plus DT
        bindings
   - st7701:
      - decouple DSI and DRM code
      - add SPI support
      - support Anbernic RG28XX plus DT bindings

  mediatek:
   - support alpha blending
   - remove cl in struct cmdq_pkt
   - ovl adaptor fix
   - add power domain binding for mediatek DPI controller

  renesas:
   - rz-du: add support for RZ/G2UL plus DT bindings

  rockchip:
   - Improve DP sink-capability reporting
   - dw_hdmi: Support 4k@60Hz
   - vop:
      - Support RGB display on Rockchip RK3066
      - Support 4096px width

  sti:
   - convert to struct drm_edid

  stm:
   - Avoid UAF wih managed plane and CRTC helpers
   - Fix module owner
   - Fix error handling in probe
   - Depend on COMMON_CLK
   - ltdc:
      - Fix transparency after disabling plane
      - Remove unused interrupt

  tegra:
   - gr3d: improve PM domain handling
   - convert to struct drm_edid
   - Call drm_atomic_helper_shutdown()

  vc4:
   - fix PM during detect
   - replace DRM_ERROR() with drm_error()
   - v3d: simplify clock retrieval

  v3d:
   - Clean up perfmon

  virtio:
   - add DRM capset"

* tag 'drm-next-2024-09-19' of https://gitlab.freedesktop.org/drm/kernel: (1326 commits)
  drm/xe: Fix missing conversion to xe_display_pm_runtime_resume
  drm/xe/xe2hpg: Add Wa_15016589081
  drm/xe: Don't keep stale pointer to bo->ggtt_node
  drm/xe: fix missing 'xe_vm_put'
  drm/xe: fix build warning with CONFIG_PM=n
  drm/xe: Suppress missing outer rpm protection warning
  drm/xe: prevent potential UAF in pf_provision_vf_ggtt()
  drm/amd/display: Add all planes on CRTC to state for overlay cursor
  drm/i915/bios: fix printk format width
  drm/i915/display: Fix BMG CCS modifiers
  drm/amdgpu: get rid of bogus includes of fdtable.h
  drm/amdkfd: CRIU fixes
  drm/amdgpu: fix a race in kfd_mem_export_dmabuf()
  drm: new helper: drm_gem_prime_handle_to_dmabuf()
  drm/amdgpu/atomfirmware: Silence UBSAN warning
  drm/amdgpu: Fix kdoc entry in 'amdgpu_vm_cpu_prepare'
  drm/amd/amdgpu: apply command submission parser for JPEG v1
  drm/amd/amdgpu: apply command submission parser for JPEG v2+
  drm/amd/pm: fix the pp_dpm_pcie issue on smu v14.0.2/3
  drm/amd/pm: update the features set on smu v14.0.2/3
  ...

41 hours agoMerge tag 'ata-6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/libata...
Linus Torvalds [Thu, 19 Sep 2024 07:49:10 +0000 (09:49 +0200)]
Merge tag 'ata-6.12-rc1' of git://git./linux/kernel/git/libata/linux

Pull ata updates from Damien Le Moal:

 - Convert the qcom AHCI controller DT bindings to DT schema (from
   Rayyan)

 - Cleanup of libata core and drivers code handling controller and
   device quirks to rename "blacklist" to the more neutral "quirk" and
   to replace the rarely used "horkage" term with the more common
   "quirk" naming (me)

 - Add libata-core message to print the quirks applied to a controller
   or device (me)

 - Remove the not-so-useful function ata_noop_qc_prep() from libata core
   (me)

 - ahci_imx driver cleanup, improvements and DT bindings compatible
   strings update (Richard and Dan)

 - libahci_platform improvements (Zhang)

 - Remove obsolete functions declarations from libata header files (from
   Gaosheng)

 - Improve teh ahci_brcm driver using managed device resources funetions
   (Zhang)

 - Introduce new helper function to improve libata EH code readability
   (Niklas)

 - Enable module autoloading for the pata_ftide010, pata_ixp4xx and
   sata_gemini drivers (Liao)

 - Move SATA related functions and data declaraions from libata-core to
   libata-sata (me)

 - Rename the function handling the sense data for successful NCQ
   commands log to better reflect that function actions (me)

 - Reduce libata memory usage by moving port resources to struct
   ata_device and by optimizing the management of resources for CDL
   capable devices (me)

 - Improve libata-eh handling of failed ATA passthrough commands
   (Niklas)

* tag 'ata-6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux: (39 commits)
  ata: libata: Clear DID_TIME_OUT for ATA PT commands with sense data
  ata: libata: Fix W=1 compilation warning
  ata: libata: Improve CDL resource management
  ata: libata: Introduce ata_dev_free_resources
  ata: libata: Move sector_buf from struct ata_port to struct ata_device
  ata: libata: Rename ata_eh_read_sense_success_ncq_log()
  ata: libata: Move sata_std_hardreset() definition to libata-sata.c
  ata: libata: Move sata_down_spd_limit() to libata-sata.c
  ata: libata: Improve __ata_qc_complete()
  ata: libata-scsi: Improve ata_scsi_handle_link_detach()
  ata: libata: Cleanup libata-transport
  ata: sata_gemini: Enable module autoloading
  ata: pata_ixp4xx: Enable module autoloading
  ata: pata_ftide010: Enable module autoloading
  ata: libata: Add helper ata_eh_decide_disposition()
  ata: ahci_brcm: Use devm_platform_ioremap_resource_byname() helper function
  ata: libata: Remove obsolete function declarations
  ata: ahci_imx: Fix error code in probe()
  ata: libahci_platform: Simplify code with for_each_child_of_node_scoped()
  ata: ahci_imx: Correct the email address
  ...

41 hours agoMerge tag 'hid-for-linus-2024091602' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 19 Sep 2024 07:42:21 +0000 (09:42 +0200)]
Merge tag 'hid-for-linus-2024091602' of git://git./linux/kernel/git/hid/hid

Pull HID updates from Jiri Kosina:

 - New HID over SPI driver for Goodix devices that don't follow
   Microsoft's HID-over-SPI specification, so a separate driver is
   needed. Currently supported device is GT7986U touchscreen (Charles
   Wang)

 - support for new hardware features in Wacom driver (high-res wheel
   scrolling, touchstrings with relative motions, support for two
   touchrings) (Jason Gerecke)

 - support for customized vendor firmware loading in intel-ish driver
   (Zhang Lixu)

 - fix for theoretical race condition in i2c-hid (Dmitry Torokhov)

 - support for HIDIOCREVOKE -- evdev's EVIOCREVOKE equivalent in hidraw
   (Peter Hutterer)

 - initial hidraw selftest implementation (Benjamin Tissoires)

 - constification of device-specific report descriptors (Thomas
   Weißschuh)

 - other small assorted fixes and device ID / quirk additions

* tag 'hid-for-linus-2024091602' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: (54 commits)
  hid: cp2112: Use irq_get_trigger_type() helper
  HID: i2c-hid: ensure various commands do not interfere with each other
  HID: multitouch: Add support for Thinkpad X12 Gen 2 Kbd Portfolio
  HID: wacom: Do not warn about dropped packets for first packet
  HID: wacom: Support sequence numbers smaller than 16-bit
  HID: lg: constify fixed up report descriptor
  HID: uclogic: constify fixed up report descriptor
  HID: waltop: constify fixed up report descriptor
  HID: sony: constify fixed up report descriptor
  HID: pxrc: constify fixed up report descriptor
  HID: steelseries: constify fixed up report descriptor
  HID: viewsonic: constify fixed up report descriptor
  HID: vrc2: constify fixed up report descriptor
  HID: xiaomi: constify fixed up report descriptor
  HID: maltron: constify fixed up report descriptor
  HID: keytouch: constify fixed up report descriptor
  HID: holtek-kbd: constify fixed up report descriptor
  HID: dr: constify fixed up report descriptor
  HID: bigbenff: constify fixed up report descriptor
  HID: picoLCD: Use backlight power constants
  ...

41 hours agoMerge tag 'tpmdd-next-6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Thu, 19 Sep 2024 07:38:34 +0000 (09:38 +0200)]
Merge tag 'tpmdd-next-6.12-rc1' of git://git./linux/kernel/git/jarkko/linux-tpmdd

Pull tpm updates from Jarkko Sakkinen:
 "Just updates and fixes, no major changes"

* tag 'tpmdd-next-6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd:
  tpm: export tpm2_sessions_init() to fix ibmvtpm building
  tpm: Drop explicit initialization of struct i2c_device_id::driver_data to 0
  selftests: tpm2: test_smoke: Run only when TPM2 is avaialable.
  MAINTAINERS: Add selftest files to TPM section
  tpm: Clean up TPM space after command failure

41 hours agoMerge tag 'for-linus-6.12-1' of https://github.com/cminyard/linux-ipmi
Linus Torvalds [Thu, 19 Sep 2024 07:33:44 +0000 (09:33 +0200)]
Merge tag 'for-linus-6.12-1' of https://github.com/cminyard/linux-ipmi

Pull IPMI updates from Corey Minyard:
 "Some minor fixes and cleanups for IPMI. Nothing big.

  Handle a bogus BMC a little better, fix autoload on some systems,
  remove some deprecated interfaces from the docs"

* tag 'for-linus-6.12-1' of https://github.com/cminyard/linux-ipmi:
  ipmi: docs: don't advertise deprecated sysfs entries
  ipmi:ssif: Improve detecting during probing
  ipmi: ipmi_ssif: fix module autoloading

41 hours agoMerge tag 'platform-drivers-x86-v6.12-1' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 19 Sep 2024 07:16:04 +0000 (09:16 +0200)]
Merge tag 'platform-drivers-x86-v6.12-1' of git://git./linux/kernel/git/pdx86/platform-drivers-x86

Pull x86 platform drivers updates from Hans de Goede:

 - asus-wmi: Add support for vivobook fan profiles

 - dell-laptop: Add knobs to change battery charge settings

 - lg-laptop: Add operation region support

 - intel-uncore-freq: Add support for efficiency latency control

 - intel/ifs: Add SBAF test support

 - intel/pmc: Ignore all LTRs during suspend

 - platform/surface: Support for arm64 based Surface devices

 - wmi: Pass event data directly to legacy notify handlers

 - x86/platform/geode: switch GPIO buttons and LEDs to software
   properties

 - bunch of small cleanups, fixes, hw-id additions, etc.

* tag 'platform-drivers-x86-v6.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (65 commits)
  MAINTAINERS: adjust file entry in INTEL MID PLATFORM
  platform/x86: x86-android-tablets: Adjust Xiaomi Pad 2 bottom bezel touch buttons LED
  platform/mellanox: mlxbf-pmc: fix lockdep warning
  platform/x86/amd: pmf: Add quirk for TUF Gaming A14
  platform/x86: touchscreen_dmi: add nanote-next quirk
  platform/x86: asus-wmi: don't fail if platform_profile already registered
  platform/x86: asus-wmi: add debug print in more key places
  platform/x86: intel_scu_wdt: Move intel_scu_wdt.h to x86 subfolder
  platform/x86: intel_scu_ipc: Move intel_scu_ipc.h out of arch/x86/include/asm
  MAINTAINERS: Add Intel MID section
  platform/x86: panasonic-laptop: Add support for programmable buttons
  platform/olpc: Remove redundant null pointer checks in olpc_ec_setup_debugfs()
  platform/x86: intel/pmc: Ignore all LTRs during suspend
  platform/x86: wmi: Call both legacy and WMI driver notify handlers
  platform/x86: wmi: Merge get_event_data() with wmi_get_notify_data()
  platform/x86: wmi: Remove wmi_get_event_data()
  platform/x86: wmi: Pass event data directly to legacy notify handlers
  platform/x86: thinkpad_acpi: Fix uninitialized symbol 's' warning
  platform/x86: x86-android-tablets: Fix spelling in the comments
  platform/x86: ideapad-laptop: Make the scope_guard() clear of its scope
  ...

42 hours agoMerge tag 'devicetree-for-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Thu, 19 Sep 2024 06:38:51 +0000 (08:38 +0200)]
Merge tag 'devicetree-for-6.12' of git://git./linux/kernel/git/robh/linux

Pull devicetree updates from Rob Herring:
 "DT Bindings:

   - Drop duplicate devices in trivial-devices.yaml

   - Add a common serial peripheral device schema and reference it in
     serial device schemas.

   - Convert nxp,lpc1850-wdt, zii,rave-wdt, ti,davinci-wdt,
     snps,archs-pct, fsl,bcsr, fsl,fpga-qixis-i2c, fsl,fpga-qixis,
     fsl,cpm-enet, fsl,cpm-mdio, fsl,ucc-hdlc, maxim,ds26522,
     aspeed,ast2400-cvic, aspeed,ast2400-vic, fsl,ftm-timer,
     ti,davinci-timer, fsl,rcpm, and qcom,ebi2 to DT schema

   - Add support for rockchip,rk3576-wdt, qcom,apss-wdt-sa8255p,
     fsl,imx8qm-irqsteer, qcom,pm6150-vib, qcom,sa8255p-pdc,
     isil,isl69260, ti,tps546d24, and lpc32xx DMA mux

   - Drop duplicate nvidia,tegra186-ccplex-cluster.yaml and
     mediatek,mt6795-sys-clock.yaml

   - Add arm,gic ESPI and EPPI interrupt type specifiers

   - Add another batch of legacy compatible strings which we have no
     intention of documenting

   - Add dmas/dma-names properties to FSL lcdif

   - Fix wakeup-source reference to m8921-keypad.yaml

   - Treewide fixes of typos in bindings

  DT Core:

   - Update dtc/libfdt to upstream version v1.7.0-95-gbcd02b523429

   - More conversions to scoped iterators and __free() initializer

   - Handle overflows in address resources on 32-bit systems

   - Extend extracting compatible strings in sources from function
     parameters

   - Use of_property_present() in DT unittest

   - Clean-up of_irq_to_resource() to use helpers

   - Support #msi-cells=<0> in of_msi_get_domain()

   - Improve the kerneldoc for of_property_match_string()

   - kselftest: Ignore nodes that have ancestors disabled"

* tag 'devicetree-for-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (59 commits)
  dt-bindings: watchdog: Add rockchip,rk3576-wdt compatible
  dt-bindings: cpu: Drop duplicate nvidia,tegra186-ccplex-cluster.yaml
  dt-bindings: clock: mediatek: Drop duplicate mediatek,mt6795-sys-clock.yaml
  of/irq: Use helper to define resources
  of/irq: Make use of irq_get_trigger_type()
  dt-bindings: clk: vc5: Make SD/OE pin configuration properties not required
  drivers/of: Improve documentation for match_string
  of: property: Do some clean up with use of __free()
  dt-bindings: watchdog: qcom-wdt: document support on SA8255p
  dt-bindings: interrupt-controller: fsl,irqsteer: Document fsl,imx8qm-irqsteer
  dt-bindings: interrupt-controller: arm,gic: add ESPI and EPPI specifiers
  dt-bindings: dma: Add lpc32xx DMA mux binding
  dt-bindings: trivial-devices: Drop duplicate "maxim,max1237"
  dt-bindings: trivial-devices: Drop duplicate LM75 compatible devices
  dt-bindings: trivial-devices: Deprecate "ad,ad7414"
  dt-bindings: trivial-devices: Drop incorrect and duplicate at24 compatibles
  dt-bindings: wakeup-source: update reference to m8921-keypad.yaml
  dt-bindings: interrupt-controller: qcom-pdc: document support for SA8255p
  dt-bindings: Fix various typos
  of: address: Unify resource bounds overflow checking
  ...

42 hours agoMerge tag 'for-linus-6.12-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Thu, 19 Sep 2024 06:20:31 +0000 (08:20 +0200)]
Merge tag 'for-linus-6.12-rc1-tag' of git://git./linux/kernel/git/xen/tip

Pull xen updates from Juergen Gross:

 - fix a boot problem as a Xen dom0 on some AMD systems

 - fix Xen PVH boot problems with KASAN enabled

 - fix for a build warning

 - fixes to swiotlb-xen

* tag 'for-linus-6.12-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
  xen/swiotlb: fix allocated size
  xen/swiotlb: add alignment check for dma buffers
  xen/pci: Avoid -Wflex-array-member-not-at-end warning
  xen/xenbus: Convert to use ERR_CAST()
  xen, pvh: fix unbootable VMs by inlining memset() in xen_prepare_pvh()
  x86/cpu: fix unbootable VMs by inlining memcmp() in hypervisor_cpuid_base()
  xen, pvh: fix unbootable VMs (PVH + KASAN - AMD_MEM_ENCRYPT)
  xen: tolerate ACPI NVS memory overlapping with Xen allocated memory
  xen: allow mapping ACPI data using a different physical address
  xen: add capability to remap non-RAM pages to different PFNs
  xen: move max_pfn in xen_memory_setup() out of function scope
  xen: move checks for e820 conflicts further up
  xen: introduce generic helper checking for memory map conflicts
  xen: use correct end address of kernel for conflict checking

42 hours agoMerge tag 'hyperv-next-signed-20240916' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 19 Sep 2024 06:15:30 +0000 (08:15 +0200)]
Merge tag 'hyperv-next-signed-20240916' of git://git./linux/kernel/git/hyperv/linux

Pull Hyper-V updates from Wei Liu:

 - Optimize boot time by concurrent execution of hv_synic_init()
   (Saurabh Sengar)

 - Use helpers to read control registers in hv_snp_boot_ap() (Yosry
   Ahmed)

 - Add memory allocation check in hv_fcopy_start (Zhu Jun)

* tag 'hyperv-next-signed-20240916' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux:
  tools/hv: Add memory allocation check in hv_fcopy_start
  x86/hyperv: use helpers to read control registers in hv_snp_boot_ap()
  Drivers: hv: vmbus: Optimize boot time by concurrent execution of hv_synic_init()

43 hours agoMerge tag 'powerpc-6.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
Linus Torvalds [Thu, 19 Sep 2024 06:03:00 +0000 (08:03 +0200)]
Merge tag 'powerpc-6.12-1' of git://git./linux/kernel/git/powerpc/linux

Pull powerpc updates from Michael Ellerman:

 - Reduce alignment constraints on STRICT_KERNEL_RWX and speed-up TLB
   misses on 8xx and 603

 - Replace kretprobe code with rethook and enable fprobe

 - Remove the "fast endian switch" syscall

 - Handle DLPAR device tree updates in kernel, allowing the deprecation
   of the binary /proc/powerpc/ofdt interface

Thanks to Abhishek Dubey, Alex Shi, Benjamin Gray, Christophe Leroy,
Gaosheng Cui, Gautam Menghani, Geert Uytterhoeven, Haren Myneni, Hari
Bathini, Huang Xiaojia, Jinjie Ruan, Madhavan Srinivasan, Miguel Ojeda,
Mina Almasry, Narayana Murty N, Naveen Rao, Rob Herring (Arm), Scott
Cheloha, Segher Boessenkool, Stephen Rothwell, Thomas Zimmermann, Uwe
Kleine-König, Vaibhav Jain, and Zhang Zekun.

* tag 'powerpc-6.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (59 commits)
  powerpc/atomic: Use YZ constraints for DS-form instructions
  MAINTAINERS: powerpc: Add Maddy
  powerpc: Switch back to struct platform_driver::remove()
  powerpc/pseries/eeh: Fix pseries_eeh_err_inject
  selftests/powerpc: Allow building without static libc
  macintosh/via-pmu: register_pmu_pm_ops() can be __init
  powerpc: Stop using no_llseek
  powerpc/64s: Remove the "fast endian switch" syscall
  powerpc/mm/64s: Restrict THP to Radix or HPT w/64K pages
  powerpc/mm/64s: Move THP reqs into a separate symbol
  powerpc/64s: Make mmu_hash_ops __ro_after_init
  powerpc: Replace kretprobe code with rethook on powerpc
  powerpc: pseries: Constify struct kobj_type
  powerpc: powernv: Constify struct kobj_type
  powerpc: Constify struct kobj_type
  powerpc/pseries/dlpar: Add device tree nodes for DLPAR IO add
  powerpc/pseries/dlpar: Remove device tree node for DLPAR IO remove
  powerpc/pseries: Use correct data types from pseries_hp_errorlog struct
  powerpc/vdso: Inconditionally use CFUNC macro
  powerpc/32: Implement validation of emergency stack
  ...

43 hours agoMerge tag 'parisc-for-6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Thu, 19 Sep 2024 05:43:13 +0000 (07:43 +0200)]
Merge tag 'parisc-for-6.12-rc1' of git://git./linux/kernel/git/deller/parisc-linux

Pull parisc architecture updates from Helge Deller:

 - On parisc we now use the generic clockevent framework for timekeeping

 - Although there is no 64-bit glibc/userspace for parisc yet, for
   testing purposes one can run statically linked 64-bit binaries. This
   patchset contains two patches which fix 64-bit userspace which has
   been broken since kernel 4.19

 - Fix the userspace stack position and size when the ADDR_NO_RANDOMIZE
   personality is enabled

 - On other architectures mmap(MAP_GROWSDOWN | MAP_STACK) creates a
   downward-growing stack. On parisc mmap(MAP_STACK) is now sufficient
   to create an upward-growing stack

* tag 'parisc-for-6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
  parisc: Allow mmap(MAP_STACK) memory to automatically expand upwards
  parisc: Use PRIV_USER instead of hardcoded value
  parisc: Fix itlb miss handler for 64-bit programs
  parisc: Fix 64-bit userspace syscall path
  parisc: Fix stack start for ADDR_NO_RANDOMIZE personality
  parisc: Convert to generic clockevents
  parisc: pdc_stable: Constify struct kobj_type

43 hours agoMerge tag 'dlm-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm
Linus Torvalds [Thu, 19 Sep 2024 05:09:39 +0000 (07:09 +0200)]
Merge tag 'dlm-6.12' of git://git./linux/kernel/git/teigland/linux-dlm

Pull dlm updates from David Teigland:

 - Remove some unnecesary hold/unhold rsb refcounting in cases where an
   existing refcount is known to exist

 - Remove some unnecessary checking for zero nodeids, which should never
   exist, and add some warning if they do

 - Make the slow freeing of structs in release_lockspace() async, run
   from a workqueue

 - Prior rcu freeing allows some further struct lookups to run without a
   lock

 - Use blocking kernel_connect on sockets to avoid EINPROGRESS

* tag 'dlm-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm:
  dlm: add missing -ENOMEM if alloc_workqueue() fails
  dlm: do synchronized socket connect call
  dlm: move lkb xarray lookup out of lock
  dlm: move dlm_search_rsb_tree() out of lock
  dlm: use RSB_HASHED to avoid lookup twice
  dlm: async freeing of lockspace resources
  dlm: drop kobject release callback handling
  dlm: warn about invalid nodeid comparsions
  dlm: never return invalid nodeid by dlm_our_nodeid()
  dlm: remove unnecessary refcounts
  dlm: cleanup memory allocation helpers

43 hours agoMerge tag 'xfs-6.12-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
Linus Torvalds [Thu, 19 Sep 2024 05:03:55 +0000 (07:03 +0200)]
Merge tag 'xfs-6.12-merge-1' of git://git./fs/xfs/xfs-linux

Pull xfs updates from Chandan Babu:
 "New code:

   - Introduce new ioctls to exchange contents of two files.

     The first ioctl does the preparation work to exchange the contents
     of two files while the second ioctl performs the actual exchange if
     the target file has not been changed since a given sampling point.

  Fixes:

   - Fix bugs associated with calculating the maximum range of realtime
     extents to scan for free space.

   - Copy keys instead of records when resizing the incore BMBT root
     block.

   - Do not report FITRIMming more bytes than possibly exist in the
     filesystem.

   - Modify xfs_fs.h to prevent C++ compilation errors.

   - Do not over eagerly free post-EOF speculative preallocation.

   - Ensure st_blocks never goes to zero during COW writes

  Cleanups/refactors:

   - Use Xarray to hold per-AG data instead of a Radix tree.

   - Cleanups to:
      - realtime bitmap
      - inode allocator
      - quota
      - inode rooted btree code"

* tag 'xfs-6.12-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (61 commits)
  xfs: ensure st_blocks never goes to zero during COW writes
  xfs: use xas_for_each_marked in xfs_reclaim_inodes_count
  xfs: convert perag lookup to xarray
  xfs: simplify tagged perag iteration
  xfs: move the tagged perag lookup helpers to xfs_icache.c
  xfs: use kfree_rcu_mightsleep to free the perag structures
  xfs: use LIST_HEAD() to simplify code
  xfs: Remove duplicate xfs_trans_priv.h header
  xfs: remove unnecessary check
  xfs: Use xfs set and clear mp state helpers
  xfs: reclaim speculative preallocations for append only files
  xfs: simplify extent lookup in xfs_can_free_eofblocks
  xfs: check XFS_EOFBLOCKS_RELEASED earlier in xfs_release_eofblocks
  xfs: only free posteof blocks on first close
  xfs: don't free post-EOF blocks on read close
  xfs: skip all of xfs_file_release when shut down
  xfs: don't bother returning errors from xfs_file_release
  xfs: refactor f_op->release handling
  xfs: remove the i_mode check in xfs_release
  xfs: standardize the btree maxrecs function parameters
  ...

44 hours agoMerge tag 'v6.12-rc-smb3-client-fixes-part1' of git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Thu, 19 Sep 2024 04:53:40 +0000 (06:53 +0200)]
Merge tag 'v6.12-rc-smb3-client-fixes-part1' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client updates from Steve French:

 - cleanups (moving duplicated code, removing unused code etc)

 - fixes relating to "sfu" mount options (for better handling special
   file types)

 - SMB3.1.1 compression fixes/improvements

* tag 'v6.12-rc-smb3-client-fixes-part1' of git://git.samba.org/sfrench/cifs-2.6: (24 commits)
  smb: client: fix compression heuristic functions
  cifs: Update SFU comments about fifos and sockets
  cifs: Add support for creating SFU symlinks
  smb: use LIST_HEAD() to simplify code
  cifs: Recognize SFU socket type
  cifs: Show debug message when SFU Fifo type was detected
  cifs: Put explicit zero byte into SFU block/char types
  cifs: Add support for reading SFU symlink location
  cifs: Fix recognizing SFU symlinks
  smb: client: compress: fix an "illegal accesses" issue
  smb: client: compress: fix a potential issue of freeing an invalid pointer
  smb: client: compress: LZ77 code improvements cleanup
  smb: client: insert compression check/call on write requests
  smb3: mark compression as CONFIG_EXPERIMENTAL and fix missing compression operation
  cifs: Remove obsoleted declaration for cifs_dir_open
  smb: client: Use min() macro
  cifs: convert to use ERR_CAST()
  smb: add comment to STATUS_MCA_OCCURED
  smb: move SMB2 Status code to common header file
  smb: move some duplicate definitions to common/smbacl.h
  ...

44 hours agoMerge tag '6.12-rc-ksmbd-server-fixes-part1' of git://git.samba.org/ksmbd
Linus Torvalds [Thu, 19 Sep 2024 04:48:28 +0000 (06:48 +0200)]
Merge tag '6.12-rc-ksmbd-server-fixes-part1' of git://git.samba.org/ksmbd

Pull smb server updates from Steve French:
 "Four ksmbd server fixes, three for stable:

   - Fix an issue where the directory can't be deleted if the share is
     on a file system that does not provide dot and dotdot entries

   - Fix file creation failure if the parent name of pathname is case
     sensitive

   - Fix write failure with FILE_APPEND_DATA flags

   - Add reference count to connection struct to protect UAF of oplocks
     on multichannel"

* tag '6.12-rc-ksmbd-server-fixes-part1' of git://git.samba.org/ksmbd:
  ksmbd: handle caseless file creation
  ksmbd: make __dir_empty() compatible with POSIX
  ksmbd: add refcnt to ksmbd_conn struct
  ksmbd: allow write with FILE_APPEND_DATA

44 hours agoMerge tag 'jfs-6.12' of github.com:kleikamp/linux-shaggy
Linus Torvalds [Thu, 19 Sep 2024 04:38:43 +0000 (06:38 +0200)]
Merge tag 'jfs-6.12' of github.com:kleikamp/linux-shaggy

Pull jfs updates from David Kleikamp:
 "A few fixes for jfs"

* tag 'jfs-6.12' of github.com:kleikamp/linux-shaggy:
  jfs: Fix uninit-value access of new_ea in ea_buffer
  jfs: check if leafidx greater than num leaves per dmap tree
  jfs: Fix uaf in dbFreeBits
  jfs: fix out-of-bounds in dbNextAG() and diAlloc()
  jfs: UBSAN: shift-out-of-bounds in dbFindBits

44 hours agoMerge tag 'ovl-update-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/overlayf...
Linus Torvalds [Thu, 19 Sep 2024 04:33:18 +0000 (06:33 +0200)]
Merge tag 'ovl-update-6.12' of git://git./linux/kernel/git/overlayfs/vfs

Pull overlayfs updates from Amir Goldstein:

 - Increase robustness of overlayfs to crashes in the case of underlying
   filesystems that to not guarantee metadata ordering to persistent
   storage (problem was reported with ubifs).

 - Deny mount inside container with features that require root
   privileges to work properly, instead of failing operations later.

 - Some clarifications to overlayfs documentation.

* tag 'ovl-update-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs:
  ovl: fail if trusted xattrs are needed but caller lacks permission
  overlayfs.rst: update metacopy section in overlayfs documentation
  ovl: fsync after metadata copy-up
  ovl: don't set the superblock's errseq_t manually

2 days agodt-bindings: watchdog: Add rockchip,rk3576-wdt compatible
Detlev Casanova [Tue, 3 Sep 2024 15:22:36 +0000 (11:22 -0400)]
dt-bindings: watchdog: Add rockchip,rk3576-wdt compatible

It is compatible with the other rockchip SoCs.

Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20240903152308.13565-7-detlev.casanova@collabora.com
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
2 days agoMerge tag 'random-6.12-rc1-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 18 Sep 2024 13:26:31 +0000 (15:26 +0200)]
Merge tag 'random-6.12-rc1-for-linus' of git://git./linux/kernel/git/crng/random

Pull random number generator updates from Jason Donenfeld:
 "Originally I'd planned on sending each of the vDSO getrandom()
  architecture ports to their respective arch trees. But as we started
  to work on this, we found lots of interesting issues in the shared
  code and infrastructure, the fixes for which the various archs needed
  to base their work.

  So in the end, this turned into a nice collaborative effort fixing up
  issues and porting to 5 new architectures -- arm64, powerpc64,
  powerpc32, s390x, and loongarch64 -- with everybody pitching in and
  commenting on each other's code. It was a fun development cycle.

  This contains:

   - Numerous fixups to the vDSO selftest infrastructure, getting it
     running successfully on more platforms, and fixing bugs in it.

   - Additions to the vDSO getrandom & chacha selftests. Basically every
     time manual review unearthed a bug in a revision of an arch patch,
     or an ambiguity, the tests were augmented.

     By the time the last arch was submitted for review, s390x, v1 of
     the series was essentially fine right out of the gate.

   - Fixes to the the generic C implementation of vDSO getrandom, to
     build and run successfully on all archs, decoupling it from
     assumptions we had (unintentionally) made on x86_64 that didn't
     carry through to the other architectures.

   - Port of vDSO getrandom to LoongArch64, from Xi Ruoyao and acked by
     Huacai Chen.

   - Port of vDSO getrandom to ARM64, from Adhemerval Zanella and acked
     by Will Deacon.

   - Port of vDSO getrandom to PowerPC, in both 32-bit and 64-bit
     varieties, from Christophe Leroy and acked by Michael Ellerman.

   - Port of vDSO getrandom to S390X from Heiko Carstens, the arch
     maintainer.

  While it'd be natural for there to be things to fix up over the course
  of the development cycle, these patches got a decent amount of review
  from a fairly diverse crew of folks on the mailing lists, and, for the
  most part, they've been cooking in linux-next, which has been helpful
  for ironing out build issues.

  In terms of architectures, I think that mostly takes care of the
  important 64-bit archs with hardware still being produced and running
  production loads in settings where vDSO getrandom is likely to help.

  Arguably there's still RISC-V left, and we'll see for 6.13 whether
  they find it useful and submit a port"

* tag 'random-6.12-rc1-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/crng/random: (47 commits)
  selftests: vDSO: check cpu caps before running chacha test
  s390/vdso: Wire up getrandom() vdso implementation
  s390/vdso: Move vdso symbol handling to separate header file
  s390/vdso: Allow alternatives in vdso code
  s390/module: Provide find_section() helper
  s390/facility: Let test_facility() generate static branch if possible
  s390/alternatives: Remove ALT_FACILITY_EARLY
  s390/facility: Disable compile time optimization for decompressor code
  selftests: vDSO: fix vdso_config for s390
  selftests: vDSO: fix ELF hash table entry size for s390x
  powerpc/vdso: Wire up getrandom() vDSO implementation on VDSO64
  powerpc/vdso: Wire up getrandom() vDSO implementation on VDSO32
  powerpc/vdso: Refactor CFLAGS for CVDSO build
  powerpc/vdso32: Add crtsavres
  mm: Define VM_DROPPABLE for powerpc/32
  powerpc/vdso: Fix VDSO data access when running in a non-root time namespace
  selftests: vDSO: don't include generated headers for chacha test
  arm64: vDSO: Wire up getrandom() vDSO implementation
  arm64: alternative: make alternative_has_cap_likely() VDSO compatible
  selftests: vDSO: also test counter in vdso_test_chacha
  ...

2 days agoMerge tag 'livepatching-for-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Wed, 18 Sep 2024 13:24:02 +0000 (15:24 +0200)]
Merge tag 'livepatching-for-6.12' of git://git./linux/kernel/git/livepatching/livepatching

Pull livepatching update from Petr Mladek:

 - Small documentation improvement

* tag 'livepatching-for-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching:
  Documentation: livepatch: Correct release locks antonym

2 days agoMerge tag 'perf-core-2024-09-18' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Wed, 18 Sep 2024 13:03:58 +0000 (15:03 +0200)]
Merge tag 'perf-core-2024-09-18' of git://git./linux/kernel/git/tip/tip

Pull perf events updates from Ingo Molnar:

 - Implement per-PMU context rescheduling to significantly improve
   single-PMU performance, and related cleanups/fixes (Peter Zijlstra
   and Namhyung Kim)

 - Fix ancient bug resulting in a lot of events being dropped
   erroneously at higher sampling frequencies (Luo Gengkun)

 - uprobes enhancements:

     - Implement RCU-protected hot path optimizations for better
       performance:

         "For baseline vs SRCU, peak througput increased from 3.7 M/s
          (million uprobe triggerings per second) up to about 8 M/s. For
          uretprobes it's a bit more modest with bump from 2.4 M/s to
          5 M/s.

          For SRCU vs RCU Tasks Trace, peak throughput for uprobes
          increases further from 8 M/s to 10.3 M/s (+28%!), and for
          uretprobes from 5.3 M/s to 5.8 M/s (+11%), as we have more
          work to do on uretprobes side.

          Even single-thread (no contention) performance is slightly
          better: 3.276 M/s to 3.396 M/s (+3.5%) for uprobes, and 2.055
          M/s to 2.174 M/s (+5.8%) for uretprobes."

          (Andrii Nakryiko et al)

     - Document mmap_lock, don't abuse get_user_pages_remote() (Oleg
       Nesterov)

     - Cleanups & fixes to prepare for future work:
        - Remove uprobe_register_refctr()
- Simplify error handling for alloc_uprobe()
        - Make uprobe_register() return struct uprobe *
        - Fold __uprobe_unregister() into uprobe_unregister()
        - Shift put_uprobe() from delete_uprobe() to uprobe_unregister()
        - BPF: Fix use-after-free in bpf_uprobe_multi_link_attach()
          (Oleg Nesterov)

 - New feature & ABI extension: allow events to use PERF_SAMPLE READ
   with inheritance, enabling sample based profiling of a group of
   counters over a hierarchy of processes or threads (Ben Gainey)

 - Intel uncore & power events updates:

      - Add Arrow Lake and Lunar Lake support
      - Add PERF_EV_CAP_READ_SCOPE
      - Clean up and enhance cpumask and hotplug support
        (Kan Liang)

      - Add LNL uncore iMC freerunning support
      - Use D0:F0 as a default device
        (Zhenyu Wang)

 - Intel PT: fix AUX snapshot handling race (Adrian Hunter)

 - Misc fixes and cleanups (James Clark, Jiri Olsa, Oleg Nesterov and
   Peter Zijlstra)

* tag 'perf-core-2024-09-18' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (40 commits)
  dmaengine: idxd: Clean up cpumask and hotplug for perfmon
  iommu/vt-d: Clean up cpumask and hotplug for perfmon
  perf/x86/intel/cstate: Clean up cpumask and hotplug
  perf: Add PERF_EV_CAP_READ_SCOPE
  perf: Generic hotplug support for a PMU with a scope
  uprobes: perform lockless SRCU-protected uprobes_tree lookup
  rbtree: provide rb_find_rcu() / rb_find_add_rcu()
  perf/uprobe: split uprobe_unregister()
  uprobes: travers uprobe's consumer list locklessly under SRCU protection
  uprobes: get rid of enum uprobe_filter_ctx in uprobe filter callbacks
  uprobes: protected uprobe lifetime with SRCU
  uprobes: revamp uprobe refcounting and lifetime management
  bpf: Fix use-after-free in bpf_uprobe_multi_link_attach()
  perf/core: Fix small negative period being ignored
  perf: Really fix event_function_call() locking
  perf: Optimize __pmu_ctx_sched_out()
  perf: Add context time freeze
  perf: Fix event_function_call() locking
  perf: Extract a few helpers
  perf: Optimize context reschedule for single PMU cases
  ...

2 days agoMerge tag 'perf-urgent-2024-09-18' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Wed, 18 Sep 2024 13:00:50 +0000 (15:00 +0200)]
Merge tag 'perf-urgent-2024-09-18' of git://git./linux/kernel/git/tip/tip

Pull perf event fixes from Ingo Molnar:
 "Left over from the v6.11 cycle:

   - Fix energy-pkg event enumeration on certain AMD CPUs

   - Set up the LBR branch stack for BPF counting events too"

* tag 'perf-urgent-2024-09-18' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf/x86/intel: Allow to setup LBR for counting event for BPF
  perf/x86/rapl: Fix the energy-pkg event for AMD CPUs

2 days agoMerge tag 'chrome-platform-for-6.12' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 18 Sep 2024 10:57:04 +0000 (12:57 +0200)]
Merge tag 'chrome-platform-for-6.12' of git://git./linux/kernel/git/chrome-platform/linux

Pull chrome platform updates from Tzung-Bi Shih:

 - Adjust DMI match table for Framework Laptop for improving
   maintainabilities for both legacy and new models

 - Add .remove driver callback for cros_ec_typec in order to allow the
   driver to be rebound

 - Use kmemdup_array() for taking care possible overflows

* tag 'chrome-platform-for-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux:
  platform/chrome: chromeos_laptop: Use kmemdup_array
  platform/chrome: cros_ec_typec: add remove driver hook
  platform/chrome: cros_ec_lpc: switch primary DMI data for Framework Laptop

2 days agoMerge tag 'fbdev-for-6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/delle...
Linus Torvalds [Wed, 18 Sep 2024 10:53:22 +0000 (12:53 +0200)]
Merge tag 'fbdev-for-6.12-rc1' of git://git./linux/kernel/git/deller/linux-fbdev

Pull fbdev updates from Helge Deller:
 - video: Reduce code when CONFIG_HAS_IOPORT=n
 - xenfb: Fix crash by assigning fb_info->device
 - pxafb: Fix possible use after free in pxafb_task()
 - efifb: Introduce and use new devm_register_framebuffer() function
 - mmpfb: Utilize devm_clk_get_enabled() helpers
 - various typo fixes and code cleanups

* tag 'fbdev-for-6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev:
  fbdev: omapfb: Fix typo in comment
  fbdev: pxafb: Fix possible use after free in pxafb_task()
  fbdev: xen-fbfront: Assign fb_info->device
  fbdev: hyperv_fb: Convert comma to semicolon
  fbdev: imsttfb: convert comma to semicolon
  fbdev: pxa3xx-gcu: Convert comma to semicolon
  fbdev: efifb: Use driver-private screen_info for sysfs
  fbdev: efifb: Use devm_register_framebuffer()
  fbdev: efifb: Register sysfs groups through driver core
  fbdev: Introduce devm_register_framebuffer()
  fbdev: omapfb: Use sysfs_emit_at() to simplify code
  fbdev: omapfb: panel-sony-acx565akm: Simplify show_cabc_available_modes()
  fbdev: mmp: Use devm_clk_get_enabled() helpers
  fbdev: hpfb: Fix an error handling path in hpfb_dio_probe()
  video: Handle HAS_IOPORT dependencies

2 days agoMerge tag 'iommu-updates-v6.12' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Wed, 18 Sep 2024 10:45:52 +0000 (12:45 +0200)]
Merge tag 'iommu-updates-v6.12' of git://git./linux/kernel/git/iommu/linux

Pull iommu updates from Joerg Roedel:
 "Core changes:
   - Allow ATS on VF when parent device is identity mapped
   - Optimize unmap path on ARM io-pagetable implementation
   - Use of_property_present()

  ARM-SMMU changes:
   - SMMUv2:
       - Devicetree binding updates for Qualcomm MMU-500 implementations
       - Extend workarounds for broken Qualcomm hypervisor to avoid
         touching features that are not available (e.g. 16KiB page
         support, reserved context banks)
   - SMMUv3:
       - Support for NVIDIA's custom virtual command queue hardware
       - Fix Stage-2 stall configuration and extend tests to cover this
         area
       - A bunch of driver cleanups, including simplification of the
         master rbtree code
   - Minor cleanups and fixes across both drivers

  Intel VT-d changes:
   - Retire si_domain and convert to use static identity domain
   - Batched IOTLB/dev-IOTLB invalidation
   - Small code refactoring and cleanups

  AMD-Vi changes:
   - Cleanup and refactoring of io-pagetable code
   - Add parameter to limit the used io-pagesizes
   - Other cleanups and fixes"

* tag 'iommu-updates-v6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux: (77 commits)
  dt-bindings: arm-smmu: Add compatible for QCS8300 SoC
  iommu/amd: Test for PAGING domains before freeing a domain
  iommu/amd: Fix argument order in amd_iommu_dev_flush_pasid_all()
  iommu/amd: Add kernel parameters to limit V1 page-sizes
  iommu/arm-smmu-v3: Reorganize struct arm_smmu_ctx_desc_cfg
  iommu/arm-smmu-v3: Add types for each level of the CD table
  iommu/arm-smmu-v3: Shrink the cdtab l1_desc array
  iommu/arm-smmu-v3: Do not use devm for the cd table allocations
  iommu/arm-smmu-v3: Remove strtab_base/cfg
  iommu/arm-smmu-v3: Reorganize struct arm_smmu_strtab_cfg
  iommu/arm-smmu-v3: Add types for each level of the 2 level stream table
  iommu/arm-smmu-v3: Add arm_smmu_strtab_l1/2_idx()
  iommu/arm-smmu-qcom: apply num_context_bank fixes for SDM630 / SDM660
  iommu/arm-smmu-v3: Use the new rb tree helpers
  dt-bindings: arm-smmu: document the support on SA8255p
  iommu/tegra241-cmdqv: Do not allocate vcmdq until dma_set_mask_and_coherent
  iommu/tegra241-cmdqv: Drop static at local variable
  iommu/tegra241-cmdqv: Fix ioremap() error handling in probe()
  iommu/amd: Do not set the D bit on AMD v2 table entries
  iommu/amd: Correct the reported page sizes from the V1 table
  ...

2 days agoMerge tag 'hwmon-for-v6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck...
Linus Torvalds [Wed, 18 Sep 2024 10:40:48 +0000 (12:40 +0200)]
Merge tag 'hwmon-for-v6.12' of git://git./linux/kernel/git/groeck/linux-staging

Pull hwmon updates from Guenter Roeck:
 "New drivers:
   - driver for Sophgo SG2042 external hardware monitor
   - thermal sensor driver for Surface Aggregator Module

  Added support to existing drivers:
   - oxp-sensors: Support for multiple new devices.
   - nct6775: Added G15CF to ASUS WMI monitoring list

  Modernizations:
   - driver cleanup and update to use with_info API: ina2xx, lm92,
     lm95234, max1619, max1668, and max6697.

  API updates:
   - removed unused devm_hwmon_device_unregister() API function

  Other notable changes
   - implement and use generic bus access delay for pmbus drivers
   - use with scoped for each OF child loop in several drivers
   - module unloading fixes for gsc-hwmon and ntc_thermistor drivers
   - converted various drivers to use multi-byte regmap operations
   - adt7475: Improved devicetree based configuration
   - ltc2947: Move to firmware agnostic API
   - ltc2978: Converted devicetree description to yaml
   - max16065: Addressed overflows when writing limit attributes

  Various other minor cleanups, fixes and improvements"

* tag 'hwmon-for-v6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (96 commits)
  hwmon: Remove devm_hwmon_device_unregister() API function
  hwmon: (sch5636) Print unknown ID in error string via %*pE
  hwmon: (sht21) Use %*ph to print small buffer
  hwmon: (pmbus/mpq7932) Constify struct regulator_desc
  hwmon: pmbus: pli12096bc: Add write delay
  hwmon: pmbus: zl6100: Use generic code
  hwmon: pmbus: ucd9000: Use generic code
  hwmon: pmbus: max15301: Use generic code
  hwmon: pmbus: Implement generic bus access delay
  hwmon: (ina2xx) Use shunt voltage to calculate current
  hwmon: (ina2xx) Add support for current limits
  hwmon: (ina2xx) Pass register to alert limit write functions
  hwmon: (ina2xx) Convert to use with_info hwmon API
  hwmon: (ina2xx) Move ina2xx_get_value()
  hwmon: (ina2xx) Set alert latch
  hwmon: (ina2xx) Consolidate chip initialization code
  hwmon: (ina2xx) Fix various overflow issues
  hwmon: (ina2xx) Re-initialize chip using regmap functions
  hwmon: (ina2xx) Use local regmap pointer if used more than once
  hwmon: (ina2xx) Mark regmap_config as const
  ...

2 days agoMerge tag 'hardening-v6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Wed, 18 Sep 2024 10:12:41 +0000 (12:12 +0200)]
Merge tag 'hardening-v6.12-rc1' of git://git./linux/kernel/git/kees/linux

Pull hardening updates from Kees Cook:

 - lib/string_choices:
    - Add str_up_down() helper (Michal Wajdeczko)
    - Add str_true_false()/str_false_true() helper  (Hongbo Li)
    - Introduce several opposite string choice helpers  (Hongbo Li)

 - lib/string_helpers:
    - rework overflow-dependent code (Justin Stitt)

 - fortify: refactor test_fortify Makefile to fix some build problems
   (Masahiro Yamada)

 - string: Check for "nonstring" attribute on strscpy() arguments

 - virt: vbox: Replace 1-element arrays with flexible arrays

 - media: venus: hfi_cmds: Replace 1-element arrays with flexible arrays

* tag 'hardening-v6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
  lib/string_choices: Add some comments to make more clear for string choices helpers.
  lib/string_choices: Introduce several opposite string choice helpers
  lib/string_choices: Add str_true_false()/str_false_true() helper
  string: Check for "nonstring" attribute on strscpy() arguments
  media: venus: hfi_cmds: struct hfi_session_release_buffer_pkt: Add __counted_by annotation
  media: venus: hfi_cmds: struct hfi_session_release_buffer_pkt: Replace 1-element array with flexible array
  virt: vbox: struct vmmdev_hgcm_pagelist: Replace 1-element array with flexible array
  lib/string_helpers: rework overflow-dependent code
  coccinelle: Add rules to find str_down_up() replacements
  string_choices: Add wrapper for str_down_up()
  coccinelle: Add rules to find str_up_down() replacements
  lib/string_choices: Add str_up_down() helper
  fortify: use if_changed_dep to record header dependency in *.cmd files
  fortify: move test_fortify.sh to lib/test_fortify/
  fortify: refactor test_fortify Makefile to fix some build problems

2 days agoMerge tag 'execve-v6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees...
Linus Torvalds [Wed, 18 Sep 2024 09:53:31 +0000 (11:53 +0200)]
Merge tag 'execve-v6.12-rc1' of git://git./linux/kernel/git/kees/linux

Pull execve updates from Kees Cook:

 - binfmt_elf: Dump smaller VMAs first in ELF cores (Brian Mak)

 - binfmt_elf: mseal address zero (Jeff Xu)

 - binfmt_elf, coredump: Log the reason of the failed core dumps (Roman
   Kisel)

* tag 'execve-v6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
  binfmt_elf: mseal address zero
  binfmt_elf: Dump smaller VMAs first in ELF cores
  binfmt_elf, coredump: Log the reason of the failed core dumps
  coredump: Standartize and fix logging

2 days agoMerge tag 'pstore-v6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees...
Linus Torvalds [Wed, 18 Sep 2024 09:47:03 +0000 (11:47 +0200)]
Merge tag 'pstore-v6.12-rc1' of git://git./linux/kernel/git/kees/linux

Pull pstore updates from Kees Cook:

 - ramoops: Fix .rst typo (Steven Rostedt)

 - pstore: replace spinlock_t by raw_spinlock_t (Wen Yang)

* tag 'pstore-v6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
  pstore: replace spinlock_t by raw_spinlock_t
  pstore/ramoops: Fix typo as there is no "reserver"

2 days agoMerge tag 'pmdomain-v6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh...
Linus Torvalds [Wed, 18 Sep 2024 08:49:45 +0000 (10:49 +0200)]
Merge tag 'pmdomain-v6.12' of git://git./linux/kernel/git/ulfh/linux-pm

Pull pmdomain updates from Ulf Hansson:
 "pmdomain core:
   - Add support for s2idle for CPU PM domains on PREEMPT_RT
   - Add device managed version of dev_pm_domain_attach|detach_list()
   - Improve layout of the debugfs summary table

  pmdomain providers:
   - amlogic: Remove obsolete vpu domain driver
   - bcm: raspberrypi: Add support for devices used as wakeup-sources
   - imx: Fixup clock handling for imx93 at driver remove
   - rockchip: Add gating support for RK3576
   - rockchip: Add support for RK3576 SoC
   - Some OF parsing simplifications
   - Some simplifications by using dev_err_probe() and guard()

  pmdomain consumers:
   - qcom/media/venus: Convert to the device managed APIs for PM domains

  cpuidle-psci:
   - Add support for s2idle/s2ram for the hierarchical topology on
     PREEMPT_RT
   - Some OF parsing simplifications"

* tag 'pmdomain-v6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm: (39 commits)
  pmdomain: core: Reduce debug summary table width
  pmdomain: core: Move mode_status_str()
  pmdomain: core: Fix "managed by" alignment in debug summary
  pmdomain: core: Harden inter-column space in debug summary
  pmdomain: rockchip: Add gating masks for rk3576
  pmdomain: rockchip: Add gating support
  pmdomain: rockchip: Simplify dropping OF node reference
  pmdomain: mediatek: make use of dev_err_cast_probe()
  pmdomain: imx93-pd: drop the context variable "init_off"
  pmdomain: imx93-pd: don't unprepare clocks on driver remove
  pmdomain: imx93-pd: replace dev_err() with dev_err_probe()
  pmdomain: qcom: rpmpd: Simplify locking with guard()
  pmdomain: qcom: rpmhpd: Simplify locking with guard()
  pmdomain: qcom: cpr: Simplify locking with guard()
  pmdomain: qcom: cpr: Simplify with dev_err_probe()
  pmdomain: imx: gpcv2: Simplify with scoped for each OF child loop
  pmdomain: imx: gpc: Simplify with scoped for each OF child loop
  pmdomain: rockchip: SimplUlf Hanssonify locking with guard()
  pmdomain: rockchip: Simplify with scoped for each OF child loop
  pmdomain: qcom-cpr: Use scope based of_node_put() to simplify code.
  ...

2 days agoMerge tag 'pwrseq-updates-for-v6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 18 Sep 2024 08:46:27 +0000 (10:46 +0200)]
Merge tag 'pwrseq-updates-for-v6.12-rc1' of git://git./linux/kernel/git/brgl/linux

Pull power sequencing updates from Bartosz Golaszewski:
 "There's one change adding support for a new PMU model and another
  adding documentation for the subsystem which probably should have been
  part of the initial commit but better late than never:

   - add support for the new PMU variant inside the WCN6855 chipset

   - add documentation for the subsystem"

* tag 'pwrseq-updates-for-v6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
  Documentation: add a driver API doc for the power sequencing subsystem
  power: sequencing: qcom-wcn: add support for the WCN6855 PMU

2 days agoMerge tag 'gpio-updates-for-v6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 18 Sep 2024 08:43:07 +0000 (10:43 +0200)]
Merge tag 'gpio-updates-for-v6.12-rc1' of git://git./linux/kernel/git/brgl/linux

Pull gpio updates from Bartosz Golaszewski:
 "Core GPIOLIB:
   - provide and add users for a macro allowing to iterate over accepted
     GPIO property names of consumer device nodes
   - remove legacy definitions that are no longer used
   - put legacy GPIO devres helpers together with the rest of the
     deprecated code
   - implement and use swnode_gpio_get_reference(): a wrapper
     simplifying the underlying calls to
     fwnode_property_get_reference_args()
   - use IS_ERR_OR_NULL() where it makes sense
   - replace of_find_property() with of_property_present()
   - simplify code with the scoped variant of OF-node children iterator

  Documentation:
   - update GPIO kerneldocs with Return sections
   - fix "Excess struct member description" warnings now being triggered
     with W=1

  New drivers:
   - add support for Analog Devices ADP5585

  Driver improvements:
   - add support for wake-on-GPIO to gpio-mpc8xxx
   - use GPIO_LOOKUP_IDX() in gpio-virtuser
   - use devm_clk_get_[optional_]enabled() where applicable in several
     drivers
   - replace OF-specific functions with provider-agnostic alternatives
     where possible
   - drop support for legacy platform data from gpio-ath79 and
     gpio-davinci
   - refactor gpio-stmpe
   - improve error reporting in gpio-pca953x
   - add support for reading the direction of pins for some models to
     gpio-vf610

  DT bindings:
   - convert the bindings for nxp,lpc3220 to YAML
   - add gpio-reserved-ranges to gpio-davinci
   - simplify the GPIO hog schema
   - fix a GPIO hog issue in bindings for fcs,fxl6408

  Other:
   - fix format specifiers in user-space tools
   - remove leftover files on make clean in tools/gpio/"

* tag 'gpio-updates-for-v6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (54 commits)
  gpio: mpc8xxx: switch to using DEFINE_RUNTIME_DEV_PM_OPS()
  gpio: xilinx: Use helper function devm_clk_get_optional_enabled()
  gpio: mb86s7x: Use helper function devm_clk_get_optional_enabled()
  gpio: lpc18xx: Use helper function devm_clk_get_enabled()
  gpio: cadence: Use helper function devm_clk_get_enabled()
  gpio: sama5d2-piobu: convert comma to semicolon
  gpio: mpc8xxx: order headers alphabetically
  gpio: davinci: use devm_clk_get_enabled()
  gpio: davinci: drop platform data support
  gpio: stmpe: Sort headers
  gpio: stmpe: Make use of device properties
  gpio: stmpe: Utilise temporary variable for struct device
  gpio: stmpe: Remove unused 'dev' member of struct stmpe_gpio
  gpio: stmpe: Fix IRQ related error messages
  gpio: pch: kerneldoc fixes for excess members
  gpio: zynq: Simplify using devm_clk_get_enabled()
  gpio: mpc8xxx: Add wake on GPIO support
  gpio: syscon: fix excess struct member build warning
  gpio: stp-xway: Simplify using devm_clk_get_enabled()
  gpiolib: legacy: Consolidate devm_gpio_*() with other legacy APIs
  ...

2 days agoMerge tag 'pwm/for-6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ukleine...
Linus Torvalds [Wed, 18 Sep 2024 08:39:35 +0000 (10:39 +0200)]
Merge tag 'pwm/for-6.12-rc1' of git://git./linux/kernel/git/ukleinek/linux

Pull pwm updates from Uwe Kleine-König:
 "This contains some cleanups to the core and some mostly minor updates
  to a bunch of drivers and device tree bindings. One thing worth
  pointing out is that it contains an immutable branch containing
  support for a new mfd chip (Analog Devices ADP5585) with several sub
  drivers.

  Thanks go to Andrew Kreimer, Clark Wang, Conor Dooley, David Lechner,
  Dmitry Rokosov, Frank Li, Geert Uytterhoeven, George Stark, Jiapeng
  Chong, Krzysztof Kozlowski, Laurent Pinchart, Liao Chen, Liu Ying, Rob
  Herring and Wolfram Sang for code contributions and reviews and to Lee
  Jones for preparing the above mentioned immutable branch"

* tag 'pwm/for-6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux: (21 commits)
  pwm: stm32: Fix a typo
  dt-bindings: pwm: amlogic: Add new bindings for meson A1 PWM
  dt-bindings: pwm: amlogic: Add optional power-domains
  pwm: Switch back to struct platform_driver::remove()
  dt-bindings: pwm: allwinner,sun4i-a10-pwm: add top-level constraints
  pwm: axi-pwmgen: use shared macro for version reg
  pwm: atmel-hlcdc: Drop trailing comma
  pwm: atmel-hlcdc: Enable module autoloading
  pwm: omap-dmtimer: Use of_property_read_bool()
  pwm: adp5585: Set OSC_EN bit to 1 when PWM state is enabled
  pwm: lp3943: Fix an incorrect type in lp3943_pwm_parse_dt()
  pwm: Simplify pwm_capture()
  pwm: lp3943: Use of_property_count_u32_elems() to get property length
  pwm: Don't export pwm_capture()
  pwm: Make info in traces about affected pwm more useful
  dt-bindings: pwm: renesas,tpu: Add r8a779h0 support
  dt-bindings: pwm: renesas,pwm-rcar: Add r8a779h0 support
  pwm: adp5585: Add Analog Devices ADP5585 support
  gpio: adp5585: Add Analog Devices ADP5585 support
  mfd: adp5585: Add Analog Devices ADP5585 core support
  ...

2 days agoMerge tag 'mmc-v6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
Linus Torvalds [Wed, 18 Sep 2024 08:36:30 +0000 (10:36 +0200)]
Merge tag 'mmc-v6.12' of git://git./linux/kernel/git/ulfh/mmc

Pull MMC updates from Ulf Hansson:
 "MMC core:
   - Add documentation for the mmc-test driver
   - Register the eMMC RPMB partition with the RPMB subsystem
   - Some various cleanups

  MMC host:
   - dw_mmc-rockchip: Add support for the RK3576 variant
   - renesas_sdhi: Add support for the RZ/V2H(P) variant
   - sdhci_am654: Add a retry mechanism for tuning
   - sdhci-atmel: Convert DT bindings to json schema
   - sdhci-of-dwcmshc:
       - Add eMMC HW reset support for BlueField-3 SoC
       - Add support for the RK3576 variant
       - Add support for the Sophgo SG2042 variant
   - sdhci-of-ma35d1: Add new driver for the Nuvoton MA35D1 SDHCI

  Misc/Tee:
   - Add Replay Protected Memory Block (RPMB) subsystem
   - Let optee probe RPMB device using RPMB subsystem"

* tag 'mmc-v6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (41 commits)
  mmc: core: Use dev_err_probe for deferred regulators
  optee: Fix a NULL vs IS_ERR() check
  mmc: sdhci_am654: Add prints to tuning algorithm
  mmc: sdhci_am654: Add retry tuning
  dt-bindings: mmc: Add support for rk3576 eMMC
  Documentation: mmc: Add mmc-test doc
  rpmb: fix error path in rpmb_dev_register()
  optee: add RPMB dependency
  mmc: block: add RPMB dependency
  mmc: core Convert UNSTUFF_BITS macro to inline function
  dt-bindings: mmc: sdhci-atmel: Convert to json schema
  mmc: core: Convert simple_stroul to kstroul
  mmc: core: Calculate size from pointer
  mmc: cqhci: Make use of cqhci_halted() routine
  mmc: core: Replace the argument of mmc_sd_switch() with defines
  mmc: dw_mmc-rockchip: Add support for rk3576 SoCs
  mmc: dw_mmc-rockchip: Add internal phase support
  dt-bindings: mmc: Add support for rk3576 dw-mshc
  mmc: sdhci-of-dwcmshc: Add hw_reset() support for BlueField-3 SoC
  mmc: core: remove left-over data structure declarations
  ...

2 days agoMerge tag 'mtd/for-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux
Linus Torvalds [Wed, 18 Sep 2024 08:30:40 +0000 (10:30 +0200)]
Merge tag 'mtd/for-6.12' of git://git./linux/kernel/git/mtd/linux

Pull MTD updates from Miquel Raynal:
 "MTD changes:

   - No particularly important patchset this cycle, but we have a few
     usual improvements: like using a better/more recent helper or
     checking a return value.

  Raw NAND changes:

   - The use of for_each_child_of_node_scoped() has been spread into the
     subsystem drivers

   - a couple of exit path have been fixed (mtk, denali)

   - TI GPMC bindings have been enhanced to comply with up-to-date
     partition descriptions

   - a load of small and misc fixes

  SPI-NAND changes:

   - The most impacting series this cycle is bringing support for
     continuous reads in the SPI-NAND subsystem.

     This is a feature already merged in the raw NAND subsystem which
     allows optimizing the internal fetch times in the chip while
     reading sequential pages within an eraseblock.

     For now only Macronix NANDs benefit from this feature. While we are
     talking about Macronix, some of their chip need an explicit action
     for selecting a different plane, and support for it has also been
     brought.

   - The bitflip threshold has also been set to the same arbitrary level
     as in the raw NAND subsystem to optimize wear leveling decisions

   - Add upport for a new Winbond chip

  SPI NOR changes:

   - Add Write Protect support for N25Q064A.

   - New flash support for Zetta ZD25Q128C and Spansion S28HS256T.

   - Fix a NULL dereference in probe path for flashes without a name.

     The probe path tries to access the name without checking its
     existence first. S28HS256T is the first flash to define its entry
     without a name, uncovering this issue"

* tag 'mtd/for-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (41 commits)
  mtd: spi-nor: fix flash probing
  mtd: spi-nor: spansion: Add support for S28HS256T
  mtd: spi-nor: winbond: add Zetta ZD25Q128C support
  mtd: spi-nor: micron-st: Add n25q064a WP support
  mtd: spi-nor: sst: Factor out common write operation to `sst_nor_write_data()`
  mtd: spinand: macronix: Flag parts needing explicit plane select
  mtd: spinand: Add support for setting plane select bits
  dt-bindings: mtd: ti, gpmc-nand: support partitions node
  mtd: rawnand: mtk: Fix init error path
  mtd: powernv: Add check devm_kasprintf() returned value
  mtd: rawnand: mtk: Factorize out the logic cleaning mtk chips
  mtd: rawnand: atmel: Add message on DMA usage
  mtd: rawnand: meson: Fix typo in function name
  mtd: spi-nand: macronix: Continuous read support
  mtd: spi-nand: macronix: Add a possible bitflip status flag
  mtd: spi-nand: macronix: Extract the bitflip retrieval logic
  mtd: spi-nand: macronix: Fix helper name
  mtd: spi-nand: Expose spinand_write_reg_op()
  mtd: spi-nand: Add continuous read support
  mtd: spi-nand: Isolate the MTD read logic in a helper
  ...

2 days agoMerge tag 'for-v6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux...
Linus Torvalds [Wed, 18 Sep 2024 08:24:22 +0000 (10:24 +0200)]
Merge tag 'for-v6.12' of git://git./linux/kernel/git/sre/linux-power-supply

Pull power supply and reset updates from Sebastian Reichel:
 "Power-supply core:
   - introduce power_supply_show_enum_with_available() helper
   - change usb_types from an array into a bitmask
   - fix early usage of power_supply_property_is_writeable() resulting
     in sysfs files not being writable
   - fix missing temp1_max_alarm attribute in power-supply's hwmon
     devices

  Drivers:
   - max1720x: expose nvmem device
   - brcmstb: cleanup driver to use latest APIs
   - max77693: expose input and charging current limit
   - max17042_battery: fix state of charge reading for devices without
     current sensing
   - axp20x_battery: add AXP717 support
   - axp20x_battery: fix min/max voltage properties
   - axp20x_usb_power: add AXP717 support
   - axp20x_usb_power: add DT based input current limit

  Documentation updates

  Misc minor cleanups and fixes"

* tag 'for-v6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (38 commits)
  power: supply: hwmon: Fix missing temp1_max_alarm attribute
  power: supply: Drop use_cnt check from power_supply_property_is_writeable()
  power: supply: ab8500: Constify struct kobj_type
  power: supply: max1720x: fix a double free on error in probe()
  power: supply: axp20x_battery: add support for AXP717
  power: supply: axp20x_usb_power: Add support for AXP717
  dt-bindings: power: supply: axp20x: Add AXP717 compatible
  dt-bindings: power: supply: axp20x: Add AXP717 compatible
  power: supply: axp20x_usb_power: Fix spelling mistake "reqested" -> "requested"
  power: supply: Change usb_types from an array into a bitmask
  power: supply: sysfs: Move power_supply_show_enum_with_available() up
  power: supply: sysfs: Add power_supply_show_enum_with_available() helper
  power: supply: rt9467-charger: Remove "usb_type" property write support
  power: supply: ucs1002: Adjust ucs1002_set_usb_type() to accept string values
  power: supply: "usb_type" property may be written to
  power: supply: max1720x: add read support for nvmem
  mfd: axp20x: Add ADC, BAT, and USB cells for AXP717
  power: supply: core: constify psy_tzd_ops
  power: reset: brcmstb: Do not go into infinite loop if reset fails
  power: reset: brcmstb: Use devm_register_sys_off_handler()
  ...

2 days agoMerge tag 'hsi-for-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi
Linus Torvalds [Wed, 18 Sep 2024 08:09:48 +0000 (10:09 +0200)]
Merge tag 'hsi-for-6.12' of git://git./linux/kernel/git/sre/linux-hsi

Pull HSI update from Sebastian Reichel:

 - omap-ssi: remove unnecessary debugfs_create_dir() error check

* tag 'hsi-for-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi:
  HSI: omap-ssi: Remove unnecessary debugfs_create_dir() error check

2 days agoMerge tag 'slab-for-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka...
Linus Torvalds [Wed, 18 Sep 2024 06:53:53 +0000 (08:53 +0200)]
Merge tag 'slab-for-6.12' of git://git./linux/kernel/git/vbabka/slab

Pull slab updates from Vlastimil Babka:
 "This time it's mostly refactoring and improving APIs for slab users in
  the kernel, along with some debugging improvements.

   - kmem_cache_create() refactoring (Christian Brauner)

     Over the years have been growing new parameters to
     kmem_cache_create() where most of them are needed only for a small
     number of caches - most recently the rcu_freeptr_offset parameter.

     To avoid adding new parameters to kmem_cache_create() and adjusting
     all its callers, or creating new wrappers such as
     kmem_cache_create_rcu(), we can now pass extra parameters using the
     new struct kmem_cache_args. Not explicitly initialized fields
     default to values interpreted as unused.

     kmem_cache_create() is for now a wrapper that works both with the
     new form: kmem_cache_create(name, object_size, args, flags) and the
     legacy form: kmem_cache_create(name, object_size, align, flags,
     ctor)

   - kmem_cache_destroy() waits for kfree_rcu()'s in flight (Vlastimil
     Babka, Uladislau Rezki)

     Since SLOB removal, kfree() is allowed for freeing objects
     allocated by kmem_cache_create(). By extension kfree_rcu() as
     allowed as well, which can allow converting simple call_rcu()
     callbacks that only do kmem_cache_free(), as there was never a
     kmem_cache_free_rcu() variant. However, for caches that can be
     destroyed e.g. on module removal, the cache owners knew to issue
     rcu_barrier() first to wait for the pending call_rcu()'s, and this
     is not sufficient for pending kfree_rcu()'s due to its internal
     batching optimizations. Ulad has provided a new
     kvfree_rcu_barrier() and to make the usage less error-prone,
     kmem_cache_destroy() calls it. Additionally, destroying
     SLAB_TYPESAFE_BY_RCU caches now again issues rcu_barrier()
     synchronously instead of using an async work, because the past
     motivation for async work no longer applies. Users of custom
     call_rcu() callbacks should however keep calling rcu_barrier()
     before cache destruction.

   - Debugging use-after-free in SLAB_TYPESAFE_BY_RCU caches (Jann Horn)

     Currently, KASAN cannot catch UAFs in such caches as it is legal to
     access them within a grace period, and we only track the grace
     period when trying to free the underlying slab page. The new
     CONFIG_SLUB_RCU_DEBUG option changes the freeing of individual
     object to be RCU-delayed, after which KASAN can poison them.

   - Delayed memcg charging (Shakeel Butt)

     In some cases, the memcg is uknown at allocation time, such as
     receiving network packets in softirq context. With
     kmem_cache_charge() these may be now charged later when the user
     and its memcg is known.

   - Misc fixes and improvements (Pedro Falcato, Axel Rasmussen,
     Christoph Lameter, Yan Zhen, Peng Fan, Xavier)"

* tag 'slab-for-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab: (34 commits)
  mm, slab: restore kerneldoc for kmem_cache_create()
  io_uring: port to struct kmem_cache_args
  slab: make __kmem_cache_create() static inline
  slab: make kmem_cache_create_usercopy() static inline
  slab: remove kmem_cache_create_rcu()
  file: port to struct kmem_cache_args
  slab: create kmem_cache_create() compatibility layer
  slab: port KMEM_CACHE_USERCOPY() to struct kmem_cache_args
  slab: port KMEM_CACHE() to struct kmem_cache_args
  slab: remove rcu_freeptr_offset from struct kmem_cache
  slab: pass struct kmem_cache_args to do_kmem_cache_create()
  slab: pull kmem_cache_open() into do_kmem_cache_create()
  slab: pass struct kmem_cache_args to create_cache()
  slab: port kmem_cache_create_usercopy() to struct kmem_cache_args
  slab: port kmem_cache_create_rcu() to struct kmem_cache_args
  slab: port kmem_cache_create() to struct kmem_cache_args
  slab: add struct kmem_cache_args
  slab: s/__kmem_cache_create/do_kmem_cache_create/g
  memcg: add charging of already allocated slab objects
  mm/slab: Optimize the code logic in find_mergeable()
  ...

2 days agoMerge tag 'lkmm.2024.09.14b' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck...
Linus Torvalds [Wed, 18 Sep 2024 06:34:45 +0000 (08:34 +0200)]
Merge tag 'lkmm.2024.09.14b' of git://git./linux/kernel/git/paulmck/linux-rcu

Pull memory model doc updates from Paul McKenney:
 "lkmm: Add documentation and mailing list

  This contains documentation updates from Andrea Parri and Akira
  Yokosawa. Also, there is now an lkmm@lists.linux.dev, and Boqun Feng's
  update adds this to the LKMM MAINTAINERS entry.

  Not included are a couple of more commits from Puranjay Mohan adding
  more atomic operations to LKMM, but these await a herdtools7 release
  that includes tool-side support for this functionality. With luck, I
  will send a separate pull request for these later in the merge window"

* tag 'lkmm.2024.09.14b' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu:
  MAINTAINERS: Add the dedicated maillist info for LKMM
  docs/memory-barriers.txt: Remove left-over references to "CACHE COHERENCY"
  tools/memory-model: simple.txt: Fix stale reference to recipes-pairs.txt
  tools/memory-model: Add locking.txt and glossary.txt to README
  tools/memory-model: Document herd7 (abstract) representation

2 days agoMerge tag 'misc.2024.09.14a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck...
Linus Torvalds [Wed, 18 Sep 2024 06:31:57 +0000 (08:31 +0200)]
Merge tag 'misc.2024.09.14a' of git://git./linux/kernel/git/paulmck/linux-rcu

Pull core dump update from Paul McKenney:
 "Sleep at TASK_IDLE when waiting for application core dump

  This causes the coredump_task_exit() function to sleep at TASK_IDLE,
  thus preventing task-blocked splats in case of large core dumps to
  slow devices"

* tag 'misc.2024.09.14a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu:
  exit: Sleep at TASK_IDLE when waiting for application core dump

2 days agoMerge tag 'kcsan.2024.09.14a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmc...
Linus Torvalds [Wed, 18 Sep 2024 06:28:59 +0000 (08:28 +0200)]
Merge tag 'kcsan.2024.09.14a' of git://git./linux/kernel/git/paulmck/linux-rcu

Pull kcsan update from Paul McKenney:
 "Use min() to fix Coccinelle warning.

  Courtesy of Thorsten Blum"

* tag 'kcsan.2024.09.14a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu:
  kcsan: Use min() to fix Coccinelle warning

2 days agoMerge tag 'rcu.release.v6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/rcu...
Linus Torvalds [Wed, 18 Sep 2024 05:52:24 +0000 (07:52 +0200)]
Merge tag 'rcu.release.v6.12' of git://git./linux/kernel/git/rcu/linux

Pull RCU updates from Neeraj Upadhyay:
 "Context tracking:
   - rename context tracking state related symbols and remove references
     to "dynticks" in various context tracking state variables and
     related helpers
   - force context_tracking_enabled_this_cpu() to be inlined to avoid
     leaving a noinstr section

  CSD lock:
   - enhance CSD-lock diagnostic reports
   - add an API to provide an indication of ongoing CSD-lock stall

  nocb:
   - update and simplify RCU nocb code to handle (de-)offloading of
     callbacks only for offline CPUs
   - fix RT throttling hrtimer being armed from offline CPU

  rcutorture:
   - remove redundant rcu_torture_ops get_gp_completed fields
   - add SRCU ->same_gp_state and ->get_comp_state functions
   - add generic test for NUM_ACTIVE_*RCU_POLL* for testing RCU and SRCU
     polled grace periods
   - add CFcommon.arch for arch-specific Kconfig options
   - print number of update types in rcu_torture_write_types()
   - add rcutree.nohz_full_patience_delay testing to the TREE07 scenario
   - add a stall_cpu_repeat module parameter to test repeated CPU stalls
   - add argument to limit number of CPUs a guest OS can use in
     torture.sh

  rcustall:
   - abbreviate RCU CPU stall warnings during CSD-lock stalls
   - Allow dump_cpu_task() to be called without disabling preemption
   - defer printing stall-warning backtrace when holding rcu_node lock

  srcu:
   - make SRCU gp seq wrap-around faster
   - add KCSAN checks for concurrent updates to ->srcu_n_exp_nodelay and
     ->reschedule_count which are used in heuristics governing
     auto-expediting of normal SRCU grace periods and
     grace-period-state-machine delays
   - mark idle SRCU-barrier callbacks to help identify stuck
     SRCU-barrier callback

  rcu tasks:
   - remove RCU Tasks Rude asynchronous APIs as they are no longer used
   - stop testing RCU Tasks Rude asynchronous APIs
   - fix access to non-existent percpu regions
   - check processor-ID assumptions during chosen CPU calculation for
     callback enqueuing
   - update description of rtp->tasks_gp_seq grace-period sequence
     number
   - add rcu_barrier_cb_is_done() to identify whether a given
     rcu_barrier callback is stuck
   - mark idle Tasks-RCU-barrier callbacks
   - add *torture_stats_print() functions to print detailed diagnostics
     for Tasks-RCU variants
   - capture start time of rcu_barrier_tasks*() operation to help
     distinguish a hung barrier operation from a long series of barrier
     operations

  refscale:
   - add a TINY scenario to support tests of Tiny RCU and Tiny
     SRCU
   - optimize process_durations() operation

  rcuscale:
   - dump stacks of stalled rcu_scale_writer() instances and
     grace-period statistics when rcu_scale_writer() stalls
   - mark idle RCU-barrier callbacks to identify stuck RCU-barrier
     callbacks
   - print detailed grace-period and barrier diagnostics on
     rcu_scale_writer() hangs for Tasks-RCU variants
   - warn if async module parameter is specified for RCU implementations
     that do not have async primitives such as RCU Tasks Rude
   - make all writer tasks report upon hang
   - tolerate repeated GFP_KERNEL failure in rcu_scale_writer()
   - use special allocator for rcu_scale_writer()
   - NULL out top-level pointers to heap memory to avoid double-free
     bugs on modprobe failures
   - maintain per-task instead of per-CPU callbacks count to avoid any
     issues with migration of either tasks or callbacks
   - constify struct ref_scale_ops

  Fixes:
   - use system_unbound_wq for kfree_rcu work to avoid disturbing
     isolated CPUs

  Misc:
   - warn on unexpected rcu_state.srs_done_tail state
   - better define "atomic" for list_replace_rcu() and
     hlist_replace_rcu() routines
   - annotate struct kvfree_rcu_bulk_data with __counted_by()"

* tag 'rcu.release.v6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/rcu/linux: (90 commits)
  rcu: Defer printing stall-warning backtrace when holding rcu_node lock
  rcu/nocb: Remove superfluous memory barrier after bypass enqueue
  rcu/nocb: Conditionally wake up rcuo if not already waiting on GP
  rcu/nocb: Fix RT throttling hrtimer armed from offline CPU
  rcu/nocb: Simplify (de-)offloading state machine
  context_tracking: Tag context_tracking_enabled_this_cpu() __always_inline
  context_tracking, rcu: Rename rcu_dyntick trace event into rcu_watching
  rcu: Update stray documentation references to rcu_dynticks_eqs_{enter, exit}()
  rcu: Rename rcu_momentary_dyntick_idle() into rcu_momentary_eqs()
  rcu: Rename rcu_implicit_dynticks_qs() into rcu_watching_snap_recheck()
  rcu: Rename dyntick_save_progress_counter() into rcu_watching_snap_save()
  rcu: Rename struct rcu_data .exp_dynticks_snap into .exp_watching_snap
  rcu: Rename struct rcu_data .dynticks_snap into .watching_snap
  rcu: Rename rcu_dynticks_zero_in_eqs() into rcu_watching_zero_in_eqs()
  rcu: Rename rcu_dynticks_in_eqs_since() into rcu_watching_snap_stopped_since()
  rcu: Rename rcu_dynticks_in_eqs() into rcu_watching_snap_in_eqs()
  rcu: Rename rcu_dynticks_eqs_online() into rcu_watching_online()
  context_tracking, rcu: Rename rcu_dynticks_curr_cpu_in_eqs() into rcu_is_watching_curr_cpu()
  context_tracking, rcu: Rename rcu_dynticks_task*() into rcu_task*()
  refscale: Constify struct ref_scale_ops
  ...

2 days agoMerge tag 'wq-for-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
Linus Torvalds [Wed, 18 Sep 2024 04:59:44 +0000 (06:59 +0200)]
Merge tag 'wq-for-6.12' of git://git./linux/kernel/git/tj/wq

Pull workqueue updates from Tejun Heo:
 "Nothing major:

   - workqueue.panic_on_stall boot param added

   - alloc_workqueue_lockdep_map() added (used by DRM)

   - Other cleanusp and doc updates"

* tag 'wq-for-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
  kernel/workqueue.c: fix DEFINE_PER_CPU_SHARED_ALIGNED expansion
  workqueue: Fix another htmldocs build warning
  workqueue: fix null-ptr-deref on __alloc_workqueue() error
  workqueue: Don't call va_start / va_end twice
  workqueue: Fix htmldocs build warning
  workqueue: Add interface for user-defined workqueue lockdep map
  workqueue: Change workqueue lockdep map to pointer
  workqueue: Split alloc_workqueue into internal function and lockdep init
  Documentation: kernel-parameters: add workqueue.panic_on_stall
  workqueue: add cmdline parameter workqueue.panic_on_stall

2 days agoMerge tag 'cgroup-for-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
Linus Torvalds [Wed, 18 Sep 2024 04:39:03 +0000 (06:39 +0200)]
Merge tag 'cgroup-for-6.12' of git://git./linux/kernel/git/tj/cgroup

Pull cgroup updates from Tejun Heo:

 - cpuset isolation improvements

 - cpuset cgroup1 support is split into its own file behind the new
   config option CONFIG_CPUSET_V1. This makes it the second controller
   which makes cgroup1 support optional after memcg

 - Handling of unavailable v1 controller handling improved during
   cgroup1 mount operations

 - union_find applied to cpuset. It makes code simpler and more
   efficient

 - Reduce spurious events in pids.events

 - Cleanups and other misc changes

 - Contains a merge of cgroup/for-6.11-fixes to receive cpuset fixes
   that further changes build upon

* tag 'cgroup-for-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: (34 commits)
  cgroup: Do not report unavailable v1 controllers in /proc/cgroups
  cgroup: Disallow mounting v1 hierarchies without controller implementation
  cgroup/cpuset: Expose cpuset filesystem with cpuset v1 only
  cgroup/cpuset: Move cpu.h include to cpuset-internal.h
  cgroup/cpuset: add sefltest for cpuset v1
  cgroup/cpuset: guard cpuset-v1 code under CONFIG_CPUSETS_V1
  cgroup/cpuset: rename functions shared between v1 and v2
  cgroup/cpuset: move v1 interfaces to cpuset-v1.c
  cgroup/cpuset: move validate_change_legacy to cpuset-v1.c
  cgroup/cpuset: move legacy hotplug update to cpuset-v1.c
  cgroup/cpuset: add callback_lock helper
  cgroup/cpuset: move memory_spread to cpuset-v1.c
  cgroup/cpuset: move relax_domain_level to cpuset-v1.c
  cgroup/cpuset: move memory_pressure to cpuset-v1.c
  cgroup/cpuset: move common code to cpuset-internal.h
  cgroup/cpuset: introduce cpuset-v1.c
  selftest/cgroup: Make test_cpuset_prs.sh deal with pre-isolated CPUs
  cgroup/cpuset: Account for boot time isolated CPUs
  cgroup/cpuset: remove use_parent_ecpus of cpuset
  cgroup/cpuset: remove fetch_xcpus
  ...

3 days agotpm: export tpm2_sessions_init() to fix ibmvtpm building
Kexy Biscuit [Mon, 9 Sep 2024 17:28:30 +0000 (20:28 +0300)]
tpm: export tpm2_sessions_init() to fix ibmvtpm building

Commit 08d08e2e9f0a ("tpm: ibmvtpm: Call tpm2_sessions_init() to
initialize session support") adds call to tpm2_sessions_init() in ibmvtpm,
which could be built as a module. However, tpm2_sessions_init() wasn't
exported, causing libmvtpm to fail to build as a module:

ERROR: modpost: "tpm2_sessions_init" [drivers/char/tpm/tpm_ibmvtpm.ko] undefined!

Export tpm2_sessions_init() to resolve the issue.

Cc: stable@vger.kernel.org # v6.10+
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202408051735.ZJkAPQ3b-lkp@intel.com/
Fixes: 08d08e2e9f0a ("tpm: ibmvtpm: Call tpm2_sessions_init() to initialize session support")
Signed-off-by: Kexy Biscuit <kexybiscuit@aosc.io>
Signed-off-by: Mingcong Bai <jeffbai@aosc.io>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
3 days agotpm: Drop explicit initialization of struct i2c_device_id::driver_data to 0
Uwe Kleine-König [Mon, 9 Sep 2024 17:26:47 +0000 (20:26 +0300)]
tpm: Drop explicit initialization of struct i2c_device_id::driver_data to 0

These drivers don't use the driver_data member of struct i2c_device_id,
so don't explicitly initialize this member.

This prepares putting driver_data in an anonymous union which requires
either no initialization or named designators. But it's also a nice
cleanup on its own.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
3 days agoselftests: tpm2: test_smoke: Run only when TPM2 is avaialable.
Michal Suchanek [Wed, 28 Aug 2024 11:23:20 +0000 (13:23 +0200)]
selftests: tpm2: test_smoke: Run only when TPM2 is avaialable.

Since Linux 5.6 tpm_version_major sysfs file is avaialble which gives
the TPM version.

Using this file the test can be skipped on systems with TPM 1.2.

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
3 days agoMAINTAINERS: Add selftest files to TPM section
Michal Suchanek [Wed, 28 Aug 2024 11:23:19 +0000 (13:23 +0200)]
MAINTAINERS: Add selftest files to TPM section

tools/testing/selftests/tpm2/ is TPM-specific test

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
3 days agotpm: Clean up TPM space after command failure
Jonathan McDowell [Fri, 16 Aug 2024 11:55:46 +0000 (12:55 +0100)]
tpm: Clean up TPM space after command failure

tpm_dev_transmit prepares the TPM space before attempting command
transmission. However if the command fails no rollback of this
preparation is done. This can result in transient handles being leaked
if the device is subsequently closed with no further commands performed.

Fix this by flushing the space in the event of command transmission
failure.

Fixes: 745b361e989a ("tpm: infrastructure for TPM spaces")
Signed-off-by: Jonathan McDowell <noodles@meta.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
3 days agoMerge tag 'sound-6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
Linus Torvalds [Tue, 17 Sep 2024 15:03:43 +0000 (17:03 +0200)]
Merge tag 'sound-6.12-rc1' of git://git./linux/kernel/git/tiwai/sound

Pull sound updates from Takashi Iwai:
 "A fairly big update at this time, both in core and driver sides.

  The core received rewrites in PCM buffer allocation handling and
  locking optimizations, PCM rate updates followed by lots of cleanups.

  In ASoC side, the legacy Intel drivers have been deprecated by AVS
  drivers which leaded to the significant amount of code reduction.
  SoundWire driver updates and other cleanups contributed more code
  reduction, too.

  USB-audio driver received a large cleanup of its big quirk table, and
  the old snd_print*() API usages in many legacy drivers are replaced
  with the standard print API.

  Here are some highlights:

  Core:
   - More optimized locking in ALSA control code
   - Rewrites of memalloc helpers for better DMA API usage
   - Drop of obsoleted vmalloc PCM buffer helper API
   - Continued MIDI2 UMP updates
   - Support of a new user-space driven timer instance
   - Update for more PCM support rates and cleanups
   - Xrun counter report in the proc files

  ASoC:
   - Continued simplification and cleanup works for ASoC
   - Extensive cleanups and refactoring of the Soundwire drivers
   - Removal of Intel machine support obsoleted by the AVS driver
   - Lots of DT schema conversions
   - Machine support for many AMD and Intel x86 platforms
   - Support for AMD ACP 7.1, Mediatek MT6367 and MT8365, Realtek
     RTL1320 SoundWire and rev C, and Texas Instruments TAS2563

  USB-audio:
   - Add support of multiple control interfaces
   - A large rewrite of quirk table with macros
   - Support for RME Digiface USB

  HD-audio:
   - Cleanup of quirk code for Samsung Galaxy laptops
   - Clean up of detection of Cirrus codecs
   - C-Media CM9825 HD-audio codec support

  Others:
   - Rewrites to standard print API in a lot of legacy drivers"

* tag 'sound-6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (410 commits)
  ASoC: topology: Fix redundant logical jump
  ASoC: tas2781: Add Calibration Kcontrols for Chromebook
  ASoC: amd: acp: refactor SoundWire machine driver code
  ASoC: sdw_utils/intel: move soundwire endpoint parsing helper functions
  ASoC: sdw_util/intel: move soundwire endpoint and dai link structures
  ASoC: intel: sof_sdw: rename soundwire parsing helper functions
  ASoC: intel: sof_sdw: rename soundwire endpoint and dailink structures
  ASoC: atmel: mchp-pdmc: Retain Non-Runtime Controls
  ALSA: hda/realtek: Add support for Galaxy Book2 Pro (NP950XEE)
  ASoC: mediatek: mt7986-afe-pcm: Remove redundant error message
  ALSA: memalloc: Use proper DMA mapping API for x86 S/G buffer allocations
  ALSA: memalloc: Use proper DMA mapping API for x86 WC buffer allocations
  ALSA: usb-audio: Add logitech Audio profile quirk
  ASoc: mediatek: mt8365: Remove unneeded assignment
  ASoC: Intel: ARL: Add entry for HDMI-In capture support to non-I2S codec boards.
  ASoC: Intel: sof_rt5682: Add HDMI-In capture with rt5682 support for ARL.
  ASoC: SOF: Intel: hda: remove common_hdmi_codec_drv
  ASoC: Intel: sof_pcm512x: do not check common_hdmi_codec_drv
  ASoC: Intel: ehl_rt5660: do not check common_hdmi_codec_drv
  ASoC: Intel: skl_hda_dsp_generic: use common module for DAI links
  ...

3 days agoMerge tag 'linux_kselftest-kunit-6.12-rc1' of git://git.kernel.org/pub/scm/linux...
Linus Torvalds [Tue, 17 Sep 2024 14:52:24 +0000 (16:52 +0200)]
Merge tag 'linux_kselftest-kunit-6.12-rc1' of git://git./linux/kernel/git/shuah/linux-kselftest

Pull kunit updates from Shuah Khan:

 - a new int_pow test suite

 - documentation update to clarify filename best practices

 - kernel-doc fix for EXPORT_SYMBOL_IF_KUNIT

 - change to build compile_commands.json automatically instead of
   requiring a manual build

* tag 'linux_kselftest-kunit-6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
  lib/math: Add int_pow test suite
  kunit: tool: Build compile_commands.json
  kunit: Fix kernel-doc for EXPORT_SYMBOL_IF_KUNIT
  Documentation: KUnit: Update filename best practices

3 days agoMerge tag 'linux_kselftest-next-6.12-rc1' of git://git.kernel.org/pub/scm/linux/kerne...
Linus Torvalds [Tue, 17 Sep 2024 14:49:56 +0000 (16:49 +0200)]
Merge tag 'linux_kselftest-next-6.12-rc1' of git://git./linux/kernel/git/shuah/linux-kselftest

Pull kselftest update from Shuah Khan:

 - test coverage for dup_fd() failure handling in unshare_fd()

 - new selftest for the acct() syscall

 - basic uprobe testcase

 - several small fixes and cleanups to existing tests

 - user and strscpy removal as they became kunit tests

 - fixes to build failures and warnings

* tag 'linux_kselftest-next-6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (21 commits)
  selftests: kselftest: Use strerror() on nolibc
  selftests/timers: Remove unused NSEC_PER_SEC macro
  selftests:resctrl: Fix build failure on archs without __cpuid_count()
  selftests/ftrace: Fix eventfs ownership testcase to find mount point
  selftests: filesystems: fix warn_unused_result build warnings
  selftests:core: test coverage for dup_fd() failure handling in unshare_fd()
  selftests/ftrace: Fix test to handle both old and new kernels
  kselftest: timers: Fix const correctness
  selftests/ftrace: Add required dependency for kprobe tests
  selftests: rust: config: disable GCC_PLUGINS
  selftests: rust: config: add trailing newline
  tracing/selftests: Run the ownership test twice
  selftests/uprobes: Add a basic uprobe testcase
  selftests: harness: rename __constructor_order for clarification
  selftests: harness: remove unneeded __constructor_order_last()
  selftest: acct: Add selftest for the acct() syscall
  selftests: lib: remove strscpy test
  selftests: user: remove user suite
  kselftest: cpufreq: Add RTC wakeup alarm
  selftests/exec: Fix grammar in an error message.
  ...

3 days agoMerge tag 'linux_kselftest-nolibc-6.12-rc1' of git://git.kernel.org/pub/scm/linux...
Linus Torvalds [Tue, 17 Sep 2024 14:47:17 +0000 (16:47 +0200)]
Merge tag 'linux_kselftest-nolibc-6.12-rc1' of git://git./linux/kernel/git/shuah/linux-kselftest

Pull nolibc updates from Shuah Khan:
 "Highlights:

   - Clang support (including LTO)

  Other Changes:

   - stdbool.h support

   - argc/argv/envp arguments for constructors

   - Small #include ordering fix"

* tag 'linux_kselftest-nolibc-6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (21 commits)
  tools/nolibc: x86_64: use local label in memcpy/memmove
  tools/nolibc: stackprotector: mark implicitly used symbols as used
  tools/nolibc: crt: mark _start_c() as used
  selftests/nolibc: run-tests.sh: allow building through LLVM
  selftests/nolibc: use correct clang target for s390/systemz
  selftests/nolibc: don't use libgcc when building with clang
  selftests/nolibc: run-tests.sh: avoid overwriting CFLAGS_EXTRA
  selftests/nolibc: add cc-option compatible with clang cross builds
  selftests/nolibc: add support for LLVM= parameter
  selftests/nolibc: determine $(srctree) first
  selftests/nolibc: avoid passing NULL to printf("%s")
  selftests/nolibc: report failure if no testcase passed
  tools/nolibc: compiler: use attribute((naked)) if available
  tools/nolibc: move entrypoint specifics to compiler.h
  tools/nolibc: compiler: introduce __nolibc_has_attribute()
  tools/nolibc: powerpc: limit stack-protector workaround to GCC
  tools/nolibc: mips: load current function to $t9
  tools/nolibc: arm: use clang-compatible asm syntax
  tools/nolibc: pass argc, argv and envp to constructors
  tools/nolibc: add stdbool.h header
  ...

3 days agoMerge tag 'docs-6.12' of git://git.lwn.net/linux
Linus Torvalds [Tue, 17 Sep 2024 14:44:08 +0000 (16:44 +0200)]
Merge tag 'docs-6.12' of git://git.lwn.net/linux

Pull documentation update from Jonathan Corbet:
 "Another relatively mundane cycle for docs:

   - The beginning of an EEVDF scheduler document

   - More Chinese translations

   - A rethrashing of our bisection documentation

  ...plus the usual array of smaller fixes, and more than the usual
  number of typo fixes"

* tag 'docs-6.12' of git://git.lwn.net/linux: (48 commits)
  Remove duplicate "and" in 'Linux NVMe docs.
  docs:filesystems: fix spelling and grammar mistakes
  docs:filesystem: fix mispelled words on autofs page
  docs:mm: fixed spelling and grammar mistakes on vmalloc kernel stack page
  Documentation: PCI: fix typo in pci.rst
  docs/zh_CN: add the translation of kbuild/gcc-plugins.rst
  docs/process: fix typos
  docs:mm: fix spelling mistakes in heterogeneous memory management page
  accel/qaic: Fix a typo
  docs/zh_CN: update the translation of security-bugs
  docs: block: Fix grammar and spelling mistakes in bfq-iosched.rst
  Documentation: Fix spelling mistakes
  Documentation/gpu: Fix typo in Documentation/gpu/komeda-kms.rst
  scripts: sphinx-pre-install: remove unnecessary double check for $cur_version
  Loongarch: KVM: Add KVM hypercalls documentation for LoongArch
  Documentation: Document the kernel flag bdev_allow_write_mounted
  docs: scheduler: completion: Update member of struct completion
  docs: kerneldoc-preamble.sty: Suppress extra spaces in CJK literal blocks
  docs: submitting-patches: Advertise b4
  docs: update dev-tools/kcsan.rst url about KTSAN
  ...

3 days agoMerge tag 'm68k-for-v6.12-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 17 Sep 2024 14:41:46 +0000 (16:41 +0200)]
Merge tag 'm68k-for-v6.12-tag1' of git://git./linux/kernel/git/geert/linux-m68k

Pull m68k updates from Geert Uytterhoeven:

 - Use swap() helper for __arch_xchg()

 - Fix kernel_clone_args.flags in m68k_clone()

 - defconfig updates

* tag 'm68k-for-v6.12-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
  m68k: defconfig: Update defconfigs for v6.11-rc1
  m68k: Fix kernel_clone_args.flags in m68k_clone()
  m68k: cmpxchg: Use swap() to improve code

3 days agoMerge tag 'x86-timers-2024-09-17' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 17 Sep 2024 13:27:01 +0000 (15:27 +0200)]
Merge tag 'x86-timers-2024-09-17' of git://git./linux/kernel/git/tip/tip

Pull x86 timer updates from Thomas Gleixner:

 - Use the topology information of number of packages for making the
   decision about TSC trust instead of using the number of online nodes
   which is not reflecting the real topology.

 - Stop the PIT timer 0 when its not in use as to stop pointless
   emulation in the VMM.

 - Fix the PIT timer stop sequence for timer 0 so it truly stops both
   real hardware and buggy VMM emulations.

* tag 'x86-timers-2024-09-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/tsc: Check for sockets instead of CPUs to make code match comment
  clockevents/drivers/i8253: Fix stop sequence for timer 0
  x86/i8253: Disable PIT timer 0 when not in use
  x86/tsc: Use topology_max_packages() to get package number

3 days agoMerge tag 'x86-misc-2024-09-17' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 17 Sep 2024 13:18:45 +0000 (15:18 +0200)]
Merge tag 'x86-misc-2024-09-17' of git://git./linux/kernel/git/tip/tip

Pull misc x86 updates from Thomas Gleixner:

 - Rework kcpuid to handle the the autogenerated CSV file correctly and
   update the CSV file to cover the whole zoo of CPUID.

 - Avoid memcpy() for ia32 syscall_get_arguments() and use direct
   assignments as fortified memcpy() is unhappy about writing/reading
   beyond the end of the addresses destination/source struct member

 - A few new PCI IDs for AMD

 - Update MAINTAINERS to cover x86 specific selftests

* tag 'x86-misc-2024-09-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  MAINTAINERS: Add selftests/x86 entry
  x86/amd_nb: Add new PCI IDs for AMD family 1Ah model 60h-70h
  x86/syscall: Avoid memcpy() for ia32 syscall_get_arguments()
  MAINTAINERS: Add x86 cpuid database entry
  tools/x86/kcpuid: Introduce a complete cpuid bitfields CSV file
  tools/x86/kcpuid: Parse subleaf ranges if provided
  tools/x86/kcpuid: Recognize all leaves with subleaves
  tools/x86/kcpuid: Strip bitfield names leading/trailing whitespace
  tools/x86/kcpuid: Protect against faulty "max subleaf" values
  tools/x86/kcpuid: Set max possible subleaves count to 64
  tools/x86/kcpuid: Properly align long-description columns
  tools/x86/kcpuid: Remove unused variable
  x86/amd_nb: Add new PCI IDs for AMD family 1Ah model 60h

3 days agoMerge tag 'x86-platform-2024-09-17' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Tue, 17 Sep 2024 13:13:14 +0000 (15:13 +0200)]
Merge tag 'x86-platform-2024-09-17' of git://git./linux/kernel/git/tip/tip

Pull x86 platform update from Thomas Gleixner:
 "Remove a stale declaration from the UV platform code"

* tag 'x86-platform-2024-09-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/platform/uv: Remove unused declaration uv_irq_2_mmr_info()

3 days agoMerge tag 'x86-mm-2024-09-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Linus Torvalds [Tue, 17 Sep 2024 13:03:01 +0000 (15:03 +0200)]
Merge tag 'x86-mm-2024-09-17' of git://git./linux/kernel/git/tip/tip

Pull x86 memory management updates from Thomas Gleixner:

 - Make LAM enablement safe vs. kernel threads using a process mm
   temporarily as switching back to the process would not update CR3 and
   therefore not enable LAM causing faults in user space when using
   tagged pointers. Cure it by synchronizing LAM enablement via IPIs to
   all CPUs which use the related mm.

 - Cure a LAM harmless inconsistency between CR3 and the state during
   context switch. It's both confusing and prone to lead to real bugs

 - Handle alt stack handling for threads which run with a non-zero
   protection key. The non-zero key prevents the kernel to access the
   alternate stack. Cure it by temporarily enabling all protection keys
   for the alternate stack setup/restore operations.

 - Provide a EFI config table identity mapping for kexec kernel to
   prevent kexec fails because the new kernel cannot access the config
   table array

 - Use GB pages only when a full GB is mapped in the identity map as
   otherwise the CPU can speculate into reserved areas after the end of
   memory which causes malfunction on UV systems.

 - Remove the noisy and pointless SRAT table dump during boot

 - Use is_ioremap_addr() for iounmap() address range checks instead of
   high_memory. is_ioremap_addr() is more precise.

* tag 'x86-mm-2024-09-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/ioremap: Improve iounmap() address range checks
  x86/mm: Remove duplicate check from build_cr3()
  x86/mm: Remove unused NX related declarations
  x86/mm: Remove unused CR3_HW_ASID_BITS
  x86/mm: Don't print out SRAT table information
  x86/mm/ident_map: Use gbpages only where full GB page should be mapped.
  x86/kexec: Add EFI config table identity mapping for kexec kernel
  selftests/mm: Add new testcases for pkeys
  x86/pkeys: Restore altstack access in sigreturn()
  x86/pkeys: Update PKRU to enable all pkeys before XSAVE
  x86/pkeys: Add helper functions to update PKRU on the sigframe
  x86/pkeys: Add PKRU as a parameter in signal handling functions
  x86/mm: Cleanup prctl_enable_tagged_addr() nr_bits error checking
  x86/mm: Fix LAM inconsistency during context switch
  x86/mm: Use IPIs to synchronize LAM enablement

3 days agoMerge tag 'x86-fred-2024-09-17' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 17 Sep 2024 12:55:59 +0000 (14:55 +0200)]
Merge tag 'x86-fred-2024-09-17' of git://git./linux/kernel/git/tip/tip

Pull x86 FRED updates from Thomas Gleixner:

 - Enable FRED right after init_mem_mapping() because at that point the
   early IDT fault handler is replaced by the real fault handler. The
   real fault handler retrieves the faulting address from the stack
   frame and not from CR2 when the FRED feature is set. But that
   obviously only works when FRED is enabled in the CPU as well.

 - Set SS to __KERNEL_DS when enabling FRED to prevent a corner case
   where ERETS can observe a SS mismatch and raises a #GP.

* tag 'x86-fred-2024-09-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/entry: Set FRED RSP0 on return to userspace instead of context switch
  x86/msr: Switch between WRMSRNS and WRMSR with the alternatives mechanism
  x86/entry: Test ti_work for zero before processing individual bits
  x86/fred: Set SS to __KERNEL_DS when enabling FRED
  x86/fred: Enable FRED right after init_mem_mapping()
  x86/fred: Move FRED RSP initialization into a separate function
  x86/fred: Parse cmdline param "fred=" in cpu_parse_early_param()

3 days agoMerge tag 'x86-fpu-2024-09-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Linus Torvalds [Tue, 17 Sep 2024 12:46:17 +0000 (14:46 +0200)]
Merge tag 'x86-fpu-2024-09-17' of git://git./linux/kernel/git/tip/tip

Pull x86 fpu updates from Thomas Gleixner:
 "Provide FPU buffer layout in core dumps:

  Debuggers have guess the FPU buffer layout in core dumps, which is
  error prone. This is because AMD and Intel layouts differ.

  To avoid buggy heuristics add a ELF section which describes the buffer
  layout which can be retrieved by tools"

* tag 'x86-fpu-2024-09-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/elf: Add a new FPU buffer layout info to x86 core files

3 days agopowerpc/atomic: Use YZ constraints for DS-form instructions
Michael Ellerman [Mon, 16 Sep 2024 12:05:10 +0000 (22:05 +1000)]
powerpc/atomic: Use YZ constraints for DS-form instructions

The 'ld' and 'std' instructions require a 4-byte aligned displacement
because they are DS-form instructions. But the "m" asm constraint
doesn't enforce that.

That can lead to build errors if the compiler chooses a non-aligned
displacement, as seen with GCC 14:

  /tmp/ccuSzwiR.s: Assembler messages:
  /tmp/ccuSzwiR.s:2579: Error: operand out of domain (39 is not a multiple of 4)
  make[5]: *** [scripts/Makefile.build:229: net/core/page_pool.o] Error 1

Dumping the generated assembler shows:

  ld 8,39(8)       # MEM[(const struct atomic64_t *)_29].counter, t

Use the YZ constraints to tell the compiler either to generate a DS-form
displacement, or use an X-form instruction, either of which prevents the
build error.

See commit 2d43cc701b96 ("powerpc/uaccess: Fix build errors seen with
GCC 13/14") for more details on the constraint letters.

Fixes: 9f0cbea0d8cc ("[POWERPC] Implement atomic{, 64}_{read, write}() without volatile")
Cc: stable@vger.kernel.org # v2.6.24+
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Closes: https://lore.kernel.org/all/20240913125302.0a06b4c7@canb.auug.org.au
Tested-by: Mina Almasry <almasrymina@google.com>
Reviewed-by: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240916120510.2017749-1-mpe@ellerman.id.au
3 days agoMAINTAINERS: powerpc: Add Maddy
Michael Ellerman [Tue, 27 Aug 2024 06:36:51 +0000 (16:36 +1000)]
MAINTAINERS: powerpc: Add Maddy

Maddy will be helping out with upstream maintenance, add him as a
reviewer.

Acked-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240827063651.28985-1-mpe@ellerman.id.au
3 days agoMerge tag 'x86-core-2024-09-17' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 17 Sep 2024 11:17:27 +0000 (13:17 +0200)]
Merge tag 'x86-core-2024-09-17' of git://git./linux/kernel/git/tip/tip

Pull x86 core update from Thomas Gleixner:
 "Enable UBSAN traps for x86, which provides better reporting through
  metadata encodeded into UD1"

* tag 'x86-core-2024-09-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/traps: Enable UBSAN traps on x86

3 days agoMerge tag 'x86-apic-2024-09-17' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 17 Sep 2024 11:09:49 +0000 (13:09 +0200)]
Merge tag 'x86-apic-2024-09-17' of git://git./linux/kernel/git/tip/tip

Pull x86 APIC updates from Thomas Gleixner:

 - Handle an allocation failure in the IO/APIC code gracefully instead
   of crashing the machine.

 - Remove support for APIC local destination mode on 64bit

   Logical destination mode of the local APIC is used for systems with
   up to 8 CPUs. It has an advantage over physical destination mode as
   it allows to target multiple CPUs at once with IPIs. That advantage
   was definitely worth it when systems with up to 8 CPUs were state of
   the art for servers and workstations, but that's history.

   In the recent past there were quite some reports of new laptops
   failing to boot with logical destination mode, but they work fine
   with physical destination mode. That's not a suprise because physical
   destination mode is guaranteed to work as it's the only way to get a
   CPU up and running via the INIT/INIT/STARTUP sequence. Some of the
   affected systems were cured by BIOS updates, but not all OEMs provide
   them.

   As the number of CPUs keep increasing, logical destination mode
   becomes less used and the benefit for small systems, like laptops, is
   not really worth the trouble. So just remove logical destination mode
   support for 64bit and be done with it.

 - Code and comment cleanups in the APIC area.

* tag 'x86-apic-2024-09-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/irq: Fix comment on IRQ vector layout
  x86/apic: Remove unused extern declarations
  x86/apic: Remove logical destination mode for 64-bit
  x86/apic: Remove unused inline function apic_set_eoi_cb()
  x86/ioapic: Cleanup remaining coding style issues
  x86/ioapic: Cleanup line breaks
  x86/ioapic: Cleanup bracket usage
  x86/ioapic: Cleanup comments
  x86/ioapic: Move replace_pin_at_irq_node() to the call site
  iommu/vt-d: Cleanup apic_printk()
  x86/mpparse: Cleanup apic_printk()s
  x86/ioapic: Cleanup guarded debug printk()s
  x86/ioapic: Cleanup apic_printk()s
  x86/apic: Cleanup apic_printk()s
  x86/apic: Provide apic_printk() helpers
  x86/ioapic: Use guard() for locking where applicable
  x86/ioapic: Cleanup structs
  x86/ioapic: Mark mp_alloc_timer_irq() __init
  x86/ioapic: Handle allocation failures gracefully

3 days agoMerge tag 'x86-cleanups-2024-09-17' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Tue, 17 Sep 2024 11:00:12 +0000 (13:00 +0200)]
Merge tag 'x86-cleanups-2024-09-17' of git://git./linux/kernel/git/tip/tip

Pull x86 cleanups from Thomas Gleixner:
 "A set of cleanups across x86:

   - Use memremap() for the EISA probe instead of ioremap(). EISA is
     strictly memory and not MMIO

   - Cleanups and enhancement all over the place"

* tag 'x86-cleanups-2024-09-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/EISA: Dereference memory directly instead of using readl()
  x86/extable: Remove unused declaration fixup_bug()
  x86/boot/64: Strip percpu address space when setting up GDT descriptors
  x86/cpu: Clarify the error message when BIOS does not support SGX
  x86/kexec: Add comments around swap_pages() assembly to improve readability
  x86/kexec: Fix a comment of swap_pages() assembly
  x86/sgx: Fix a W=1 build warning in function comment
  x86/EISA: Use memremap() to probe for the EISA BIOS signature
  x86/mtrr: Remove obsolete declaration for mtrr_bp_restore()
  x86/cpu_entry_area: Annotate percpu_setup_exception_stacks() as __init

3 days agoMAINTAINERS: adjust file entry in INTEL MID PLATFORM
Lukas Bulwahn [Tue, 17 Sep 2024 10:39:55 +0000 (12:39 +0200)]
MAINTAINERS: adjust file entry in INTEL MID PLATFORM

Commit 5f1cda51107f ("platform/x86: intel_scu_wdt: Move intel_scu_wdt.h to
x86 subfolder") moves intel-mid_wdt.h in ./include/linux/platform_data into
the x86 subdirectory, but misses to adjust the INTEL MID PLATFORM section,
which is referring to this file.

Hence, ./scripts/get_maintainer.pl --self-test=patterns complains about a
broken reference.

Adjust the file entry to this header file movement.

Signed-off-by: Lukas Bulwahn <lukas.bulwahn@redhat.com>
Link: https://lore.kernel.org/r/20240917103955.102921-1-lukas.bulwahn@redhat.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
3 days agoMerge tag 'x86-build-2024-09-17' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 17 Sep 2024 10:40:34 +0000 (12:40 +0200)]
Merge tag 'x86-build-2024-09-17' of git://git./linux/kernel/git/tip/tip

Pull x86 build updates from Thomas Gleixner:
 "Updates for KCOV instrumentation on x86:

   - Prevent spurious KCOV coverage in common_interrupt()

   - Fixup the KCOV Makefile directive which got stale due to a source
     file rename

   - Exclude stack unwinding from KCOV as it creates large amounts of
     uninteresting coverage

   - Provide a self test to validate that KCOV coverage of the interrupt
     handling code starts not before preempt count got updated"

* tag 'x86-build-2024-09-17' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86: Ignore stack unwinding in KCOV
  module: Fix KCOV-ignored file name
  kcov: Add interrupt handling self test
  x86/entry: Remove unwanted instrumentation in common_interrupt()

3 days agoMerge tag 'soc-arm-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
Linus Torvalds [Tue, 17 Sep 2024 09:41:47 +0000 (11:41 +0200)]
Merge tag 'soc-arm-6.12' of git://git./linux/kernel/git/soc/soc

Pull SoC ARM platform updates from Arnd Bergmann:
 "Most of these updates are for removing dead code on the Samsung S3C,
  NXP i.MX, TI OMAP and TI DaVinci platforms, though this appears to be
  a coincidence.

  There are also cleanups for the Marvell Orion family and the Arm
  integrator series and a Kconfig change for Broadcom"

* tag 'soc-arm-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
  ARM: dove: Drop a write-only variable
  ARM: orion5x: Switch to new sys-off handler API
  ARM: mvebu: Warn about memory chunks too small for DDR training
  ARM: imx: Annotate imx7d_enet_init() as __init
  ARM: OMAP1: Remove unused declarations in arch/arm/mach-omap1/pm.h
  ARM: s3c: remove unused s3c2410_cpu_suspend() declaration
  ARM: s3c: remove unused declarations for s3c6400
  ARM: s3c: Remove unused s3c_init_uart_irqs() declaration
  ARM: davinci: remove unused cpuidle code
  ARM: davinci: remove unused davinci_init_ide() declaration
  ARM: davinci: remove unused davinci_cfg_reg_list() declaration
  ARM: mach-imx: imx6sx: Remove Ethernet refclock setting
  MAINTAINERS: Add entry for Samsung Exynos850 SoC
  ARM: bcm: Select ARM_GIC_V3 for ARCH_BRCMSTB
  ARM: omap2: Switch to use kmemdup_array()
  ARM: omap1: Remove unused struct 'dma_link_info'
  ARM: s3c: Drop explicit initialization of struct i2c_device_id::driver_data to 0

3 days agoMerge tag 'soc-defconfig-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
Linus Torvalds [Tue, 17 Sep 2024 08:53:21 +0000 (10:53 +0200)]
Merge tag 'soc-defconfig-6.12' of git://git./linux/kernel/git/soc/soc

Pull SoC defconfig updates from Arnd Bergmann:
 "The updates to the defconfig files are fairly small, enabling drivers
  for eight of the arm and riscv based platforms"

* tag 'soc-defconfig-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
  arm64: defconfig: enable mt8365 sound
  riscv: defconfig: Enable pinctrl support for CV18XX Series SoC
  arm64: defconfig: Enable ADP5585 GPIO and PWM drivers
  arm64: defconfig: Enable Tegra194 PCIe Endpoint
  arm64: defconfig: Enable E5010 JPEG Encoder
  riscv: defconfig: sophgo: enable clks for sg2042
  arm64: defconfig: build CONFIG_REGULATOR_QCOM_REFGEN as module
  ARM: configs: at91: enable config flags for sam9x7 SoC family
  arm64: defconfig: Enable R-Car Ethernet-TSN support
  ARM: shmobile: defconfig: Enable slab hardening and kmalloc buckets
  arm64: defconfig: Enable AK4619 codec support

3 days agoMerge tag 'soc-drivers-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
Linus Torvalds [Tue, 17 Sep 2024 08:48:09 +0000 (10:48 +0200)]
Merge tag 'soc-drivers-6.12' of git://git./linux/kernel/git/soc/soc

Pull SoC driver updates from Arnd Bergmann:
 "The driver updates seem larger this time around, with changes is many
  of the SoC specific drivers, both the custom drivers/soc ones and the
  closely related subsystems (memory, bus, firmware, reset, ...).

  The at91 platform gains support for sam9x7 chips in the soc and power
  management code. This is the latest variant of one of the oldest still
  supported SoC families, using the ARM9 (ARMv5) core.

  As usual, the qualcomm snapdragon platform gets a ton of updates in
  many of their drivers to add more features and additional SoC support.
  Most of these are somewhat firmware related as the platform has a
  number of firmware based interfaces to the kernel. A notable addition
  here is the inclusion of trace events to two of these drivers.

  Herve Codina and Christophe Leroy are now sending updates for
  drivers/soc/fsl/ code through the SoC tree, this contains both PowerPC
  and Arm specific platforms and has previously been problematic to
  maintain. The first update here contains support for newer PowerPC
  variants and some cleanups.

  The turris mox firmware driver has a number of updates, mostly
  cleanups.

  The Arm SCMI firmware driver gets a major rework to modularize the
  existing code into separately loadable drivers for the various
  transports, the addition of custom NXP i.MX9 interfaces and a number
  of smaller updates.

  The Arm FF-A firmware driver gets a feature update to support the v1.2
  version of the specification.

  The reset controller drivers have some smaller cleanups and a newly
  added driver for the Intel/Mobileye EyeQ5/EyeQ6 MIPS SoCs.

  The memory controller drivers get some cleanups and refactoring for
  Tegra, TI, Freescale/NXP and a couple more platforms.

  Finally there are lots of minor updates to firmware (raspberry pi,
  tegra, imx), bus (sunxi, omap, tegra) and soc (rockchips, tegra,
  amlogic, mediatek) drivers and their DT bindings"

* tag 'soc-drivers-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (212 commits)
  firmware: imx: remove duplicate scmi_imx_misc_ctrl_get()
  platform: cznic: turris-omnia-mcu: Fix error check in omnia_mcu_register_trng()
  bus: sunxi-rsb: Simplify code with dev_err_probe()
  soc: fsl: qe: ucc: Export ucc_mux_set_grant_tsa_bkpt
  soc: fsl: cpm1: qmc: Fix dependency on fsl_soc.h
  dt-bindings: arm: rockchip: Add rk3576 compatible string to pmu.yaml
  soc: fsl: qbman: Remove redundant warnings
  soc: fsl: qbman: Use iommu_paging_domain_alloc()
  MAINTAINERS: Add QE files related to the Freescale QMC controller
  soc: fsl: cpm1: qmc: Handle QUICC Engine (QE) soft-qmc firmware
  soc: fsl: cpm1: qmc: Add support for QUICC Engine (QE) implementation
  soc: fsl: qe: Add missing PUSHSCHED command
  soc: fsl: qe: Add resource-managed muram allocators
  soc: fsl: cpm1: qmc: Introduce qmc_version
  soc: fsl: cpm1: qmc: Rename SCC_GSMRL_MODE_QMC
  soc: fsl: cpm1: qmc: Handle RPACK initialization
  soc: fsl: cpm1: qmc: Rename qmc_chan_command()
  soc: fsl: cpm1: qmc: Introduce qmc_{init,exit}_xcc() and their CPM1 version
  soc: fsl: cpm1: qmc: Introduce qmc_init_resource() and its CPM1 version
  soc: fsl: cpm1: qmc: Re-order probe() operations
  ...

3 days agoMerge tag 'soc-dt-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
Linus Torvalds [Tue, 17 Sep 2024 08:41:21 +0000 (10:41 +0200)]
Merge tag 'soc-dt-6.12' of git://git./linux/kernel/git/soc/soc

Pull SoC devicetree updates from Arnd Bergmann:
 "New SoC support for Broadcom bcm2712 (Raspberry Pi 5) and Renesas
  R9A09G057 (RZ/V2H(P)) and Qualcomm Snapdragon 414 (MSM8929), all three
  of these are variants of already supported chips, in particular the
  last one is almost identical to MSM8939.

  Lots of updates to Mediatek, ASpeed, Rockchips, Amlogic, Qualcomm,
  STM32, NXP i.MX, Sophgo, TI K3, Renesas, Microchip at91, NVIDIA Tegra,
  and T-HEAD.

  The added Qualcomm platform support once again dominates the changes,
  with seven phones and three laptops getting added in addition to many
  new features on existing machines. The Snapdragon X1E support
  specifically keeps improving.

  The other new machines are:

   - eight new machines using various 64-bit Rockchips SoCs, both on the
     consumer/gaming side and developer boards

   - three industrial boards with 64-bit i.MX, which is a very low
     number for them.

   - four more servers using a 32-bit Speed BMC

   - three boards using STM32MP1 SoCs

   - one new machine each using allwinner, amlogic, broadcom and renesas
     chips"

* tag 'soc-dt-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (672 commits)
  arm64: dts: allwinner: h5: NanoPi NEO Plus2: Use regulators for pio
  arm64: dts: mediatek: add audio support for mt8365-evk
  arm64: dts: mediatek: add afe support for mt8365 SoC
  arm64: dts: mediatek: mt8186-corsola: Disable DPI display interface
  arm64: dts: mediatek: mt8186: Add svs node
  arm64: dts: mediatek: mt8186: Add power domain for DPI
  arm64: dts: mediatek: mt8195: Correct clock order for dp_intf*
  arm64: dts: mt8183: add dpi node to mt8183
  arm64: dts: allwinner: h5: NanoPi Neo Plus2: Fix regulators
  arm64: dts: rockchip: add CAN0 and CAN1 interfaces to mecsbc board
  arm64: dts: rockchip: add CAN-FD controller nodes to rk3568
  arm64: dts: nuvoton: ma35d1: Add uart pinctrl settings
  arm64: dts: nuvoton: ma35d1: Add pinctrl and gpio nodes
  arm64: dts: nuvoton: Add syscon to the system-management node
  ARM: dts: Fix undocumented LM75 compatible nodes
  arm64: dts: toshiba: Fix pl011 and pl022 clocks
  ARM: dts: stm32: Use SAI to generate bit and frame clock on STM32MP15xx DHCOM PDK2
  ARM: dts: stm32: Switch bitclock/frame-master to flag on STM32MP15xx DHCOM PDK2
  ARM: dts: stm32: Sort properties in audio endpoints on STM32MP15xx DHCOM PDK2
  ARM: dts: stm32: Add MECIO1 and MECT1S board variants
  ...

3 days agoMerge tag 'spi-v6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Linus Torvalds [Tue, 17 Sep 2024 08:31:31 +0000 (10:31 +0200)]
Merge tag 'spi-v6.12' of git://git./linux/kernel/git/broonie/spi

Pull spi updates from Mark Brown:
 "This is quite a quiet release for SPI. The one new core feature here
  is support for configuring the state of the MOSI pin when the bus is
  idle, there are some devices which are very fragile in this regard
  even when the chip select signal is not asserted. Otherwise we have
  some new driver support, a bunch of small fixes and some general
  cleanup work.

   - Support for configuring the state of the MOSI pin when the the bus
     is idle

   - Add the Elgin JG0309-01 in spidev

   - Support for Marvell xSPI, Mediatek MTK7981, Microchip PIC64GX, NXP
     i.MX8ULP, and Rockchip RK3576 controllers

  I also accidentally pulled in an IIO DT bindings update due to a typo
  when applying the MOSI idle state patches"

* tag 'spi-v6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (65 commits)
  spi: geni-qcom: Use devm functions to simplify code
  spi: remove spi_controller_is_slave() and spi_slave_abort()
  platform/olpc: olpc-xo175-ec: switch to use spi_target_abort().
  spi: slave-mt27xx: switch to use target_abort
  spi: spidev: switch to use spi_target_abort()
  spi: slave-system-control: switch to use spi_target_abort()
  spi: slave-time: switch to use spi_target_abort()
  spi: switch to use spi_controller_is_target()
  spi: fspi: add support for imx8ulp
  spi: fspi: involve lut_num for struct nxp_fspi_devtype_data
  dt-bindings: spi: nxp-fspi: add imx8ulp support
  spi: spidev_fdx: Fix the wrong format specifier
  spi: mxs: Switch to RUNTIME/SYSTEM_SLEEP_PM_OPS()
  spi: dt-bindings: Add rockchip,rk3576-spi compatible
  spi: Revert "spi: Insert the missing pci_dev_put()before return"
  spi: zynq-qspi: Replace kzalloc with kmalloc for buffer allocation
  spi: ppc4xx: Sort headers
  spi: ppc4xx: Revert "handle irq_of_parse_and_map() errors"
  spi: zynqmp-gqspi: Simplify with dev_err_probe()
  spi: zynqmp-gqspi: Use devm_spi_alloc_host()
  ...

3 days agoMerge tag 'regulator-v6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Linus Torvalds [Tue, 17 Sep 2024 08:26:21 +0000 (10:26 +0200)]
Merge tag 'regulator-v6.12' of git://git./linux/kernel/git/broonie/regulator

Pull regulator updates from Mark Brown:
 "This release is almost all cleanup work of various kinds, while the
  diffstat for the core is quite large this is almost all cleanups and
  documentation improvments with some small fixes rather than any new
  feature work. We do have support for a couple of new devices but these
  are small additions to existing drivers rather than new drivers.

   - Removal of the SM5703 driver which does not have it's dependencies
     available.

   - Support for Allwinner AXP717, and Qualcomm WCN6855.

  The Allwinner support shares some commits with the MFD tree"

* tag 'regulator-v6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (66 commits)
  regulator: sm5703: Remove because it is unused and fails to build
  regulator: Split up _regulator_get()
  regulator: update some comments ([gs]et_voltage_vsel vs [gs]et_voltage_sel)
  regulator: max8973: Use irq_get_trigger_type() helper
  regulator: core: fix the broken behavior of regulator_dev_lookup()
  regulator: max77650: Use container_of and constify static data
  regulator: hi6421v530: Use container_of and constify static data
  regulator: hi6421v530: Drop unused 'eco_microamp'
  regulator: qcom-refgen: Constify static data
  regulator: pfuze100: Constify static data
  regulator: pcap: Constify static data
  regulator: mtk-dvfsrc: Constify static data
  regulator: max77826: Constify static data
  regulator: max77826: Drop unused 'rdesc' in 'struct max77826_regulator_info'
  regulator: tps65023: Constify static data
  regulator: hi6421v600: Constify static data
  regulator: hi6421: Constify static data
  regulator: da9121: Constify static data
  regulator: da9063: Constify static data
  regulator: da9055: Constify static data
  ...

3 days agoMerge tag 'regmap-v6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Linus Torvalds [Tue, 17 Sep 2024 08:18:01 +0000 (10:18 +0200)]
Merge tag 'regmap-v6.12' of git://git./linux/kernel/git/broonie/regmap

Pull regmap updates from Mark Brown:
 "The main update here is Matti's work allowing regmap irqdomains to be
  given custom names (allowing multiple interrupt controllers associatd
  with a single struct device), this pulls in some commits from Thomas'
  tree which it depends on.

  Otherwise there's a bit of work on improving handling of regmaps
  protected with spinlocks when used with complex cache types, fixing
  some valid but harmless lockdep reports seen with some new driver
  work"

* tag 'regmap-v6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
  regmap: kunit: Add coverage of spinlocked regmaps
  regcache: use map->alloc_flags also for allocating cache
  regmap: Use locking during kunit tests
  regmap: Hold the regmap lock when allocating and freeing the cache
  regmap: Allow setting IRQ domain name suffix

3 days agomm/madvise: process_madvise() drop capability check if same mm
Lorenzo Stoakes [Fri, 13 Sep 2024 14:06:28 +0000 (15:06 +0100)]
mm/madvise: process_madvise() drop capability check if same mm

In commit 96cfe2c0fd23 ("mm/madvise: replace ptrace attach requirement for
process_madvise") process_madvise() was updated to require the caller to
possess the CAP_SYS_NICE capability to perform the operation, in addition
to a check against PTRACE_MODE_READ performed by mm_access().

The mm_access() function explicitly checks to see if the address space of
the process being referenced is the current one, in which case no check is
performed.

We, however, do not do this when checking the CAP_SYS_NICE capability. This
means that we insist on the caller possessing this capability in order to
perform madvise() operations on its own address space, which seems
nonsensical.

Simply add a check to allow for an invocation of this function with pidfd
set to the current process without elevation.

Link: https://lkml.kernel.org/r/20240913140628.77047-1-lorenzo.stoakes@oracle.com
Fixes: 96cfe2c0fd23 ("mm/madvise: replace ptrace attach requirement for process_madvise")
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Shakeel Butt <shakeel.butt@linux.dev>
Acked-by: David Rientjes <rientjes@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
3 days agomm/huge_memory: ensure huge_zero_folio won't have large_rmappable flag set
Miaohe Lin [Sat, 14 Sep 2024 01:53:06 +0000 (09:53 +0800)]
mm/huge_memory: ensure huge_zero_folio won't have large_rmappable flag set

Ensure huge_zero_folio won't have large_rmappable flag set.  So it can be
reported as thp,zero correctly through stable_page_flags().

Link: https://lkml.kernel.org/r/20240914015306.3656791-1-linmiaohe@huawei.com
Fixes: 5691753d73a2 ("mm: convert huge_zero_page to huge_zero_folio")
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
3 days agomm/hugetlb.c: fix UAF of vma in hugetlb fault pathway
Vishal Moola (Oracle) [Sat, 14 Sep 2024 19:41:19 +0000 (12:41 -0700)]
mm/hugetlb.c: fix UAF of vma in hugetlb fault pathway

Syzbot reports a UAF in hugetlb_fault().  This happens because
vmf_anon_prepare() could drop the per-VMA lock and allow the current VMA
to be freed before hugetlb_vma_unlock_read() is called.

We can fix this by using a modified version of vmf_anon_prepare() that
doesn't release the VMA lock on failure, and then release it ourselves
after hugetlb_vma_unlock_read().

Link: https://lkml.kernel.org/r/20240914194243.245-2-vishal.moola@gmail.com
Fixes: 9acad7ba3e25 ("hugetlb: use vmf_anon_prepare() instead of anon_vma_prepare()")
Reported-by: syzbot+2dab93857ee95f2eeb08@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/linux-mm/00000000000067c20b06219fbc26@google.com/
Signed-off-by: Vishal Moola (Oracle) <vishal.moola@gmail.com>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
3 days agomm: change vmf_anon_prepare() to __vmf_anon_prepare()
Vishal Moola (Oracle) [Sat, 14 Sep 2024 19:41:18 +0000 (12:41 -0700)]
mm: change vmf_anon_prepare() to __vmf_anon_prepare()

Some callers of vmf_anon_prepare() may not want us to release the per-VMA
lock ourselves.  Rename vmf_anon_prepare() to __vmf_anon_prepare() and let
the callers drop the lock when desired.

Also, make vmf_anon_prepare() a wrapper that releases the per-VMA lock
itself for any callers that don't care.

This is in preparation to fix this bug reported by syzbot:
https://lore.kernel.org/linux-mm/00000000000067c20b06219fbc26@google.com/

Link: https://lkml.kernel.org/r/20240914194243.245-1-vishal.moola@gmail.com
Fixes: 9acad7ba3e25 ("hugetlb: use vmf_anon_prepare() instead of anon_vma_prepare()")
Reported-by: syzbot+2dab93857ee95f2eeb08@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/linux-mm/00000000000067c20b06219fbc26@google.com/
Signed-off-by: Vishal Moola (Oracle) <vishal.moola@gmail.com>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
3 days agoresource: fix region_intersects() vs add_memory_driver_managed()
Huang Ying [Fri, 6 Sep 2024 03:07:11 +0000 (11:07 +0800)]
resource: fix region_intersects() vs add_memory_driver_managed()

On a system with CXL memory, the resource tree (/proc/iomem) related to
CXL memory may look like something as follows.

490000000-50fffffff : CXL Window 0
  490000000-50fffffff : region0
    490000000-50fffffff : dax0.0
      490000000-50fffffff : System RAM (kmem)

Because drivers/dax/kmem.c calls add_memory_driver_managed() during
onlining CXL memory, which makes "System RAM (kmem)" a descendant of "CXL
Window X".  This confuses region_intersects(), which expects all "System
RAM" resources to be at the top level of iomem_resource.  This can lead to
bugs.

For example, when the following command line is executed to write some
memory in CXL memory range via /dev/mem,

 $ dd if=data of=/dev/mem bs=$((1 << 10)) seek=$((0x490000000 >> 10)) count=1
 dd: error writing '/dev/mem': Bad address
 1+0 records in
 0+0 records out
 0 bytes copied, 0.0283507 s, 0.0 kB/s

the command fails as expected.  However, the error code is wrong.  It
should be "Operation not permitted" instead of "Bad address".  More
seriously, the /dev/mem permission checking in devmem_is_allowed() passes
incorrectly.  Although the accessing is prevented later because ioremap()
isn't allowed to map system RAM, it is a potential security issue.  During
command executing, the following warning is reported in the kernel log for
calling ioremap() on system RAM.

 ioremap on RAM at 0x0000000490000000 - 0x0000000490000fff
 WARNING: CPU: 2 PID: 416 at arch/x86/mm/ioremap.c:216 __ioremap_caller.constprop.0+0x131/0x35d
 Call Trace:
  memremap+0xcb/0x184
  xlate_dev_mem_ptr+0x25/0x2f
  write_mem+0x94/0xfb
  vfs_write+0x128/0x26d
  ksys_write+0xac/0xfe
  do_syscall_64+0x9a/0xfd
  entry_SYSCALL_64_after_hwframe+0x4b/0x53

The details of command execution process are as follows.  In the above
resource tree, "System RAM" is a descendant of "CXL Window 0" instead of a
top level resource.  So, region_intersects() will report no System RAM
resources in the CXL memory region incorrectly, because it only checks the
top level resources.  Consequently, devmem_is_allowed() will return 1
(allow access via /dev/mem) for CXL memory region incorrectly.
Fortunately, ioremap() doesn't allow to map System RAM and reject the
access.

So, region_intersects() needs to be fixed to work correctly with the
resource tree with "System RAM" not at top level as above.  To fix it, if
we found a unmatched resource in the top level, we will continue to search
matched resources in its descendant resources.  So, we will not miss any
matched resources in resource tree anymore.

In the new implementation, an example resource tree

|------------- "CXL Window 0" ------------|
|-- "System RAM" --|

will behave similar as the following fake resource tree for
region_intersects(, IORESOURCE_SYSTEM_RAM, ),

|-- "System RAM" --||-- "CXL Window 0a" --|

Where "CXL Window 0a" is part of the original "CXL Window 0" that
isn't covered by "System RAM".

Link: https://lkml.kernel.org/r/20240906030713.204292-2-ying.huang@intel.com
Fixes: c221c0b0308f ("device-dax: "Hotplug" persistent memory for use like normal RAM")
Signed-off-by: "Huang, Ying" <ying.huang@intel.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Jonathan Cameron <jonathan.cameron@huawei.com>
Cc: Dave Jiang <dave.jiang@intel.com>
Cc: Alison Schofield <alison.schofield@intel.com>
Cc: Vishal Verma <vishal.l.verma@intel.com>
Cc: Ira Weiny <ira.weiny@intel.com>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Baoquan He <bhe@redhat.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
3 days agozsmalloc: use unique zsmalloc caches names
Sergey Senozhatsky [Fri, 6 Sep 2024 03:45:44 +0000 (12:45 +0900)]
zsmalloc: use unique zsmalloc caches names

Each zsmalloc pool maintains several named kmem-caches for zs_handle-s and
zspage-s.  On a system with multiple zsmalloc pools and CONFIG_DEBUG_VM
this triggers kmem_cache_sanity_check():

  kmem_cache of name 'zspage' already exists
  WARNING: at mm/slab_common.c:108 do_kmem_cache_create_usercopy+0xb5/0x310
  ...

  kmem_cache of name 'zs_handle' already exists
  WARNING: at mm/slab_common.c:108 do_kmem_cache_create_usercopy+0xb5/0x310
  ...

We provide zram device name when init its zsmalloc pool, so we can use
that same name for zsmalloc caches and, hence, create unique names that
can easily be linked to zram device that has created them.

So instead of having this

cat /proc/slabinfo
slabinfo - version: 2.1
zspage                46     46    ...
zs_handle            128    128    ...
zspage             34270  34270    ...
zs_handle          34816  34816    ...
zspage                 0      0    ...
zs_handle              0      0    ...

We now have this

cat /proc/slabinfo
slabinfo - version: 2.1
zspage-zram2          46     46    ...
zs_handle-zram2      128    128    ...
zspage-zram0       34270  34270    ...
zs_handle-zram0    34816  34816    ...
zspage-zram1           0      0    ...
zs_handle-zram1        0      0    ...

Link: https://lkml.kernel.org/r/20240906035103.2435557-1-senozhatsky@chromium.org
Fixes: 2e40e163a25a ("zsmalloc: decouple handle and object")
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
3 days agoxen/swiotlb: fix allocated size
Juergen Gross [Sun, 15 Sep 2024 11:06:44 +0000 (13:06 +0200)]
xen/swiotlb: fix allocated size

The allocated size in xen_swiotlb_alloc_coherent() and
xen_swiotlb_free_coherent() is calculated wrong for the case of
XEN_PAGE_SIZE not matching PAGE_SIZE. Fix that.

Fixes: 7250f422da04 ("xen-swiotlb: use actually allocated size on check physical continuous")
Reported-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Juergen Gross <jgross@suse.com>
3 days agoxen/swiotlb: add alignment check for dma buffers
Juergen Gross [Fri, 13 Sep 2024 10:05:02 +0000 (12:05 +0200)]
xen/swiotlb: add alignment check for dma buffers

When checking a memory buffer to be consecutive in machine memory,
the alignment needs to be checked, too. Failing to do so might result
in DMA memory not being aligned according to its requested size,
leading to error messages like:

  4xxx 0000:2b:00.0: enabling device (0140 -> 0142)
  4xxx 0000:2b:00.0: Ring address not aligned
  4xxx 0000:2b:00.0: Failed to initialise service qat_crypto
  4xxx 0000:2b:00.0: Resetting device qat_dev0
  4xxx: probe of 0000:2b:00.0 failed with error -14

Fixes: 9435cce87950 ("xen/swiotlb: Add support for 64KB page granularity")
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Juergen Gross <jgross@suse.com>
3 days agoMerge tag 'printk-for-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/printk...
Linus Torvalds [Tue, 17 Sep 2024 06:52:28 +0000 (08:52 +0200)]
Merge tag 'printk-for-6.12' of git://git./linux/kernel/git/printk/linux

Pull printk updates from Petr Mladek:
 "This is the "last" part of the support for the new nbcon consoles.
  Where "nbcon" stays for "No Big console lock CONsoles" aka not under
  the console_lock.

  New callbacks are added to struct console:

   - write_thread() for flushing nbcon consoles in task context.

   - write_atomic() for flushing nbcon consoles in atomic context,
     including NMI.

   - con->device_lock() and device_unlock() for taking the driver
     specific lock, for example, port->lock.

  New printk-specific kthreads are created:

   - per-console kthreads which get responsible for flushing normal
     priority messages on nbcon consoles.

   - thread which gets responsible for flushing normal priority messages
     on all consoles when CONFIG_RT enabled.

  The new callbacks are called under a special per-console lock which
  has already been added back in v6.7. It allows to distinguish three
  severities: normal, emergency, and panic. A context with a higher
  priority could take over the ownership when it is safe even in the
  middle of handling a record. The panic context could do it even when
  it is not safe. But it is allowed only for the final desperate flush
  before entering the infinite loop.

  The new lock helps to flush the messages directly in emergency and
  panic contexts. But it is not enough in all situations:

   - console_lock() is still need for synchronization against boot
     consoles.

   - con->device_lock() is need for synchronization against other
     operations on the same HW, e.g. serial port speed setting,
     non-printk related read/write.

  The dependency on con->device_lock() is mutual. Any code taking the
  driver specific lock has to acquire the related nbcon console context
  as well. For example, see the new uart_port_lock() API. It provides
  the necessary synchronization against emergency and panic contexts
  where the messages are flushed only under the new per-console lock.

  Maybe surprisingly, a quite tricky part is the decision how to flush
  the consoles in various situations. It has to take into account:

   - message priority:    normal, emergency, panic

   - scheduling context:  task, atomic, deferred_legacy

   - registered consoles: boot, legacy, nbcon

   - threads are running: early boot, suspend, shutdown, panic

   - caller:              printk(), pr_flush(), printk_flush_in_panic(),
                          console_unlock(), console_start(), ...

  The primary decision is made in printk_get_console_flush_type(). It
  creates a hint what the caller should do:

   - flush nbcon consoles directly or via the kthread

   - call the legacy loop (console_unlock()) directly or via irq_work

  The existing behavior is preserved for the legacy consoles. The only
  exception is that they are not longer flushed directly from printk()
  in panic() before CPUs are stopped. But this blocking happens only
  when at least one nbcon console is registered. The motivation is to
  increase a chance to produce the crash dump. They legacy consoles
  might create a deadlock in compare with nbcon consoles. The nbcon
  console should allow to see the messages even when the crash dump
  fails.

  There are three possible ways how nbcon consoles are flushed:

   - The per-nbcon-console kthread is responsible for flushing messages
     added with the normal priority. This is the default mode.

   - The legacy loop, aka console_unlock(), is used when there is still
     a boot console registered. There is no easy way how to match an
     early console driver with a nbcon console driver. And the
     console_lock() provides the only reliable serialization at the
     moment.

     The legacy loop uses either con->write_atomic() or
     con->write_thread() callbacks depending on whether it is allowed to
     schedule. The atomic variant has to be used from printk().

   - In other situations, the messages are flushed directly using
     write_atomic() which can be called in any context, including NMI.
     It is primary needed during early boot or shutdown, in emergency
     situations, and panic.

  The emergency priority is used by a code called within
  nbcon_cpu_emergency_enter()/exit(). At the moment, it is used in four
  situations: WARN(), Oops, lockdep, and RCU stall reports.

  Finally, there is no nbcon console at the moment. It means that the
  changes should _not_ modify the existing behavior. The only exception
  is CONFIG_RT which would force offloading the legacy loop, for normal
  priority context, into the dedicated kthread"

* tag 'printk-for-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux: (54 commits)
  printk: Avoid false positive lockdep report for legacy printing
  printk: nbcon: Assign nice -20 for printing threads
  printk: Implement legacy printer kthread for PREEMPT_RT
  tty: sysfs: Add nbcon support for 'active'
  proc: Add nbcon support for /proc/consoles
  proc: consoles: Add notation to c_start/c_stop
  printk: nbcon: Show replay message on takeover
  printk: Provide helper for message prepending
  printk: nbcon: Rely on kthreads for normal operation
  printk: nbcon: Use thread callback if in task context for legacy
  printk: nbcon: Relocate nbcon_atomic_emit_one()
  printk: nbcon: Introduce printer kthreads
  printk: nbcon: Init @nbcon_seq to highest possible
  printk: nbcon: Add context to usable() and emit()
  printk: Flush console on unregister_console()
  printk: Fail pr_flush() if before SYSTEM_SCHEDULING
  printk: nbcon: Add function for printers to reacquire ownership
  printk: nbcon: Use raw_cpu_ptr() instead of open coding
  printk: Use the BITS_PER_LONG macro
  lockdep: Mark emergency sections in lockdep splats
  ...

3 days agoMerge tag 'core-debugobjects-2024-09-16' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Tue, 17 Sep 2024 06:14:00 +0000 (08:14 +0200)]
Merge tag 'core-debugobjects-2024-09-16' of git://git./linux/kernel/git/tip/tip

Pull debugobjects updates from Thomas Gleixner:

 - Use the threshold to check for the pool refill condition and not the
   run time recorded all time low fill value, which is lower than the
   threshold and therefore causes refills to be delayed.

 - KCSAN annotation updates and simplification of the fill_pool() code.

* tag 'core-debugobjects-2024-09-16' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  debugobjects: Remove redundant checks in fill_pool()
  debugobjects: Fix conditions in fill_pool()
  debugobjects: Fix the compilation attributes of some global variables

3 days agoMerge tag 'timers-core-2024-09-16' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 17 Sep 2024 05:25:37 +0000 (07:25 +0200)]
Merge tag 'timers-core-2024-09-16' of git://git./linux/kernel/git/tip/tip

Pull timer updates from Thomas Gleixner:
 "Core:

   - Overhaul of posix-timers in preparation of removing the workaround
     for periodic timers which have signal delivery ignored.

   - Remove the historical extra jiffie in msleep()

     msleep() adds an extra jiffie to the timeout value to ensure
     minimal sleep time. The timer wheel ensures minimal sleep time
     since the large rewrite to a non-cascading wheel, but the extra
     jiffie in msleep() remained unnoticed. Remove it.

   - Make the timer slack handling correct for realtime tasks.

     The procfs interface is inconsistent and does neither reflect
     reality nor conforms to the man page. Show the correct 0 slack for
     real time tasks and enforce it at the core level instead of having
     inconsistent individual checks in various timer setup functions.

   - The usual set of updates and enhancements all over the place.

  Drivers:

   - Allow the ACPI PM timer to be turned off during suspend

   - No new drivers

   - The usual updates and enhancements in various drivers"

* tag 'timers-core-2024-09-16' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (43 commits)
  ntp: Make sure RTC is synchronized when time goes backwards
  treewide: Fix wrong singular form of jiffies in comments
  cpu: Use already existing usleep_range()
  timers: Rename next_expiry_recalc() to be unique
  platform/x86:intel/pmc: Fix comment for the pmc_core_acpi_pm_timer_suspend_resume function
  clocksource/drivers/jcore: Use request_percpu_irq()
  clocksource/drivers/cadence-ttc: Add missing clk_disable_unprepare in ttc_setup_clockevent
  clocksource/drivers/asm9260: Add missing clk_disable_unprepare in asm9260_timer_init
  clocksource/drivers/qcom: Add missing iounmap() on errors in msm_dt_timer_init()
  clocksource/drivers/ingenic: Use devm_clk_get_enabled() helpers
  platform/x86:intel/pmc: Enable the ACPI PM Timer to be turned off when suspended
  clocksource: acpi_pm: Add external callback for suspend/resume
  clocksource/drivers/arm_arch_timer: Using for_each_available_child_of_node_scoped()
  dt-bindings: timer: rockchip: Add rk3576 compatible
  timers: Annotate possible non critical data race of next_expiry
  timers: Remove historical extra jiffie for timeout in msleep()
  hrtimer: Use and report correct timerslack values for realtime tasks
  hrtimer: Annotate hrtimer_cpu_base_.*_expiry() for sparse.
  timers: Add sparse annotation for timer_sync_wait_running().
  signal: Replace BUG_ON()s
  ...

3 days agoMerge tag 'irq-core-2024-09-16' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 17 Sep 2024 05:09:17 +0000 (07:09 +0200)]
Merge tag 'irq-core-2024-09-16' of git://git./linux/kernel/git/tip/tip

Pull irq updates from Thomas Gleixner:
 "Core:

   - Remove a global lock in the affinity setting code

     The lock protects a cpumask for intermediate results and the lock
     causes a bottleneck on simultaneous start of multiple virtual
     machines. Replace the lock and the static cpumask with a per CPU
     cpumask which is nicely serialized by raw spinlock held when
     executing this code.

   - Provide support for giving a suffix to interrupt domain names.

     That's required to support devices with subfunctions so that the
     domain names are distinct even if they originate from the same
     device node.

   - The usual set of cleanups and enhancements all over the place

  Drivers:

   - Support for longarch AVEC interrupt chip

   - Refurbishment of the Armada driver so it can be extended for new
     variants.

   - The usual set of cleanups and enhancements all over the place"

* tag 'irq-core-2024-09-16' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (73 commits)
  genirq: Use cpumask_intersects()
  genirq/cpuhotplug: Use cpumask_intersects()
  irqchip/apple-aic: Only access system registers on SoCs which provide them
  irqchip/apple-aic: Add a new "Global fast IPIs only" feature level
  irqchip/apple-aic: Skip unnecessary enabling of use_fast_ipi
  dt-bindings: apple,aic: Document A7-A11 compatibles
  irqdomain: Use IS_ERR_OR_NULL() in irq_domain_trim_hierarchy()
  genirq/msi: Use kmemdup_array() instead of kmemdup()
  genirq/proc: Change the return value for set affinity permission error
  genirq/proc: Use irq_move_pending() in show_irq_affinity()
  genirq/proc: Correctly set file permissions for affinity control files
  genirq: Get rid of global lock in irq_do_set_affinity()
  genirq: Fix typo in struct comment
  irqchip/loongarch-avec: Add AVEC irqchip support
  irqchip/loongson-pch-msi: Prepare get_pch_msi_handle() for AVECINTC
  irqchip/loongson-eiointc: Rename CPUHP_AP_IRQ_LOONGARCH_STARTING
  LoongArch: Architectural preparation for AVEC irqchip
  LoongArch: Move irqchip function prototypes to irq-loongson.h
  irqchip/loongson-pch-msi: Switch to MSI parent domains
  softirq: Remove unused 'action' parameter from action callback
  ...

3 days agoMerge tag 'timers-clocksource-2024-09-16' of git://git.kernel.org/pub/scm/linux/kerne...
Linus Torvalds [Tue, 17 Sep 2024 05:05:08 +0000 (07:05 +0200)]
Merge tag 'timers-clocksource-2024-09-16' of git://git./linux/kernel/git/tip/tip

Pull clocksource watchdog updates from Thomas Gleixner:

 - Make the uncertainty margin handling more robust to prevent false
   positives

 - Clarify comments

* tag 'timers-clocksource-2024-09-16' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  clocksource: Set cs_watchdog_read() checks based on .uncertainty_margin
  clocksource: Fix comments on WATCHDOG_THRESHOLD & WATCHDOG_MAX_SKEW
  clocksource: Improve comments for watchdog skew bounds

3 days agoMerge tag 'smp-core-2024-09-16' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 17 Sep 2024 04:56:31 +0000 (06:56 +0200)]
Merge tag 'smp-core-2024-09-16' of git://git./linux/kernel/git/tip/tip

Pull CPU hotplug updates from Thomas Gleixner:

 - Prepare the core for supporting parallel hotplug on loongarch

 - A small set of cleanups and enhancements

* tag 'smp-core-2024-09-16' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  smp: Mark smp_prepare_boot_cpu() __init
  cpu: Fix W=1 build kernel-doc warning
  cpu/hotplug: Provide weak fallback for arch_cpuhp_init_parallel_bringup()
  cpu/hotplug: Make HOTPLUG_PARALLEL independent of HOTPLUG_SMT

3 days agoMerge tag 'drm-xe-next-fixes-2024-09-12' of https://gitlab.freedesktop.org/drm/xe...
Dave Airlie [Tue, 17 Sep 2024 04:53:29 +0000 (14:53 +1000)]
Merge tag 'drm-xe-next-fixes-2024-09-12' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next

Driver Changes:
- Fix usefafter-free when provisioning VF (Matthew Auld)
- Suppress rpm warning on false positive (Rodrigo)
- Fix memleak on ioctl error path (Dafna)
- Fix use-after-free while inserting ggtt (Michal Wajdeczko)
- Add Wa_15016589081 workaround (Tejas)
- Fix error path on suspend (Maarten)

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/az6xs2z6zj3brq2h5wgaaoxwnqktrwbvxoyckrz7gbywsso734@a6v7gytqbcd6
3 days agosmb: client: fix compression heuristic functions
Enzo Matsumiya [Mon, 16 Sep 2024 16:30:49 +0000 (13:30 -0300)]
smb: client: fix compression heuristic functions

Change is_compressible() return type to bool, use WARN_ON_ONCE(1) for
internal errors and return false for those.

Renames:
check_repeated_data -> has_repeated_data
check_ascii_bytes -> is_mostly_ascii (also refactor into a single loop)
calc_shannon_entropy -> has_low_entropy

Also wraps "wreq->Length" in le32_to_cpu() in should_compress() (caught
by sparse).

Signed-off-by: Enzo Matsumiya <ematsumiya@suse.de>
Suggested-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
3 days agocifs: Update SFU comments about fifos and sockets
Pali Rohár [Sun, 15 Sep 2024 19:45:45 +0000 (21:45 +0200)]
cifs: Update SFU comments about fifos and sockets

In SFU mode, activated by -o sfu mount option is now also support for
creating new fifos and sockets.

Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
3 days agocifs: Add support for creating SFU symlinks
Pali Rohár [Sun, 15 Sep 2024 19:45:42 +0000 (21:45 +0200)]
cifs: Add support for creating SFU symlinks

Linux cifs client can already detect SFU symlinks and reads it content
(target location). But currently is not able to create new symlink. So
implement this missing support.

When 'sfu' mount option is specified and 'mfsymlinks' is not specified then
create new symlinks in SFU-style. This will provide full SFU compatibility
of symlinks when mounting cifs share with 'sfu' option. 'mfsymlinks' option
override SFU for better Apple compatibility as explained in fs_context.c
file in smb3_update_mnt_flags() function.

Extend __cifs_sfu_make_node() function, which now can handle also S_IFLNK
type and refactor structures passed to sync_write() in this function, by
splitting SFU type and SFU data from original combined struct win_dev as
combined fixed-length struct cannot be used for variable-length symlinks.

Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
4 days agoparisc: Allow mmap(MAP_STACK) memory to automatically expand upwards
Helge Deller [Sun, 8 Sep 2024 18:51:17 +0000 (20:51 +0200)]
parisc: Allow mmap(MAP_STACK) memory to automatically expand upwards

When userspace allocates memory with mmap() in order to be used for stack,
allow this memory region to automatically expand upwards up until the
current maximum process stack size.
The fault handler checks if the VM_GROWSUP bit is set in the vm_flags field
of a memory area before it allows it to expand.
This patch modifies the parisc specific code only.
A RFC for a generic patch to modify mmap() for all architectures was sent
to the mailing list but did not get enough Acks.

Reported-by: Camm Maguire <camm@maguirefamily.org>
Signed-off-by: Helge Deller <deller@gmx.de>
Cc: stable@vger.kernel.org # v5.10+