100 Commits
Author SHA1 Message Date
Steve Best 319d168769 fs/resctrl: Add "*" shorthand to set io_alloc CBM for all domains
JIRA: https://redhat.atlassian.net/browse/RHEL-174711

commit d2bf45d067c728b0fe6e8f99a7386b8291e391e3
Author: Aaron Tomlin <atomlin@atomlin.com>
Date:   Tue Mar 24 20:11:59 2026 -0400

    fs/resctrl: Add "*" shorthand to set io_alloc CBM for all domains

    Configuring the io_alloc_cbm interface requires an explicit domain ID for each
    cache domain. On systems with high core counts and numerous cache clusters,
    this requirement becomes cumbersome for automation and management tasks that
    aim to apply a uniform policy.

    Introduce a wildcard domain ID selector "*" for the io_alloc_cbm interface.
    This enables users to set the same Capacity Bitmask (CBM) across all cache
    domains in a single operation.

    Signed-off-by: Aaron Tomlin <atomlin@atomlin.com>
    Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
    Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
    Reviewed-by: Babu Moger <babu.moger@amd.com>
    Tested-by: Babu Moger <babu.moger@amd.com>
    Link: https://patch.msgid.link/20260325001159.447075-3-atomlin@atomlin.com

(cherry picked from commit d2bf45d067c728b0fe6e8f99a7386b8291e391e3)
Assisted-by: Patchpal
Signed-off-by: Steve Best <sbest@redhat.com>
2026-08-24 02:24:13 -04:00
Steve Best 0a69b5abfd fs/resctrl: Report invalid domain ID when parsing io_alloc_cbm
JIRA: https://redhat.atlassian.net/browse/RHEL-174711

commit d06b8e7c97c3290e61006e30b32beb9e715fab82
Author: Aaron Tomlin <atomlin@atomlin.com>
Date:   Tue Mar 24 20:11:58 2026 -0400

    fs/resctrl: Report invalid domain ID when parsing io_alloc_cbm

    The last_cmd_status file is intended to report details about the most recent
    resctrl filesystem operation, specifically to aid in diagnosing failures.

    However, when parsing io_alloc_cbm, if a user provides a domain ID that does
    not exist in the resource, the operation fails with -EINVAL without updating
    last_cmd_status. This results in inconsistent behaviour where the system call
    returns an error, but last_cmd_status misleadingly reports "ok", leaving the
    user unaware that the failure was caused by an invalid domain ID.

    Write an error message to last_cmd_status when the target domain ID cannot
    be found.

    Fixes: 28fa2cce7a83 ("fs/resctrl: Introduce interface to modify io_alloc capacity bitmasks")
    Suggested-by: Reinette Chatre <reinette.chatre@intel.com>
    Signed-off-by: Aaron Tomlin <atomlin@atomlin.com>
    Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
    Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
    Reviewed-by: Babu Moger <babu.moger@amd.com>
    Tested-by: Babu Moger <babu.moger@amd.com>
    Link: https://patch.msgid.link/20260325001159.447075-2-atomlin@atomlin.com

(cherry picked from commit d06b8e7c97c3290e61006e30b32beb9e715fab82)
Assisted-by: Patchpal
Signed-off-by: Steve Best <sbest@redhat.com>
2026-08-24 02:24:06 -04:00
Steve Best 542a392241 x86/mce: Set up the polling timer before CMCI discovery
JIRA: https://redhat.atlassian.net/browse/RHEL-239086

commit a213dfaa2596c1c0dc4dae91c14fbfa499c03223
Author: Breno Leitao <leitao@debian.org>
Date:   Mon Aug 3 02:47:40 2026 -0700

    x86/mce: Set up the polling timer before CMCI discovery

    I hit the following on one of my machines:

      mce: CPU0 BANK15 CMCI inherited storm
      ------------[ cut here ]------------
      ODEBUG: assert_init not available (active state 0) object: (____ptrval____) object type: timer_list hint: 0x0
      WARNING: lib/debugobjects.c:632 at debug_object_assert_init+0x178/0x230, CPU#0: swapper/0/0
      CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 7.2.0-rc5 #3 PREEMPTLAZY
      RIP: 0010:debug_object_assert_init+0x18f/0x230
      Call Trace:
       <TASK>
       __mod_timer
       mce_timer_kick
       cmci_discover
       intel_init_cmci
       mce_intel_feature_init
       mcheck_cpu_init
       identify_cpu
       identify_boot_cpu
       arch_cpu_finalize_init
       start_kernel

    A second splat follows right after, from timer_setup() finding that same
    timer already queued:

      ODEBUG: init active (active state 0) object: (____ptrval____) object type: timer_list hint: stub_timer+0x0/0x10

    This is happening because CMCI storm detection is trying to modify the timer
    before latter was properly set up.

    Set up the timer first. __mcheck_cpu_setup_timer() only calls timer_setup(),
    and depends on neither the generic nor the vendor init.

      [ bp: Massage commit message. ]

    Fixes: 1f68ce2a02 ("x86/mce: Handle Intel threshold interrupt storms")
    Signed-off-by: Breno Leitao <leitao@debian.org>
    Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
    Cc: stable@vger.kernel.org
    Link: https://patch.msgid.link/20260803-mce_timer_init-v1-1-9539db424330@debian.org

Signed-off-by: Steve Best <sbest@redhat.com>
2026-08-12 16:37:02 -04:00
Steve Best e95b7f0dd8 thermal: core: Fix thermal zone device registration error path
JIRA: https://redhat.atlassian.net/browse/RHEL-226828
CVE: CVE-2026-43332

commit 9e07e3b81807edd356e1f794cffa00a428eff443
Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Date:   Wed Apr 1 16:33:53 2026 +0200

    thermal: core: Fix thermal zone device registration error path

    If thermal_zone_device_register_with_trips() fails after registering
    a thermal zone device, it needs to wait for the tz->removal completion
    like thermal_zone_device_unregister(), in case user space has managed
    to take a reference to the thermal zone device's kobject, in which case
    thermal_release() may not be called by the error path itself and tz may
    be freed prematurely.

    Add the missing wait_for_completion() call to the thermal zone device
    registration error path.

    Fixes: 04e6ccfc93 ("thermal: core: Fix NULL pointer dereference in zone registration error path")
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
    Cc: All applicable <stable@vger.kernel.org>
    Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
    Tested-by: Lukasz Luba <lukasz.luba@arm.com>
    Link: https://patch.msgid.link/2849815.mvXUDI8C0e@rafael.j.wysocki

Signed-off-by: Steve Best <sbest@redhat.com>
2026-08-11 15:20:55 -04:00
Steve Best d4e4ed6e88 i2c: core: fix adapter deregistration race
JIRA: https://redhat.atlassian.net/browse/RHEL-222908
CVE: CVE-2026-64279

commit b1a58ed9eab146b36f41a55db8f5d7ce9fdedf3f
Author: Johan Hovold <johan@kernel.org>
Date:   Mon May 11 16:37:13 2026 +0200

    i2c: core: fix adapter deregistration race

    Adapters can be looked up by their id using i2c_get_adapter() which
    takes a reference to the embedded struct device.

    Remove the adapter from the IDR before tearing it down during
    deregistration (and on registration failure) to make sure its resources
    are not accessed after having been freed (e.g. the device name).

    Fixes: 35fc37f818 ("i2c: Limit core locking to the necessary sections")
    Cc: stable@vger.kernel.org      # 2.6.31
    Cc: Jean Delvare <khali@linux-fr.org>
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-08-04 04:23:14 -04:00
Steve Best 1428239b93 i2c: core: disable runtime PM on adapter registration failure
JIRA: https://redhat.atlassian.net/browse/RHEL-222908
CVE: CVE-2026-64279

commit 3e2041ea586ae37fcea918ecb505ab9972a1201d
Author: Johan Hovold <johan@kernel.org>
Date:   Mon May 11 16:37:11 2026 +0200

    i2c: core: disable runtime PM on adapter registration failure

    Runtime PM is disabled by driver core when deregistering a device (and
    on registration failure) but add an explicit disable to balance the
    enable call when adapter registration fails for symmetry.

    Fixes: 23a698fe65 ("i2c: core: treat EPROBE_DEFER when acquiring SCL/SDA GPIOs")
    Cc: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-08-04 04:23:08 -04:00
Steve Best 63c9595c9b i2c: core: fix adapter debugfs creation
JIRA: https://redhat.atlassian.net/browse/RHEL-222908
CVE: CVE-2026-64279

commit 07d5fb537928aad4369aaff0cbae73ba38a719af
Author: Johan Hovold <johan@kernel.org>
Date:   Mon May 11 16:37:10 2026 +0200

    i2c: core: fix adapter debugfs creation

    Clients can be registered from bus notifier callbacks so the debugfs
    directory needs to be created before registering the adapter as clients
    use that directory as their debugfs parent.

    Move debugfs creation before adapter registration to avoid having
    clients create their debugfs directories in the debugfs root (which is
    also more likely to fail due to name collisions).

    Note that failure to allocate the adapter name must now be handled
    explicitly as debugfs_create_dir() cannot handle a NULL name (unlike
    device_add() which returns an error).

    Fixes: 73febd775b ("i2c: create debugfs entry per adapter")
    Cc: stable@vger.kernel.org      # 6.8
    Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-08-04 04:23:02 -04:00
Steve Best 544c175479 i2c: core: fix adapter probe deferral loop
JIRA: https://redhat.atlassian.net/browse/RHEL-222908
CVE: CVE-2026-64279

commit 158efa411c57111d87bf265a3776614f32d70007
Author: Johan Hovold <johan@kernel.org>
Date:   Mon May 11 16:37:09 2026 +0200

    i2c: core: fix adapter probe deferral loop

    Drivers must not probe defer after having registered devices as that
    will trigger a probe loop if the devices bind to a driver (cf. commit
    fbc35b45f9 ("Add documentation on meaning of -EPROBE_DEFER")).

    Move the recovery initialisation, where the GPIO lookup may fail, before
    registering the adapter to prevent this.

    Fixes: 75820314de ("i2c: core: add generic I2C GPIO recovery")
    Cc: stable@vger.kernel.org      # 5.9
    Cc: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-08-04 04:22:54 -04:00
Steve Best a29c364d2a i2c: core: fix NULL-deref on adapter registration failure
JIRA: https://redhat.atlassian.net/browse/RHEL-222908
CVE: CVE-2026-64279

commit 2295d2bb101faa663fbc45fadbb3fec45f107441
Author: Johan Hovold <johan@kernel.org>
Date:   Mon May 11 16:37:08 2026 +0200

    i2c: core: fix NULL-deref on adapter registration failure

    If adapter registration ever fails the release callback would trigger a
    NULL-pointer dereference as the completion struct has not been
    initialised.

    Note that before the offending commit this would instead have resulted
    in a minor memory leak of the adapter name.

    Fixes: 3f8c4f5e9a57 ("i2c: core: fix reference leak in i2c_register_adapter()")
    Cc: stable@vger.kernel.org
    Cc: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-08-04 04:22:45 -04:00
Steve Best fb54517309 i2c: core: fix hang on adapter registration failure
JIRA: https://redhat.atlassian.net/browse/RHEL-222908
CVE: CVE-2026-64279

commit 3c7e164344e5bcf6f274bbf59a3274f5caad9bc1
Author: Johan Hovold <johan@kernel.org>
Date:   Mon May 11 16:37:07 2026 +0200

    i2c: core: fix hang on adapter registration failure

    Clients may be registered from bus notifier callbacks when the adapter
    is registered. On a subsequent error during registration, the adapter
    references taken by such clients prevent the wait for the references to
    be released from ever completing.

    Fix this by refactoring client deregistration and deregistering also on
    late adapter registration failures.

    Fixes: f8756c67b3 ("i2c: core: call of_i2c_setup_smbus_alert in i2c_register_adapter")
    Cc: stable@vger.kernel.org      # 4.15
    Cc: Phil Reid <preid@electromag.com.au>
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-08-04 04:22:36 -04:00
Steve Best 1cdefaca80 i2c: core: fix irq domain leak on adapter registration failure
JIRA: https://redhat.atlassian.net/browse/RHEL-222908
CVE: CVE-2026-64279

commit 8ce19524e4cc2462685f596a6402fbd8fb984ab2
Author: Johan Hovold <johan@kernel.org>
Date:   Mon May 11 16:37:06 2026 +0200

    i2c: core: fix irq domain leak on adapter registration failure

    Make sure to tear down the host notify irq domain on adapter
    registration failure to avoid leaking it.

    This issue was flagged by Sashiko when reviewing another adapter
    registration fix.

    Fixes: 4d5538f588 ("i2c: use an IRQ to report Host Notify events, not alert")
    Cc: stable@vger.kernel.org      # 4.10
    Cc: Benjamin Tissoires <bentiss@kernel.org>
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-08-04 04:22:30 -04:00
Steve Best 31179a7019 i2c: core: fix reference leak in i2c_register_adapter()
JIRA: https://redhat.atlassian.net/browse/RHEL-222908
CVE: CVE-2026-64279

commit 3f8c4f5e9a57868fa107016c81165686d23325f2
Author: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Date:   Wed Dec 11 12:08:03 2024 +0900

    i2c: core: fix reference leak in i2c_register_adapter()

    The reference count of the device incremented in device_initialize() is
    not decremented when device_add() fails. Add a put_device() call before
    returning from the function.

    This bug was found by an experimental static analysis tool that I am
    developing.

    Fixes: 60f6859702 ("i2c: core: Setup i2c_adapter runtime-pm before calling device_add()")
    Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
    Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-08-04 04:22:23 -04:00
Steve Best 1196d9f972 mfd: intel-lpss: Add Intel Nova Lake-H PCI IDs
JIRA: https://redhat.atlassian.net/browse/RHEL-154489

commit d6e0ef44688249009dfa24f1cd619d41637de060
Author: Saranya Gopal <saranya.gopal@intel.com>
Date:   Fri Mar 13 12:03:37 2026 +0200

    mfd: intel-lpss: Add Intel Nova Lake-H PCI IDs

    Add Intel Nova Lake-H LPSS PCI IDs.

    Signed-off-by: Saranya Gopal <saranya.gopal@intel.com>
    Co-developed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
    Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
    Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Link: https://patch.msgid.link/20260313100337.3471-1-ilpo.jarvinen@linux.intel.com
    Signed-off-by: Lee Jones <lee@kernel.org>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-08-01 05:06:56 -04:00
Steve Best f995e4070a mei: bus: access mei_device under device_lock on cleanup
JIRA: https://redhat.atlassian.net/browse/RHEL-222295

commit f112ea910e554d58b4b39a4492b7d302f0f4204f
Author: Alexander Usyskin <alexander.usyskin@intel.com>
Date:   Sun Jul 5 18:12:59 2026 +0300

    mei: bus: access mei_device under device_lock on cleanup

    Fix couple of problems in mei_cl_bus_dev_release():

    mei_cl_flush_queues() is running without lock.
    bus->file_list access after mei_dev_bus_put(bus) can become a
    use-after-free if this was the last reference to bus.

    Protect queues cleanup and WARN traversal by device lock there
    to avoid the concurrent access problems.
    Move WARN traversal before mei_dev_bus_put(bus).

    This file uses bus variable name for mei_device, adjust
    code of mei_cl_bus_dev_release() to use bus variable too.

    Cc: stable <stable@kernel.org>
    Fixes: 35e8a426b16a ("mei: bus: Check for still connected devices in mei_cl_bus_dev_release()")
    Reviewed-by: Menachem Adin <menachem.adin@intel.com>
    Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
    Link: https://patch.msgid.link/20260705151259.3054795-1-alexander.usyskin@intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-07-31 03:21:04 -04:00
