Commit graph

648 commits

Author SHA1 Message Date
Linus Torvalds
0cdee263bc [GIT PULL for v6.17] media updates
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE+QmuaPwR3wnBdVwACF8+vY7k4RUFAmiLgnwACgkQCF8+vY7k
 4RULug/9Hro6lyA8ZtKjPd0nAhML5XC4Cdds4CUE8C0jkdUs5UEXdZMkvq+FA8iT
 O0lMZpo3ssCyqTEPCUyDxu9X9Z+meGCzFg2imPWMgcGRGtkNH+WxBfWBECrWJIbA
 jnBgvYM+EDP+GRacW4yLVK/O4l9+8E1mDhYdouf7T3uy1leEM6GFGjZTtYkEM74+
 7mJh+4+fXfRrBvoZZ2HYQa8OCn18zs7YYpVdTBHBncd6qvhRm7/g3xHhkpyh/iR4
 M2BEM1FEeVPj7SGKR4ojKrltz5EYAhtdI5p9hJ/SCCXyk9H55jpdSfwEMw1UaHdm
 HdC5G4Cen4aI7aVHU9CdwW2fRsLfU1b7Lhb8IMGaBGvUoJlg94q5qNt9KS2SFnpk
 U/IwoMOxQVDNIGjr/cZ81QHLnjR2Tcb1RQ4vJKDxLu2flCNO8pDG8TGEbcSq0UKb
 TFEsmykP5s6LEMCKO3htpq4lx+MTCF/pUS99TkgM//WOFcuM505scIbBio1tutpk
 CXVn5KoT5ecNgt3xSGaWN6KtBWr12mnuY5oqVBRfoFKrAvl0xbexbToBvE3uSCWc
 tcUJ+3bMlZZvZsYdF2HvHQTXfx4glrWAP9tfusjstvKie+z8JfixVktNGSLCMU+4
 qvidvLM99t/9bw+Bt0O4BbvryRnGi2+RA1Afo6zGRnRpxYMkagY=
 =oX7n
 -----END PGP SIGNATURE-----

Merge tag 'media/v6.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media updates from Mauro Carvalho Chehab:

 - v4l2 core:
     - sub-device framework routing improvements
     - NV12M tiled variants added to v4l2_format_info
     - some fixes at control handler freeing logic
     - fixed H264 SEPARATE_COLOUR_PLANE check

 - new staging driver: Intel IPU7 PCI

 - Rockchip video decoder driver got promoted from staging

 - iris: added HEVC/VP9 encoder/decoder support

 - vsp1: driver has gained Renesas VSPX support

 - uvc:
     - switched to vb2 ioctl helpers
     - added MSXU 1.5 metadata support

 - atomisp: GC0310 sensor driver cleanups in preparation for moving it
   out of staging

 - Lots of cleanup, fixes and improvements

* tag 'media/v6.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (310 commits)
  media: rkvdec: Unstage the driver
  media: rkvdec: Remove TODO file
  media: dt-bindings: rockchip: Add RK3576 Video Decoder bindings
  media: dt-bindings: rockchip: Document RK3588 Video Decoder bindings
  media: amphion: Support dmabuf and v4l2 buffer without binding
  media: verisilicon: postproc: 4K support
  media: v4l2: Add support for NV12M tiled variants to v4l2_format_info()
  media: uvcvideo: Use a count variable for meta_formats instead of 0 terminating
  media: uvcvideo: Auto-set UVC_QUIRK_MSXU_META
  media: uvcvideo: Introduce V4L2_META_FMT_UVC_MSXU_1_5
  media: uvcvideo: Introduce dev->meta_formats
  media: Documentation: Add note about UVCH length field
  media: uvcvideo: Do not mark valid metadata as invalid
  media: uvcvideo: uvc_v4l2_unlocked_ioctl: Invert PM logic
  media: core: export v4l2_translate_cmd
  media: uvcvideo: Turn on the camera if V4L2_EVENT_SUB_FL_SEND_INITIAL
  media: uvcvideo: Remove stream->is_streaming field
  media: uvcvideo: Split uvc_stop_streaming()
  media: uvcvideo: Handle locks in uvc_queue_return_buffers
  media: uvcvideo: Use vb2 ioctl and fop helpers
  ...
2025-07-31 13:16:09 -07:00
Linus Torvalds
22c5696e3f Driver core changes for 6.17-rc1
- DEBUGFS
 
   - Remove unneeded debugfs_file_{get,put}() instances
 
   - Remove last remnants of debugfs_real_fops()
 
   - Allow storing non-const void * in struct debugfs_inode_info::aux
 
 - SYSFS
 
   - Switch back to attribute_group::bin_attrs (treewide)
 
   - Switch back to bin_attribute::read()/write() (treewide)
 
   - Constify internal references to 'struct bin_attribute'
 
 - Support cache-ids for device-tree systems
 
   - Add arch hook arch_compact_of_hwid()
 
   - Use arch_compact_of_hwid() to compact MPIDR values on arm64
 
 - Rust
 
   - Device
 
     - Introduce CoreInternal device context (for bus internal methods)
 
     - Provide generic drvdata accessors for bus devices
 
     - Provide Driver::unbind() callbacks
 
     - Use the infrastructure above for auxiliary, PCI and platform
 
     - Implement Device::as_bound()
 
     - Rename Device::as_ref() to Device::from_raw() (treewide)
 
     - Implement fwnode and device property abstractions
 
       - Implement example usage in the Rust platform sample driver
 
   - Devres
 
     - Remove the inner reference count (Arc) and use pin-init instead
 
     - Replace Devres::new_foreign_owned() with devres::register()
 
     - Require T to be Send in Devres<T>
 
     - Initialize the data kept inside a Devres last
 
     - Provide an accessor for the Devres associated Device
 
   - Device ID
 
     - Add support for ACPI device IDs and driver match tables
 
     - Split up generic device ID infrastructure
 
     - Use generic device ID infrastructure in net::phy
 
   - DMA
 
     - Implement the dma::Device trait
 
     - Add DMA mask accessors to dma::Device
 
     - Implement dma::Device for PCI and platform devices
 
     - Use DMA masks from the DMA sample module
 
   - I/O
 
     - Implement abstraction for resource regions (struct resource)
 
     - Implement resource-based ioremap() abstractions
 
     - Provide platform device accessors for I/O (remap) requests
 
   - Misc
 
     - Support fallible PinInit types in Revocable
 
     - Implement Wrapper<T> for Opaque<T>
 
     - Merge pin-init blanket dependencies (for Devres)
 
 - Misc
 
   - Fix OF node leak in auxiliary_device_create()
 
   - Use util macros in device property iterators
 
   - Improve kobject sample code
 
   - Add device_link_test() for testing device link flags
 
   - Fix typo in Documentation/ABI/testing/sysfs-kernel-address_bits
 
   - Hint to prefer container_of_const() over container_of()
 -----BEGIN PGP SIGNATURE-----
 
 iHQEABYKAB0WIQS2q/xV6QjXAdC7k+1FlHeO1qrKLgUCaIjkhwAKCRBFlHeO1qrK
 LpXuAP9RWwfD9ZGgQZ9OsMk/0pZ2mDclaK97jcmI9TAeSxeZMgD1FHnOMTY7oSIi
 iG7Muq0yLD+A5gk9HUnMUnFNrngWCg==
 =jgRj
 -----END PGP SIGNATURE-----

Merge tag 'driver-core-6.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core

Pull driver core updates from Danilo Krummrich:
 "debugfs:
   - Remove unneeded debugfs_file_{get,put}() instances
   - Remove last remnants of debugfs_real_fops()
   - Allow storing non-const void * in struct debugfs_inode_info::aux

  sysfs:
   - Switch back to attribute_group::bin_attrs (treewide)
   - Switch back to bin_attribute::read()/write() (treewide)
   - Constify internal references to 'struct bin_attribute'

  Support cache-ids for device-tree systems:
   - Add arch hook arch_compact_of_hwid()
   - Use arch_compact_of_hwid() to compact MPIDR values on arm64

  Rust:
   - Device:
       - Introduce CoreInternal device context (for bus internal methods)
       - Provide generic drvdata accessors for bus devices
       - Provide Driver::unbind() callbacks
       - Use the infrastructure above for auxiliary, PCI and platform
       - Implement Device::as_bound()
       - Rename Device::as_ref() to Device::from_raw() (treewide)
       - Implement fwnode and device property abstractions
       - Implement example usage in the Rust platform sample driver
   - Devres:
       - Remove the inner reference count (Arc) and use pin-init instead
       - Replace Devres::new_foreign_owned() with devres::register()
       - Require T to be Send in Devres<T>
       - Initialize the data kept inside a Devres last
       - Provide an accessor for the Devres associated Device
   - Device ID:
       - Add support for ACPI device IDs and driver match tables
       - Split up generic device ID infrastructure
       - Use generic device ID infrastructure in net::phy
   - DMA:
       - Implement the dma::Device trait
       - Add DMA mask accessors to dma::Device
       - Implement dma::Device for PCI and platform devices
       - Use DMA masks from the DMA sample module
   - I/O:
       - Implement abstraction for resource regions (struct resource)
       - Implement resource-based ioremap() abstractions
       - Provide platform device accessors for I/O (remap) requests
   - Misc:
       - Support fallible PinInit types in Revocable
       - Implement Wrapper<T> for Opaque<T>
       - Merge pin-init blanket dependencies (for Devres)

  Misc:
   - Fix OF node leak in auxiliary_device_create()
   - Use util macros in device property iterators
   - Improve kobject sample code
   - Add device_link_test() for testing device link flags
   - Fix typo in Documentation/ABI/testing/sysfs-kernel-address_bits
   - Hint to prefer container_of_const() over container_of()"