Steve Best 9ccead40bd PM: EM: Fix incorrect description of the cost field in struct em_perf_state
JIRA: https://redhat.atlassian.net/browse/RHEL-220528

commit 54b603f2db6b95495bc33a8f2bde80f044baff9a
Author: Yaxiong Tian <tianyaxiong@kylinos.cn>
Date:   Tue Dec 30 14:15:34 2025 +0800

    PM: EM: Fix incorrect description of the cost field in struct em_perf_state

    Due to commit 1b600da510 ("PM: EM: Optimize em_cpu_energy() and remove
    division"), the logic for energy consumption calculation has been modified.
    The actual calculation of cost is 10 * power * max_frequency / frequency
    instead of power * max_frequency / frequency.

    Therefore, the comment for cost has been updated to reflect the correct
    content.

    Fixes: 1b600da510 ("PM: EM: Optimize em_cpu_energy() and remove division")
    Signed-off-by: Yaxiong Tian <tianyaxiong@kylinos.cn>
    Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
    [ rjw: Added Fixes: tag ]
    Link: https://patch.msgid.link/20251230061534.816894-1-tianyaxiong@kylinos.cn
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-07-30 08:11:55 -04:00
Steve Best 690db76f27 PM: EM: Fix late boot with holes in CPU topology
JIRA: https://redhat.atlassian.net/browse/RHEL-220528

commit 1ebe8f7e782523e62cd1fa8237f7afba5d1dae83
Author: Christian Loehle <christian.loehle@arm.com>
Date:   Sun Aug 31 22:43:57 2025 +0100

    PM: EM: Fix late boot with holes in CPU topology

    Commit e3f1164fc9 ("PM: EM: Support late CPUs booting and capacity
    adjustment") added a mechanism to handle CPUs that come up late by
    retrying when any of the `cpufreq_cpu_get()` call fails.

    However, if there are holes in the CPU topology (offline CPUs, e.g.
    nosmt), the first missing CPU causes the loop to break, preventing
    subsequent online CPUs from being updated.

    Instead of aborting on the first missing CPU policy, loop through all
    and retry if any were missing.

    Fixes: e3f1164fc9 ("PM: EM: Support late CPUs booting and capacity adjustment")
    Suggested-by: Kenneth Crudup <kenneth.crudup@gmail.com>
    Reported-by: Kenneth Crudup <kenneth.crudup@gmail.com>
    Link: https://lore.kernel.org/linux-pm/40212796-734c-4140-8a85-854f72b8144d@panix.com/
    Cc: 6.9+ <stable@vger.kernel.org> # 6.9+
    Signed-off-by: Christian Loehle <christian.loehle@arm.com>
    Link: https://patch.msgid.link/20250831214357.2020076-1-christian.loehle@arm.com
    [ rjw: Drop the new pr_debug() message which is not very useful ]
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-07-30 08:11:50 -04:00
Steve Best 79e9439617 pinctrl-amd: Don't clear S4 wake bits at probe
JIRA: https://redhat.atlassian.net/browse/RHEL-212012

commit ffe8a0c6b55285ceaf2f42fc20c3a0594d14f1e9
Author: Mario Limonciello <mario.limonciello@amd.com>
Date:   Mon Jul 20 11:28:44 2026 -0500

    pinctrl-amd: Don't clear S4 wake bits at probe

    commit 6bc3462a0f ("pinctrl: amd: Mask wake bits on probe again")
    introduced a regression where Wake-on-LAN no longer works after suspend
    or shutdown on some AMD platforms.

    Firmware-programmed S4 wake bits for devices like PCIe NICs using PCI
    PME are cleared at probe, but nothing restores them. Unlike S0i3/S3 wake
    sources that use enable_irq_wake() -> amd_gpio_irq_set_wake(), PCIe PME
    does not use GPIO IRQ infrastructure and relies on firmware configuration.

    The original intent of commit 6bc3462a0f ("pinctrl: amd: Mask wake
    bits on probe again") was to clear spurious wake bits left by firmware
    to prevent unwanted wakeups. However, S4 wake bits are used for
    hardware-level wake sources like WoL that bypass the kernel's IRQ wake
    API.

    Fix by preserving S4 wake bits at probe and only clearing S0i3/S3 bits:
    - Firmware-configured S4 wake sources (WoL) continue working
    - Kernel maintains control of S3/S0i3 wake policy via set_wake()
    - S3-only wake sources work correctly per commit f31f33dbb3ba ("pinctrl:
      amd: Take suspend type into consideration which pins are non-wake")

    The trade-off is that firmware-programmed spurious S4 wake bits remain
    set, but this is less problematic than breaking WoL.

    Fixes: 6bc3462a0f ("pinctrl: amd: Mask wake bits on probe again")
    Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
    Signed-off-by: Linus Walleij <linusw@kernel.org>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-07-28 10:24:52 -04:00
Steve Best f18d562e71 tools/power/x86/intel-speed-select: Harden daemon pidfile open
JIRA: https://redhat.atlassian.net/browse/RHEL-214504

commit 607af438e6430893a822964c841a1994b33acccc
Author: Ali Ahmet MEMIS <dev@unknownbbqr.xyz>
Date:   Sun Apr 26 08:09:28 2026 -0700

    tools/power/x86/intel-speed-select: Harden daemon pidfile open

    Avoid symlink-based pidfile clobbering by opening the pidfile with
    O_NOFOLLOW and validating it with fstat() before locking/writing.

    The daemon currently uses a fixed pidfile path under /tmp. A local
    unprivileged user can pre-create a symlink at that path and cause a
    root-run daemon instance to write into an attacker-chosen file.

    Fixes: 7fd786dfbd ("tools/power/x86/intel-speed-select: OOB daemon mode")
    Signed-off-by: Ali Ahmet MEMIS <dev@unknownbbqr.xyz>
    Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
    Cc: stable@kernel.org

Signed-off-by: Steve Best <sbest@redhat.com>
2026-07-28 02:17:23 -04:00
Steve Best a1176bfab2 platform/x86: intel: Add notifiers support
JIRA: https://redhat.atlassian.net/browse/RHEL-215232

commit 57c347a2e2473bfb5c1f1132a3209c55efbe640b
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date:   Thu Apr 30 08:11:02 2026 -0700

    platform/x86: intel: Add notifiers support

    In some cases a driver using services of vsec_tpmi driver requires some
    processing before vsec_tpmi exits. For example a children using debugfs
    can't use debugfs as this will be deleted by the vsec_tpmi driver.

    This is the case when unbind using PCI driver interface. In this case
    the remove callback of vsec_tpmi driver is called first, then remove
    callback of its children.

    Add support of blocking chain notifiers support. Notify on successful probe
    and before clean up in the remove callback.

    Fixes: 811f67c516 ("platform/x86/intel/tpmi: Add new auxiliary driver for performance limits")
    Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
    Cc: Stable@vger.kernel.org
    Link: https://patch.msgid.link/20260430151103.1549733-3-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>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-07-24 03:51:25 -04:00
Steve Best f732a39c78 platform/x86: intel: Move debugfs register before creating devices
JIRA: https://redhat.atlassian.net/browse/RHEL-215232

commit ad3bff944c0f4f2e913298a9664391af32f87491
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date:   Thu Apr 30 08:11:01 2026 -0700

    platform/x86: intel: Move debugfs register before creating devices

    It is possible that the driver handling device is enumerated before
    registering debugfs. If the driver wants to access debugfs by calling
    tpmi_get_debugfs_dir(), this will return error in this case.

    Hence register debugfs before creating devices.

    Fixes: 811f67c516 ("platform/x86/intel/tpmi: Add new auxiliary driver for performance limits")
    Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
    Cc: Stable@vger.kernel.org
    Link: https://patch.msgid.link/20260430151103.1549733-2-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>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-07-24 03:51:19 -04:00
Steve Best f3ecdc000e platform/x86/intel/vsec: Fix enable_cnt imbalance on PCIe error recovery
JIRA: https://redhat.atlassian.net/browse/RHEL-213934

commit 348ccc754d8939e21ca5956ff45720b81d6e407f
Author: Lukas Wunner <lukas@wunner.de>
Date:   Thu May 14 07:40:42 2026 +0200

    platform/x86/intel/vsec: Fix enable_cnt imbalance on PCIe error recovery

    After a PCIe Uncorrectable Error has been reported by a device with
    Intel Vendor Specific Extended Capabilities and has been recovered
    through a Secondary Bus Reset, its driver calls intel_vsec_pci_probe()
    to rescan and reinitialize VSECs.

    intel_vsec_pci_probe() invokes pcim_enable_device() and thereby adds
    another devm action which calls pcim_disable_device() on driver unbind.

    So once the driver unbinds, pcim_disable_device() will be called as many
    times as an Uncorrectable Error occurred, plus one.  This will lead to
    an enable_cnt imbalance on driver unbind.

    Additionally, since commit dc957ab6aa05 ("platform/x86/intel/vsec: Add
    private data for per-device data"), a devm_kzalloc() allocation is
    leaked on every Uncorrectable Error.

    Avoid by splitting the VSEC rescan out of intel_vsec_pci_probe() into a
    separate helper and calling that on PCIe error recovery.

    Fixes: 936874b77d ("platform/x86/intel/vsec: Add PCI error recovery support to Intel PMT")
    Signed-off-by: Lukas Wunner <lukas@wunner.de>
    Cc: stable@vger.kernel.org  # v6.0+
    Link: https://patch.msgid.link/bd594d09fa866dc51dddc9a447c3b23f9b1402cc.1778736835.git.lukas@wunner.de
    Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
    Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-07-23 12:35:24 -04:00
Steve Best de5f76366d platform/x86/intel/vsec: Make driver_data info const
JIRA: https://redhat.atlassian.net/browse/RHEL-213934

Conflicts:
- drivers/platform/x86/intel/vsec.c: minor fix up add const in intel_vsec_register_device

commit 9577c74c96f88d807d1ba005adbf5952e7127e55
Author: David E. Box <david.e.box@linux.intel.com>
Date:   Thu Mar 12 18:51:41 2026 -0700

    platform/x86/intel/vsec: Make driver_data info const

    Treat PCI id->driver_data (intel_vsec_platform_info) as read-only by making
    vsec_priv->info a const pointer and updating all function signatures to
    accept const intel_vsec_platform_info *.

    This improves const-correctness and clarifies that the platform info data
    from the driver_data table is not meant to be modified at runtime.

    No functional changes intended.

    Signed-off-by: David E. Box <david.e.box@linux.intel.com>
    Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
    Link: https://patch.msgid.link/20260313015202.3660072-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>

(cherry picked from commit 9577c74c96f88d807d1ba005adbf5952e7127e55)
Assisted-by: Patchpal AI
Signed-off-by: Steve Best <sbest@redhat.com>
2026-07-23 12:35:19 -04:00
Steve Best c1d8ad7a8f x86/fpu: Ensure XFD state on signal delivery
JIRA: https://redhat.atlassian.net/browse/RHEL-213537

commit 388eff894d6bc5f921e9bfff0e4b0ab2684a96e9
Author: Chang S. Bae <chang.seok.bae@intel.com>
Date:   Mon Jun 9 17:16:59 2025 -0700

    x86/fpu: Ensure XFD state on signal delivery

    Sean reported [1] the following splat when running KVM tests:

       WARNING: CPU: 232 PID: 15391 at xfd_validate_state+0x65/0x70
       Call Trace:
        <TASK>
        fpu__clear_user_states+0x9c/0x100
        arch_do_signal_or_restart+0x142/0x210
        exit_to_user_mode_loop+0x55/0x100
        do_syscall_64+0x205/0x2c0
        entry_SYSCALL_64_after_hwframe+0x4b/0x53

    Chao further identified [2] a reproducible scenario involving signal
    delivery: a non-AMX task is preempted by an AMX-enabled task which
    modifies the XFD MSR.

    When the non-AMX task resumes and reloads XSTATE with init values,
    a warning is triggered due to a mismatch between fpstate::xfd and the
    CPU's current XFD state. fpu__clear_user_states() does not currently
    re-synchronize the XFD state after such preemption.

    Invoke xfd_update_state() which detects and corrects the mismatch if
    there is a dynamic feature.

    This also benefits the sigreturn path, as fpu__restore_sig() may call
    fpu__clear_user_states() when the sigframe is inaccessible.

    [ dhansen: minor changelog munging ]

    Closes: https://lore.kernel.org/lkml/aDCo_SczQOUaB2rS@google.com [1]
    Fixes: 672365477a ("x86/fpu: Update XFD state where required")
    Reported-by: Sean Christopherson <seanjc@google.com>
    Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com>
    Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
    Reviewed-by: Chao Gao <chao.gao@intel.com>
    Tested-by: Chao Gao <chao.gao@intel.com>
    Link: https://lore.kernel.org/all/aDWbctO%2FRfTGiCg3@intel.com [2]
    Cc:stable@vger.kernel.org
    Link: https://patch.msgid.link/20250610001700.4097-1-chang.seok.bae%40intel.com

(cherry picked from commit 388eff894d6bc5f921e9bfff0e4b0ab2684a96e9)
Assisted-by: Patchpal
Signed-off-by: Steve Best <sbest@redhat.com>
2026-07-22 06:32:47 -04:00
Steve Best 10c6181096 platform/x86: intel-hid: Protect ACPI notify handler against recursion
JIRA: https://redhat.atlassian.net/browse/RHEL-213294

commit c085d82613d5618814b84406c8b2d64f1bc305e7
Author: HyeongJun An <sammiee5311@gmail.com>
Date:   Sat Jun 6 02:49:05 2026 +0900

    platform/x86: intel-hid: Protect ACPI notify handler against recursion

    Since commit e2ffcda162 ("ACPI: OSL: Allow Notify () handlers to run on
    all CPUs") ACPI notify handlers like the intel-hid notify_handler() may
    run on multiple CPU cores racing with themselves.

    On convertibles and detachables (matched by DMI chassis-type 31 and 32 in
    dmi_auto_add_switch[]) the SW_TABLET_MODE input device is registered
    lazily from notify_handler() on the first tablet-mode event, via
    intel_hid_switches_setup(). When two such events race on different CPUs
    both can pass the !priv->switches check and register the priv->switches
    input device twice, resulting in a duplicate sysfs entry and a subsequent
    NULL pointer dereference.

    This is the same class of bug fixed by commit e075c3b13a ("platform/x86:
    intel-vbtn: Protect ACPI notify handler against recursion") for the
    sibling intel-vbtn driver.

    Protect intel-hid notify_handler() from racing with itself with a mutex
    to fix this.

    Fixes: e2ffcda162 ("ACPI: OSL: Allow Notify () handlers to run on all CPUs")
    Cc: stable@vger.kernel.org
    Signed-off-by: HyeongJun An <sammiee5311@gmail.com>
    Link: https://patch.msgid.link/20260605174905.131095-1-sammiee5311@gmail.com
    Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
    Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-07-21 19:41:36 -04:00
Steve Best c32e06f28c cpufreq: intel_pstate: Set non-turbo capacity to HWP_GUARANTEED_PERF()
JIRA: https://redhat.atlassian.net/browse/RHEL-212894

commit 27d80e0f8b8dff97503fc0061754b1d3800cb961
Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Date:   Tue Jul 7 19:19:55 2026 +0200

    cpufreq: intel_pstate: Set non-turbo capacity to HWP_GUARANTEED_PERF()

    Setting cpu->capacity_perf to cpu->pstate.max_pstate_physical in the
    "no turbo" case is inconsistent with what happens elsewhere in the
    driver and causes arch_scale_cpu_capacity() to be incorrect.  It also
    skews arch_scale_freq_capacity() which ends up differing from 1024 for
    the guaranteed P-state.

    Address that by setting capacity_perf to HWP_GUARANTEED_PERF() in the
    "no turbo" case.

    Fixes: 929ebc93cc ("cpufreq: intel_pstate: Set asymmetric CPU capacity on hybrid systems")
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
    Tested-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
    Cc: All applicable <stable@vger.kernel.org>
    Link: https://patch.msgid.link/12928972.O9o76ZdvQC@rafael.j.wysocki

Signed-off-by: Steve Best <sbest@redhat.com>
2026-07-21 09:19:02 -04:00
Steve Best 6ba51d5c6b thermal: intel: Fix dangling resources on thermal_throttle_online() failure
JIRA: https://issues.redhat.com/browse/RHEL-212369

commit b91d287fa7a1ba0727eed5823c6ee4924ee5fa31
Author: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Date:   Sat Jun 13 15:17:47 2026 -0700

    thermal: intel: Fix dangling resources on thermal_throttle_online() failure

    The function thermal_throttle_add_dev() may fail and abort a CPU hotplug
    online operation. Since the failure occurs within the online callback,
    thermal_throttle_online(), the CPU hotplug framework does not invoke the
    corresponding offline callback. As a result, the hardware and software
    resources set up during the failed operation are not torn down.

    Since only thermal_throttle_add_dev() can fail, call it before setting up
    the rest of the resources.

    Fixes: f6656208f0 ("x86/mce/therm_throt: Optimize notifications of thermal throttle")
    Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
    Link: https://patch.msgid.link/20260613-rneri-directed-therm-intr-v3-1-3a26d1e47fc8@linux.intel.com
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-07-20 18:39:07 -04:00
Steve Best 08b759773e platform/x86/intel-uncore-freq: Fix current_freq_khz after CPU hotplug
JIRA: https://redhat.atlassian.net/browse/RHEL-212368

commit 6b63520ed14b17bbe9c2103debbd2152dde1fba3
Author: Guixiong Wei <weiguixiong@bytedance.com>
Date:   Tue Jun 2 10:07:52 2026 +0800

    platform/x86/intel-uncore-freq: Fix current_freq_khz after CPU hotplug

    When the last CPU of a legacy uncore die goes offline,
    uncore_freq_remove_die_entry() clears control_cpu. During CPU hotplug
    re-add, uncore_freq_add_entry() still populates sysfs attributes before
    assigning the new control CPU. As a result, the current frequency read
    returns -ENXIO and current_freq_khz is omitted from the recreated sysfs
    group.

    Assign control_cpu before the initial read paths and before
    create_attr_group() so sysfs recreation uses the new online CPU. If
    sysfs creation fails, restore control_cpu to -1 to keep the error path
    state consistent.

    Fixes: 4d73c6772a ("platform/x86: intel-uncore-freq: Conditionally create attribute for read frequency")
    Cc: stable@vger.kernel.org
    Signed-off-by: Guixiong Wei <weiguixiong@bytedance.com>
    Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
    Link: https://patch.msgid.link/20260602020752.3126-1-weiguixiong@bytedance.com
    Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
    Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

(cherry picked from commit 6b63520ed14b17bbe9c2103debbd2152dde1fba3)
Assisted-by: Patchpal
Signed-off-by: Steve Best <sbest@redhat.com>
2026-07-20 14:40:51 -04:00
Steve Best 5621beb88d i2c: i801: fix hardware state machine corruption in error path
JIRA: https://redhat.atlassian.net/browse/RHEL-212367

commit 10dd1a736d557e310a77117832874729a0175d57
Author: Mingyu Wang <25181214217@stu.xidian.edu.cn>
Date:   Tue May 12 17:35:34 2026 +0800

    i2c: i801: fix hardware state machine corruption in error path

    A severe livelock and subsequent Hung Task panic were observed in the
    i2c-i801 driver during concurrent Fuzzing. The crash is caused by an
    unconditional hardware register cleanup in the error handling path of
    i801_access().

    When i801_check_pre() fails (e.g., returning -EBUSY because the SMBus
    controller is actively used by BIOS/ACPI), the kernel does not actually
    acquire the hardware ownership. However, the code jumps to the 'out'
    label and executes:

        iowrite8(SMBHSTSTS_INUSE_STS | STATUS_FLAGS, SMBHSTSTS(priv));

    This forcefully clears the INUSE_STS lock and resets the hardware status
    flags without owning the controller. Doing so interrupts ongoing BIOS/ACPI
    transactions and totally corrupts the SMBus hardware state machine.

    Consequently, all subsequent i801_access() calls fail at the pre-check
    stage, triggering an endless stream of "SMBus is busy, can't use it!"
    error logs. Over a slow serial console, this printk flood monopolizes
    the CPU (Console Livelock), starving other processes trying to acquire
    the mmap_lock down_read semaphore, ultimately triggering the hung task
    watchdog.

    Fix this by moving the 'out' label below the hardware register cleanup.
    If i801_check_pre() fails, we safely bypass the iowrite8() and only
    release the software locks (pm_runtime and mutex), strictly adhering to
    the rule of not releasing resources that were never acquired.

    Fixes: 1f760b87e5 ("i2c: i801: Call i801_check_pre() from i801_access()")
    Signed-off-by: Mingyu Wang <25181214217@stu.xidian.edu.cn>
    Cc: <stable@vger.kernel.org> # v6.3+
    Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
    Link: https://lore.kernel.org/r/20260512093534.348655-1-w15303746062@163.com

(cherry picked from commit 10dd1a736d557e310a77117832874729a0175d57)
Assisted-by: Patchpal
Signed-off-by: Steve Best <sbest@redhat.com>
2026-07-20 03:51:12 -04:00
Steve Best 00fd3be22b x86/cpu: Enable FSGSBASE early in cpu_init_exception_handling()
JIRA: https://redhat.atlassian.net/browse/RHEL-211103

commit 05243d490bb7852a8acca7b5b5658019c7797a52
Author: Nikunj A Dadhania <nikunj@amd.com>
Date:   Wed Mar 18 07:56:52 2026 +0000

    x86/cpu: Enable FSGSBASE early in cpu_init_exception_handling()

    Move FSGSBASE enablement from identify_cpu() to cpu_init_exception_handling()
    to ensure it is enabled before any exceptions can occur on both boot and
    secondary CPUs.

    == Background ==

    Exception entry code (paranoid_entry()) uses ALTERNATIVE patching based on
    X86_FEATURE_FSGSBASE to decide whether to use RDGSBASE/WRGSBASE instructions
    or the slower RDMSR/SWAPGS sequence for saving/restoring GSBASE.

    On boot CPU, ALTERNATIVE patching happens after enabling FSGSBASE in CR4.
    When the feature is available, the code is permanently patched to use
    RDGSBASE/WRGSBASE, which require CR4.FSGSBASE=1 to execute without triggering

    == Boot Sequence ==

    Boot CPU (with CR pinning enabled):
      trap_init()
        cpu_init()                   <- Uses unpatched code (RDMSR/SWAPGS)
          x2apic_setup()
      ...
      arch_cpu_finalize_init()
        identify_boot_cpu()
          identify_cpu()
            cr4_set_bits(X86_CR4_FSGSBASE)  # Enables the feature
    	# This becomes part of cr4_pinned_bits
        ...
        alternative_instructions()   <- Patches code to use RDGSBASE/WRGSBASE

    Secondary CPUs (with CR pinning enabled):
      start_secondary()
        cr4_init()                   <- Code already patched, CR4.FSGSBASE=1
                                        set implicitly via cr4_pinned_bits

        cpu_init()                   <- exceptions work because FSGSBASE is
                                        already enabled

    Secondary CPU (with CR pinning disabled):
      start_secondary()
        cr4_init()                   <- Code already patched, CR4.FSGSBASE=0
        cpu_init()
          x2apic_setup()
            rdmsrq(MSR_IA32_APICBASE)  <- Triggers #VC in SNP guests
              exc_vmm_communication()
                paranoid_entry()       <- Uses RDGSBASE with CR4.FSGSBASE=0
                                          (patched code)
        ...
        ap_starting()
          identify_secondary_cpu()
            identify_cpu()
    	  cr4_set_bits(X86_CR4_FSGSBASE)  <- Enables the feature, which is
                                                 too late

    == CR Pinning ==

    Currently, for secondary CPUs, CR4.FSGSBASE is set implicitly through
    CR-pinning: the boot CPU sets it during identify_cpu(), it becomes part of
    cr4_pinned_bits, and cr4_init() applies those pinned bits to secondary CPUs.
    This works but creates an undocumented dependency between cr4_init() and the
    pinning mechanism.

    == Problem ==

    Secondary CPUs boot after alternatives have been applied globally. They
    execute already-patched paranoid_entry() code that uses RDGSBASE/WRGSBASE
    instructions, which require CR4.FSGSBASE=1. Upcoming changes to CR pinning
    behavior will break the implicit dependency, causing secondary CPUs to
    generate #UD.

    This issue manifests itself on AMD SEV-SNP guests, where the rdmsrq() in
    x2apic_setup() triggers a #VC exception early during cpu_init(). The #VC
    handler (exc_vmm_communication()) executes the patched paranoid_entry() path.
    Without CR4.FSGSBASE enabled, RDGSBASE instructions trigger #UD.

    == Fix ==

    Enable FSGSBASE explicitly in cpu_init_exception_handling() before loading
    exception handlers. This makes the dependency explicit and ensures both
    boot and secondary CPUs have FSGSBASE enabled before paranoid_entry()
    executes.

    Fixes: c82965f9e5 ("x86/entry/64: Handle FSGSBASE enabled paranoid entry/exit")
    Reported-by: Borislav Petkov <bp@alien8.de>
    Suggested-by: Sohil Mehta <sohil.mehta@intel.com>
    Signed-off-by: Nikunj A Dadhania <nikunj@amd.com>
    Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
    Reviewed-by: Sohil Mehta <sohil.mehta@intel.com>
    Cc: <stable@kernel.org>
    Link: https://patch.msgid.link/20260318075654.1792916-2-nikunj@amd.com

(cherry picked from commit 05243d490bb7852a8acca7b5b5658019c7797a52)
Assisted-by: Patchpal
Signed-off-by: Steve Best <sbest@redhat.com>
2026-07-16 04:58:05 -04:00
Steve Best 06a0f82a39 cpufreq: intel_pstate: Sync policy->cur during CPU offline
JIRA: https://redhat.atlassian.net/browse/RHEL-210859

commit bcbdaa1086c25a8a5d48e04e1b82fdfb0682b681
Author: Fushuai Wang <wangfushuai@baidu.com>
Date:   Wed May 20 11:21:19 2026 +0800

    cpufreq: intel_pstate: Sync policy->cur during CPU offline

    When a CPU goes offline with HWP disabled, intel_pstate_set_min_pstate()
    sets the MSR_IA32_PERF_CTL to minimum frequency to prevent SMT siblings
    from being restricted. However, the policy->cur value was not updated,
    leaving it at the previous value.

    When the CPU comes back online, governor->limits() checks if target_freq
    equals policy->cur and skips the frequency adjustment if they match. Since
    policy->cur still holds the previous value, the governor does not call
    cpufreq_driver->target to update MSR_IA32_PERF_CTL.

    Fix this by synchronizing policy->cur with the hardware state when setting
    minimum pstate during CPU offline.

    Fixes: bb18008f80 ("intel_pstate: Set core to min P state during core offline")
    Cc: stable@vger.kernel.org # 3.15+
    Suggested-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
    Signed-off-by: Fushuai Wang <wangfushuai@baidu.com>
    [ rjw: Subject refinement ]
    Link: https://patch.msgid.link/20260520032119.30615-1-fushuai.wang@linux.dev
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

(cherry picked from commit bcbdaa1086c25a8a5d48e04e1b82fdfb0682b681)
Assisted-by: Patchpal
Signed-off-by: Steve Best <sbest@redhat.com>
2026-07-15 03:19:24 -04:00
Steve Best 33d374ed99 platform/x86/amd/hsmp: Clamp ioctl/send_message indices (Spectre v1)
JIRA: https://issues.redhat.com/browse/RHEL-208745

commit d20457b46eca76b9bb716dd31af591cad21607b5
Author: Muralidhara M K <muralidhara.mk@amd.com>
Date:   Fri Jun 12 09:56:08 2026 +0530

    platform/x86/amd/hsmp: Clamp ioctl/send_message indices (Spectre v1)

    Although validate_message() checks msg_id, a mispredicted branch can
    still allow speculative indexing into hsmp_msg_desc_table[]. Clamp
    msg.msg_id with array_index_nospec() at entry to hsmp_ioctl_msg() so
    downstream dereferences (including via is_get_msg() and
    hsmp_send_message()) see a bounded index.

    Similarly, hsmp_send_message() bounds-checks msg->sock_ind before
    indexing hsmp_pdev.sock[], but a mispredicted branch can still
    speculatively use the raw index (Spectre v1, CVE-2017-5753). Apply
    array_index_nospec() after the check so every caller that reaches
    hsmp_pdev.sock[] through this helper sees a clamped socket
    index—including hsmp_ioctl_msg() and any other path that hands a
    user-derived struct hsmp_message to hsmp_send_message().

    Reviewed-by: Muthusamy Ramalingam <muthusamy.ramalingam@amd.com>
    Signed-off-by: Muralidhara M K <muralidhara.mk@amd.com>
    Link: https://patch.msgid.link/20260612042610.1629037-7-muralidhara.mk@amd.com
    Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
    Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-07-14 14:17:43 -04:00
Steve Best 8bd78ce110 powercap: intel_rapl: Fix memory leak in rapl_add_package_cpuslocked()
JIRA: https://issues.redhat.com/browse/RHEL-193546

commit bfc7d93bc5e12288e5dc6bb54260f68cdf5a5c47
Author: Sumeet Pawnikar <sumeet4linux@gmail.com>
Date:   Fri May 15 23:56:16 2026 +0530

    powercap: intel_rapl: Fix memory leak in rapl_add_package_cpuslocked()

    When topology_physical_package_id()/topology_logical_die_id() returns
    a negative value, rapl_add_package_cpuslocked() returns ERR_PTR(-EINVAL)
    directly without freeing the rapl_package structure that was just
    allocated by kzalloc_obj(), leaking memory on every failed package
    addition.

    Use the existing err_free_package label so that the allocation is
    released on the error path.

    Signed-off-by: Sumeet Pawnikar <sumeet4linux@gmail.com>
    Link: https://patch.msgid.link/20260515182616.227707-1-sumeet4linux@gmail.com
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-07-09 05:06:04 -04:00
Steve Best 9418ee4757 thermal: intel: int340x: Read DDR data rate for Nova Lake
JIRA: https://issues.redhat.com/browse/RHEL-117276

commit 6d3e2ce6f10107c2e5870e9dce7c2e1d03a6be72
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date:   Mon Feb 23 11:04:20 2026 -0800

    thermal: intel: int340x: Read DDR data rate for Nova Lake

    Add support for reading DDR data rate from PCI config offset.

    The register details are:

     CFG Offset : 0xE0
     Bits      : 11:2

    DDR Data rate is in 33.33 MTPS units.

    Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
    [ rjw: Rearrange code to avoid using goto and make declarations consistent ]
    Link: https://patch.msgid.link/20260223190420.874853-1-srinivas.pandruvada@linux.intel.com
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-06-23 04:28:39 -04:00
Steve Best 1274dae4fa platform/x86: ISST: Increase minor version
JIRA: https://issues.redhat.com/browse/RHEL-185954

commit ba7d46e0a384398c58eee34579986f830260d37b
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date:   Wed Mar 25 12:31:57 2026 -0700

    platform/x86: ISST: Increase minor version

    The current implementation doesn't require any changes to support minor
    version 3, hence increment it to avoid "Unsupported minor version:3"
    message.

    Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
    Link: https://patch.msgid.link/20260325193158.3417382-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>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-06-17 20:17:40 -04:00
Steve Best 1f07580d3f intel_idle: Add Panther Lake C-states table
JIRA: https://issues.redhat.com/browse/RHEL-185572

commit d51de21b4c3a34a2cc592319df63864e14b18b29
Author: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Date:   Mon Mar 9 10:38:18 2026 +0200

    intel_idle: Add Panther Lake C-states table

    Panther Lake supports the following requestable C-states: C1, C1E, C6S,
    C10.

    The parameters of these C-states should be consistent across all
    systems based on Panther Lake, so add a custom C-states table for it
    that will override C-state parameters supplied by platform firmware
    that may vary from one platform to another and may not represent the
    most optimum choice.

    Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
    [ rjw: Changelog expansion ]
    Link: https://patch.msgid.link/20260309083818.79588-1-dedekind1@gmail.com
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-06-17 08:38:17 -04:00
Steve Best de1300f961 platform/x86/intel-uncore-freq: Increase minor version
JIRA: https://issues.redhat.com/browse/RHEL-185138

commit b7f4e7babc122426e8802dffdd8ff1501db6adf4
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date:   Wed Mar 25 12:31:58 2026 -0700

    platform/x86/intel-uncore-freq: Increase minor version

    The current implementation doesn't require any changes to support minor
    version 3, hence increment it to avoid "Unsupported minor version:3"
    message.

    Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
    Link: https://patch.msgid.link/20260325193158.3417382-2-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>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-06-16 19:02:04 -04:00
Steve Best 07ffa4c609 platform/x86/intel-uncore-freq: Handle autonomous UFS status bit
JIRA: https://issues.redhat.com/browse/RHEL-185138

commit 4ab604b3f3aa8dcccc7505f5d310016682a99d5f
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date:   Wed Mar 25 12:29:09 2026 -0700

    platform/x86/intel-uncore-freq: Handle autonomous UFS status bit

    When the AUTONOMOUS_UFS_DISABLED bit is set in the header, the ELC
    (Efficiency Latency Control) feature is non-functional. Hence, return
    error for read or write to ELC attributes.

    Fixes: bb516dc79c ("platform/x86/intel-uncore-freq: Add support for efficiency latency control")
    Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
    Cc: stable@vger.kernel.org
    Link: https://patch.msgid.link/20260325192909.3417322-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>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-06-16 19:01:58 -04:00
Steve Best 3a5ef8b63f tools/power/x86/intel-speed-select: Fix output when running on unsupported CLX platforms
JIRA: https://issues.redhat.com/browse/RHEL-184884

commit 1b25f03f3daf7c26c37050a7b2b5858ad5f99cfc
Author: Zhang Rui <rui.zhang@intel.com>
Date:   Thu Mar 19 13:52:56 2026 +0800

    tools/power/x86/intel-speed-select: Fix output when running on unsupported CLX platforms

    When running intel-speed-select on unsupported CLX platforms, it prints
     intel-speed-select: Invalid CPU model (85)
     : Success
    Because this is not a system error and errno is not set.

    Replace err() with exit().

    Signed-off-by: Zhang Rui <rui.zhang@intel.com>
    Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-06-15 07:30:52 -04:00
Steve Best 6ae9150a7b tools/power/x86/intel-speed-select: Fix some program return value
JIRA: https://issues.redhat.com/browse/RHEL-184884

commit 3e244dd513e26728577f1e4deca6fdf749b6f244
Author: Zhang Rui <rui.zhang@intel.com>
Date:   Thu Mar 19 13:52:54 2026 +0800

    tools/power/x86/intel-speed-select: Fix some program return value

    When running the "intel-speed-select -h" command, it returns
    1. 0 when using a version that is API incompatible.
    2. 1 when using a version that is API compatible.
    And this is confusing.

    Fix the program to return 0 for "-h" parameter, and return 1 whenever
    "Incompatible API versions" is detected.

    Signed-off-by: Zhang Rui <rui.zhang@intel.com>
    Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-06-15 07:30:45 -04:00
Steve Best 557b181e46 tools/power/x86/intel-speed-select: Fix cpu extended family ID decoding
JIRA: https://issues.redhat.com/browse/RHEL-184884

commit df4a83543117c7fc27077fd7f4ffe870556b257b
Author: Zhang Rui <rui.zhang@intel.com>
Date:   Mon Jan 26 08:27:01 2026 +0800

    tools/power/x86/intel-speed-select: Fix cpu extended family ID decoding

    When decode and use CPU extended family ID in intel-speed-select, there
    are several potential issues,
    1. Mask with 0x0f to get CPU extended family ID is bogus because
       CPU extended family ID takes 8 bits (bit 27:20).
    2. Use CPU extended family ID fields without checking CPU family ID is
       risky. Because Intel SDM says, "The Extended Family ID needs to be
       examined only when the Family ID is 0FH."
    3. Saving cpu family ID and cpu extended family ID separately doesn't
       align with Linux kernel. And it may bring extra complexity when
       making family specific changes in the future.

    Signed-off-by: Zhang Rui <rui.zhang@intel.com>
    Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-06-15 07:30:39 -04:00
Steve Best 8dc27e2a90 x86/mce: Restore MCA polling interval halving
JIRA: https://issues.redhat.com/browse/RHEL-182292

commit ea324444ece9f301b5c4ff71b258cc68990c4d61
Author: Borislav Petkov (AMD) <bp@alien8.de>
Date:   Mon Mar 16 16:12:00 2026 +0100

    x86/mce: Restore MCA polling interval halving

    RongQing reported that the MCA polling interval doesn't halve when an
    error gets logged. It was traced down to the commit in Fixes:, because:

      mce_timer_fn()
      |-> mce_poll_banks()
      |-> machine_check_poll()
      |-> mce_log()

    which will queue the work and return.

    Now, back in mce_timer_fn():

            /*
             * Alert userspace if needed. If we logged an MCE, reduce the polling
             * interval, otherwise increase the polling interval.
             */
            if (mce_notify_irq())

    <--- here we haven't ran the notifier chain yet so mce_need_notify is
    not set yet so this won't hit and we won't halve the interval iv.

    Now the notifier chain runs. mce_early_notifier() sets the bit, does
    mce_notify_irq(), that clears the bit and then the notifier chain
    a little later logs the error.

    So this is a silly timing issue.

    But, that's all unnecessary.

    All it needs to happen here is, the "should we notify of a logged MCE"
    mce_notify_irq() asks, should be simply a question to the mce gen pool:
    "Are you empty?"

    And that then turns into a simple yes or no answer and it all
    JustWorks(tm).

    So do that and also distribute the functionality where it belongs:
     - Print that MCE events have been logged in mce_log()
     - Trigger the mcelog tool specific work in the first notifier

    As a result, mce_notify_irq() can go now.

    Fixes: 011d826111 ("RAS: Add a Corrected Errors Collector")
    Reported-by: Li RongQing <lirongqing@baidu.com>
    Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
    Reviewed-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
    Tested-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
    Link: https://lore.kernel.org/r/20260112082747.2842-1-lirongqing@baidu.com

Signed-off-by: Steve Best <sbest@redhat.com>
2026-06-10 15:55:03 -04:00
Steve Best 1a7173b676 platform/x86/intel/tpmi/plr: Prevent fault during unbind
JIRA: https://issues.redhat.com/browse/RHEL-182358

commit 14473e8c4e97d51eff9b2f384ae696f7a32f182b
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date:   Thu Apr 30 08:11:03 2026 -0700

    platform/x86/intel/tpmi/plr: Prevent fault during unbind

    This driver faults when intel vsec driver is unbound from PCI driver
    interface. For example:

    echo 0000:00:03.1 > /sys/bus/pci/drivers/intel_vsec/unbind

    This is caused by accessing plr->dbgfs_dir after vsec_tpmi driver is
    removed. Here vsec_tpmi driver is the parent. On unbind, the parent
    device remove callback is called first which here will remove debugfs
    interface. Hence plr->dbgfs_dir is no longer valid.

    Register notifier for TPMI_CORE_EXIT and make this pointer to NULL,
    so that debugfs_remove_recursive() is not called with bad plr->dbgfs_dir
    pointer.

    After notifier is returned the vsec_tpmi driver will call remove debugfs
    by calling debugfs_remove_recursive().

    Fixes: 811f67c516 ("platform/x86/intel/tpmi: Add new auxiliary driver for performance limits")
    Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
    Cc: Stable@vger.kernel.org
    Link: https://patch.msgid.link/20260430151103.1549733-4-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>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-06-09 04:44:17 -04:00
Steve Best 60644d1a89 platform/x86: intel-hid: Check ACPI_HANDLE() against NULL
JIRA: https://issues.redhat.com/browse/RHEL-182291

commit 5c69e090ae5dd93d910f70db0796357080707d26
Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Date:   Tue May 12 17:13:28 2026 +0200

    platform/x86: intel-hid: Check ACPI_HANDLE() against NULL

    Every platform driver can be forced to match a device that doesn't match
    its list of device IDs because of device_match_driver_override(), so
    platform drivers that rely on the existence of a device's ACPI companion
    object need to verify its presence.

    Accordingly, add a requisite ACPI_HANDLE() check against NULL to the
    platform/x86 intel-hid driver.

    Fixes: ecc83e52b2 ("intel-hid: new hid event driver for hotkeys")
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
    Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Link: https://patch.msgid.link/1971512.tdWV9SEqCh@rafael.j.wysocki
    Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
    Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-06-08 05:57:55 -04:00
Steve Best 0ce4705bb8 mei: late_bind: fix struct intel_lb_component_ops kernel-doc
JIRA: https://issues.redhat.com/browse/RHEL-177639

commit 936cae9254e55a39aeaa0c156a764d22f319338b
Author: Jani Nikula <jani.nikula@intel.com>
Date:   Wed Jan 7 18:02:26 2026 +0200

    mei: late_bind: fix struct intel_lb_component_ops kernel-doc

    Fix kernel-doc warnings on struct intel_lb_component_ops:

    Warning: include/drm/intel/intel_lb_mei_interface.h:55 Incorrect use of
      kernel-doc format: * push_payload - Sends a payload to the
      authentication firmware

    And a bunch more. There isn't really support for documenting function
    pointer struct members in kernel-doc, but at least reference the member
    properly.

    Fixes: 741eeabb7c78 ("mei: late_bind: add late binding component driver")
    Cc: Alexander Usyskin <alexander.usyskin@intel.com>
    Reviewed-by: Nitin Gote <nitin.r.gote@intel.com>
    Link: https://patch.msgid.link/20260107160226.2381388-1-jani.nikula@intel.com
    Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-19 14:14:02 -04:00
Steve Best 15f0fa0e4b misc/mei: INTEL_MEI should depend on X86 or DRM_XE
JIRA: https://issues.redhat.com/browse/RHEL-177639

commit 69335152910b775e7835939d5c863c580c605275
Author: Geert Uytterhoeven <geert+renesas@glider.be>
Date:   Tue Jan 27 20:11:05 2026 +0100

    misc/mei: INTEL_MEI should depend on X86 or DRM_XE

    The Intel Management Engine Interface is only present on x86 platforms
    and Intel Xe graphics cards.  Hence add a dependency on X86 or DRM_XE,
    to prevent asking the user about this driver when configuring a kernel
    for a non-x86 architecture and without Xe graphics support.

    Fixes: 25f9b0d35155 ("misc/mei: Allow building Intel ME interface on non-x86")
    Cc: stable <stable@kernel.org>
    Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
    Link: https://patch.msgid.link/8e2646fb71b148b3d38beb13f19b14e3634a1e1a.1769541024.git.geert+renesas@glider.be
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

(cherry picked from commit 69335152910b775e7835939d5c863c580c605275)
Assisted-by: Patchpal
Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-19 14:07:31 -04:00
Steve Best 38319b40a5 mei: me: reduce the scope on unexpected reset
JIRA: https://issues.redhat.com/browse/RHEL-177639

commit 8c27b1bce059a11a8d3c8682984e13866f0714af
Author: Alexander Usyskin <alexander.usyskin@intel.com>
Date:   Mon Mar 30 11:38:30 2026 +0300

    mei: me: reduce the scope on unexpected reset

    After commit 2cedb296988c ("mei: me: trigger link reset if hw ready is unexpected")
    some devices started to show long resume times (5-7 seconds).
    This happens as mei falsely detects unready hardware,
    starts parallel link reset flow and triggers link reset timeouts
    in the resume callback.

    Address it by performing detection of unready hardware only
    when driver is in the MEI_DEV_ENABLED state instead of blacklisting
    states as done in the original patch.
    This eliminates active waitqueue check as in MEI_DEV_ENABLED state
    there will be no active waitqueue.

    Reviewed-by: Rafael J. Wysocki (Intel) <rafael@kernel.org>
    Reported-by: Todd Brandt <todd.e.brandt@linux.intel.com>
    Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221023
    Tested-by: Todd Brandt <todd.e.brandt@linux.intel.com>
    Fixes: 2cedb296988c ("mei: me: trigger link reset if hw ready is unexpected")
    Cc: stable <stable@kernel.org>
    Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
    Link: https://patch.msgid.link/20260330083830.536056-1-alexander.usyskin@intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-19 14:07:26 -04:00
Steve Best 15efdb39a9 mei: trace: treat reg parameter as string
JIRA: https://issues.redhat.com/browse/RHEL-177639

commit 06d5a7afe1d0b47102936d8fba568572c2b4b941
Author: Alexander Usyskin <alexander.usyskin@intel.com>
Date:   Sun Jan 11 16:51:25 2026 +0200

    mei: trace: treat reg parameter as string

    The commit
    afd2627f727b ("tracing: Check "%s" dereference via the field and not the TP_printk format")
    forbids to emit event with a plain char* without a wrapper.

    The reg parameter always passed as static string and wrapper
    is not strictly required, contrary to dev parameter.
    Use the string wrapper anyway to check sanity of the reg parameters,
    store it value independently and prevent internal kernel data leaks.

    Since some code refactoring has taken place, explicit backporting may
    be needed for kernels older than 6.10.

    Cc: stable@vger.kernel.org  # v6.11+
    Fixes: a0a927d06d ("mei: me: add io register tracing")
    Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
    Link: https://patch.msgid.link/20260111145125.1754912-1-alexander.usyskin@intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-19 14:07:21 -04:00
Steve Best 7847af1441 misc/mei: gsc_proxy: add dependency on Xe driver
JIRA: https://issues.redhat.com/browse/RHEL-177639

commit 327e987e5166a407554e8cccba8e5f8d51f1c868
Author: Simon Richter <Simon.Richter@hogyros.de>
Date:   Thu Jan 8 03:26:05 2026 +0900

    misc/mei: gsc_proxy: add dependency on Xe driver

    This driver is useful if at least one DRM driver registers an auxiliary device
    for the ME interface. With the addition of Xe, this is no longer just i915.

    Cc: Usyskin, Alexander <alexander.usyskin@intel.com>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Simon Richter <Simon.Richter@hogyros.de>
    Link: https://patch.msgid.link/20260107182615.488194-5-Simon.Richter@hogyros.de
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-19 14:07:16 -04:00
Steve Best 7878cec6aa misc/mei: Allow building standalone for compile testing
JIRA: https://issues.redhat.com/browse/RHEL-177639

commit 6d5dca5f9e37741f5e50c31c81b497f875dca6c8
Author: Simon Richter <Simon.Richter@hogyros.de>
Date:   Thu Jan 8 03:26:04 2026 +0900

    misc/mei: Allow building standalone for compile testing

    While this is not a particularly useful configuration, the MEI code should
    compile even when no drivers for a GPU containing a management engine are
    built.

    Cc: Usyskin, Alexander <alexander.usyskin@intel.com>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Simon Richter <Simon.Richter@hogyros.de>
    Link: https://patch.msgid.link/20260107182615.488194-4-Simon.Richter@hogyros.de
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-19 14:07:10 -04:00
Steve Best c9cc2b0193 misc/mei: Decouple ME interfaces from GPU drivers
JIRA: https://issues.redhat.com/browse/RHEL-177639

commit d876cb978058a57b5d28b2b3e16197f678ce8311
Author: Simon Richter <Simon.Richter@hogyros.de>
Date:   Thu Jan 8 03:26:03 2026 +0900

    misc/mei: Decouple ME interfaces from GPU drivers

    These are enumerated via an auxiliary bus, so there is no functional
    dependency between these drivers, therefore allow compiling MEI as builtin
    even when i915/xe are built as modules.

    Cc: Usyskin, Alexander <alexander.usyskin@intel.com>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Simon Richter <Simon.Richter@hogyros.de>
    Link: https://patch.msgid.link/20260107182615.488194-3-Simon.Richter@hogyros.de
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-19 14:07:05 -04:00
Steve Best 62f29532a3 misc/mei: Allow building Intel ME interface on non-x86
JIRA: https://issues.redhat.com/browse/RHEL-177639

commit 25f9b0d351552f63ac3f72e6c655bc8f9994f7d2
Author: Simon Richter <Simon.Richter@hogyros.de>
Date:   Thu Jan 8 03:26:02 2026 +0900

    misc/mei: Allow building Intel ME interface on non-x86

    The xe driver supports dGPUs which can be plugged into non-x86 machines,
    and exposes a MEI GSC interface, so this driver is no longer x86 only.

    Cc: Usyskin, Alexander <alexander.usyskin@intel.com>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Simon Richter <Simon.Richter@hogyros.de>
    Link: https://patch.msgid.link/20260107182615.488194-2-Simon.Richter@hogyros.de
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

(cherry picked from commit 25f9b0d351552f63ac3f72e6c655bc8f9994f7d2)
Assisted-by: Patchpal
Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-19 14:07:00 -04:00
Steve Best a8087895aa mei: Fix error handling in mei_register
JIRA: https://issues.redhat.com/browse/RHEL-177639

commit a6dab2f61d23c1eb32f1d08fa7b4919a2478950b
Author: Ma Ke <make24@iscas.ac.cn>
Date:   Tue Nov 4 10:01:33 2025 +0800

    mei: Fix error handling in mei_register

    mei_register() fails to release the device reference in error paths
    after device_initialize(). During normal device registration, the
    reference is properly handled through mei_deregister() which calls
    device_destroy(). However, in error handling paths (such as cdev_alloc
    failure, cdev_add failure, etc.), missing put_device() calls cause
    reference count leaks, preventing the device's release function
    (mei_device_release) from being called and resulting in memory leaks
    of mei_device.

    Found by code review.

    Cc: stable <stable@kernel.org>
    Fixes: 7704e6be4ed2 ("mei: hook mei_device on class device")
    Signed-off-by: Ma Ke <make24@iscas.ac.cn>
    Acked-by: Alexander Usyskin <alexander.usyskin@intel.com>
    Link: https://patch.msgid.link/20251104020133.5017-1-make24@iscas.ac.cn
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-19 14:06:55 -04:00
Steve Best 9e4b8a37e2 mei: gsc: add dependency on Xe driver
JIRA: https://issues.redhat.com/browse/RHEL-177639

commit 5d92c3b41f0bddfa416130c6e1b424414f3d2acf
Author: Junxiao Chang <junxiao.chang@intel.com>
Date:   Sun Nov 9 17:35:33 2025 +0200

    mei: gsc: add dependency on Xe driver

    INTEL_MEI_GSC depends on either i915 or Xe
    and can be present when either of above is present.

    Cc: stable <stable@kernel.org>
    Fixes: 87a4c85d3a ("drm/xe/gsc: add gsc device support")
    Tested-by: Baoli Zhang <baoli.zhang@intel.com>
    Signed-off-by: Junxiao Chang <junxiao.chang@intel.com>
    Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
    Link: https://patch.msgid.link/20251109153533.3179787-1-alexander.usyskin@intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-19 14:06:49 -04:00
Steve Best 4963994055 mei: Remove redundant pm_runtime_mark_last_busy() calls
JIRA: https://issues.redhat.com/browse/RHEL-177639

commit 58796560642a6e3148661a4df9da342a9a301748
Author: Sakari Ailus <sakari.ailus@linux.intel.com>
Date:   Mon Oct 27 13:41:18 2025 +0200

    mei: Remove redundant pm_runtime_mark_last_busy() calls

    pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
    pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
    to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
    pm_runtime_mark_last_busy().

    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Acked-by: Alexander Usyskin <alexander.usyskin@intel.com>
    Link: https://patch.msgid.link/20251027114118.390775-1-sakari.ailus@linux.intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-19 14:06:44 -04:00
Steve Best 58203a0df5 mei: fix error flow in probe
JIRA: https://issues.redhat.com/browse/RHEL-177639

commit 1ebc180d2b9066043226299cecc42c1ea146ac8e
Author: Alexander Usyskin <alexander.usyskin@intel.com>
Date:   Sun Nov 2 20:08:36 2025 +0200

    mei: fix error flow in probe

    Dismantle class device last in probe error flow to avoid accessing
    freed memory like:

    [   87.926774] WARNING: CPU: 9 PID: 518 at kernel/workqueue.c:4234
    __flush_work+0x340/0x390
    ...
    [   87.926912] Workqueue: async async_run_entry_fn
    [   87.926918] RIP: e030:__flush_work+0x340/0x390
    [   87.926923] Code: 26 9d 05 00 65 48 8b 15 26 3c ca 02 48 85 db 48 8b
    04 24 48 89 54 24 58 0f 85 de fe ff ff e9 f6 fd ff ff 0f 0b e9 77 ff ff
    ff <0f> 0b e9 70 ff ff ff 0f 0b e9 19 ff ff ff e8 7d 8b 0e 01 48 89 de
    [   87.926931] RSP: e02b:ffffc900412ebc00 EFLAGS: 00010246
    [   87.926936] RAX: 0000000000000000 RBX: ffff888103e55090 RCX: 0000000000000000
    [   87.926941] RDX: 000fffffffe00000 RSI: 0000000000000001 RDI: ffffc900412ebc60
    [   87.926945] RBP: ffff888103e55090 R08: ffffffffc1266ec8 R09: ffff8881109076e8
    [   87.926949] R10: 0000000080040003 R11: 0000000000000000 R12: ffff888103e54000
    [   87.926953] R13: ffffc900412ebc18 R14: 0000000000000001 R15: 0000000000000000
    [   87.926962] FS:  0000000000000000(0000) GS:ffff888233238000(0000) knlGS:0000000000000000
    [   87.926967] CS:  e030 DS: 0000 ES: 0000 CR0: 0000000080050033
    [   87.926971] CR2: 00007e7923b32708 CR3: 00000001088df000 CR4: 0000000000050660
    [   87.926977] Call Trace:
    [   87.926981]  <TASK>
    [   87.926987]  ? __call_rcu_common.constprop.0+0x11e/0x310
    [   87.926993]  cancel_work_sync+0x5e/0x80
    [   87.926999]  mei_cancel_work+0x19/0x40 [mei]
    [   87.927051]  mei_me_probe+0x273/0x2b0 [mei_me]
    [   87.927060]  local_pci_probe+0x45/0x90
    [   87.927066]  pci_call_probe+0x5b/0x180
    [   87.927070]  pci_device_probe+0x95/0x140
    [   87.927074]  ? driver_sysfs_add+0x57/0xc0
    [   87.927079]  really_probe+0xde/0x340
    [   87.927083]  ? pm_runtime_barrier+0x54/0x90
    [   87.927087]  __driver_probe_device+0x78/0x110
    [   87.927092]  driver_probe_device+0x1f/0xa0
    [   87.927095]  __driver_attach_async_helper+0x5e/0xe0
    [   87.927100]  async_run_entry_fn+0x34/0x130
    [   87.927104]  process_one_work+0x18d/0x340
    [   87.927108]  worker_thread+0x256/0x3a0
    [   87.927111]  ? __pfx_worker_thread+0x10/0x10
    [   87.927115]  kthread+0xfc/0x240
    [   87.927120]  ? __pfx_kthread+0x10/0x10
    [   87.927124]  ? __pfx_kthread+0x10/0x10
    [   87.927127]  ret_from_fork+0xf5/0x110
    [   87.927132]  ? __pfx_kthread+0x10/0x10
    [   87.927136]  ret_from_fork_asm+0x1a/0x30
    [   87.927141]  </TASK>

    Tested-by: Guenter Roeck <groeck@google.com>
    Reported-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
    Closes: https://lore.kernel.org/lkml/aQbYAXPADqfiXUYO@mail-itl/
    Reported-by: Guenter Roeck <linux@roeck-us.net>
    Closes: https://lore.kernel.org/lkml/8deef7c4-ac75-4db8-91b7-02cf0e39e371@roeck-us.net/
    Fixes: 7704e6be4ed2 ("mei: hook mei_device on class device")
    Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
    Tested-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
    Link: https://patch.msgid.link/20251102180836.1203314-1-alexander.usyskin@intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-19 14:06:39 -04:00
Steve Best 8249bdff3b mei: txe: fix initialization order
JIRA: https://issues.redhat.com/browse/RHEL-177639

commit 2463ae285e5c162686fb19e822fb6b535e6e728a
Author: Alexander Usyskin <alexander.usyskin@intel.com>
Date:   Sun Oct 19 10:36:59 2025 +0300

    mei: txe: fix initialization order

    The mei_register() should move before the mei_start() for hook
    on class device to work.
    Same change was implemented in mei-me, missed from mei-txe.

    Fixes: 7704e6be4ed2 ("mei: hook mei_device on class device")
    Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
    Link: https://patch.msgid.link/20251019073659.2646791-1-alexander.usyskin@intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-19 14:06:34 -04:00
Steve Best 82fb6fde72 mei: late_bind: Fix -Wincompatible-function-pointer-types-strict
JIRA: https://issues.redhat.com/browse/RHEL-177639

commit 98718e80af0bb1cd80f4bfe565dd60c57debad51
Author: Nathan Chancellor <nathan@kernel.org>
Date:   Sat Sep 20 16:17:50 2025 -0700

    mei: late_bind: Fix -Wincompatible-function-pointer-types-strict

    When building with -Wincompatible-function-pointer-types-strict, a
    warning designed to catch kernel control flow integrity (kCFI) issues at
    build time, there is an instance in the new mei late binding code
    originating from the type parameter of mei_lb_push_payload():

      drivers/misc/mei/mei_lb.c:211:18: error: incompatible function pointer types initializing 'int (*)(struct device *, u32, u32, const void *, size_t)' (aka 'int (*)(struct device *, unsigned int, unsigned int, const void *, unsigned long)') with an expression of type 'int (struct device *, enum intel_lb_type, u32, const void *, size_t)' (aka 'int (struct device *, enum intel_lb_type, unsigned int, const void *, unsigned long)') [-Werror,-Wincompatible-function-pointer-types-strict]
        211 |         .push_payload = mei_lb_push_payload,
            |                         ^~~~~~~~~~~~~~~~~~~

    While 'unsigned int' and 'enum intel_lb_type' are ABI compatible, hence
    no regular warning from -Wincompatible-function-pointer-types, the
    mismatch will trigger a kCFI violation when mei_lb_push_payload() is
    called indirectly.

    Update the type parameter of mei_lb_push_payload() to be 'u32' to match
    the prototype in 'struct intel_lb_component_ops', clearing up the
    warning and kCFI violation.

    Fixes: 741eeabb7c78 ("mei: late_bind: add late binding component driver")
    Signed-off-by: Nathan Chancellor <nathan@kernel.org>
    Link: https://patch.msgid.link/20250920-drm-xe-fix-wifpts-v1-1-c89b5357c7ba@kernel.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-19 14:06:29 -04:00
Steve Best ec12614f60 redhat/configs: disable CONFIG_INTEL_MEI_LB
Description:
Disable Intel Late Binding (LB) via the MEI interface

JIRA: https://issues.redhat.com/browse/RHEL-177639

Upstream Status: RHEL only

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-19 14:06:25 -04:00
Steve Best 721f1f195a mei: late_bind: add late binding component driver [partial]
JIRA: https://issues.redhat.com/browse/RHEL-177639

Conflicts: drm parts are already in RHEL

commit 741eeabb7c78c555c4c8e39df91b2b8e8d6f5ec6
Author: Alexander Usyskin <alexander.usyskin@intel.com>
Date:   Fri Sep 5 21:19:46 2025 +0530

    mei: late_bind: add late binding component driver

    Introduce a new MEI client driver to support Late Binding firmware
    upload/update for Intel discrete graphics platforms.

    Late Binding is a runtime firmware upload/update mechanism that allows
    payloads, such as fan control and voltage regulator, to be securely
    delivered and applied without requiring SPI flash updates or
    system reboots. This driver enables the Xe graphics driver and other
    user-space tools to push such firmware blobs to the authentication
    firmware via the MEI interface.

    The driver handles authentication, versioning, and communication
    with the authentication firmware, which in turn coordinates with
    the PUnit/PCODE to apply the payload.

    This is a foundational component for enabling dynamic, secure,
    and re-entrant configuration updates on platforms like Battlemage.

    Cc: Badal Nilawar <badal.nilawar@intel.com>
    Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
    Signed-off-by: Badal Nilawar <badal.nilawar@intel.com>
    Reviewed-by: Anshuman Gupta <anshuman.gupta@intel.com>
    Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
    Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
    Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
    Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Link: https://lore.kernel.org/r/20250905154953.3974335-3-badal.nilawar@intel.com
    Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-19 14:06:19 -04:00
Steve Best be0f308da9 mei: bus: add mei_cldev_mtu interface
JIRA: https://issues.redhat.com/browse/RHEL-177639

commit 8d5b7009aabc27e626e4167fedf1e1c1c3d6b143
Author: Alexander Usyskin <alexander.usyskin@intel.com>
Date:   Fri Sep 5 21:19:45 2025 +0530

    mei: bus: add mei_cldev_mtu interface

    Add a new helper function that allows MEI client drivers
    to query the maximum transmission unit (MTU) for a connected
    MEI client.

    This is useful for clients that need to transmit large payloads,
    such as firmware blobs, allowing them to determine the maximum
    message size that can be safely sent before starting transmission and
    size of the buffer to allocate when receiving data.

    Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
    Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
    Signed-off-by: Badal Nilawar <badal.nilawar@intel.com>
    Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
    Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
    Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Link: https://lore.kernel.org/r/20250905154953.3974335-2-badal.nilawar@intel.com
    Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-19 14:06:14 -04:00
Steve Best 6b0aa05976 mei: gsc: demote unexpected reset print
JIRA: https://issues.redhat.com/browse/RHEL-177639

commit f9deb462d52e71e12f339a43b10f4443287e1f08
Author: Alexander Usyskin <alexander.usyskin@intel.com>
Date:   Thu Sep 18 16:04:35 2025 +0300

    mei: gsc: demote unexpected reset print

    Discrete graphic card can go to D3cold.
    On the exit from D3cold the link reset is performed.
    Driver did not expect such link reset and print warning.

    Print debug message for unexpected reset in discrete graphic
    case and remove infrastructure to print warning is some cases.

    Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Link: https://lore.kernel.org/r/20250918130435.3327400-6-alexander.usyskin@intel.com

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-19 14:06:10 -04:00
Steve Best b7b92d3ba4 mei: bus: demote error on connect
JIRA: https://issues.redhat.com/browse/RHEL-177639

commit ecdddd20b0c5987a824bb4f3948d5a597d8fb8d8
Author: Alexander Usyskin <alexander.usyskin@intel.com>
Date:   Thu Sep 18 16:04:34 2025 +0300

    mei: bus: demote error on connect

    There are flows, like exit from D3cold where connect via bus can fail.
    Demote error print to debug level to unclutter dmesg.

    Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Link: https://lore.kernel.org/r/20250918130435.3327400-5-alexander.usyskin@intel.com

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-19 14:06:05 -04:00
Steve Best cde5c83cf3 mei: retry connect if interrupted by link reset
JIRA: https://issues.redhat.com/browse/RHEL-177639

commit 2b5c4cb2c008f01182f87f529cb104bc5bc80418
Author: Alexander Usyskin <alexander.usyskin@intel.com>
Date:   Thu Sep 18 16:04:33 2025 +0300

    mei: retry connect if interrupted by link reset

    When device is in D3cold the connect message will wake device
    and cause link reset.
    Link reset flow cleans all queues and wakes all waiters.
    Retry the connect flow if connect is failed and link reset is detected.

    Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Link: https://lore.kernel.org/r/20250918130435.3327400-4-alexander.usyskin@intel.com

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-19 14:06:00 -04:00
Steve Best 6f88acd06a mei: make a local copy of client uuid in connect
JIRA: https://issues.redhat.com/browse/RHEL-177639

commit bb29fc32ae56393269d8fe775159fd59e45682d1
Author: Alexander Usyskin <alexander.usyskin@intel.com>
Date:   Thu Sep 18 16:04:32 2025 +0300

    mei: make a local copy of client uuid in connect

    Connect ioctl has the same memory for in and out parameters.
    Copy in parameter (client uuid) to the local stack to avoid it be
    overwritten by out parameters fill.

    Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Link: https://lore.kernel.org/r/20250918130435.3327400-3-alexander.usyskin@intel.com

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-19 14:05:54 -04:00
Steve Best 3c27a09e34 mei: me: trigger link reset if hw ready is unexpected
JIRA: https://issues.redhat.com/browse/RHEL-177639

commit 2cedb296988c384e1555d74fb55e3b7b9fb268ae
Author: Alexander Usyskin <alexander.usyskin@intel.com>
Date:   Thu Sep 18 16:04:31 2025 +0300

    mei: me: trigger link reset if hw ready is unexpected

    Driver can receive HW not ready interrupt unexpectedly.
    E.g. for cards that go donwn to D3cold.
    Trigger link reset in this case to synchronize driver and
    firmware state.
    No need to do that sync if driver is going down or interrupt is
    received before driver started initial link reset sequence.
    Introduce UNINITIALIZED device state to allow interrupt handler
    to ignore interrupts before first init.

    Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Link: https://lore.kernel.org/r/20250918130435.3327400-2-alexander.usyskin@intel.com

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-19 14:05:49 -04:00
Steve Best f51fcd0d38 mei: gsc: fix remove operations order
JIRA: https://issues.redhat.com/browse/RHEL-177639

commit 68be6c432cfa84abe908668b0d5c26060f2fe589
Author: Alexander Usyskin <alexander.usyskin@intel.com>
Date:   Mon Sep 15 15:45:54 2025 +0300

    mei: gsc: fix remove operations order

    The mei disconnect should be the last operation in remove flow.
    Otherwise the device is used after destruction.
    Fix minor free flow that happens after device destruction too.

    The fault leads to the following oops in Intel Gfx CI:

    <4>[  267.871331] Oops: general protection fault, probably for non-canonical address 0x6b6b6b6b6b6b6bcb: 0000 [#1] SMP NOPTI
    ...
    <4>[  267.871410] RIP: 0010:mei_gsc_remove+0x44/0x90 [mei_gsc]
    ...
    <4>[  267.871555] Call Trace:
    <4>[  267.871562]  <TASK>
    <4>[  267.871570]  auxiliary_bus_remove+0x1b/0x30
    <4>[  267.871589]  device_remove+0x43/0x80
    <4>[  267.871604]  device_release_driver_internal+0x215/0x280
    <4>[  267.871619]  device_release_driver+0x12/0x20
    <4>[  267.871630]  bus_remove_device+0xdc/0x150
    <4>[  267.871645]  device_del+0x15f/0x3b0
    <4>[  267.871656]  ? bus_unregister_notifier+0x37/0x50
    <4>[  267.871672]  gsc_destroy_one.isra.0+0x44/0x210 [i915]
    <4>[  267.872295]  intel_gsc_fini+0x28/0x50 [i915]
    <4>[  267.872860]  intel_gt_driver_unregister+0x2c/0x80 [i915]
    <4>[  267.873300]  i915_driver_remove+0x6e/0x150 [i915]
    <4>[  267.873694]  i915_pci_remove+0x1e/0x40 [i915]
    <4>[  267.874095]  pci_device_remove+0x3e/0xb0
    <4>[  267.874111]  device_remove+0x43/0x80
    <4>[  267.874126]  device_release_driver_internal+0x215/0x280
    <4>[  267.874137]  ? bus_find_device+0xa5/0xe0
    <4>[  267.874153]  device_driver_detach+0x14/0x20
    <4>[  267.874164]  unbind_store+0xac/0xc0
    <4>[  267.874178]  drv_attr_store+0x21/0x50
    <4>[  267.874190]  sysfs_kf_write+0x4a/0x80
    <4>[  267.874204]  kernfs_fop_write_iter+0x188/0x240
    <4>[  267.874222]  vfs_write+0x283/0x540
    <4>[  267.874241]  ksys_write+0x6f/0xf0
    <4>[  267.874253]  __x64_sys_write+0x19/0x30
    <4>[  267.874264]  x64_sys_call+0x79/0x26a0
    <4>[  267.874277]  do_syscall_64+0x93/0xd50
    <4>[  267.874291]  ? do_syscall_64+0x1a2/0xd50
    <4>[  267.874301]  ? do_syscall_64+0x1a2/0xd50
    <4>[  267.874313]  ? do_syscall_64+0x1a2/0xd50
    <4>[  267.874324]  ? clear_bhb_loop+0x30/0x80
    <4>[  267.874336]  ? clear_bhb_loop+0x30/0x80
    <4>[  267.874349]  entry_SYSCALL_64_after_hwframe+0x76/0x7e

    Fixes: 7704e6be4ed2 ("mei: hook mei_device on class device")
    Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
    Link: https://lore.kernel.org/r/20250915124554.2263330-1-alexander.usyskin@intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-19 14:05:44 -04:00
Steve Best e973d6d791 mei: hook mei_device on class device
JIRA: https://issues.redhat.com/browse/RHEL-177639

commit 7704e6be4ed2835832c445807cdcb2d56d8a8430
Author: Alexander Usyskin <alexander.usyskin@intel.com>
Date:   Tue Aug 26 15:56:17 2025 +0300

    mei: hook mei_device on class device

    mei_device lifetime was managed by devm procedure of parent device.
    But such memory is freed on device_del.
    Mei_device object is used by client object that may be alive after
    parent device is removed.
    It may lead to use-after-free if discrete graphics driver unloads
    mei_gsc auxiliary device while user-space holds open handle to mei
    character device.

    Connect mei_device structure lifteme to mei class device lifetime
    by adding mei_device free to class device remove callback.

    Move exising parent device pointer to separate field in mei_device
    to avoid misuse.

    Allocate character device dynamically and allow to control its own
    lifetime as it may outlive mei_device structure while character
    device closes after parent device is removed from the system.

    Leave power management on parent device as we overwrite pci runtime
    pm procedure and user-space is expecting it there.

    Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/14201
    Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
    Link: https://lore.kernel.org/r/20250826125617.1166546-1-alexander.usyskin@intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-19 14:05:38 -04:00
Steve Best 74bf182b68 platform/x86: intel-hid: disable wakeup_mode during hibernation
JIRA: https://issues.redhat.com/browse/RHEL-176441

commit e02ea3ae8ee40d5835a845884c7b161a27c10bcb
Author: David McFarland <corngood@gmail.com>
Date:   Thu Feb 5 19:16:24 2026 -0400

    platform/x86: intel-hid: disable wakeup_mode during hibernation

    Add a freeze handler which clears wakeup_mode. This fixes aborted hibernation on
    Dell Precision 3880.

      Wakeup event detected during hibernation, rolling back

    This system sends power button events during hibernation, even when triggered by
    software.

    Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218634
    Fixes: 0c4cae1bc0 ("PM: hibernate: Avoid missing wakeup events during hibernation")
    Signed-off-by: David McFarland <corngood@gmail.com>
    Link: https://patch.msgid.link/20260205231629.1336348-1-corngood@gmail.com
    Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
    Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-18 13:48:50 -04:00
Steve Best d57b6a20fb platform/x86: intel-hid: Enable 5-button array on ThinkPad X1 Fold 16 Gen 1
JIRA: https://issues.redhat.com/browse/RHEL-176441

commit b38d478dad79e61e8a65931021bdfd7a71741212
Author: Leif Skunberg <diamondback@cohunt.app>
Date:   Tue Feb 10 09:56:25 2026 +0100

    platform/x86: intel-hid: Enable 5-button array on ThinkPad X1 Fold 16 Gen 1

    The Lenovo ThinkPad X1 Fold 16 Gen 1 has physical volume up/down
    buttons that are handled through the intel-hid 5-button array
    interface. The firmware does not advertise 5-button array support via
    HEBC, so the driver relies on a DMI allowlist to enable it.

    Add the ThinkPad X1 Fold 16 Gen 1 to the button_array_table so the
    volume buttons work out of the box.

    Signed-off-by: Leif Skunberg <diamondback@cohunt.app>
    Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
    Link: https://patch.msgid.link/20260210085625.34380-1-diamondback@cohunt.app
    Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
    Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-18 13:48:43 -04:00
Steve Best 8e6d9bcce5 platform/x86: intel-hid: Add Dell 16 Plus 2-in-1 to dmi_vgbs_allow_list
JIRA: https://issues.redhat.com/browse/RHEL-176441

commit 857f5036f8fd729e097efbe3ba421b75e27346cb
Author: Peter Metz <peter.metz@unarin.com>
Date:   Fri Feb 13 17:58:02 2026 -0500

    platform/x86: intel-hid: Add Dell 16 Plus 2-in-1 to dmi_vgbs_allow_list

    The Dell 16 Plus 2-in-1 (model DB06250) requires the VGBS allow list
    entry to correctly enable the tablet mode switch. Without this, the
    chassis state is not reported, and the hinge rotation only emits
    unknown scancodes.

    Link: https://lore.kernel.org/platform-driver-x86/CAP3yi-BWm0LqkhfzTrGy5n-KQ=3+T8eRMoR+Z+7Ke2VJB43kTA@mail.gmail.com/
    Signed-off-by: Peter Metz <peter.metz@unarin.com>
    Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
    Link: https://patch.msgid.link/20260213230310.299974-1-peter.metz@unarin.com
    Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
    Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-18 13:45:23 -04:00
Steve Best c315074a1b platform/x86: intel-hid: Add Dell 14 Plus 2-in-1 to dmi_vgbs_allow_list
JIRA: https://issues.redhat.com/browse/RHEL-176441

commit 6b3fa0615cd8432148581de62a52f83847af3d70
Author: Peter Metz <peter.metz@unarin.com>
Date:   Thu Feb 12 23:46:27 2026 -0500

    platform/x86: intel-hid: Add Dell 14 Plus 2-in-1 to dmi_vgbs_allow_list

    The Dell 14 Plus 2-in-1 (model DB04250) requires the VGBS allow list
    entry to correctly enable the tablet mode switch. Without this, the
    chassis state is not reported, and the hinge rotation only emits
    unknown scancodes.

    Verified on Dell 14 Plus 2-in-1 DB04250.

    Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221090
    Signed-off-by: Peter Metz <peter.metz@unarin.com>
    Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
    Link: https://patch.msgid.link/20260213044627.203638-1-peter.metz@unarin.com
    Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
    Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-18 13:45:12 -04:00
Steve Best f875e45b8b platform/x86/intel/hid: Add Dell Pro Rugged 10/12 tablet to VGBS DMI quirks
JIRA: https://issues.redhat.com/browse/RHEL-176441

commit b169e1733cadb614e87f69d7a5ae1b186c50d313
Author: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>
Date:   Thu Nov 27 15:04:07 2025 +0800

    platform/x86/intel/hid: Add Dell Pro Rugged 10/12 tablet to VGBS DMI quirks

    Dell Pro Rugged 10/12 tablets has a reliable VGBS method.
    If VGBS is not called on boot, the on-screen keyboard won't appear if the
    device is booted without a keyboard.

    Call VGBS on boot on thess devices to get the initial state of
    SW_TABLET_MODE in a reliable way.

    Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>
    Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
    Link: https://patch.msgid.link/20251127070407.656463-1-acelan.kao@canonical.com
    Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
    Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-18 13:45:07 -04:00
Steve Best 58f635f115 platform/x86: int0002: Remove IRQF_ONESHOT from request_irq()
JIRA: https://issues.redhat.com/browse/RHEL-176441

commit f6bc712877f24dc89bdfd7bdbf1a32f3b9960b34
Author: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date:   Wed Jan 28 10:55:22 2026 +0100

    platform/x86: int0002: Remove IRQF_ONESHOT from request_irq()

    Passing IRQF_ONESHOT ensures that the interrupt source is masked until the
    secondary (threaded) handler is done. If only a primary handler is used
    then the flag makes no sense because the interrupt cannot fire (again)
    while its handler is running.

    The flag also prevents force-threading of the primary handler and the
    irq-core will warn about this.

    The flag was added to match the flag on the shared handler which uses a
    threaded handler and therefore IRQF_ONESHOT. This is no longer needed
    because devm_request_irq() now passes IRQF_COND_ONESHOT for this case.

    Revert adding IRQF_ONESHOT to irqflags.

    Fixes: 8f812373d1 ("platform/x86: intel: int0002_vgpio: Pass IRQF_ONESHOT to request_irq()")
    Reported-by: Borah, Chaitanya Kumar <chaitanya.kumar.borah@intel.com>
    Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
    Signed-off-by: Thomas Gleixner <tglx@kernel.org>
    Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
    Acked-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
    Link: https://patch.msgid.link/20260128095540.863589-3-bigeasy@linutronix.de
    Closes: https://lore.kernel.org/all/555f1c56-0f74-41bf-8bd2-6217e0aab0c6@intel.com

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-18 13:45:01 -04:00
Steve Best ca02df9a70 platform/x86/intel/tpmi/plr: Make the file domain<n>/status writeable
JIRA: https://issues.redhat.com/browse/RHEL-176441

commit 008bec8ffe6e7746588d1e12c5b3865fa478fc91
Author: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Date:   Tue Jan 27 15:45:40 2026 -0800

    platform/x86/intel/tpmi/plr: Make the file domain<n>/status writeable

    The file sys/kernel/debug/tpmi-<n>/plr/domain<n>/status has store and show
    callbacks. Make it writeable.

    Fixes: 811f67c516 ("platform/x86/intel/tpmi: Add new auxiliary driver for performance limits")
    Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
    Link: https://patch.msgid.link/20260127-plr-debugfs-write-v1-1-1fffbc370b1e@linux.intel.com
    Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
    Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-18 13:44:56 -04:00
Steve Best 814050ec71 platform/x86: intel_telemetry: Fix PSS event register mask
JIRA: https://issues.redhat.com/browse/RHEL-176441

commit 39e9c376ac42705af4ed4ae39eec028e8bced9b4
Author: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
Date:   Wed Dec 24 11:41:44 2025 +0530

    platform/x86: intel_telemetry: Fix PSS event register mask

    The PSS telemetry info parsing incorrectly applies
    TELEM_INFO_SRAMEVTS_MASK when extracting event register
    count from firmware response. This reads bits 15-8 instead
    of the correct bits 7-0, causing misdetection of hardware
    capabilities.

    The IOSS path correctly uses TELEM_INFO_NENABLES_MASK for
    register count. Apply the same mask to PSS parsing for
    consistency.

    Fixes: 9d16b482b0 ("platform:x86: Add Intel telemetry platform driver")
    Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
    Link: https://patch.msgid.link/20251224061144.3925519-1-kaushlendra.kumar@intel.com
    Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
    Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-18 13:44:51 -04:00
Steve Best 9192e6c6ec platform/x86: intel_telemetry: Fix swapped arrays in PSS output
JIRA: https://issues.redhat.com/browse/RHEL-176441

commit 25e9e322d2ab5c03602eff4fbf4f7c40019d8de2
Author: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
Date:   Wed Dec 24 08:50:53 2025 +0530

    platform/x86: intel_telemetry: Fix swapped arrays in PSS output

    The LTR blocking statistics and wakeup event counters are incorrectly
    cross-referenced during debugfs output rendering. The code populates
    pss_ltr_blkd[] with LTR blocking data and pss_s0ix_wakeup[] with wakeup
    data, but the display loops reference the wrong arrays.

    This causes the "LTR Blocking Status" section to print wakeup events
    and the "Wakes Status" section to print LTR blockers, misleading power
    management analysis and S0ix residency debugging.

    Fix by aligning array usage with the intended output section labels.

    Fixes: 87bee29099 ("platform:x86: Add Intel Telemetry Debugfs interfaces")
    Cc: stable@vger.kernel.org
    Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
    Link: https://patch.msgid.link/20251224032053.3915900-1-kaushlendra.kumar@intel.com
    Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
    Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-18 13:44:46 -04:00
Steve Best 5027077fbd platform/x86: intel: punit_ipc: fix memory corruption
JIRA: https://issues.redhat.com/browse/RHEL-176441

commit 9b9c0adbc3f8a524d291baccc9d0c04097fb4869
Author: Dan Carpenter <dan.carpenter@linaro.org>
Date:   Fri Nov 21 20:51:28 2025 +0300

    platform/x86: intel: punit_ipc: fix memory corruption

    This passes the address of the pointer "&punit_ipcdev" when the intent
    was to pass the pointer itself "punit_ipcdev" (without the ampersand).
    This means that the:

            complete(&ipcdev->cmd_complete);

    in intel_punit_ioc() will write to a wrong memory address corrupting it.

    Fixes: fdca4f16f5 ("platform:x86: add Intel P-Unit mailbox IPC driver")
    Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
    Link: https://patch.msgid.link/aSCmoBipSQ_tlD-D@stanley.mountain
    Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
    Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-18 13:44:40 -04:00
Steve Best 9d4883fdf1 New configs in drivers/platform
JIRA: https://issues.redhat.com/browse/RHEL-176441

Upstream Status: git@gitlab.com:cki-project/kernel-ark.git

commit 981c3f3f78c3cbb955a94468b90dcfa1c43d6149
Author: Fedora Kernel Team <kernel-team@fedoraproject.org>
Date:   Fri Dec 5 13:36:04 2025 +0000

    [redhat] New configs in drivers/platform

    Hi,

    As part of the ongoing rebase effort, the following configuration
    options need to be reviewed.

    As a reminder, the ARK configuration flow involves moving unreviewed
    configuration options from the pending directory to the ark directory.
    In the diff below, options are removed from the pending directory and
    added to the ark hierarchy. The final options that need to be ACKed
    are the files that are being added to the ark hierarchy.

    If the value for a file that is added should be changed, please reply
    with a better option.

     ~~~
     Symbol: INTEL_EHL_PSE_IO [=n]
     Type  : tristate
     Defined at drivers/platform/x86/intel/Kconfig:44
       Prompt: Intel Elkhart Lake PSE I/O driver
       Depends on: X86_PLATFORM_DEVICES [=y] && PCI [=y]
       Location:
         -> Device Drivers
           -> X86 Platform Specific Device Drivers (X86_PLATFORM_DEVICES [=y])
             -> Intel Elkhart Lake PSE I/O driver (INTEL_EHL_PSE_IO [=n])
     Selects: AUXILIARY_BUS [=y]

     ~~~
     Commit: a0c83150eea5 (platform/x86/intel: Introduce Intel Elkhart Lake PSE I/O)

    ---

    Signed-off-by: Fedora Kernel Team <kernel-team@fedoraproject.org>

Signed-off-by: Steve Best <sbest@redhat.com>

-# CONFIG_INTEL_EHL_PSE_IO is not set
2026-05-18 13:44:33 -04:00
Steve Best ded26e214e platform/x86/intel: Introduce Intel Elkhart Lake PSE I/O
JIRA: https://issues.redhat.com/browse/RHEL-176441

commit a0c83150eea5807dbedf786f55cd49b14af118a8
Author: Raag Jadav <raag.jadav@intel.com>
Date:   Wed Nov 12 09:10:10 2025 +0530

    platform/x86/intel: Introduce Intel Elkhart Lake PSE I/O

    Intel Elkhart Lake Programmable Service Engine (PSE) includes two PCI
    devices that expose two different capabilities of GPIO and Timed I/O
    as a single PCI function through shared MMIO with below layout.

    GPIO: 0x0000 - 0x1000
    TIO:  0x1000 - 0x2000

    This driver enumerates the PCI parent device and creates auxiliary child
    devices for these capabilities. The actual functionalities are provided
    by their respective auxiliary drivers.

    Signed-off-by: Raag Jadav <raag.jadav@intel.com>
    Acked-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
    Link: https://lore.kernel.org/r/20251112034040.457801-2-raag.jadav@intel.com
    Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-18 13:44:27 -04:00
Steve Best 8dd4a74e5c platform/x86/amd: hfi: Remove redundant assignment to .owner
JIRA: https://issues.redhat.com/browse/RHEL-176387

commit 0254329897495c42646144376230add710078937
Author: Kuan-Wei Chiu <visitorckw@gmail.com>
Date:   Sat Oct 11 14:38:37 2025 +0800

    platform/x86/amd: hfi: Remove redundant assignment to .owner

    The coccicheck tool reports the following warning for this driver:

    ./hfi.c:509:3-8: No need to set .owner here. The core will do it.

    The manual assignment of .owner = THIS_MODULE; in the platform_driver
    struct is redundant. The platform_driver_register() function, which is
    called to register the driver, is a macro that automatically sets the
    driver's owner to THIS_MODULE.

    The driver core handles this assignment internally, making the explicit
    initialization in the struct definition unnecessary. Remove the
    unnecessary line.

    Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
    Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
    Link: https://patch.msgid.link/20251011063837.2318535-3-visitorckw@gmail.com
    Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
    Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-14 19:07:07 -04:00
Steve Best 30df1d6cfe platform/x86/amd: hfi: Remove unused cpumask from cpuinfo struct
JIRA: https://issues.redhat.com/browse/RHEL-176387

commit 32647324c77012b7aed7ef48752909510d3c7ec7
Author: Kuan-Wei Chiu <visitorckw@gmail.com>
Date:   Sat Oct 11 14:38:36 2025 +0800

    platform/x86/amd: hfi: Remove unused cpumask from cpuinfo struct

    The cpus field within the struct amd_hfi_cpuinfo was allocated and set
    in the amd_hfi_online() CPU hotplug callback, and subsequently freed in
    the amd_hfi_offline() callback.

    However, after being initialized, this cpumask was never read or used
    for any purpose within the driver. It represents dead code that serves
    no functional role.

    This change has no impact on the driver's functionality as the removed
    code was entirely superfluous.

    Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
    Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
    Link: https://patch.msgid.link/20251011063837.2318535-2-visitorckw@gmail.com
    Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
    Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-14 19:07:01 -04:00
Steve Best 8332a6c508 powercap: intel_rapl_tpmi: Remove FW_BUG from invalid version check
JIRA: https://issues.redhat.com/browse/RHEL-130025

commit c7d54dafa042cf379859dba265fe5afef6fa8770
Author: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Date:   Wed Feb 11 14:34:01 2026 -0800

    powercap: intel_rapl_tpmi: Remove FW_BUG from invalid version check

    On partitioned systems, multiple TPMI instances may exist per package,
    but RAPL registers are only valid on one instance since RAPL has
    package-scope control. Other instances return invalid versions during
    domain parsing, which is expected behavior on such systems.

    Currently this generates a firmware bug warning:

      intel_rapl_tpmi: [Firmware Bug]: Invalid version

    Remove the FW_BUG tag, downgrade to pr_debug(), and update the message
    to clarify that invalid versions are expected on partitioned systems
    where only one instance can be valid.

    Fixes: 9eef7f9da9 ("powercap: intel_rapl: Introduce RAPL TPMI interface driver")
    Reported-by: Zhang Rui <rui.zhang@intel.com>
    Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
    Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
    Link: https://patch.msgid.link/20260211223401.1575776-1-sathyanarayanan.kuppuswamy@linux.intel.com
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-13 09:08:04 -04:00
Steve Best 9823bf35f2 powercap: intel_rapl: Expose all package CPUs in PMU cpumask
JIRA: https://issues.redhat.com/browse/RHEL-130025

commit 525e0064f3d81764277036036932e873608a47af
Author: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Date:   Mon Feb 9 15:43:10 2026 -0800

    powercap: intel_rapl: Expose all package CPUs in PMU cpumask

    Currently, the RAPL PMU cpumask only includes one CPU per package
    (typically the lead_cpu) for both MSR and TPMI interfaces. This
    forces tools to pin their operations to that specific CPU, even
    though package-scoped registers are readable from any CPU within
    the package.

    Change the cpumask to include all online CPUs in each package. This
    allows tools like perf and turbostat to read RAPL events from any
    CPU in the package without requiring special handling to find and
    use the designated lead_cpu.

    The change refactors get_pmu_cpu() into set_pmu_cpumask() which
    populates the cpumask with all CPUs belonging to each RAPL package
    instead of returning a single CPU.

    This improves flexibility for userspace tools while maintaining
    correctness since package-scoped RAPL MSRs are architecturally
    accessible from any CPU in the package.

    Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
    Tested-by: Furquim Ulisses <ulisses.furquim@intel.com>
    Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
    Link: https://patch.msgid.link/20260209234310.1440722-3-sathyanarayanan.kuppuswamy@linux.intel.com
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-13 09:07:59 -04:00
Steve Best 821753f31c powercap: intel_rapl: Remove incorrect CPU check in PMU context
JIRA: https://issues.redhat.com/browse/RHEL-130025

commit 7537bae8b6eb635583e0e6260f61d13ddbd52087
Author: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Date:   Mon Feb 9 15:43:09 2026 -0800

    powercap: intel_rapl: Remove incorrect CPU check in PMU context

    The RAPL MSR read path incorrectly validates CPU context when called
    from the PMU subsystem:

        if (atomic) {
            if (unlikely(smp_processor_id() != cpu))
                return -EIO;
            rdmsrq(ra->reg.msr, ra->value);
        }

    This check fails for package-scoped MSRs like RAPL energy counters,
    which are readable from any CPU within the package.

    The perf tool avoids hitting this check by validating against
    /sys/bus/event_source/devices/power/cpumask before opening events.
    However, turbostat does not perform this validation and may attempt
    reads from non-lead CPUs, causing the check to fail and return zero
    power values.

    Since package-scoped MSRs are architecturally accessible from any CPU
    in the package, remove the CPU matching check.

    Also rename 'atomic' to 'pmu_ctx' to clarify this indicates PMU context
    where rdmsrq() can be used directly instead of rdmsrl_safe_on_cpu().

    Fixes: 748d6ba43afd ("powercap: intel_rapl: Enable MSR-based RAPL PMU support")
    Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
    Tested-by: Furquim Ulisses <ulisses.furquim@intel.com>
    Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
    Link: https://patch.msgid.link/20260209234310.1440722-2-sathyanarayanan.kuppuswamy@linux.intel.com
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-13 09:07:54 -04:00
Steve Best dfee379eec powercap: intel_rapl: Add PL4 support for Ice Lake
JIRA: https://issues.redhat.com/browse/RHEL-130025

commit 54b3cd55a515c7c0fcfa0c1f0b10d62c11d64bcc
Author: Daniel Tang <danielzgtg.opensource@gmail.com>
Date:   Wed Jan 14 21:01:52 2026 -0500

    powercap: intel_rapl: Add PL4 support for Ice Lake

    Microsoft Surface Pro 7 firmware throttles the processor upon
    boot/resume. Userspace needs to be able to restore the correct value.

    Link: https://github.com/linux-surface/linux-surface/issues/706
    Signed-off-by: Daniel Tang <danielzgtg.opensource@gmail.com>
    Link: https://patch.msgid.link/6088605.ChMirdbgyp@daniel-desktop3
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-13 09:07:48 -04:00
Steve Best 013d1d49fb powercap: Replace sprintf() with sysfs_emit() in sysfs show functions
JIRA: https://issues.redhat.com/browse/RHEL-130025

commit 07e5e811f86dcd6f595c3bbd71cde294e8545889
Author: Sumeet Pawnikar <sumeet4linux@gmail.com>
Date:   Sun Jan 11 19:42:36 2026 +0530

    powercap: Replace sprintf() with sysfs_emit() in sysfs show functions

    Replace all sprintf() calls with sysfs_emit() in sysfs show functions.

    sysfs_emit() is preferred over sprintf() for formatting sysfs output
    as it provides better bounds checking and prevents potential buffer
    overflows.

    Also, replace sprintf() with sysfs_emit() in show_constraint_name()
    and simplify the code by removing the redundant strlen() call since
    sysfs_emit() returns the length.

    Signed-off-by: Sumeet Pawnikar <sumeet4linux@gmail.com>
    Link: https://patch.msgid.link/20260111141237.12340-1-sumeet4linux@gmail.com
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-13 09:07:44 -04:00
Steve Best 50d3a62861 powercap: intel_rapl: Fix possible recursive lock warning
JIRA: https://issues.redhat.com/browse/RHEL-130025

commit dcd0b625fe440d68bb4b97c71d18ca48ecd6e594
Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Date:   Wed Dec 17 07:34:55 2025 -0800

    powercap: intel_rapl: Fix possible recursive lock warning

    With the RAPL PMU addition, there is a recursive locking when CPU online
    callback function calls rapl_package_add_pmu(). Here cpu_hotplug_lock
    is already acquired by cpuhp_thread_fun() and rapl_package_add_pmu()
    tries to acquire again.

    <4>[ 8.197433] ============================================
    <4>[ 8.197437] WARNING: possible recursive locking detected
    <4>[ 8.197440] 6.19.0-rc1-lgci-xe-xe-4242-05b7c58b3367dca84+ #1 Not tainted
    <4>[ 8.197444] --------------------------------------------
    <4>[ 8.197447] cpuhp/0/20 is trying to acquire lock:
    <4>[ 8.197450] ffffffff83487870 (cpu_hotplug_lock){++++}-{0:0}, at:
    rapl_package_add_pmu+0x37/0x370 [intel_rapl_common]
    <4>[ 8.197463]
    but task is already holding lock:
    <4>[ 8.197466] ffffffff83487870 (cpu_hotplug_lock){++++}-{0:0}, at:
    cpuhp_thread_fun+0x6d/0x290
    <4>[ 8.197477]
    other info that might help us debug this:
    <4>[ 8.197480] Possible unsafe locking scenario:

    <4>[ 8.197483] CPU0
    <4>[ 8.197485] ----
    <4>[ 8.197487] lock(cpu_hotplug_lock);
    <4>[ 8.197490] lock(cpu_hotplug_lock);
    <4>[ 8.197493]
    *** DEADLOCK ***
    ..
    ..
    <4>[ 8.197542] __lock_acquire+0x146e/0x2790
    <4>[ 8.197548] lock_acquire+0xc4/0x2c0
    <4>[ 8.197550] ? rapl_package_add_pmu+0x37/0x370 [intel_rapl_common]
    <4>[ 8.197556] cpus_read_lock+0x41/0x110
    <4>[ 8.197558] ? rapl_package_add_pmu+0x37/0x370 [intel_rapl_common]
    <4>[ 8.197561] rapl_package_add_pmu+0x37/0x370 [intel_rapl_common]
    <4>[ 8.197565] rapl_cpu_online+0x85/0x87 [intel_rapl_msr]
    <4>[ 8.197568] ? __pfx_rapl_cpu_online+0x10/0x10 [intel_rapl_msr]
    <4>[ 8.197570] cpuhp_invoke_callback+0x41f/0x6c0
    <4>[ 8.197573] ? cpuhp_thread_fun+0x6d/0x290
    <4>[ 8.197575] cpuhp_thread_fun+0x1e2/0x290
    <4>[ 8.197578] ? smpboot_thread_fn+0x26/0x290
    <4>[ 8.197581] smpboot_thread_fn+0x12f/0x290
    <4>[ 8.197584] ? __pfx_smpboot_thread_fn+0x10/0x10
    <4>[ 8.197586] kthread+0x11f/0x250
    <4>[ 8.197589] ? __pfx_kthread+0x10/0x10
    <4>[ 8.197592] ret_from_fork+0x344/0x3a0
    <4>[ 8.197595] ? __pfx_kthread+0x10/0x10
    <4>[ 8.197597] ret_from_fork_asm+0x1a/0x30
    <4>[ 8.197604] </TASK>

    Fix this issue in the same way as rapl powercap package domain is added
    from the same CPU online callback by introducing another interface which
    doesn't call cpus_read_lock(). Add rapl_package_add_pmu_locked() and
    rapl_package_remove_pmu_locked() which don't call cpus_read_lock().

    Fixes: 748d6ba43afd ("powercap: intel_rapl: Enable MSR-based RAPL PMU support")
    Reported-by: Borah, Chaitanya Kumar <chaitanya.kumar.borah@intel.com>
    Closes: https://lore.kernel.org/linux-pm/5427ede1-57a0-43d1-99f3-8ca4b0643e82@intel.com/T/#u
    Tested-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
    Tested-by: RavitejaX Veesam <ravitejax.veesam@intel.com>
    Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
    Link: https://patch.msgid.link/20251217153455.3560176-1-srinivas.pandruvada@linux.intel.com
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-13 09:07:39 -04:00
Steve Best 5f620ca2a5 powercap: fix sscanf() error return value handling
JIRA: https://issues.redhat.com/browse/RHEL-130025

commit efc4c35b741af973de90f6826bf35d3b3ac36bf1
Author: Sumeet Pawnikar <sumeet4linux@gmail.com>
Date:   Sun Dec 7 20:45:48 2025 +0530

    powercap: fix sscanf() error return value handling

    Fix inconsistent error handling for sscanf() return value check.

    Implicit boolean conversion is used instead of explicit return
    value checks. The code checks if (!sscanf(...)) which is incorrect
    because:
     1. sscanf returns the number of successfully parsed items
     2. On success, it returns 1 (one item passed)
     3. On failure, it returns 0 or EOF
     4. The check 'if (!sscanf(...))' is wrong because it treats
        success (1) as failure

    All occurrences of sscanf() now uses explicit return value check.
    With this behavior it returns '-EINVAL' when parsing fails (returns
    0 or EOF), and continues when parsing succeeds (returns 1).

    Signed-off-by: Sumeet Pawnikar <sumeet4linux@gmail.com>
    [ rjw: Subject and changelog edits ]
    Link: https://patch.msgid.link/20251207151549.202452-1-sumeet4linux@gmail.com
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-13 09:07:34 -04:00
Steve Best 4bc1437521 powercap: fix race condition in register_control_type()
JIRA: https://issues.redhat.com/browse/RHEL-130025

commit 7bda1910c4bccd4b8d4726620bb3d6bbfb62286e
Author: Sumeet Pawnikar <sumeet4linux@gmail.com>
Date:   Sat Dec 6 00:32:16 2025 +0530

    powercap: fix race condition in register_control_type()

    The device becomes visible to userspace via device_register()
    even before it fully initialized by idr_init(). If userspace
    or another thread tries to register a zone immediately after
    device_register(), the control_type_valid() will fail because
    the control_type is not yet in the list. The IDR is not yet
    initialized, so this race condition causes zone registration
    failure.

    Move idr_init() and list addition before device_register()
    fix the race condition.

    Signed-off-by: Sumeet Pawnikar <sumeet4linux@gmail.com>
    [ rjw: Subject adjustment, empty line added ]
    Link: https://patch.msgid.link/20251205190216.5032-1-sumeet4linux@gmail.com
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-13 09:07:30 -04:00
Steve Best ca348060ee powercap: intel_rapl: Enable MSR-based RAPL PMU support
JIRA: https://issues.redhat.com/browse/RHEL-130025

commit 748d6ba43afde7e9ac27443233203995cc15d235
Author: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Date:   Thu Nov 20 16:05:39 2025 -0800

    powercap: intel_rapl: Enable MSR-based RAPL PMU support

    Currently, RAPL PMU support requires adding CPU model entries to
    arch/x86/events/rapl.c for each new generation. However, RAPL MSRs are
    not architectural and require platform-specific customization, making
    arch/x86 an inappropriate location for this functionality.

    The powercap subsystem already handles RAPL functionality and is the
    natural place to consolidate all RAPL features. The powercap RAPL
    driver already includes PMU support for TPMI-based RAPL interfaces,
    making it straightforward to extend this support to MSR-based RAPL
    interfaces as well.

    This consolidation eliminates the need to maintain RAPL support in
    multiple subsystems and provides a unified approach for both TPMI and
    MSR-based RAPL implementations.

    The MSR-based PMU support includes the following updates:

     1. Register MSR-based PMU support for the supported platforms
        and unregister it when no online CPUs remain in the package.

     2. Remove existing checks that restrict RAPL PMU support to TPMI-based
        interfaces and extend the logic to allow MSR-based RAPL interfaces.

     3. Define a CPU model list to determine which processors should
        register RAPL PMU interface through the powercap driver for
        MSR-based RAPL, excluding those that support TPMI interface.
        This list prevents conflicts with existing arch/x86 PMU code
        that already registers RAPL PMU for some processors. Add
        Panther Lake & Wildcat Lake to the CPU models list.

    Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
    Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
    [ rjw: Changelog edits ]
    Link: https://patch.msgid.link/20251121000539.386069-3-sathyanarayanan.kuppuswamy@linux.intel.com
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-13 09:07:26 -04:00
Steve Best 86198b1efa powercap: intel_rapl: Prepare read_raw() interface for atomic-context callers
JIRA: https://issues.redhat.com/browse/RHEL-130025

commit 1d6c915819f5b805c35487b6ce5923e31a28266b
Author: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Date:   Thu Nov 20 16:05:38 2025 -0800

    powercap: intel_rapl: Prepare read_raw() interface for atomic-context callers

    The current read_raw() implementation of the TPMI, MMIO and MSR
    interfaces does not distinguish between atomic and non-atomic callers.

    rapl_msr_read_raw() uses rdmsrq_safe_on_cpu(), which can sleep and
    issue cross CPU calls. When MSR-based RAPL PMU support is enabled, PMU
    event handlers can invoke this function from atomic context where
    sleeping or rescheduling is not allowed. In atomic context, the caller
    is already executing on the target CPU, so a direct rdmsrq() is
    sufficient.

    To support such usage, introduce an atomic flag to the read_raw()
    interface to allow callers pass the context information. Modify the
    common RAPL code to propagate this flag, and set the flag to reflect
    the calling contexts.

    Utilize the atomic flag in rapl_msr_read_raw() to perform direct MSR
    read with rdmsrq() when running in atomic context, and a sanity check
    to ensure target CPU matches the current CPU for such use cases.

    The TPMI and MMIO implementations do not require special atomic
    handling, so the flag is ignored in those paths.

    This is a preparatory patch for adding MSR-based RAPL PMU support.

    Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
    Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
    [ rjw: Subject tweak ]
    Link: https://patch.msgid.link/20251121000539.386069-2-sathyanarayanan.kuppuswamy@linux.intel.com
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-13 09:07:20 -04:00
Steve Best 18aa962d27 x86/msr: Rename 'rdmsrl_safe_on_cpu()' to 'rdmsrq_safe_on_cpu()' [partial]
JIRA: https://issues.redhat.com/browse/RHEL-130025

Conflicts: limited to drivers/platform/x86/intel
           kept rdmsrl_safe_on_cpu() to keep other RHEL users happy

commit 5e404cb7ac4c097e95896a4a3fba5f5aabf7f679
Author: Ingo Molnar <mingo@kernel.org>
Date:   Wed Apr 9 22:28:58 2025 +0200

    x86/msr: Rename 'rdmsrl_safe_on_cpu()' to 'rdmsrq_safe_on_cpu()'

    Suggested-by: "H. Peter Anvin" <hpa@zytor.com>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Cc: Juergen Gross <jgross@suse.com>
    Cc: Dave Hansen <dave.hansen@intel.com>
    Cc: Xin Li <xin@zytor.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-13 09:07:14 -04:00
Steve Best 813a99b1e2 x86/msr: Rename 'wrmsrl_safe()' to 'wrmsrq_safe()' [partial]
JIRA: https://issues.redhat.com/browse/RHEL-130025

Conflicts: limited to drivers/powercap

commit 6fa17efe45440f43fa4e059d7a487179bbba053e
Author: Ingo Molnar <mingo@kernel.org>
Date:   Wed Apr 9 22:28:57 2025 +0200

    x86/msr: Rename 'wrmsrl_safe()' to 'wrmsrq_safe()'

    Suggested-by: "H. Peter Anvin" <hpa@zytor.com>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Cc: Juergen Gross <jgross@suse.com>
    Cc: Dave Hansen <dave.hansen@intel.com>
    Cc: Xin Li <xin@zytor.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-13 09:07:09 -04:00
Steve Best a1954322c3 x86/msr: Rename 'rdmsrl_safe()' to 'rdmsrq_safe()' [partial]
JIRA: https://issues.redhat.com/browse/RHEL-130025

Conflicts: limited to drivers/powercap

commit 6fe22abacd40e259fffec744a02d5ca3febccd68
Author: Ingo Molnar <mingo@kernel.org>
Date:   Wed Apr 9 22:28:56 2025 +0200

    x86/msr: Rename 'rdmsrl_safe()' to 'rdmsrq_safe()'

    Suggested-by: "H. Peter Anvin" <hpa@zytor.com>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Cc: Juergen Gross <jgross@suse.com>
    Cc: Dave Hansen <dave.hansen@intel.com>
    Cc: Xin Li <xin@zytor.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-13 09:07:04 -04:00
Steve Best b531d47e11 powercap: idle_inject: use us_to_ktime() where appropriate
JIRA: https://issues.redhat.com/browse/RHEL-130025

commit 03cf825911c95f39d77d2a60b35fe5b4a33115b1
Author: Xichao Zhao <zhao.xichao@vivo.com>
Date:   Wed Aug 13 15:54:33 2025 +0800

    powercap: idle_inject: use us_to_ktime() where appropriate

    Convert values in microseconds to ktime using us_to_ktime() instead of
    multiplying them by NSEC_PER_USEC and using ns_to_ktime() for the
    conversion.

    Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
    Link: https://patch.msgid.link/20250813075433.464786-1-zhao.xichao@vivo.com
    [ rjw: Subject and changelog edits ]
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-13 09:06:56 -04:00
Steve Best f6d3eddc6a x86/mce, EDAC/mce_amd: Add new SMCA bank types
JIRA: https://issues.redhat.com/browse/RHEL-100951

commit b90d398138ab3088d168cacb2c3d5248feaa1ef7
Author: Yazen Ghannam <yazen.ghannam@amd.com>
Date:   Sat Mar 7 11:33:16 2026 -0500

    x86/mce, EDAC/mce_amd: Add new SMCA bank types

    Recognize new SMCA bank types and include their short names for sysfs
    and long names for decoding.

    Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
    Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
    Link: https://patch.msgid.link/20260307163316.345923-4-yazen.ghannam@amd.com

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-12 05:05:53 -04:00
Steve Best 64d5eabfe9 x86/mce, EDAC/mce_amd: Update CS bank type naming
JIRA: https://issues.redhat.com/browse/RHEL-100951

commit b595a009726b706fdadedace90c54831e19188e2
Author: Yazen Ghannam <yazen.ghannam@amd.com>
Date:   Sat Mar 7 11:33:15 2026 -0500

    x86/mce, EDAC/mce_amd: Update CS bank type naming

    Recent documentation updated the "CS" bank type name from "Coherent
    Slave" to "Coherent Station".

    Apply this change in the kernel also.

    Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
    Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
    Link: https://patch.msgid.link/20260307163316.345923-3-yazen.ghannam@amd.com

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-12 05:05:48 -04:00
Steve Best 37ec96c2c7 x86/mce, EDAC/mce_amd: Reorder SMCA bank type enums
JIRA: https://issues.redhat.com/browse/RHEL-100951

commit bee9f4178b4a3fec70414c82ddc4bceff182f2ba
Author: Yazen Ghannam <yazen.ghannam@amd.com>
Date:   Sat Mar 7 11:33:14 2026 -0500

    x86/mce, EDAC/mce_amd: Reorder SMCA bank type enums

    Originally, the SMCA bank type enums were ordered based on processor
    documentation. However, the ordering became inconsistent after new bank
    types were added over time.

    Sort the bank type enums alphanumerically in most places.  Sort the
    "enum to HWID/McaType" mapping by HWID/McaType. Drop redundant code
    comments.

    No functional changes.

      [ bp: Sort them alphanumerically. ]

    Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
    Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
    Link: https://patch.msgid.link/20260307163316.345923-2-yazen.ghannam@amd.com

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-12 05:05:42 -04:00
Steve Best 0f8ea416b0 powercap: intel_rapl: Add support for Nova Lake processors
JIRA: https://issues.redhat.com/browse/RHEL-117269

commit 58075aec92a8141fd7f42e1c36d1bc54552c015e
Author: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
Date:   Tue Oct 28 15:48:14 2025 +0530

    powercap: intel_rapl: Add support for Nova Lake processors

    Add RAPL support for Intel Nova Lake and Nova Lake L processors using
    the core defaults configuration.

    Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
    [ rjw: Subject and changelog edits, rebase ]
    Link: https://patch.msgid.link/20251028101814.3482508-1-kaushlendra.kumar@intel.com
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-11 08:50:31 -04:00
Steve Best 4d444395ab redhat/configs: enable CONFIG_GPIO_NOVALAKE for x86 on RHEL
We are planning to support this in RHEL, but it should remain disabled for x86 automotive.

JIRA: https://issues.redhat.com/browse/RHEL-117349

Upstream status: RHEL-only

Signed-off-by: Steve Best <sbest@redhat.com>
2026-05-06 10:28:34 -04:00