* tag 'driver-core-6.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core: (84 commits)
  rust: io: fix broken intra-doc links to `platform::Device`
  rust: io: fix broken intra-doc link to missing `flags` module
  rust: io: mem: enable IoRequest doc-tests
  rust: platform: add resource accessors
  rust: io: mem: add a generic iomem abstraction
  rust: io: add resource abstraction
  rust: samples: dma: set DMA mask
  rust: platform: implement the `dma::Device` trait
  rust: pci: implement the `dma::Device` trait
  rust: dma: add DMA addressing capabilities
  rust: dma: implement `dma::Device` trait
  rust: net::phy Change module_phy_driver macro to use module_device_table macro
  rust: net::phy represent DeviceId as transparent wrapper over mdio_device_id
  rust: device_id: split out index support into a separate trait
  device: rust: rename Device::as_ref() to Device::from_raw()
  arm64: cacheinfo: Provide helper to compress MPIDR value into u32
  cacheinfo: Add arch hook to compress CPU h/w id into 32 bits for cache-id
  cacheinfo: Set cache 'id' based on DT data
  container_of: Document container_of() is not to be used in new code
  driver core: auxiliary bus: fix OF node leak
  ...
2025-07-29 12:15:39 -07:00
Michael J. Ruhl
2c402a801c
platform/x86/intel/pmt: support BMG crashlog
The Battlemage GPU has the type 1 version 2 crashlog feature.

Update the crashlog driver to support this crashlog version.

Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Link: https://lore.kernel.org/r/20250713172943.7335-14-michael.j.ruhl@intel.com
[ij: make crashlog_type1_ver2 static]
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-22 17:39:13 +03:00
Michael J. Ruhl
5623fa6859
platform/x86/intel/pmt: use a version struct
In preparation for supporting multiple crashlog versions, use a struct
to keep bit offset info for the status and control bits.

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Link: https://lore.kernel.org/r/20250713172943.7335-13-michael.j.ruhl@intel.com
[ij: move crashlog_type1_ver0 to its final place & add consts to crashlog_info]
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-22 17:39:10 +03:00
Michael J. Ruhl
66df9fa783
platform/x86/intel/pmt: refactor base parameter
To support an upcoming crashlog change, use the parent of
struct intel_pmt_entry, struct crashlog_entry, as a main parameter.

Using struct crashlog_entry will allow for a more flexible interface
to control the crashlog feature.

- Refactor to use struct crashlog_entry in place of
  struct intel_pmt_entry
- Rename variables from "entry" to "crashlog"

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Link: https://lore.kernel.org/r/20250713172943.7335-12-michael.j.ruhl@intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-22 17:39:08 +03:00
Michael J. Ruhl
f57b32cb4a
platform/x86/intel/pmt: add register access helpers
The control register is used in a read/modify/write pattern.
The status register is used in a read/check bit pattern.

Add helpers to eliminate common code.

Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Link: https://lore.kernel.org/r/20250713172943.7335-11-michael.j.ruhl@intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-22 17:39:06 +03:00
Michael J. Ruhl
8ab4f88d46
platform/x86/intel/pmt: decouple sysfs and namespace
The PMT namespace includes the crashlog sysfs attribute information.
Other crashlog version/types may need different sysfs attributes.
Coupling the attributes with the namespace blocks this usage.

Decouple sysfs attributes from the name space and add them to the
specific entry.

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Link: https://lore.kernel.org/r/20250713172943.7335-10-michael.j.ruhl@intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-22 17:39:03 +03:00
Michael J. Ruhl
5c7bfa1088
platform/x86/intel/pmt: correct types
A couple of local variables do not match the return types of some of
the functions.

Update the mismatched types to match.

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: David E. Box <david.e.box@linux.intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Link: https://lore.kernel.org/r/20250713172943.7335-9-michael.j.ruhl@intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-22 17:39:01 +03:00
Michael J. Ruhl
147c18d8ef
platform/x86/intel/pmt: re-order trigger logic
Setting the clear bit or checking the complete bit before checking to
see if crashlog is disabled seems incorrect.

Check disable before accessing any other bits.

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: David E. Box <david.e.box@linux.intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Link: https://lore.kernel.org/r/20250713172943.7335-8-michael.j.ruhl@intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-22 17:38:58 +03:00
Michael J. Ruhl
4f8fa22d10
platform/x86/intel/pmt: use guard(mutex)
Update the mutex paths to use the new guard() mechanism.

With the removal of goto, do some minor cleanup of the current logic
path.

Reviewed-by: David E. Box <david.e.box@linux.intel.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Link: https://lore.kernel.org/r/20250713172943.7335-7-michael.j.ruhl@intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-22 17:38:56 +03:00
Michael J. Ruhl
75a496aa05
platform/x86/intel/pmt: mutex clean up
The header file for mutex usage and mutex_destroy() cleanup code is
absent from the crashlog.c module.

Add the header file and mutex_destroy().

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Link: https://lore.kernel.org/r/20250713172943.7335-6-michael.j.ruhl@intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-22 17:38:54 +03:00
Michael J. Ruhl
ba22fe0cff
platform/x86/intel/pmt: white space cleanup
Noticed two white space issues; cleaned them.

Reviewed-by: David E. Box <david.e.box@linux.intel.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Link: https://lore.kernel.org/r/20250713172943.7335-5-michael.j.ruhl@intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-22 17:38:51 +03:00
Michael J. Ruhl
54d5cd4719
platform/x86/intel/pmt: fix a crashlog NULL pointer access
Usage of the intel_pmt_read() for binary sysfs, requires a pcidev. The
current use of the endpoint value is only valid for telemetry endpoint
usage.

Without the ep, the crashlog usage causes the following NULL pointer
exception:

BUG: kernel NULL pointer dereference, address: 0000000000000000
Oops: Oops: 0000 [#1] SMP NOPTI
RIP: 0010:intel_pmt_read+0x3b/0x70 [pmt_class]
Code:
Call Trace:
 <TASK>
 ? sysfs_kf_bin_read+0xc0/0xe0
 kernfs_fop_read_iter+0xac/0x1a0
 vfs_read+0x26d/0x350
 ksys_read+0x6b/0xe0
 __x64_sys_read+0x1d/0x30
 x64_sys_call+0x1bc8/0x1d70
 do_syscall_64+0x6d/0x110

Augment struct intel_pmt_entry with a pointer to the pcidev to avoid
the NULL pointer exception.

Fixes: 045a513040 ("platform/x86/intel/pmt: Use PMT callbacks")
Cc: stable@vger.kernel.org
Reviewed-by: David E. Box <david.e.box@linux.intel.com>
Reviewed-by: Tejas Upadhyay <tejas.upadhyay@intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Link: https://lore.kernel.org/r/20250713172943.7335-2-michael.j.ruhl@intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-22 17:38:44 +03:00
Arnd Bergmann
5a9fffd8a5
platform/x86/intel/pmt: fix build dependency for kunit test
When INTEL_PMT_TELEMETRY is in a loadable module, the discovery
test cannot be built-in:

x86_64-linux-ld: drivers/platform/x86/intel/pmt/discovery-kunit.o: in function `test_intel_pmt_get_regions_by_feature':
discovery-kunit.c:(.text+0x29d): undefined reference to `intel_pmt_get_regions_by_feature'
x86_64-linux-ld: discovery-kunit.c:(.text+0x2c3): undefined reference to `intel_pmt_put_feature_group'

Add a Kconfig dependency to prevent this.

Fixes: b9707d46a9 ("platform/x86/intel/pmt: KUNIT test for PMT Enhanced Discovery API")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20250714081559.4056777-1-arnd@kernel.org
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-21 16:59:23 +03:00
Arnd Bergmann
6382c27389
platform/x86/intel/pmt/discovery: fix format string warning
When -Wformat-security is enabled, this new code triggers it:

drivers/platform/x86/intel/pmt/discovery.c: In function 'pmt_features_discovery':
drivers/platform/x86/intel/pmt/discovery.c:505:36: error: format not a string literal and no format arguments [-Werror=format-security]
  505 |                                    pmt_feature_names[feature->id]);

Fixes: d9a0788093 ("platform/x86/intel/pmt: Add PMT Discovery driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20250711072718.2748415-1-arnd@kernel.org
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-11 18:00:48 +03:00
Nathan Chancellor
428f6f3a56
platform/x86/intel/pmt/discovery: Fix size_t specifiers for 32-bit
When building i386 allmodconfig, there are two warnings in the newly
added discovery code:

  drivers/platform/x86/intel/pmt/discovery.c: In function 'pmt_feature_get_feature_table':
  drivers/platform/x86/intel/pmt/discovery.c:427:35: error: format '%ld' expects argument of type 'long int', but argument 2 has type 'size_t' {aka 'unsigned int'} [-Werror=format=]
    427 |         if (WARN(size > res_size, "Bad table size %ld > %pa", size, &res_size))
        |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~
        |                                                               |
        |                                                               size_t {aka unsigned int}
  ...
  drivers/platform/x86/intel/pmt/discovery.c:427:53: note: format string is defined here
    427 |         if (WARN(size > res_size, "Bad table size %ld > %pa", size, &res_size))
        |                                                   ~~^
        |                                                     |
        |                                                     long int
        |                                                   %d

  drivers/platform/x86/intel/pmt/discovery-kunit.c: In function 'validate_pmt_regions':
  include/linux/kern_levels.h:5:25: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Werror=format=]
  ...
  drivers/platform/x86/intel/pmt/discovery-kunit.c:35:17: note: in expansion of macro 'kunit_info'
     35 |                 kunit_info(test, "\t\taddr=%p, size=%lu, num_rmids=%u", region->addr, region->size,
        |                 ^~~~~~~~~~

size_t is 'unsigned long' for 64-bit platforms but 'unsigned int' for
32-bit platforms, so '%ld' is not correct. Use the proper size_t
specifier, '%zu', to resolve the warnings on 32-bit platforms while not
affecting 64-bit platforms.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernelci.org bot <bot@kernelci.org>
Fixes: d9a0788093 ("platform/x86/intel/pmt: Add PMT Discovery driver")
Fixes: b9707d46a9 ("platform/x86/intel/pmt: KUNIT test for PMT Enhanced Discovery API")
Closes: https://lore.kernel.org/all/CACo-S-29Degjym-azsJNSd1yofLOB2_Rf5xpa9b7L-14OPn7wQ@mail.gmail.com/
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20250708-discovery-pmt-fix-32-bit-formats-v1-1-296a5fc9c3d4@kernel.org
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-09 11:32:37 +03:00
David E. Box
b9707d46a9
platform/x86/intel/pmt: KUNIT test for PMT Enhanced Discovery API
Adds a KUNIT test for the intel_pmt_get_regions_by_feature() API.

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Link: https://lore.kernel.org/r/20250703022832.1302928-16-david.e.box@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-03 11:09:44 +03:00
David E. Box
42dabe5442
platform/x86/intel/pmt/telemetry: Add API to retrieve telemetry regions by feature
Introduce a new API, intel_pmt_get_regions_by_feature(), that gathers
telemetry regions based on a provided capability flag. This API enables
retrieval of regions with various capabilities (for example, RMID-based
telemetry) and provides a unified interface for accessing them. Resource
management is handled via reference counting using
intel_pmt_put_feature_group().

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Link: https://lore.kernel.org/r/20250703022832.1302928-15-david.e.box@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-03 11:09:43 +03:00
David E. Box
86fc85c75b
platform/x86/intel/pmt/discovery: Get telemetry attributes
Add intel_pmt_get_features() in PMT Discovery to enable the PMT Telemetry
driver to obtain attributes of the aggregated telemetry spaces it
enumerates. The function gathers feature flags and associated data (like
the number of RMIDs) from each PMT entry, laying the groundwork for a
future kernel interface that will allow direct access to telemetry regions
based on their capabilities.

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Link: https://lore.kernel.org/r/20250703022832.1302928-14-david.e.box@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-03 11:09:40 +03:00
David E. Box
c969905752
platform/x86/intel/tpmi: Get OOBMSM CPU mapping from TPMI
Copy TPMI’s OOBMSM platform info into a common area within VSEC private
data via intel_vsec_set_mapping(). This enables other Intel VSEC features
to access the CPU mapping without additional queries.

Additionally, designate the TPMI driver as a supplier for the Telemetry
driver, ensuring it can obtain the necessary platform information for
future feature extensions.

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Link: https://lore.kernel.org/r/20250703022832.1302928-13-david.e.box@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-03 11:09:38 +03:00
David E. Box
a885a27809
platform/x86/intel/vsec: Set OOBMSM to CPU mapping
Add functions, intel_vsec_set/get_mapping(), to set and retrieve the
OOBMSM-to-CPU mapping data in the private data of the parent Intel VSEC
driver. With this mapping information available, other Intel VSEC features
on the same OOBMSM device can easily access and use the mapping data,
allowing each of the OOBMSM features to map to the CPUs they provides data
for.

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Link: https://lore.kernel.org/r/20250703022832.1302928-12-david.e.box@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-03 11:09:36 +03:00
David E. Box
934954df0f
platform/x86/intel/tpmi: Relocate platform info to intel_vsec.h
The TPMI platform information provides a mapping of OOBMSM PCI devices to
logical CPUs. Since this mapping is consistent across all OOBMSM features
(e.g., TPMI, PMT, SDSi), it can be leveraged by multiple drivers. To
facilitate reuse, relocate the struct intel_tpmi_plat_info to intel_vsec.h,
renaming it to struct oobmsm_plat_info, making it accessible to other
features. While modifying headers, place them in alphabetical order.

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20250703022832.1302928-11-david.e.box@linux.intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-03 11:09:35 +03:00
David E. Box
d9a0788093
platform/x86/intel/pmt: Add PMT Discovery driver
This patch introduces a new driver to enumerate and expose Intel Platform
Monitoring Technology (PMT) capabilities via a simple discovery mechanism.
The PMT Discovery driver parses hardware-provided discovery tables from
Intel Out of Band Management Services Modules (OOBMSM) and extracts feature
information for various providers (such as TPMI, Telemetry, Crash Log,
etc). This unified interface simplifies the process of determining which
manageability and telemetry features are supported by a given platform.

This new feature is described in the Intel Platform Monitoring Technology
3.0 specification, section 6.6 Capability.

Key changes and additions:

New file drivers/platform/x86/intel/pmt/discovery.c:
  – Implements the discovery logic to map the discovery resource, read
    the feature discovery table, and validate feature parameters.
New file drivers/platform/x86/intel/pmt/features.c:
  – Defines feature names, layouts, and associated capability masks.
  – Provides a mapping between raw hardware attributes and sysfs
    representations for easier integration with user-space tools.
New header include/linux/intel_pmt_features.h:
  – Declares constants, masks, and feature identifiers used across the
    PMT framework.
Sysfs integration:
  – Feature attributes are exposed under /sys/class/intel_pmt.
  – Each device is represented by a subfolder within the intel_pmt class,
    named using its DBDF (Domain:Bus:Device.Function), e.g.:
        features-0000:00:03.1
  – Example directory layout for a device:

    /sys/class/intel_pmt/features-0000:00:03.1/
    ├── accelerator_telemetry
    ├── crash_log
    ├── per_core_environment_telemetry
    ├── per_core_performance_telemetry
    ├── per_rmid_energy_telemetry
    ├── per_rmid_perf_telemetry
    ├── tpmi_control
    ├── tracing
    └── uncore_telemetry

By exposing PMT feature details through sysfs and integrating with the
existing PMT class, this driver paves the way for more streamlined
integration of PMT-based manageability and telemetry tools.

Link: https://www.intel.com/content/www/us/en/content-details/710389/intel-platform-monitoring-technology-intel-pmt-external-specification.html
Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Link: https://lore.kernel.org/r/20250703022832.1302928-9-david.e.box@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-03 11:09:32 +03:00
David E. Box
10f32796e8
platform/x86/intel/vsec: Add new Discovery feature
Add the PCIe VSEC ID for new Intel Platform Monitoring Technology
Capability Discovery feature. Discovery provides detailed information for
the various Intel VSEC features. Also make the driver a supplier for
TPMI and Telemetry drivers which will use the information.

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Link: https://lore.kernel.org/r/20250703022832.1302928-8-david.e.box@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-03 11:09:30 +03:00
David E. Box
e4436e9867
platform/x86/intel/vsec: Skip driverless features
If a feature lacks a corresponding driver and that feature is also a
supplier, registering it would be prevent the consumer driver from probing.
Introduces logic to skip such features during device registration.

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Link: https://lore.kernel.org/r/20250703022832.1302928-7-david.e.box@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-03 11:09:28 +03:00
David E. Box
1f3855ea7d
platform/x86/intel/vsec: Skip absent features during initialization
Some VSEC features depend on the presence of supplier features that may not
always be present. To prevent unnecessary retries and device linking during
initialization, introduce logic to skip attempts to link consumers to
missing suppliers.

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Link: https://lore.kernel.org/r/20250703022832.1302928-6-david.e.box@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-03 11:09:26 +03:00
David E. Box
8a67d4b49b
platform/x86/intel/vsec: Add device links to enforce dependencies
New Intel VSEC features will have dependencies on other features, requiring
certain supplier drivers to be probed before their consumers. To enforce
this dependency ordering, introduce device links using device_link_add(),
ensuring that suppliers are fully registered before consumers are probed.

- Add device link tracking by storing supplier devices and tracking their
  state.
- Implement intel_vsec_link_devices() to establish links between suppliers
  and consumers based on feature dependencies.
- Add get_consumer_dependencies() to retrieve supplier-consumer
  relationships.
- Modify feature registration logic:
  * Consumers now check that all required suppliers are registered before
    being initialized.
  * suppliers_ready() verifies that all required supplier devices are
    available.
- Prevent potential null consumer name issue in sysfs:
  - Use dev_set_name() when creating auxiliary devices to ensure a
    unique, non-null consumer name.
- Update intel_vsec_pci_probe() to loop up to the number of possible
  features or when all devices are registered, whichever comes first.
- Introduce VSEC_CAP_UNUSED to prevent sub-features (registered via
  exported APIs) from being mistakenly linked.

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Link: https://lore.kernel.org/r/20250703022832.1302928-5-david.e.box@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-03 11:09:25 +03:00
David E. Box
b0631f8a57
platform/x86/intel/vsec: Create wrapper to walk PCI config space
Combine three PCI config space walkers — intel_vsec_walk_dvsec(),
intel_vsec_walk_vsec(), and intel_vsec_walk_header() — into a new wrapper
function, intel_vsec_feature_walk().  This refactoring simplifies the probe
logic and lays the groundwork for future patches that will loop over these
calls. No functional changes.

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Link: https://lore.kernel.org/r/20250703022832.1302928-4-david.e.box@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-03 11:09:22 +03:00
David E. Box
dc957ab6aa
platform/x86/intel/vsec: Add private data for per-device data
Introduce a new private structure, struct vsec_priv, to hold a pointer to
the platform-specific information. Although the driver didn’t previously
require this per-device data, adding it now lays the groundwork for
upcoming patches that will manage such data. No functional changes.

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Link: https://lore.kernel.org/r/20250703022832.1302928-3-david.e.box@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-07-03 11:09:20 +03:00
Ilpo Järvinen
88e326b331
Merge branch 'fixes' into for-next
Merge fixes back into for-next to be able to take dell_rbu change that
is build on top of fixes material, and to bring lenovo related changes
in sync after the move under lenovo/ subdir in the for-next branch and
diverging changes in the fixes branch.
2025-07-02 13:30:30 +03:00
Srinivas Pandruvada
690be4bc58
platform/x86/intel/hid: Add Wildcat Lake support
Add ACPI ID for Wildcat Lake.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Link: https://lore.kernel.org/r/20250617232913.3314765-1-srinivas.pandruvada@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-06-30 12:14:19 +03:00
Daniel Scally
bca5cfbb69 platform/x86: int3472: Add board data for Dell 7212
The Dell 7212 Rugged Extreme Tablet pairs an OV5670 sensor with the
Intel IPU3 ISP. The sensor is powered by a TPS68470 PMIC, and so we
need some board data to describe how to configure the GPIOs and
regulators to run the sensor.

Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
Acked-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2025-06-30 08:47:41 +02:00
Greg Kroah-Hartman
63dafeb392 Merge 6.16-rc3 into driver-core-next
We need the driver-core fixes that are in 6.16-rc3 into here as well
to build on top of.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-06-23 07:53:36 +02:00
Thomas Weißschuh
fb506e31b3 sysfs: treewide: switch back to attribute_group::bin_attrs
The normal bin_attrs field can now handle const pointers.
This makes the _new variant unnecessary.
Switch all users back.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20250530-sysfs-const-bin_attr-final-v3-4-724bfcf05b99@weissschuh.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-06-17 10:44:15 +02:00
Thomas Weißschuh
2fbe82037a sysfs: treewide: switch back to bin_attribute::read()/write()
The bin_attribute argument of bin_attribute::read() is now const.
This makes the _new() callbacks unnecessary. Switch all users back.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20250530-sysfs-const-bin_attr-final-v3-3-724bfcf05b99@weissschuh.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-06-17 10:44:13 +02:00
Arnd Bergmann
0c44b46f51
platform/x86/intel-uncore-freq: avoid non-literal format string
Using a string variable in place of a format string causes a W=1 build warning:

drivers/platform/x86/intel/uncore-frequency/uncore-frequency-common.c:61:40: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
   61 |                 length += sysfs_emit_at(buf, length, agent_name[agent]);
      |                                                      ^~~~~~~~~~~~~~~~~

Use the safer "%s" format string to print it instead.

Fixes: b98fa870fc ("platform/x86/intel-uncore-freq: Add attributes to show agent types")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Link: https://lore.kernel.org/r/20250610093459.2646337-1-arnd@kernel.org
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-06-12 12:28:04 +03:00
Xi Pardee
be574d5eee
platform/x86/intel/pmc: Add Panther Lake support to Intel PMC SSRAM Telemetry
Add Panther Lake support to Intel PMC SSRAM Telemetry driver.

Signed-off-by: Xi Pardee <xi.pardee@linux.intel.com>
Link: https://lore.kernel.org/r/20250610230416.622970-2-xi.pardee@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-06-12 12:21:05 +03:00
Xi Pardee
2d5a84c3ec
platform/x86/intel/pmc: Add Lunar Lake support to Intel PMC SSRAM Telemetry
Add Lunar Lake support to Intel PMC SSRAM Telemetry driver.

Signed-off-by: Xi Pardee <xi.pardee@linux.intel.com>
Link: https://lore.kernel.org/r/20250610230416.622970-1-xi.pardee@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-06-12 12:21:03 +03:00
Dr. David Alan Gilbert
097cd6d6c9
platform/x86: intel_telemetry: Remove unused telemetry_raw_read_events()
telemetry_raw_read_events() was added by the commit 378f956e3f
("platform/x86: Add Intel Telemetry Core Driver") in 2016 but has
remained unused.

Remove it.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Link: https://lore.kernel.org/r/20250608012512.377134-4-linux@treblig.org
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-06-11 10:56:06 +03:00
Dr. David Alan Gilbert
b35b9fb28c
platform/x86: intel_telemetry: Remove unused telemetry_[gs]et_sampling_period()
The functions:

  - telemetry_get_sampling_period()
  - telemetry_set_sampling_period()

were both added by the commit 378f956e3f ("platform/x86: Add Intel
Telemetry Core Driver") in 2016 but have remained unused.

They're each a tiny wrapper that is the only caller through a similarly
named function pointer, and for each function pointer there's a 'def'
empty implementation and a plt implementation.

Remove all of those components for each function.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Link: https://lore.kernel.org/r/20250608012512.377134-3-linux@treblig.org
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-06-11 10:56:00 +03:00
Dr. David Alan Gilbert
3dd1e9c2a2
platform/x86: intel_telemetry: Remove unused telemetry_*_events()
The functions:

  - telemetry_add_events()
  - telemetry_update_events()
  - telemetry_reset_events()
  - telemetry_get_eventconfig()

were all added by the commit 378f956e3f ("platform/x86: Add Intel
Telemetry Core Driver") in 2016 but have remained unused.

They're each a tiny wrapper that is the only caller through a similarly
named function pointer, and for each function pointer there's a 'def'
empty implementation and a plt implementation.

Remove all of those components for each function.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Link: https://lore.kernel.org/r/20250608012512.377134-2-linux@treblig.org
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-06-11 10:55:54 +03:00
Dan Carpenter
1d0a61940e
platform/x86/intel: power-domains: Fix error code in tpmi_init()
Return -ENOMEM instead of success if kcalloc() fails.

Fixes: e37be5d85c ("platform/x86/intel: power-domains: Add interface to get Linux die ID")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/aEKvIGCt6d8Gcx4S@stanley.mountain
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-06-09 10:47:10 +03:00
Srinivas Pandruvada
685f88c72a
platform/x86/intel-uncore-freq: Fail module load when plat_info is NULL
Address a Smatch static checker warning regarding an unchecked
dereference in the function call:
set_cdie_id(i, cluster_info, plat_info)
when plat_info is NULL.

Instead of addressing this one case, in general if plat_info is NULL
then it can cause other issues. For example in a two package system it
will give warning for duplicate sysfs entry as package ID will be always
zero for both packages when creating string for attribute group name.

plat_info is derived from TPMI ID TPMI_BUS_INFO, which is integral to
the core TPMI design. Therefore, it should not be NULL on a production
platform. Consequently, the module should fail to load if plat_info is
NULL.

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/platform-driver-x86/aEKvGCLd1qmX04Tc@stanley.mountain/T/#u
Fixes: 8a54e2253e ("platform/x86/intel-uncore-freq: Uncore frequency control via TPMI")
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250606205300.2384494-1-srinivas.pandruvada@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-06-09 10:34:41 +03:00
Linus Torvalds
1193e205db platform-drivers-x86 for v6.16-1
Highlights:
 
  - alienware-wmi-wmax:
 
    - Add HWMON support
 
    - Add ABI and admin-guide documentation
 
    - Expose GPIO debug methods through debug FS
 
    - Support manual fan control and "custom" thermal profile
 
  - amd/hsmp:
 
    - Add sysfs files to show HSMP telemetry
 
    - Report power readings and limits via hwmon
 
  - amd/isp4: Add AMD ISP platform config for OV05C10
 
  - asus-wmi:
 
    - Refactor Ally suspend/resume to work better with older FW
 
    - hid-asus: check ROG Ally MCU version and warn about old FW versions
 
  - dasharo-acpi: Add driver for Dasharo devices supporting fans and
                  temperatures monitoring
 
  - dell-ddv:
 
    - Expose the battery health and manufacture date to userspace using
      power supply extensions
 
    - Implement the battery matching algorithm
 
  - dell-pc:
 
   - Improve error propagation
 
   - Use faux device
 
  - int3472:
 
    - Add delays to avoid GPIO regulator spikes
 
    - Add handshake pin support
 
    - Make regulator supply name configurable and allow registering more
      than 1 GPIO regulator
 
    - Map mt9m114 powerdown pin to powerenable
 
  - intel/pmc: Add separate SSRAM Telemetry driver
 
  - intel-uncore-freq: Add attributes to show agent types and die ID
 
  - ISST:
 
    - Support SST-TF revision 2 (allows more cores per bucket)
 
    - Support SST-PP revision 2 (fabric 1 frequencies)
 
    - Remove unnecessary SST MSRs restore (the package retains MSRs
      despite CPU offlining)
 
  - mellanox: Add support for SN2201, SN4280, SN5610, and SN5640
 
  - mellanox: mlxbf-pmc: Support additional PMC blocks
 
  - oxpec:
 
    - Add OneXFly variants
 
    - Add support for charge limit, charge thresholds, and turbo LED
 
    - Distinguish current X1 variants to avoid unwanted matching to new
      variants
 
    - Follow hwmon conventions
 
    - Move from hwmon/oxp-sensors to platform/x86 to match the enlarged
      scope
 
  - power: supply:
 
    - Add inhibit-charge-awake (needed by oxpec)
 
    - Add additional battery health status values ("blown fuse" and "cell
      imbalance") (needed by dell-ddv)
 
  - powerwell-ec: Add driver for Portwell EC supporting GPIO and watchdog
 
  - thinkpad-acpi: Support camera shutter switch hotkey
 
  - tuxedo: Add virtual LampArray for TUXEDO NB04 devices
 
  - tools/power/x86/intel-speed-select:
 
    - Support displaying SST-PP revision 2 fields
 
    - Skip uncore frequency update on newer generations of CPUs
 
  - Miscellaneous cleanups / refactoring / improvements
 
 The following is an automated shortlog grouped by driver:
 
 ABI: testing: sysfs-class-oxp:
  -  add missing documentation
  -  add tt_led attribute documentation
 
 Add AMD ISP platform config for OV05C10:
  - Add AMD ISP platform config for OV05C10
 
 alienware-wmi-wmax:
  -  Add a DebugFS interface
  -  Add HWMON support
  -  Add support for manual fan control
  -  Add support for the "custom" thermal profile
  -  Expose GPIO debug methods
  -  Fix awcc_hwmon_fans_init() label logic
  -  Fix uninitialized bitmap in awcc_hwmon_fans_init()
  -  Improve ID processing
  -  Improve internal AWCC API
  -  Improve platform profile probe
  -  Modify supported_thermal_profiles[]
  -  Rename thermal related symbols
 
 amd/hsmp: acpi:
  -  Add sysfs files to display HSMP telemetry
 
 amd/hsmp:
  -  fix building with CONFIG_HWMON=m
  -  Report power via hwmon sensors
  -  Use a single DRIVER_VERSION for all hsmp modules
 
 arm64: huawei-gaokun-ec:
  -  Remove unneeded semicolon
 
 asus-wmi:
  -  fix build without CONFIG_SUSPEND
  -  Refactor Ally suspend/resume
 
 Avoid -Wflex-array-member-not-at-end warning:
  - Avoid -Wflex-array-member-not-at-end warning
 
 barco-p50:
  -  use new GPIO line value setter callbacks
 
 dell-ddv:
  -  Expose the battery health to userspace
  -  Expose the battery manufacture date to userspace
  -  Implement the battery matching algorithm
 
 dell-pc:
  -  Propagate errors when detecting feature support
  -  Transition to faux device
  -  Use non-atomic bitmap operations
 
 docs: ABI:
  -  Fix "aassociated" to "associated"
 
 Documentation/ABI:
  -  Add new attribute for mlxreg-io sysfs interfaces
 
 Documentation: ABI:
  -  Add sysfs platform and debugfs ABI documentation for alienware-wmi
 
 Documentation: admin-guide: laptops:
  -  Add documentation for alienware-wmi
 
 Documentation: admin-guide: pm:
  -  Add documentation for agent_types
  -  Add documentation for die_id
 
 Documentation: wmi: alienware-wmi:
  -  Add GPIO control documentation
 
 Documentation: wmi:
  -  Improve and update alienware-wmi documentation
 
 Do not enable by default during compile testing:
  - Do not enable by default during compile testing
 
 hid-asus:
  -  check ROG Ally MCU version and warn
 
 hwmon:
  -  (oxp-sensors) Add all OneXFly variants
  -  (oxp-sensors) Distinguish the X1 variants
 
 int0002:
  -  use new GPIO line value setter callbacks
 
 int3472:
  -  Add handshake pin support
  -  Add skl_int3472_register_clock() helper
  -  Avoid GPIO regulator spikes
  -  Debug log when remapping pins
  -  Drop unused gpio field from struct int3472_gpio_regulator
  -  Export int3472_discrete_parse_crs()
  -  For mt9m114 sensors map powerdown to powerenable
  -  Make regulator supply name configurable
  -  Move common.h to public includes, symbols to INTEL_INT3472
  -  Prepare for registering more than 1 GPIO regulator
  -  Remove unused sensor_config struct member
  -  Rework AVDD second sensor quirk handling
  -  Stop setting a supply-name for GPIO regulators
  -  Stop using devm_gpiod_get()
 
 intel/pmc:
  -  Convert index variables to be unsigned
  -  Create Intel PMC SSRAM Telemetry driver
  -  Improve pmc_core_get_lpm_req()
  -  Move error handling to init function
  -  Move PMC Core related functions
  -  Move PMC devid to core.h
  -  Remove unneeded header file inclusion
  -  Remove unneeded io operations
  -  Rename core_ssram to ssram_telemetry
  -  Use devm for mutex_init
 
 intel: power-domains:
  -  Add interface to get Linux die ID
 
 intel-uncore-freq:
  -  Add attributes to show agent types
  -  Add attributes to show die_id
 
 intel/vsec:
  -  Change return type of intel_vsec_register
 
 Introduce dasharo-acpi platform driver:
  - Introduce dasharo-acpi platform driver
 
 ISST:
  -  Do Not Restore SST MSRs on CPU Online Operation
  -  Support SST-PP revision 2
  -  Support SST-TF revision 2
  -  Update minor version
 
 mellanox:
  -  Cosmetic changes to improve code style
  -  Introduce support of Nvidia smart switch
  -  Rename field to improve code readability
 
 mlxbf-pmc:
  -  Support additional PMC blocks
 
 mlx-platform:
  -  Add support for new Nvidia system
 
 mlxreg-dpu:
  -  Add initial support for Nvidia DPU
  -  Fix smatch warnings
 
 nvsw-sn2200:
  -  Add support for new system flavour
  -  Fix .items in nvsw_sn2201_busbar_hotplug
 
 oxpec:
  -  Add a lower bounds check in oxp_psy_ext_set_prop()
  -  Add charge threshold and behaviour to OneXPlayer
  -  Add support for the OneXPlayer G1
  -  Add turbo led support to X1 devices
  -  Adhere to sysfs-class-hwmon and enable pwm on 2
  -  Convert defines to using tabs
  -  Follow reverse xmas convention for tt_toggle
  -  Make turbo val apply a bitmask
  -  Move fan speed read to separate function
  -  Move hwmon/oxp-sensors to platform/x86
  -  Move pwm_enable read to its own function
  -  Move pwm value read/write to separate functions
  -  Rename ec group to tt_toggle
  -  Rename rval to ret in tt_toggle
 
 portwell-ec:
  -  Add GPIO and WDT driver for Portwell EC
 
 power: supply:
  -  add inhibit-charge-awake to charge_behaviour
 
 power: supply: core:
  -  Add additional health status values
 
 silicom:
  -  use new GPIO line value setter callbacks
 
 sony-laptop:
  -  Remove unused sony laptop camera code
 
 thermal/drivers/acerhdf:
  -  Constify struct thermal_zone_device_ops
 
 thinkpad-acpi:
  -  Add support for new hotkey for camera shutter switch
 
 tools/power/x86/intel-speed-select:
  -  Skip uncore frequency update
  -  Support SST PP revision 2 fields
  -  v1.23 release
 
 tuxedo:
  -  Add virtual LampArray for TUXEDO NB04 devices
  -  Prevent invalid Kconfig state
 
 Use strscpy()/scnprintf() with acpi_device_name/class():
  - Use strscpy()/scnprintf() with acpi_device_name/class()
 
 Merges:
  -  Merge branch 'fixes' into for-next
  -  Merge branch 'intel-sst' of https://github.com/spandruvada/linux-kernel into for-next
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQSCSUwRdwTNL2MhaBlZrE9hU+XOMQUCaDWJ7wAKCRBZrE9hU+XO
 MT8JAQDWW6qBoXuqpd6Yx1oOyROc6gJMQAsS9sNc7I60mGooEAEAnTLhOHDGkKb5
 av1fz/SmXGl7joeRYkZV9FRzJ/26AAk=
 =ytxa
 -----END PGP SIGNATURE-----

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

Pull x86 platform drivers updates from Ilpo Järvinen:
 "The changes are mostly business as usual. Besides pdx86 changes, there
  are a few power supply changes needed for related pdx86 features, move
  of oxpec driver from hwmon (oxp-sensors) to pdx86, and one FW version
  warning to hid-asus.

  Highlights:

   - alienware-wmi-wmax:
       - Add HWMON support
       - Add ABI and admin-guide documentation
       - Expose GPIO debug methods through debug FS
       - Support manual fan control and "custom" thermal profile

   - amd/hsmp:
       - Add sysfs files to show HSMP telemetry
       - Report power readings and limits via hwmon

   - amd/isp4: Add AMD ISP platform config for OV05C10

   - asus-wmi:
       - Refactor Ally suspend/resume to work better with older FW
       - hid-asus: check ROG Ally MCU version and warn about old FW versions

   - dasharo-acpi:
       - Add driver for Dasharo devices supporting fans and temperatures
         monitoring

   - dell-ddv:
       - Expose the battery health and manufacture date to userspace
         using power supply extensions
       - Implement the battery matching algorithm

   - dell-pc:
       - Improve error propagation
       - Use faux device

   - int3472:
       - Add delays to avoid GPIO regulator spikes
       - Add handshake pin support
       - Make regulator supply name configurable and allow registering
         more than 1 GPIO regulator
       - Map mt9m114 powerdown pin to powerenable

   - intel/pmc: Add separate SSRAM Telemetry driver

   - intel-uncore-freq: Add attributes to show agent types and die ID

   - ISST:
       - Support SST-TF revision 2 (allows more cores per bucket)
       - Support SST-PP revision 2 (fabric 1 frequencies)
       - Remove unnecessary SST MSRs restore (the package retains MSRs
         despite CPU offlining)

   - mellanox: Add support for SN2201, SN4280, SN5610, and SN5640

   - mellanox: mlxbf-pmc: Support additional PMC blocks

   - oxpec:
       - Add OneXFly variants
       - Add support for charge limit, charge thresholds, and turbo LED
       - Distinguish current X1 variants to avoid unwanted matching to
         new variants
       - Follow hwmon conventions
       - Move from hwmon/oxp-sensors to platform/x86 to match the
         enlarged scope

   - power supply:
       - Add inhibit-charge-awake (needed by oxpec)
       - Add additional battery health status values ("blown fuse" and
         "cell imbalance") (needed by dell-ddv)

   - powerwell-ec: Add driver for Portwell EC supporting GPIO and watchdog

   - thinkpad-acpi: Support camera shutter switch hotkey

   - tuxedo: Add virtual LampArray for TUXEDO NB04 devices

   - tools/power/x86/intel-speed-select:
       - Support displaying SST-PP revision 2 fields
       - Skip uncore frequency update on newer generations of CPUs

   - Miscellaneous cleanups / refactoring / improvements"

* tag 'platform-drivers-x86-v6.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (112 commits)
  thermal/drivers/acerhdf: Constify struct thermal_zone_device_ops
  platform/x86/amd/hsmp: fix building with CONFIG_HWMON=m
  platform/x86: asus-wmi: fix build without CONFIG_SUSPEND
  docs: ABI: Fix "aassociated" to "associated"
  platform/x86: Add AMD ISP platform config for OV05C10
  Documentation: admin-guide: pm: Add documentation for die_id
  platform/x86/intel-uncore-freq: Add attributes to show die_id
  platform/x86/intel: power-domains: Add interface to get Linux die ID
  Documentation: admin-guide: pm: Add documentation for agent_types
  platform/x86/intel-uncore-freq: Add attributes to show agent types
  platform/x86/tuxedo: Prevent invalid Kconfig state
  platform/x86: dell-ddv: Expose the battery health to userspace
  platform/x86: dell-ddv: Expose the battery manufacture date to userspace
  platform/x86: dell-ddv: Implement the battery matching algorithm
  power: supply: core: Add additional health status values
  platform/x86/amd/hsmp: acpi: Add sysfs files to display HSMP telemetry
  platform/x86/amd/hsmp: Report power via hwmon sensors
  platform/x86/amd/hsmp: Use a single DRIVER_VERSION for all hsmp modules
  platform/mellanox: mlxreg-dpu: Fix smatch warnings
  platform: mellanox: nvsw-sn2200: Fix .items in nvsw_sn2201_busbar_hotplug
  ...
2025-05-29 10:19:22 -07:00
Linus Torvalds
aacc73ceeb gpio updates for v6.16-rc1
GPIO core:
 - use more lock guards where applicable
 - refactor GPIO ACPI code and shrink it in the process by 8%
 - move GPIO ACPI quirks into a separate file
 - remove unneeded #ifdef
 - convert GPIO devres helpers to using devm_add_action() where applicable
   which shrinks and simplifies the code
 - refactor GPIO descriptor validation in GPIO consumer interfaces
 - don't allow setting values on input lines in the GPIO core which will
   take off the burden from GPIO drivers of checking this down the line
 - provide gpiod_is_equal() as a way of safely comparing two GPIO
   descriptors (the only current user is in regulator core)
 
 New drivers:
 - add the GPIO module for the max77759 multifunction device
 - add the GPIO driver for the VeriSilicon BLZP1600 GPIO controller
 - add the GPIO driver for the Spacemit K1 SoC
 
 Driver improvements:
 - convert more drivers to using the new GPIO line value setter callbacks
 - convert more drivers to making the irq_chip immutable as is recommended
   by the interrupt subsystem
 - extend build testing coverage by enabling more modules to be built with
   COMPILE_TEST=y
 - extend the gpio-aggregator module with a configfs interface that makes
   the setup easier for user-space than the existing driver-level sysfs
   attributes and also adds more advanced configuration features (such as
   referring to aggregated lines by their original names or modifying
   their names as exposed by the aggregated chip)
 - add a missing mutex_destroy() in gpio-imx-scu
 - add an OF polarity quirk for s5m8767
 - allow building gpio-vf610 as a loadable module
 - make gpio-mxc not hardcode its GPIO base number with GPIO SYSFS
   interface disabled (another small step towards getting rid of the global
   GPIO numberspace)
 - add support for level-triggered interrupts to gpio-pca953x
 - don't double-check the ngpios property in gpio-ds4520 as GPIO core
   already does it
 - don't double-check the number of GPIOs in gpio-imx-scu as GPIO core
   already does it
 - remove unused callbacks from gpio-max3191x
 
 DT bindings:
 - add device-tree bindings for max77759, spacemit,k1 and blzp1600 (new
   drivers added this cycle)
 - document more properties for gpio-vf610 and gpio-tegra186
 - document a new pca95xx variant
 - fix style of examples in several GPIO DT-binding documents
 
 Misc:
 - TODO list updates
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEFp3rbAvDxGAT0sefEacuoBRx13IFAmg0NtQACgkQEacuoBRx
 13Iolg/+P8fe1hTek+UgdKm/EAQ1Mn3oijNE1Ix15VD8Iqacu+URyB2SJMFcg27n
 S/tsuwogQeQmdgXPfYDJkQmiZEyln/ytWf5W2lNwYhGfGujVa8h1FueB7Wb8Zs7G
 PNMnobyAIGivodJfvikDEyczMuxhkOH04ZOT7UpTSPI47BSGsujX/1vgmRQLid1Z
 3wFDJ0yDhVcuxit/VC+LzFpHIV0MiRzGpvHzYid5jjEaGSiRMpHixf27VJGc0gG1
 IJLkhNkwZ3InisWVGvqdRg/FUNErRYKYQSARb4AjCU+/y1H0SWdB0R6sZDTZpP+e
 YqAc8FW31Lw1L7PWBLRTaVS3KT868tdXDCsArNzfBbb3u/WikO2GY/AXuzveZatp
 pHwyPA0JS9QvxaTXU9yjCpGqdNfjbrmU5OkZxTTe+Nyz84fUfiURiE8g4Rl6riy4
 fNzaywRBmVZlEECWSWGzyNw9ZEYDRPZ1ZHmOA+8FWE+/XKJIsVf8w3x2QIC5b/HO
 hYKH4mar8oiEYJFZqoko3iQURJq+AD9wILCNpws5bSsi//VyyNT0mZV/q5hj7+Xx
 pqeEGDInvycN5fDWWJlkN1lj5dDyHZi4uus05mYI9Ec+eX3XNWRUHXUskbpzdgCs
 XepjP9kFQmMSL7y4z2d7tLd7gFup/uGny7o/KyMsIPDw7qVL5rY=
 =PQqp
 -----END PGP SIGNATURE-----

Merge tag 'gpio-updates-for-v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio updates from Bartosz Golaszewski:
 "We have three new drivers, some refactoring in the GPIO core, lots of
  various changes across many drivers, new configfs interface for the
  virtual gpio-aggregator module and DT-bindings updates.

  The treewide conversion of GPIO drivers to using the new value setter
  callbacks is ongoing with another round of GPIO drivers updated. You
  will also see these commits coming in from other subsystems as with
  the relevant changes merged into mainline last cycle, I've started
  converting GPIO providers located elsewhere than drivers/gpio/.

  GPIO core:
   - use more lock guards where applicable
   - refactor GPIO ACPI code and shrink it in the process by 8%
   - move GPIO ACPI quirks into a separate file
   - remove unneeded #ifdef
   - convert GPIO devres helpers to using devm_add_action() where
     applicable which shrinks and simplifies the code
   - refactor GPIO descriptor validation in GPIO consumer interfaces
   - don't allow setting values on input lines in the GPIO core which
     will take off the burden from GPIO drivers of checking this down
     the line
   - provide gpiod_is_equal() as a way of safely comparing two GPIO
     descriptors (the only current user is in regulator core)

  New drivers:
   - add the GPIO module for the max77759 multifunction device
   - add the GPIO driver for the VeriSilicon BLZP1600 GPIO controller
   - add the GPIO driver for the Spacemit K1 SoC

  Driver improvements:
   - convert more drivers to using the new GPIO line value setter
     callbacks
   - convert more drivers to making the irq_chip immutable as is
     recommended by the interrupt subsystem
   - extend build testing coverage by enabling more modules to be built
     with COMPILE_TEST=y
   - extend the gpio-aggregator module with a configfs interface that
     makes the setup easier for user-space than the existing
     driver-level sysfs attributes and also adds more advanced
     configuration features (such as referring to aggregated lines by
     their original names or modifying their names as exposed by the
     aggregated chip)
   - add a missing mutex_destroy() in gpio-imx-scu
   - add an OF polarity quirk for s5m8767
   - allow building gpio-vf610 as a loadable module
   - make gpio-mxc not hardcode its GPIO base number with GPIO SYSFS
     interface disabled (another small step towards getting rid of the
     global GPIO numberspace)
   - add support for level-triggered interrupts to gpio-pca953x
   - don't double-check the ngpios property in gpio-ds4520 as GPIO core
     already does it
   - don't double-check the number of GPIOs in gpio-imx-scu as GPIO core
     already does it
   - remove unused callbacks from gpio-max3191x

  DT bindings:
   - add device-tree bindings for max77759, spacemit,k1 and blzp1600
     (new drivers added this cycle)
   - document more properties for gpio-vf610 and gpio-tegra186
   - document a new pca95xx variant
   - fix style of examples in several GPIO DT-binding documents

  Misc:
   - TODO list updates"

* tag 'gpio-updates-for-v6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (123 commits)
  gpio: timberdale: select GPIOLIB_IRQCHIP
  gpio: lpc18xx: select GPIOLIB_IRQCHIP
  gpio: grgpio: select GPIOLIB_IRQCHIP
  gpio: bcm-kona: select GPIOLIB_IRQCHIP
  dt-bindings: gpio: vf610: add ngpios and gpio-reserved-ranges
  gpio: davinci: select GPIOLIB_IRQCHIP
  gpiolib-acpi: Update file references in the Documentation and MAINTAINERS
  gpiolib: acpi: Move quirks to a separate file
  gpiolib: acpi: Add acpi_gpio_need_run_edge_events_on_boot() getter
  gpiolib: acpi: Handle deferred list via new API
  gpiolib: acpi: Make sure we fill struct acpi_gpio_info
  gpiolib: acpi: Switch to use enum in acpi_gpio_in_ignore_list()
  gpiolib: acpi: Use temporary variable for struct acpi_gpio_info
  gpiolib: remove unneeded #ifdef
  gpio: mpc8xxx: select GPIOLIB_IRQCHIP
  gpio: pxa: select GPIOLIB_IRQCHIP
  gpio: pxa: Make irq_chip immutable
  gpio: timberdale: Make irq_chip immutable
  gpio: xgene-sb: Make irq_chip immutable
  gpio: davinci: Make irq_chip immutable
  ...
2025-05-27 15:22:01 -07:00
Linus Torvalds
785cdec46e Core x86 updates for v6.16:
Boot code changes:
 
  - A large series of changes to reorganize the x86 boot code into a better isolated
    and easier to maintain base of PIC early startup code in arch/x86/boot/startup/,
    by Ard Biesheuvel.
 
    Motivation & background:
 
 	| Since commit
 	|
 	|    c88d71508e ("x86/boot/64: Rewrite startup_64() in C")
 	|
 	| dated Jun 6 2017, we have been using C code on the boot path in a way
 	| that is not supported by the toolchain, i.e., to execute non-PIC C
 	| code from a mapping of memory that is different from the one provided
 	| to the linker. It should have been obvious at the time that this was a
 	| bad idea, given the need to sprinkle fixup_pointer() calls left and
 	| right to manipulate global variables (including non-pointer variables)
 	| without crashing.
 	|
 	| This C startup code has been expanding, and in particular, the SEV-SNP
 	| startup code has been expanding over the past couple of years, and
 	| grown many of these warts, where the C code needs to use special
 	| annotations or helpers to access global objects.
 
    This tree includes the first phase of this work-in-progress x86 boot code
    reorganization.
 
 Scalability enhancements and micro-optimizations:
 
  - Improve code-patching scalability (Eric Dumazet)
  - Remove MFENCEs for X86_BUG_CLFLUSH_MONITOR (Andrew Cooper)
 
 CPU features enumeration updates:
 
  - Thorough reorganization and cleanup of CPUID parsing APIs (Ahmed S. Darwish)
  - Fix, refactor and clean up the cacheinfo code (Ahmed S. Darwish, Thomas Gleixner)
  - Update CPUID bitfields to x86-cpuid-db v2.3 (Ahmed S. Darwish)
 
 Memory management changes:
 
  - Allow temporary MMs when IRQs are on (Andy Lutomirski)
  - Opt-in to IRQs-off activate_mm() (Andy Lutomirski)
  - Simplify choose_new_asid() and generate better code (Borislav Petkov)
  - Simplify 32-bit PAE page table handling (Dave Hansen)
  - Always use dynamic memory layout (Kirill A. Shutemov)
  - Make SPARSEMEM_VMEMMAP the only memory model (Kirill A. Shutemov)
  - Make 5-level paging support unconditional (Kirill A. Shutemov)
  - Stop prefetching current->mm->mmap_lock on page faults (Mateusz Guzik)
  - Predict valid_user_address() returning true (Mateusz Guzik)
  - Consolidate initmem_init() (Mike Rapoport)
 
 FPU support and vector computing:
 
  - Enable Intel APX support (Chang S. Bae)
  - Reorgnize and clean up the xstate code (Chang S. Bae)
  - Make task_struct::thread constant size (Ingo Molnar)
  - Restore fpu_thread_struct_whitelist() to fix CONFIG_HARDENED_USERCOPY=y
    (Kees Cook)
  - Simplify the switch_fpu_prepare() + switch_fpu_finish() logic (Oleg Nesterov)
  - Always preserve non-user xfeatures/flags in __state_perm (Sean Christopherson)
 
 Microcode loader changes:
 
  - Help users notice when running old Intel microcode (Dave Hansen)
  - AMD: Do not return error when microcode update is not necessary (Annie Li)
  - AMD: Clean the cache if update did not load microcode (Boris Ostrovsky)
 
 Code patching (alternatives) changes:
 
  - Simplify, reorganize and clean up the x86 text-patching code (Ingo Molnar)
  - Make smp_text_poke_batch_process() subsume smp_text_poke_batch_finish()
    (Nikolay Borisov)
  - Refactor the {,un}use_temporary_mm() code (Peter Zijlstra)
 
 Debugging support:
 
  - Add early IDT and GDT loading to debug relocate_kernel() bugs (David Woodhouse)
  - Print the reason for the last reset on modern AMD CPUs (Yazen Ghannam)
  - Add AMD Zen debugging document (Mario Limonciello)
  - Fix opcode map (!REX2) superscript tags (Masami Hiramatsu)
  - Stop decoding i64 instructions in x86-64 mode at opcode (Masami Hiramatsu)
 
 CPU bugs and bug mitigations:
 
  - Remove X86_BUG_MMIO_UNKNOWN (Borislav Petkov)
  - Fix SRSO reporting on Zen1/2 with SMT disabled (Borislav Petkov)
  - Restructure and harmonize the various CPU bug mitigation methods
    (David Kaplan)
  - Fix spectre_v2 mitigation default on Intel (Pawan Gupta)
 
 MSR API:
 
  - Large MSR code and API cleanup (Xin Li)
  - In-kernel MSR API type cleanups and renames (Ingo Molnar)
 
 PKEYS:
 
  - Simplify PKRU update in signal frame (Chang S. Bae)
 
 NMI handling code:
 
  - Clean up, refactor and simplify the NMI handling code (Sohil Mehta)
  - Improve NMI duration console printouts (Sohil Mehta)
 
 Paravirt guests interface:
 
  - Restrict PARAVIRT_XXL to 64-bit only (Kirill A. Shutemov)
 
 SEV support:
 
  - Share the sev_secrets_pa value again (Tom Lendacky)
 
 x86 platform changes:
 
  - Introduce the <asm/amd/> header namespace (Ingo Molnar)
  - i2c: piix4, x86/platform: Move the SB800 PIIX4 FCH definitions to <asm/amd/fch.h>
    (Mario Limonciello)
 
 Fixes and cleanups:
 
  - x86 assembly code cleanups and fixes (Uros Bizjak)
 
  - Misc fixes and cleanups (Andi Kleen, Andy Lutomirski, Andy Shevchenko,
    Ard Biesheuvel, Bagas Sanjaya, Baoquan He, Borislav Petkov, Chang S. Bae,
    Chao Gao, Dan Williams, Dave Hansen, David Kaplan, David Woodhouse,
    Eric Biggers, Ingo Molnar, Josh Poimboeuf, Juergen Gross, Malaya Kumar Rout,
    Mario Limonciello, Nathan Chancellor, Oleg Nesterov, Pawan Gupta,
    Peter Zijlstra, Shivank Garg, Sohil Mehta, Thomas Gleixner, Uros Bizjak,
    Xin Li)
 
 Signed-off-by: Ingo Molnar <mingo@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmgy9WARHG1pbmdvQGtl
 cm5lbC5vcmcACgkQEnMQ0APhK1jJSw/+OW2zvAx602doujBIE17vFLU7R10Xwj5H
 lVgomkWCoTNscUZPhdT/iI+/kQF1fG8PtN9oZKUsTAUswldKJsqu7KevobviesiW
 qI+FqH/fhHaIk7GVh9VP65Dgrdki8zsgd7BFxD8pLRBlbZTxTxXNNkuNJrs6LxJh
 SxWp/FVtKo6Wd57qlUcsdo0tilAfcuhlEweFUarX55X2ouhdeHjcGNpxj9dHKOh8
 M7R5yMYFrpfdpSms+WaCnKKahWHaIQtQTsPAyKwoVdtfl1kK+7NgaCF55Gbo3ogp
 r59JwC/CGruDa5QnnDizCwFIwpZw9M52Q1NhP/eLEZbDGB4Yya3b5NW+Ya+6rPvO
 ZZC3e1uUmlxW3lrYflUHurnwrVb2GjkQZOdf0gfnly/7LljIicIS2dk4qIQF9NBd
 sQPpW5hjmIz9CsfeL8QaJW38pQyMsQWznFuz4YVuHcLHvleb3hR+n4fNfV5Lx9bw
 oirVETSIT5hy/msAgShPqTqFUEiVCgp16ow20YstxxzFu/FQ+VG987tkeUyFkPMe
 q1v5yF1hty+TkM4naKendIZ/MJnsrv0AxaegFz9YQrKGL1UPiOajQbSyKbzbto7+
 ozmtN0W80E8n4oQq008j8htpgIhDV91UjF5m33qB82uSqKihHPPTsVcbeg5nZwh2
 ti5g/a1jk94=
 =JgQo
 -----END PGP SIGNATURE-----

Merge tag 'x86-core-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull core x86 updates from Ingo Molnar:
 "Boot code changes:

   - A large series of changes to reorganize the x86 boot code into a
     better isolated and easier to maintain base of PIC early startup
     code in arch/x86/boot/startup/, by Ard Biesheuvel.

     Motivation & background:

  	| Since commit
  	|
  	|    c88d71508e ("x86/boot/64: Rewrite startup_64() in C")
  	|
  	| dated Jun 6 2017, we have been using C code on the boot path in a way
  	| that is not supported by the toolchain, i.e., to execute non-PIC C
  	| code from a mapping of memory that is different from the one provided
  	| to the linker. It should have been obvious at the time that this was a
  	| bad idea, given the need to sprinkle fixup_pointer() calls left and
  	| right to manipulate global variables (including non-pointer variables)
  	| without crashing.
  	|
  	| This C startup code has been expanding, and in particular, the SEV-SNP
  	| startup code has been expanding over the past couple of years, and
  	| grown many of these warts, where the C code needs to use special
  	| annotations or helpers to access global objects.

     This tree includes the first phase of this work-in-progress x86
     boot code reorganization.

  Scalability enhancements and micro-optimizations:

   - Improve code-patching scalability (Eric Dumazet)

   - Remove MFENCEs for X86_BUG_CLFLUSH_MONITOR (Andrew Cooper)

  CPU features enumeration updates:

   - Thorough reorganization and cleanup of CPUID parsing APIs (Ahmed S.
     Darwish)

   - Fix, refactor and clean up the cacheinfo code (Ahmed S. Darwish,
     Thomas Gleixner)

   - Update CPUID bitfields to x86-cpuid-db v2.3 (Ahmed S. Darwish)

  Memory management changes:

   - Allow temporary MMs when IRQs are on (Andy Lutomirski)

   - Opt-in to IRQs-off activate_mm() (Andy Lutomirski)

   - Simplify choose_new_asid() and generate better code (Borislav
     Petkov)

   - Simplify 32-bit PAE page table handling (Dave Hansen)

   - Always use dynamic memory layout (Kirill A. Shutemov)

   - Make SPARSEMEM_VMEMMAP the only memory model (Kirill A. Shutemov)

   - Make 5-level paging support unconditional (Kirill A. Shutemov)

   - Stop prefetching current->mm->mmap_lock on page faults (Mateusz
     Guzik)

   - Predict valid_user_address() returning true (Mateusz Guzik)

   - Consolidate initmem_init() (Mike Rapoport)

  FPU support and vector computing:

   - Enable Intel APX support (Chang S. Bae)

   - Reorgnize and clean up the xstate code (Chang S. Bae)

   - Make task_struct::thread constant size (Ingo Molnar)

   - Restore fpu_thread_struct_whitelist() to fix
     CONFIG_HARDENED_USERCOPY=y (Kees Cook)

   - Simplify the switch_fpu_prepare() + switch_fpu_finish() logic (Oleg
     Nesterov)

   - Always preserve non-user xfeatures/flags in __state_perm (Sean
     Christopherson)

  Microcode loader changes:

   - Help users notice when running old Intel microcode (Dave Hansen)

   - AMD: Do not return error when microcode update is not necessary
     (Annie Li)

   - AMD: Clean the cache if update did not load microcode (Boris
     Ostrovsky)

  Code patching (alternatives) changes:

   - Simplify, reorganize and clean up the x86 text-patching code (Ingo
     Molnar)

   - Make smp_text_poke_batch_process() subsume
     smp_text_poke_batch_finish() (Nikolay Borisov)

   - Refactor the {,un}use_temporary_mm() code (Peter Zijlstra)

  Debugging support:

   - Add early IDT and GDT loading to debug relocate_kernel() bugs
     (David Woodhouse)

   - Print the reason for the last reset on modern AMD CPUs (Yazen
     Ghannam)

   - Add AMD Zen debugging document (Mario Limonciello)

   - Fix opcode map (!REX2) superscript tags (Masami Hiramatsu)

   - Stop decoding i64 instructions in x86-64 mode at opcode (Masami
     Hiramatsu)

  CPU bugs and bug mitigations:

   - Remove X86_BUG_MMIO_UNKNOWN (Borislav Petkov)

   - Fix SRSO reporting on Zen1/2 with SMT disabled (Borislav Petkov)

   - Restructure and harmonize the various CPU bug mitigation methods
     (David Kaplan)

   - Fix spectre_v2 mitigation default on Intel (Pawan Gupta)

  MSR API:

   - Large MSR code and API cleanup (Xin Li)

   - In-kernel MSR API type cleanups and renames (Ingo Molnar)

  PKEYS:

   - Simplify PKRU update in signal frame (Chang S. Bae)

  NMI handling code:

   - Clean up, refactor and simplify the NMI handling code (Sohil Mehta)

   - Improve NMI duration console printouts (Sohil Mehta)

  Paravirt guests interface:

   - Restrict PARAVIRT_XXL to 64-bit only (Kirill A. Shutemov)

  SEV support:

   - Share the sev_secrets_pa value again (Tom Lendacky)

  x86 platform changes:

   - Introduce the <asm/amd/> header namespace (Ingo Molnar)

   - i2c: piix4, x86/platform: Move the SB800 PIIX4 FCH definitions to
     <asm/amd/fch.h> (Mario Limonciello)

  Fixes and cleanups:

   - x86 assembly code cleanups and fixes (Uros Bizjak)

   - Misc fixes and cleanups (Andi Kleen, Andy Lutomirski, Andy
     Shevchenko, Ard Biesheuvel, Bagas Sanjaya, Baoquan He, Borislav
     Petkov, Chang S. Bae, Chao Gao, Dan Williams, Dave Hansen, David
     Kaplan, David Woodhouse, Eric Biggers, Ingo Molnar, Josh Poimboeuf,
     Juergen Gross, Malaya Kumar Rout, Mario Limonciello, Nathan
     Chancellor, Oleg Nesterov, Pawan Gupta, Peter Zijlstra, Shivank
     Garg, Sohil Mehta, Thomas Gleixner, Uros Bizjak, Xin Li)"

* tag 'x86-core-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (331 commits)
  x86/bugs: Fix spectre_v2 mitigation default on Intel
  x86/bugs: Restructure ITS mitigation
  x86/xen/msr: Fix uninitialized variable 'err'
  x86/msr: Remove a superfluous inclusion of <asm/asm.h>
  x86/paravirt: Restrict PARAVIRT_XXL to 64-bit only
  x86/mm/64: Make 5-level paging support unconditional
  x86/mm/64: Make SPARSEMEM_VMEMMAP the only memory model
  x86/mm/64: Always use dynamic memory layout
  x86/bugs: Fix indentation due to ITS merge
  x86/cpuid: Rename hypervisor_cpuid_base()/for_each_possible_hypervisor_cpuid_base() to cpuid_base_hypervisor()/for_each_possible_cpuid_base_hypervisor()
  x86/cpu/intel: Rename CPUID(0x2) descriptors iterator parameter
  x86/cacheinfo: Rename CPUID(0x2) descriptors iterator parameter
  x86/cpuid: Rename cpuid_get_leaf_0x2_regs() to cpuid_leaf_0x2()
  x86/cpuid: Rename have_cpuid_p() to cpuid_feature()
  x86/cpuid: Set <asm/cpuid/api.h> as the main CPUID header
  x86/cpuid: Move CPUID(0x2) APIs into <cpuid/api.h>
  x86/msr: Add rdmsrl_on_cpu() compatibility wrapper
  x86/mm: Fix kernel-doc descriptions of various pgtable methods
  x86/asm-offsets: Export certain 'struct cpuinfo_x86' fields for 64-bit asm use too
  x86/boot: Defer initialization of VM space related global variables
  ...
2025-05-26 16:04:17 -07:00
Todd Brandt
f2eae58c44
platform/x86/intel/pmc: Fix Arrow Lake U/H NPU PCI ID
The ARL requires that the GMA and NPU devices both be in D3Hot in order
for PC10 and S0iX to be achieved in S2idle. The original ARL-H/U addition
to the intel_pmc_core driver attempted to do this by switching them to D3
in the init and resume calls of the intel_pmc_core driver.

The problem is the ARL-H/U have a different NPU device and thus are not
being properly set and thus S0iX does not work properly in ARL-H/U. This
patch creates a new ARL-H specific device id that is correct and also
adds the D3 fixup to the suspend callback. This way if the PCI devies
drop from D3 to D0 after resume they can be corrected for the next
suspend. Thus there is no dropout in S0iX.

Fixes: bd820906ea ("platform/x86/intel/pmc: Add Arrow Lake U/H support to intel_pmc_core driver")
Signed-off-by: Todd Brandt <todd.e.brandt@intel.com>
Link: https://lore.kernel.org/r/a61f78be45c13f39e122dcc684b636f4b21e79a0.1747737446.git.todd.e.brandt@intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-05-23 12:04:54 +03:00
Andy Shevchenko
ec0c0aab15 gpiolib-acpi: Update file references in the Documentation and MAINTAINERS
The recent changes in the gpiolib-acpi.c need also updates in the Documentation
and MAINTAINERS. Do the necessary changes here.

Fixes: babb541af627 ("gpiolib: acpi: Move quirks to a separate file")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Closes: https://lore.kernel.org/r/20250516193436.09bdf8cc@canb.auug.org.au
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2025-05-21 12:25:24 +03:00
Ahmed S. Darwish
968e300068 x86/cpuid: Set <asm/cpuid/api.h> as the main CPUID header
The main CPUID header <asm/cpuid.h> was originally a storefront for the
headers:

    <asm/cpuid/api.h>
    <asm/cpuid/leaf_0x2_api.h>

Now that the latter CPUID(0x2) header has been merged into the former,
there is no practical difference between <asm/cpuid.h> and
<asm/cpuid/api.h>.

Migrate all users to the <asm/cpuid/api.h> header, in preparation of
the removal of <asm/cpuid.h>.

Don't remove <asm/cpuid.h> just yet, in case some new code in -next
started using it.

Suggested-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Ahmed S. Darwish <darwi@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: John Ogness <john.ogness@linutronix.de>
Cc: x86-cpuid@lists.linux.dev
Link: https://lore.kernel.org/r/20250508150240.172915-3-darwi@linutronix.de
2025-05-15 18:23:55 +02:00
Srinivas Pandruvada
247b43fcd8
platform/x86/intel-uncore-freq: Add attributes to show die_id
For domains with agents to control cores (compute dies) show matching
Linux CPU die ID. Linux CPU ID is a logical die ID, so this may not match
physical die ID or domain_id. So, a mapping is required to get Linux CPU
die ID. This attribute is only presented when CPUID enumerates die ids.

This attribute can be used by orchestration software like Kubernetes to
target specific dies for uncore frequency control.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20250508230250.1186619-5-srinivas.pandruvada@linux.intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2025-05-15 14:47:27 +03:00