Merge tag 'pm-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 26 Apr 2023 01:44:10 +0000 (18:44 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 26 Apr 2023 01:44:10 +0000 (18:44 -0700)
Pull power management updates from Rafael Wysocki:
 "These update several cpufreq drivers and the cpufreq core, add sysfs
  interface for exposing the time really spent in the platform low-power
  state during suspend-to-idle, update devfreq (core and drivers) and
  the pm-graph suite of tools and clean up code.

  Specifics:

   - Fix the frequency unit in cpufreq_verify_current_freq checks()
     Sanjay Chandrashekara)

   - Make mode_state_machine in amd-pstate static (Tom Rix)

   - Make the cpufreq core require drivers with target_index() to set
     freq_table (Viresh Kumar)

   - Fix typo in the ARM_BRCMSTB_AVS_CPUFREQ Kconfig entry (Jingyu Wang)

   - Use of_property_read_bool() for boolean properties in the pmac32
     cpufreq driver (Rob Herring)

   - Make the cpufreq sysfs interface return proper error codes on
     obviously invalid input (qinyu)

   - Add guided autonomous mode support to the AMD P-state driver (Wyes
     Karny)

   - Make the Intel P-state driver enable HWP IO boost on all server
     platforms (Srinivas Pandruvada)

   - Add opp and bandwidth support to tegra194 cpufreq driver (Sumit
     Gupta)

   - Use of_property_present() for testing DT property presence (Rob
     Herring)

   - Remove MODULE_LICENSE in non-modules (Nick Alcock)

   - Add SM7225 to cpufreq-dt-platdev blocklist (Luca Weiss)

   - Optimizations and fixes for qcom-cpufreq-hw driver (Krzysztof
     Kozlowski, Konrad Dybcio, and Bjorn Andersson)

   - DT binding updates for qcom-cpufreq-hw driver (Konrad Dybcio and
     Bartosz Golaszewski)

   - Updates and fixes for mediatek driver (Jia-Wei Chang and
     AngeloGioacchino Del Regno)

   - Use of_property_present() for testing DT property presence in the
     cpuidle code (Rob Herring)

   - Drop unnecessary (void *) conversions from the PM core (Li zeming)

   - Add sysfs files to represent time spent in a platform sleep state
     during suspend-to-idle and make AMD and Intel PMC drivers use them
     Mario Limonciello)

   - Use of_property_present() for testing DT property presence (Rob
     Herring)

   - Add set_required_opps() callback to the 'struct opp_table', to make
     the code paths cleaner (Viresh Kumar)

   - Update the pm-graph siute of utilities to v5.11 with the following
     changes:
       * New script which allows users to install the latest pm-graph
         from the upstream github repo.
       * Update all the dmesg suspend/resume PM print formats to be able
         to process recent timelines using dmesg only.
       * Add ethtool output to the log for the system's ethernet device
         if ethtool exists.
       * Make the tool more robustly handle events where mangled dmesg
         or ftrace outputs do not include all the requisite data.

   - Make the sleepgraph utility recognize "CPU killed" messages (Xueqin
     Luo)

   - Remove unneeded SRCU selection in Kconfig because it's always set
     from devfreq core (Paul E. McKenney)

   - Drop of_match_ptr() macro from exynos-bus.c because this driver is
     always using the DT table for driver probe (Krzysztof Kozlowski)

   - Use the preferred of_property_present() instead of the low-level
     of_get_property() on exynos-bus.c (Rob Herring)

   - Use devm_platform_get_and_ioream_resource() in exyno-ppmu.c (Yang
     Li)"

* tag 'pm-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (44 commits)
  platform/x86/intel/pmc: core: Report duration of time in HW sleep state
  platform/x86/intel/pmc: core: Always capture counters on suspend
  platform/x86/amd: pmc: Report duration of time in hw sleep state
  PM: Add sysfs files to represent time spent in hardware sleep state
  cpufreq: use correct unit when verify cur freq
  cpufreq: tegra194: add OPP support and set bandwidth
  cpufreq: amd-pstate: Make varaiable mode_state_machine static
  PM: core: Remove unnecessary (void *) conversions
  cpufreq: drivers with target_index() must set freq_table
  PM / devfreq: exynos-ppmu: Use devm_platform_get_and_ioremap_resource()
  OPP: Move required opps configuration to specialized callback
  OPP: Handle all genpd cases together in _set_required_opps()
  cpufreq: qcom-cpufreq-hw: Revert adding cpufreq qos
  dt-bindings: cpufreq: cpufreq-qcom-hw: Add QCM2290
  dt-bindings: cpufreq: cpufreq-qcom-hw: Sanitize data per compatible
  dt-bindings: cpufreq: cpufreq-qcom-hw: Allow just 1 frequency domain
  cpufreq: Add SM7225 to cpufreq-dt-platdev blocklist
  cpufreq: qcom-cpufreq-hw: fix double IO unmap and resource release on exit
  cpufreq: mediatek: Raise proc and sram max voltage for MT7622/7623
  cpufreq: mediatek: raise proc/sram max voltage for MT8516
  ...

1  2 
Documentation/admin-guide/kernel-parameters.txt
drivers/platform/x86/amd/pmc.c
drivers/platform/x86/intel/pmc/core.c

index 10e2e5c3ff0bb23c3b6b1ce9f59e41d7aac0ca17,1e5fe4891dd784536d8922c1ae5810c287f22228..bbecbd5797a33e9aab2a318f61e15767a365289a
                                     This mode requires kvm-amd.avic=1.
                                     (Default when IOMMU HW support is present.)
  
+       amd_pstate=     [X86]
+                       disable
+                         Do not enable amd_pstate as the default
+                         scaling driver for the supported processors
+                       passive
+                         Use amd_pstate with passive mode as a scaling driver.
+                         In this mode autonomous selection is disabled.
+                         Driver requests a desired performance level and platform
+                         tries to match the same performance level if it is
+                         satisfied by guaranteed performance level.
+                       active
+                         Use amd_pstate_epp driver instance as the scaling driver,
+                         driver provides a hint to the hardware if software wants
+                         to bias toward performance (0x0) or energy efficiency (0xff)
+                         to the CPPC firmware. then CPPC power algorithm will
+                         calculate the runtime workload and adjust the realtime cores
+                         frequency.
+                       guided
+                         Activate guided autonomous mode. Driver requests minimum and
+                         maximum performance level and the platform autonomously
+                         selects a performance level in this range and appropriate
+                         to the current workload.
        amijoy.map=     [HW,JOY] Amiga joystick support
                        Map of devices attached to JOY0DAT and JOY1DAT
                        Format: <a>,<b>
  
        debug_objects   [KNL] Enable object debugging
  
 -      no_debug_objects
 -                      [KNL] Disable object debugging
 -
        debug_guardpage_minorder=
                        [KNL] When CONFIG_DEBUG_PAGEALLOC is set, this
                        parameter allows control of the order of pages that will
  
        mce             [X86-32] Machine Check Exception
  
 -      mce=option      [X86-64] See Documentation/x86/x86_64/boot-options.rst
 +      mce=option      [X86-64] See Documentation/arch/x86/x86_64/boot-options.rst
  
        md=             [HW] RAID subsystems devices and level
                        See Documentation/admin-guide/md.rst.
                        deep    - Suspend-To-RAM or equivalent (if supported)
                        See Documentation/admin-guide/pm/sleep-states.rst.
  
 -      meye.*=         [HW] Set MotionEye Camera parameters
 -                      See Documentation/admin-guide/media/meye.rst.
 -
        mfgpt_irq=      [IA-32] Specify the IRQ to use for the
                        Multi-Function General Purpose Timers on AMD Geode
                        platforms.
                        1 to enable accounting
                        Default value is 0.
  
 -      nfsaddrs=       [NFS] Deprecated.  Use ip= instead.
 -                      See Documentation/admin-guide/nfs/nfsroot.rst.
 -
 -      nfsroot=        [NFS] nfs root filesystem for disk-less boxes.
 -                      See Documentation/admin-guide/nfs/nfsroot.rst.
 +      nfs.cache_getent=
 +                      [NFS] sets the pathname to the program which is used
 +                      to update the NFS client cache entries.
  
 -      nfsrootdebug    [NFS] enable nfsroot debugging messages.
 -                      See Documentation/admin-guide/nfs/nfsroot.rst.
 +      nfs.cache_getent_timeout=
 +                      [NFS] sets the timeout after which an attempt to
 +                      update a cache entry is deemed to have failed.
  
        nfs.callback_nr_threads=
                        [NFSv4] set the total number of threads that the
                        [NFS] set the TCP port on which the NFSv4 callback
                        channel should listen.
  
 -      nfs.cache_getent=
 -                      [NFS] sets the pathname to the program which is used
 -                      to update the NFS client cache entries.
 -
 -      nfs.cache_getent_timeout=
 -                      [NFS] sets the timeout after which an attempt to
 -                      update a cache entry is deemed to have failed.
 -
 -      nfs.idmap_cache_timeout=
 -                      [NFS] set the maximum lifetime for idmapper cache
 -                      entries.
 -
        nfs.enable_ino64=
                        [NFS] enable 64-bit inode numbers.
                        If zero, the NFS client will fake up a 32-bit inode
                        of returning the full 64-bit number.
                        The default is to return 64-bit inode numbers.
  
 +      nfs.idmap_cache_timeout=
 +                      [NFS] set the maximum lifetime for idmapper cache
 +                      entries.
 +
        nfs.max_session_cb_slots=
                        [NFSv4.1] Sets the maximum number of session
                        slots the client will assign to the callback
                        will be autodetected by the client, and it will fall
                        back to using the idmapper.
                        To turn off this behaviour, set the value to '0'.
 +
        nfs.nfs4_unique_id=
                        [NFS4] Specify an additional fixed unique ident-
                        ification string that NFSv4 clients can insert into
                        their nfs_client_id4 string.  This is typically a
                        UUID that is generated at system install time.
  
 -      nfs.send_implementation_id =
 -                      [NFSv4.1] Send client implementation identification
 -                      information in exchange_id requests.
 -                      If zero, no implementation identification information
 -                      will be sent.
 -                      The default is to send the implementation identification
 -                      information.
 -
 -      nfs.recover_lost_locks =
 +      nfs.recover_lost_locks=
                        [NFSv4] Attempt to recover locks that were lost due
                        to a lease timeout on the server. Please note that
                        doing this risks data corruption, since there are
                        The default parameter value of '0' causes the kernel
                        not to attempt recovery of lost locks.
  
 -      nfs4.layoutstats_timer =
 +      nfs.send_implementation_id=
 +                      [NFSv4.1] Send client implementation identification
 +                      information in exchange_id requests.
 +                      If zero, no implementation identification information
 +                      will be sent.
 +                      The default is to send the implementation identification
 +                      information.
 +
 +      nfs4.layoutstats_timer=
                        [NFSv4.2] Change the rate at which the kernel sends
                        layoutstats to the pNFS metadata server.
  
                        driver. A non-zero value sets the minimum interval
                        in seconds between layoutstats transmissions.
  
 -      nfsd.inter_copy_offload_enable =
 +      nfsd.inter_copy_offload_enable=
                        [NFSv4.2] When set to 1, the server will support
                        server-to-server copies for which this server is
                        the destination of the copy.
  
 -      nfsd.nfsd4_ssc_umount_timeout =
 +      nfsd.nfs4_disable_idmapping=
 +                      [NFSv4] When set to the default of '1', the NFSv4
 +                      server will return only numeric uids and gids to
 +                      clients using auth_sys, and will accept numeric uids
 +                      and gids from such clients.  This is intended to ease
 +                      migration from NFSv2/v3.
 +
 +      nfsd.nfsd4_ssc_umount_timeout=
                        [NFSv4.2] When used as the destination of a
                        server-to-server copy, knfsd temporarily mounts
                        the source server.  It caches the mount in case
                        used for the number of milliseconds specified by
                        this parameter.
  
 -      nfsd.nfs4_disable_idmapping=
 -                      [NFSv4] When set to the default of '1', the NFSv4
 -                      server will return only numeric uids and gids to
 -                      clients using auth_sys, and will accept numeric uids
 -                      and gids from such clients.  This is intended to ease
 -                      migration from NFSv2/v3.
 +      nfsaddrs=       [NFS] Deprecated.  Use ip= instead.
 +                      See Documentation/admin-guide/nfs/nfsroot.rst.
 +
 +      nfsroot=        [NFS] nfs root filesystem for disk-less boxes.
 +                      See Documentation/admin-guide/nfs/nfsroot.rst.
  
 +      nfsrootdebug    [NFS] enable nfsroot debugging messages.
 +                      See Documentation/admin-guide/nfs/nfsroot.rst.
  
        nmi_backtrace.backtrace_idle [KNL]
                        Dump stacks even of idle CPUs in response to an
        no5lvl          [X86-64] Disable 5-level paging mode. Forces
                        kernel to use 4-level paging instead.
  
 -      nofsgsbase      [X86] Disables FSGSBASE instructions.
 +      noaliencache    [MM, NUMA, SLAB] Disables the allocation of alien
 +                      caches in the slab allocator.  Saves per-node memory,
 +                      but will impact performance.
 +
 +      noalign         [KNL,ARM]
 +
 +      noaltinstr      [S390] Disables alternative instructions patching
 +                      (CPU alternatives feature).
 +
 +      noapic          [SMP,APIC] Tells the kernel to not make use of any
 +                      IOAPICs that may be present in the system.
 +
 +      noautogroup     Disable scheduler automatic task group creation.
 +
 +      nocache         [ARM]
  
        no_console_suspend
                        [HW] Never suspend the console
                        /sys/module/printk/parameters/console_suspend) to
                        turn on/off it dynamically.
  
 -      novmcoredd      [KNL,KDUMP]
 -                      Disable device dump. Device dump allows drivers to
 -                      append dump data to vmcore so you can collect driver
 -                      specified debug info.  Drivers can append the data
 -                      without any limit and this data is stored in memory,
 -                      so this may cause significant memory stress.  Disabling
 -                      device dump can help save memory but the driver debug
 -                      data will be no longer available.  This parameter
 -                      is only available when CONFIG_PROC_VMCORE_DEVICE_DUMP
 -                      is set.
 -
 -      noaliencache    [MM, NUMA, SLAB] Disables the allocation of alien
 -                      caches in the slab allocator.  Saves per-node memory,
 -                      but will impact performance.
 -
 -      noalign         [KNL,ARM]
 -
 -      noaltinstr      [S390] Disables alternative instructions patching
 -                      (CPU alternatives feature).
 -
 -      noapic          [SMP,APIC] Tells the kernel to not make use of any
 -                      IOAPICs that may be present in the system.
 -
 -      noautogroup     Disable scheduler automatic task group creation.
 -
 -      nocache         [ARM]
 +      no_debug_objects
 +                      [KNL] Disable object debugging
  
        nodsp           [SH] Disable hardware DSP at boot time.
  
  
        noexec          [IA-64]
  
 -      nosmap          [PPC]
 -                      Disable SMAP (Supervisor Mode Access Prevention)
 -                      even if it is supported by processor.
 -
 -      nosmep          [PPC64s]
 -                      Disable SMEP (Supervisor Mode Execution Prevention)
 -                      even if it is supported by processor.
 -
        noexec32        [X86-64]
                        This affects only 32-bit executables.
                        noexec32=on: enable non-executable mappings (default)
                        noexec32=off: disable non-executable mappings
                                read implies executable mappings
  
 +      no_file_caps    Tells the kernel not to honor file capabilities.  The
 +                      only way then for a file to be executed with privilege
 +                      is to be setuid root or executed by root.
 +
        nofpu           [MIPS,SH] Disable hardware FPU at boot time.
  
 +      nofsgsbase      [X86] Disables FSGSBASE instructions.
 +
        nofxsr          [BUGS=X86-32] Disables x86 floating point extended
                        register save and restore. The kernel will only save
                        legacy floating-point registers on task switch.
  
 -      nohugeiomap     [KNL,X86,PPC,ARM64] Disable kernel huge I/O mappings.
 -
 -      nohugevmalloc   [KNL,X86,PPC,ARM64] Disable kernel huge vmalloc mappings.
 -
 -      nosmt           [KNL,S390] Disable symmetric multithreading (SMT).
 -                      Equivalent to smt=1.
 -
 -                      [KNL,X86] Disable symmetric multithreading (SMT).
 -                      nosmt=force: Force disable SMT, cannot be undone
 -                                   via the sysfs control file.
 -
 -      nospectre_v1    [X86,PPC] Disable mitigations for Spectre Variant 1
 -                      (bounds check bypass). With this option data leaks are
 -                      possible in the system.
 -
 -      nospectre_v2    [X86,PPC_E500,ARM64] Disable all mitigations for
 -                      the Spectre variant 2 (indirect branch prediction)
 -                      vulnerability. System may allow data leaks with this
 -                      option.
 -
 -      nospectre_bhb   [ARM64] Disable all mitigations for Spectre-BHB (branch
 -                      history injection) vulnerability. System may allow data leaks
 -                      with this option.
 -
 -      nospec_store_bypass_disable
 -                      [HW] Disable all mitigations for the Speculative Store Bypass vulnerability
 -
 -      no_uaccess_flush
 -                      [PPC] Don't flush the L1-D cache after accessing user data.
 -
 -      noxsave         [BUGS=X86] Disables x86 extended register state save
 -                      and restore using xsave. The kernel will fallback to
 -                      enabling legacy floating-point and sse state.
 -
 -      noxsaveopt      [X86] Disables xsaveopt used in saving x86 extended
 -                      register states. The kernel will fall back to use
 -                      xsave to save the states. By using this parameter,
 -                      performance of saving the states is degraded because
 -                      xsave doesn't support modified optimization while
 -                      xsaveopt supports it on xsaveopt enabled systems.
 -
 -      noxsaves        [X86] Disables xsaves and xrstors used in saving and
 -                      restoring x86 extended register state in compacted
 -                      form of xsave area. The kernel will fall back to use
 -                      xsaveopt and xrstor to save and restore the states
 -                      in standard form of xsave area. By using this
 -                      parameter, xsave area per process might occupy more
 -                      memory on xsaves enabled systems.
 -
 -      nohlt           [ARM,ARM64,MICROBLAZE,SH] Forces the kernel to busy wait
 -                      in do_idle() and not use the arch_cpu_idle()
 -                      implementation; requires CONFIG_GENERIC_IDLE_POLL_SETUP
 -                      to be effective. This is useful on platforms where the
 -                      sleep(SH) or wfi(ARM,ARM64) instructions do not work
 -                      correctly or when doing power measurements to evaluate
 -                      the impact of the sleep instructions. This is also
 -                      useful when using JTAG debugger.
 -
 -      no_file_caps    Tells the kernel not to honor file capabilities.  The
 -                      only way then for a file to be executed with privilege
 -                      is to be setuid root or executed by root.
 -
        nohalt          [IA-64] Tells the kernel not to use the power saving
                        function PAL_HALT_LIGHT when idle. This increases
                        power-consumption. On the positive side, it reduces
  
        nohibernate     [HIBERNATION] Disable hibernation and resume.
  
 +      nohlt           [ARM,ARM64,MICROBLAZE,SH] Forces the kernel to busy wait
 +                      in do_idle() and not use the arch_cpu_idle()
 +                      implementation; requires CONFIG_GENERIC_IDLE_POLL_SETUP
 +                      to be effective. This is useful on platforms where the
 +                      sleep(SH) or wfi(ARM,ARM64) instructions do not work
 +                      correctly or when doing power measurements to evaluate
 +                      the impact of the sleep instructions. This is also
 +                      useful when using JTAG debugger.
 +
 +      nohugeiomap     [KNL,X86,PPC,ARM64] Disable kernel huge I/O mappings.
 +
 +      nohugevmalloc   [KNL,X86,PPC,ARM64] Disable kernel huge vmalloc mappings.
 +
        nohz=           [KNL] Boottime enable/disable dynamic ticks
                        Valid arguments: on, off
                        Default: on
                        Note that this argument takes precedence over
                        the CONFIG_RCU_NOCB_CPU_DEFAULT_ALL option.
  
 -      noiotrap        [SH] Disables trapped I/O port accesses.
 -
 -      noirqdebug      [X86-32] Disables the code which attempts to detect and
 -                      disable unhandled interrupt sources.
 -
 -      no_timer_check  [X86,APIC] Disables the code which tests for
 -                      broken timer IRQ sources.
 -
 -      noisapnp        [ISAPNP] Disables ISA PnP code.
 -
        noinitrd        [RAM] Tells the kernel not to load any configured
                        initial RAM disk.
  
  
        noinvpcid       [X86] Disable the INVPCID cpu feature.
  
 +      noiotrap        [SH] Disables trapped I/O port accesses.
 +
 +      noirqdebug      [X86-32] Disables the code which attempts to detect and
 +                      disable unhandled interrupt sources.
 +
 +      noisapnp        [ISAPNP] Disables ISA PnP code.
 +
        nojitter        [IA-64] Disables jitter checking for ITC timers.
  
        nokaslr         [KNL]
                        kernel and module base offset ASLR (Address Space
                        Layout Randomization).
  
 -      no-kvmclock     [X86,KVM] Disable paravirtualized KVM clock driver
 -
        no-kvmapf       [X86,KVM] Disable paravirtualized asynchronous page
                        fault handling.
  
 -      no-vmw-sched-clock
 -                      [X86,PV_OPS] Disable paravirtualized VMware scheduler
 -                      clock and use the default one.
 -
 -      no-steal-acc    [X86,PV_OPS,ARM64,PPC/PSERIES] Disable paravirtualized
 -                      steal time accounting. steal time is computed, but
 -                      won't influence scheduler behaviour
 +      no-kvmclock     [X86,KVM] Disable paravirtualized KVM clock driver
  
        nolapic         [X86-32,APIC] Do not enable or use the local APIC.
  
        nomfgpt         [X86-32] Disable Multi-Function General Purpose
                        Timer usage (for AMD Geode machines).
  
 -      nonmi_ipi       [X86] Disable using NMI IPIs during panic/reboot to
 -                      shutdown the other cpus.  Instead use the REBOOT_VECTOR
 -                      irq.
 -
        nomodeset       Disable kernel modesetting. Most systems' firmware
                        sets up a display mode and provides framebuffer memory
                        for output. With nomodeset, DRM and fbdev drivers will
  
        nomodule        Disable module load
  
 +      nonmi_ipi       [X86] Disable using NMI IPIs during panic/reboot to
 +                      shutdown the other cpus.  Instead use the REBOOT_VECTOR
 +                      irq.
 +
        nopat           [X86] Disable PAT (page attribute table extension of
                        pagetables) support.
  
        nopku           [X86] Disable Memory Protection Keys CPU feature found
                        in some Intel CPUs.
  
 +      nopti           [X86-64]
 +                      Equivalent to pti=off
 +
        nopv=           [X86,XEN,KVM,HYPER_V,VMWARE]
                        Disables the PV optimizations forcing the guest to run
                        as generic guest with no PV drivers. Currently support
        noresume        [SWSUSP] Disables resume and restores original swap
                        space.
  
 +      nosbagart       [IA-64]
 +
        no-scroll       [VGA] Disables scrollback.
                        This is required for the Braillex ib80-piezo Braille
                        reader made by F.H. Papenmeier (Germany).
  
 -      nosbagart       [IA-64]
 -
        nosgx           [X86-64,SGX] Disables Intel SGX kernel support.
  
 +      nosmap          [PPC]
 +                      Disable SMAP (Supervisor Mode Access Prevention)
 +                      even if it is supported by processor.
 +
 +      nosmep          [PPC64s]
 +                      Disable SMEP (Supervisor Mode Execution Prevention)
 +                      even if it is supported by processor.
 +
        nosmp           [SMP] Tells an SMP kernel to act as a UP kernel,
                        and disable the IO APIC.  legacy for "maxcpus=0".
  
 +      nosmt           [KNL,S390] Disable symmetric multithreading (SMT).
 +                      Equivalent to smt=1.
 +
 +                      [KNL,X86] Disable symmetric multithreading (SMT).
 +                      nosmt=force: Force disable SMT, cannot be undone
 +                                   via the sysfs control file.
 +
        nosoftlockup    [KNL] Disable the soft-lockup detector.
  
 +      nospec_store_bypass_disable
 +                      [HW] Disable all mitigations for the Speculative Store Bypass vulnerability
 +
 +      nospectre_bhb   [ARM64] Disable all mitigations for Spectre-BHB (branch
 +                      history injection) vulnerability. System may allow data leaks
 +                      with this option.
 +
 +      nospectre_v1    [X86,PPC] Disable mitigations for Spectre Variant 1
 +                      (bounds check bypass). With this option data leaks are
 +                      possible in the system.
 +
 +      nospectre_v2    [X86,PPC_E500,ARM64] Disable all mitigations for
 +                      the Spectre variant 2 (indirect branch prediction)
 +                      vulnerability. System may allow data leaks with this
 +                      option.
 +
 +      no-steal-acc    [X86,PV_OPS,ARM64,PPC/PSERIES] Disable paravirtualized
 +                      steal time accounting. steal time is computed, but
 +                      won't influence scheduler behaviour
 +
        nosync          [HW,M68K] Disables sync negotiation for all devices.
  
 +      no_timer_check  [X86,APIC] Disables the code which tests for
 +                      broken timer IRQ sources.
 +
 +      no_uaccess_flush
 +                      [PPC] Don't flush the L1-D cache after accessing user data.
 +
 +      novmcoredd      [KNL,KDUMP]
 +                      Disable device dump. Device dump allows drivers to
 +                      append dump data to vmcore so you can collect driver
 +                      specified debug info.  Drivers can append the data
 +                      without any limit and this data is stored in memory,
 +                      so this may cause significant memory stress.  Disabling
 +                      device dump can help save memory but the driver debug
 +                      data will be no longer available.  This parameter
 +                      is only available when CONFIG_PROC_VMCORE_DEVICE_DUMP
 +                      is set.
 +
 +      no-vmw-sched-clock
 +                      [X86,PV_OPS] Disable paravirtualized VMware scheduler
 +                      clock and use the default one.
 +
        nowatchdog      [KNL] Disable both lockup detectors, i.e.
                        soft-lockup and NMI watchdog (hard-lockup).
  
                        LEGACY_XAPIC_DISABLED bit set in the
                        IA32_XAPIC_DISABLE_STATUS MSR.
  
 +      noxsave         [BUGS=X86] Disables x86 extended register state save
 +                      and restore using xsave. The kernel will fallback to
 +                      enabling legacy floating-point and sse state.
 +
 +      noxsaveopt      [X86] Disables xsaveopt used in saving x86 extended
 +                      register states. The kernel will fall back to use
 +                      xsave to save the states. By using this parameter,
 +                      performance of saving the states is degraded because
 +                      xsave doesn't support modified optimization while
 +                      xsaveopt supports it on xsaveopt enabled systems.
 +
 +      noxsaves        [X86] Disables xsaves and xrstors used in saving and
 +                      restoring x86 extended register state in compacted
 +                      form of xsave area. The kernel will fall back to use
 +                      xsaveopt and xrstor to save and restore the states
 +                      in standard form of xsave area. By using this
 +                      parameter, xsave area per process might occupy more
 +                      memory on xsaves enabled systems.
 +
        nps_mtm_hs_ctr= [KNL,ARC]
                        This parameter sets the maximum duration, in
                        cycles, each HW thread of the CTOP can run
                        and performance comparison.
  
        pirq=           [SMP,APIC] Manual mp-table setup
 -                      See Documentation/x86/i386/IO-APIC.rst.
 +                      See Documentation/arch/x86/i386/IO-APIC.rst.
  
        plip=           [PPT,NET] Parallel port network link
                        Format: { parport<nr> | timid | 0 }
  
                        Not specifying this option is equivalent to pti=auto.
  
 -      nopti           [X86-64]
 -                      Equivalent to pti=off
 -
        pty.legacy_count=
                        [KNL] Number of legacy pty's. Overwrites compiled-in
                        default number.
  
        serialnumber    [BUGS=X86-32]
  
 -      sev=option[,option...] [X86-64] See Documentation/x86/x86_64/boot-options.rst
 +      sev=option[,option...] [X86-64] See Documentation/arch/x86/x86_64/boot-options.rst
  
        shapers=        [NET]
                        Maximal number of shapers.
                        Can be used multiple times for multiple devices.
  
        vga=            [BOOT,X86-32] Select a particular video mode
 -                      See Documentation/x86/boot.rst and
 +                      See Documentation/arch/x86/boot.rst and
                        Documentation/admin-guide/svga.rst.
                        Use vga=ask for menu.
                        This is actually a boot loader parameter; the value is
                        When enabled, memory and cache locality will be
                        impacted.
  
 +      writecombine=   [LOONGARCH] Control the MAT (Memory Access Type) of
 +                      ioremap_wc().
 +
 +                      on   - Enable writecombine, use WUC for ioremap_wc()
 +                      off  - Disable writecombine, use SUC for ioremap_wc()
 +
        x2apic_phys     [X86-64,APIC] Use x2apic physical mode instead of
                        default x2apic cluster mode on platforms
                        supporting x2apic.
                                xmon commands.
                        off     xmon is disabled.
  
-       amd_pstate=     [X86]
-                       disable
-                         Do not enable amd_pstate as the default
-                         scaling driver for the supported processors
-                       passive
-                         Use amd_pstate as a scaling driver, driver requests a
-                         desired performance on this abstract scale and the power
-                         management firmware translates the requests into actual
-                         hardware states (core frequency, data fabric and memory
-                         clocks etc.)
-                       active
-                         Use amd_pstate_epp driver instance as the scaling driver,
-                         driver provides a hint to the hardware if software wants
-                         to bias toward performance (0x0) or energy efficiency (0xff)
-                         to the CPPC firmware. then CPPC power algorithm will
-                         calculate the runtime workload and adjust the realtime cores
-                         frequency.
index 5a935db80fabb12112bbee9e95df9582d4ed9162,e610457136e64bf1e8e8e3b55f0d8a1d4af82889..427905714f79cd025a1ae4d49b55d8f091485a6c
@@@ -10,7 -10,6 +10,7 @@@
  
  #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
  
 +#include <asm/amd_nb.h>
  #include <linux/acpi.h>
  #include <linux/bitfield.h>
  #include <linux/bits.h>
@@@ -38,6 -37,8 +38,6 @@@
  #define AMD_PMC_SCRATCH_REG_YC                0xD14
  
  /* STB Registers */
 -#define AMD_PMC_STB_INDEX_ADDRESS     0xF8
 -#define AMD_PMC_STB_INDEX_DATA                0xFC
  #define AMD_PMC_STB_PMI_0             0x03E30600
  #define AMD_PMC_STB_S2IDLE_PREPARE    0xC6000001
  #define AMD_PMC_STB_S2IDLE_RESTORE    0xC6000002
@@@ -55,6 -56,8 +55,6 @@@
  #define S2D_TELEMETRY_DRAMBYTES_MAX   0x1000000
  
  /* Base address of SMU for mapping physical address to virtual address */
 -#define AMD_PMC_SMU_INDEX_ADDRESS     0xB8
 -#define AMD_PMC_SMU_INDEX_DATA                0xBC
  #define AMD_PMC_MAPPING_SIZE          0x01000
  #define AMD_PMC_BASE_ADDR_OFFSET      0x10000
  #define AMD_PMC_BASE_ADDR_LO          0x13B102E8
@@@ -94,7 -97,6 +94,7 @@@
  #define AMD_CPU_ID_YC                 0x14B5
  #define AMD_CPU_ID_CB                 0x14D8
  #define AMD_CPU_ID_PS                 0x14E8
 +#define AMD_CPU_ID_SP                 0x14A4
  
  #define PMC_MSG_DELAY_MIN_US          50
  #define RESPONSE_REGISTER_LOOP_MAX    20000
@@@ -266,7 -268,6 +266,7 @@@ static int amd_pmc_stb_debugfs_open_v2(
        dev->msg_port = 0;
        if (ret) {
                dev_err(dev->dev, "error: S2D_NUM_SAMPLES not supported : %d\n", ret);
 +              kfree(buf);
                return ret;
        }
  
@@@ -341,6 -342,33 +341,6 @@@ static int amd_pmc_setup_smu_logging(st
        return 0;
  }
  
 -static int amd_pmc_idlemask_read(struct amd_pmc_dev *pdev, struct device *dev,
 -                               struct seq_file *s)
 -{
 -      u32 val;
 -
 -      switch (pdev->cpu_id) {
 -      case AMD_CPU_ID_CZN:
 -              val = amd_pmc_reg_read(pdev, AMD_PMC_SCRATCH_REG_CZN);
 -              break;
 -      case AMD_CPU_ID_YC:
 -      case AMD_CPU_ID_CB:
 -      case AMD_CPU_ID_PS:
 -              val = amd_pmc_reg_read(pdev, AMD_PMC_SCRATCH_REG_YC);
 -              break;
 -      default:
 -              return -EINVAL;
 -      }
 -
 -      if (dev)
 -              dev_dbg(pdev->dev, "SMU idlemask s0i3: 0x%x\n", val);
 -
 -      if (s)
 -              seq_printf(s, "SMU idlemask : 0x%x\n", val);
 -
 -      return 0;
 -}
 -
  static int get_metrics_table(struct amd_pmc_dev *pdev, struct smu_metrics *table)
  {
        if (!pdev->smu_virt_addr) {
@@@ -365,9 -393,8 +365,8 @@@ static void amd_pmc_validate_deepest(st
  
        if (!table.s0i3_last_entry_status)
                dev_warn(pdev->dev, "Last suspend didn't reach deepest state\n");
-       else
-               dev_dbg(pdev->dev, "Last suspend in deepest state for %lluus\n",
-                        table.timein_s0i3_lastcapture);
+       pm_report_hw_sleep_time(table.s0i3_last_entry_status ?
+                               table.timein_s0i3_lastcapture : 0);
  }
  
  static int amd_pmc_get_smu_version(struct amd_pmc_dev *dev)
        int rc;
        u32 val;
  
 +      if (dev->cpu_id == AMD_CPU_ID_PCO)
 +              return -ENODEV;
 +
        rc = amd_pmc_send_cmd(dev, 0, &val, SMU_MSG_GETSMUVERSION, 1);
        if (rc)
                return rc;
@@@ -424,31 -448,12 +423,31 @@@ static ssize_t smu_program_show(struct 
  static DEVICE_ATTR_RO(smu_fw_version);
  static DEVICE_ATTR_RO(smu_program);
  
 +static umode_t pmc_attr_is_visible(struct kobject *kobj, struct attribute *attr, int idx)
 +{
 +      struct device *dev = kobj_to_dev(kobj);
 +      struct amd_pmc_dev *pdev = dev_get_drvdata(dev);
 +
 +      if (pdev->cpu_id == AMD_CPU_ID_PCO)
 +              return 0;
 +      return 0444;
 +}
 +
  static struct attribute *pmc_attrs[] = {
        &dev_attr_smu_fw_version.attr,
        &dev_attr_smu_program.attr,
        NULL,
  };
 -ATTRIBUTE_GROUPS(pmc);
 +
 +static struct attribute_group pmc_attr_group = {
 +      .attrs = pmc_attrs,
 +      .is_visible = pmc_attr_is_visible,
 +};
 +
 +static const struct attribute_group *pmc_groups[] = {
 +      &pmc_attr_group,
 +      NULL,
 +};
  
  static int smu_fw_info_show(struct seq_file *s, void *unused)
  {
@@@ -515,47 -520,28 +514,47 @@@ static int s0ix_stats_show(struct seq_f
  }
  DEFINE_SHOW_ATTRIBUTE(s0ix_stats);
  
 -static int amd_pmc_idlemask_show(struct seq_file *s, void *unused)
 +static int amd_pmc_idlemask_read(struct amd_pmc_dev *pdev, struct device *dev,
 +                               struct seq_file *s)
  {
 -      struct amd_pmc_dev *dev = s->private;
 +      u32 val;
        int rc;
  
 -      /* we haven't yet read SMU version */
 -      if (!dev->major) {
 -              rc = amd_pmc_get_smu_version(dev);
 -              if (rc)
 -                      return rc;
 +      switch (pdev->cpu_id) {
 +      case AMD_CPU_ID_CZN:
 +              /* we haven't yet read SMU version */
 +              if (!pdev->major) {
 +                      rc = amd_pmc_get_smu_version(pdev);
 +                      if (rc)
 +                              return rc;
 +              }
 +              if (pdev->major > 56 || (pdev->major >= 55 && pdev->minor >= 37))
 +                      val = amd_pmc_reg_read(pdev, AMD_PMC_SCRATCH_REG_CZN);
 +              else
 +                      return -EINVAL;
 +              break;
 +      case AMD_CPU_ID_YC:
 +      case AMD_CPU_ID_CB:
 +      case AMD_CPU_ID_PS:
 +              val = amd_pmc_reg_read(pdev, AMD_PMC_SCRATCH_REG_YC);
 +              break;
 +      default:
 +              return -EINVAL;
        }
  
 -      if (dev->major > 56 || (dev->major >= 55 && dev->minor >= 37)) {
 -              rc = amd_pmc_idlemask_read(dev, NULL, s);
 -              if (rc)
 -                      return rc;
 -      } else {
 -              seq_puts(s, "Unsupported SMU version for Idlemask\n");
 -      }
 +      if (dev)
 +              dev_dbg(pdev->dev, "SMU idlemask s0i3: 0x%x\n", val);
 +
 +      if (s)
 +              seq_printf(s, "SMU idlemask : 0x%x\n", val);
  
        return 0;
  }
 +
 +static int amd_pmc_idlemask_show(struct seq_file *s, void *unused)
 +{
 +      return amd_pmc_idlemask_read(s->private, NULL, s);
 +}
  DEFINE_SHOW_ATTRIBUTE(amd_pmc_idlemask);
  
  static void amd_pmc_dbgfs_unregister(struct amd_pmc_dev *dev)
@@@ -825,14 -811,6 +824,14 @@@ static void amd_pmc_s2idle_check(void
                dev_err(pdev->dev, "error writing to STB: %d\n", rc);
  }
  
 +static int amd_pmc_dump_data(struct amd_pmc_dev *pdev)
 +{
 +      if (pdev->cpu_id == AMD_CPU_ID_PCO)
 +              return -ENODEV;
 +
 +      return amd_pmc_send_cmd(pdev, 0, NULL, SMU_MSG_LOG_DUMP_DATA, 0);
 +}
 +
  static void amd_pmc_s2idle_restore(void)
  {
        struct amd_pmc_dev *pdev = &pmc;
                dev_err(pdev->dev, "resume failed: %d\n", rc);
  
        /* Let SMU know that we are looking for stats */
 -      amd_pmc_send_cmd(pdev, 0, NULL, SMU_MSG_LOG_DUMP_DATA, 0);
 +      amd_pmc_dump_data(pdev);
  
        rc = amd_pmc_write_stb(pdev, AMD_PMC_STB_S2IDLE_RESTORE);
        if (rc)
@@@ -861,7 -839,7 +860,7 @@@ static struct acpi_s2idle_dev_ops amd_p
        .restore = amd_pmc_s2idle_restore,
  };
  
 -static int __maybe_unused amd_pmc_suspend_handler(struct device *dev)
 +static int amd_pmc_suspend_handler(struct device *dev)
  {
        struct amd_pmc_dev *pdev = dev_get_drvdata(dev);
  
@@@ -887,7 -865,6 +886,7 @@@ static const struct pci_device_id pmc_p
        { PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_RN) },
        { PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_PCO) },
        { PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_RV) },
 +      { PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_SP) },
        { }
  };
  
@@@ -924,9 -901,17 +923,9 @@@ static int amd_pmc_write_stb(struct amd
  {
        int err;
  
 -      err = pci_write_config_dword(dev->rdev, AMD_PMC_STB_INDEX_ADDRESS, AMD_PMC_STB_PMI_0);
 +      err = amd_smn_write(0, AMD_PMC_STB_PMI_0, data);
        if (err) {
 -              dev_err(dev->dev, "failed to write addr in stb: 0x%X\n",
 -                      AMD_PMC_STB_INDEX_ADDRESS);
 -              return pcibios_err_to_errno(err);
 -      }
 -
 -      err = pci_write_config_dword(dev->rdev, AMD_PMC_STB_INDEX_DATA, data);
 -      if (err) {
 -              dev_err(dev->dev, "failed to write data in stb: 0x%X\n",
 -                      AMD_PMC_STB_INDEX_DATA);
 +              dev_err(dev->dev, "failed to write data in stb: 0x%X\n", AMD_PMC_STB_PMI_0);
                return pcibios_err_to_errno(err);
        }
  
@@@ -937,10 -922,18 +936,10 @@@ static int amd_pmc_read_stb(struct amd_
  {
        int i, err;
  
 -      err = pci_write_config_dword(dev->rdev, AMD_PMC_STB_INDEX_ADDRESS, AMD_PMC_STB_PMI_0);
 -      if (err) {
 -              dev_err(dev->dev, "error writing addr to stb: 0x%X\n",
 -                      AMD_PMC_STB_INDEX_ADDRESS);
 -              return pcibios_err_to_errno(err);
 -      }
 -
        for (i = 0; i < FIFO_SIZE; i++) {
 -              err = pci_read_config_dword(dev->rdev, AMD_PMC_STB_INDEX_DATA, buf++);
 +              err = amd_smn_read(0, AMD_PMC_STB_PMI_0, buf++);
                if (err) {
 -                      dev_err(dev->dev, "error reading data from stb: 0x%X\n",
 -                              AMD_PMC_STB_INDEX_DATA);
 +                      dev_err(dev->dev, "error reading data from stb: 0x%X\n", AMD_PMC_STB_PMI_0);
                        return pcibios_err_to_errno(err);
                }
        }
@@@ -966,26 -959,31 +965,26 @@@ static int amd_pmc_probe(struct platfor
        }
  
        dev->cpu_id = rdev->device;
 -      dev->rdev = rdev;
 -      err = pci_write_config_dword(rdev, AMD_PMC_SMU_INDEX_ADDRESS, AMD_PMC_BASE_ADDR_LO);
 -      if (err) {
 -              dev_err(dev->dev, "error writing to 0x%x\n", AMD_PMC_SMU_INDEX_ADDRESS);
 -              err = pcibios_err_to_errno(err);
 +
 +      if (dev->cpu_id == AMD_CPU_ID_SP) {
 +              dev_warn_once(dev->dev, "S0i3 is not supported on this hardware\n");
 +              err = -ENODEV;
                goto err_pci_dev_put;
        }
  
 -      err = pci_read_config_dword(rdev, AMD_PMC_SMU_INDEX_DATA, &val);
 +      dev->rdev = rdev;
 +      err = amd_smn_read(0, AMD_PMC_BASE_ADDR_LO, &val);
        if (err) {
 +              dev_err(dev->dev, "error reading 0x%x\n", AMD_PMC_BASE_ADDR_LO);
                err = pcibios_err_to_errno(err);
                goto err_pci_dev_put;
        }
  
        base_addr_lo = val & AMD_PMC_BASE_ADDR_HI_MASK;
  
 -      err = pci_write_config_dword(rdev, AMD_PMC_SMU_INDEX_ADDRESS, AMD_PMC_BASE_ADDR_HI);
 -      if (err) {
 -              dev_err(dev->dev, "error writing to 0x%x\n", AMD_PMC_SMU_INDEX_ADDRESS);
 -              err = pcibios_err_to_errno(err);
 -              goto err_pci_dev_put;
 -      }
 -
 -      err = pci_read_config_dword(rdev, AMD_PMC_SMU_INDEX_DATA, &val);
 +      err = amd_smn_read(0, AMD_PMC_BASE_ADDR_HI, &val);
        if (err) {
 +              dev_err(dev->dev, "error reading 0x%x\n", AMD_PMC_BASE_ADDR_HI);
                err = pcibios_err_to_errno(err);
                goto err_pci_dev_put;
        }
        }
  
        amd_pmc_dbgfs_register(dev);
+       pm_report_max_hw_sleep(U64_MAX);
        return 0;
  
  err_pci_dev_put:
        return err;
  }
  
 -static int amd_pmc_remove(struct platform_device *pdev)
 +static void amd_pmc_remove(struct platform_device *pdev)
  {
        struct amd_pmc_dev *dev = platform_get_drvdata(pdev);
  
        amd_pmc_dbgfs_unregister(dev);
        pci_dev_put(dev->rdev);
        mutex_destroy(&dev->lock);
 -      return 0;
  }
  
  static const struct acpi_device_id amd_pmc_acpi_ids[] = {
@@@ -1054,7 -1054,7 +1054,7 @@@ static struct platform_driver amd_pmc_d
                .pm = pm_sleep_ptr(&amd_pmc_pm),
        },
        .probe = amd_pmc_probe,
 -      .remove = amd_pmc_remove,
 +      .remove_new = amd_pmc_remove,
  };
  module_platform_driver(amd_pmc_driver);
  
index 61ca7c37fb02022e10c580b027d2fa629575cce7,298f27ba1e10f34a85bba2e0ea364b4880603469..da6e7206d38b5a571e2889665cd675f51c343d5e
@@@ -1153,6 -1153,8 +1153,8 @@@ static int pmc_core_probe(struct platfo
        pmc_core_do_dmi_quirks(pmcdev);
  
        pmc_core_dbgfs_register(pmcdev);
+       pm_report_max_hw_sleep(FIELD_MAX(SLP_S0_RES_COUNTER_MASK) *
+                              pmc_core_adjust_slp_s0_step(pmcdev, 1));
  
        device_initialized = true;
        dev_info(&pdev->dev, " initialized\n");
        return 0;
  }
  
 -static int pmc_core_remove(struct platform_device *pdev)
 +static void pmc_core_remove(struct platform_device *pdev)
  {
        struct pmc_dev *pmcdev = platform_get_drvdata(pdev);
  
        platform_set_drvdata(pdev, NULL);
        mutex_destroy(&pmcdev->lock);
        iounmap(pmcdev->regbase);
 -      return 0;
  }
  
  static bool warn_on_s0ix_failures;
@@@ -1178,12 -1181,6 +1180,6 @@@ static __maybe_unused int pmc_core_susp
  {
        struct pmc_dev *pmcdev = dev_get_drvdata(dev);
  
-       pmcdev->check_counters = false;
-       /* No warnings on S0ix failures */
-       if (!warn_on_s0ix_failures)
-               return 0;
        /* Check if the syspend will actually use S0ix */
        if (pm_suspend_via_firmware())
                return 0;
        if (pmc_core_dev_state_get(pmcdev, &pmcdev->s0ix_counter))
                return -EIO;
  
-       pmcdev->check_counters = true;
        return 0;
  }
  
@@@ -1220,6 -1216,8 +1215,8 @@@ static inline bool pmc_core_is_s0ix_fai
        if (pmc_core_dev_state_get(pmcdev, &s0ix_counter))
                return false;
  
+       pm_report_hw_sleep_time((u32)(s0ix_counter - pmcdev->s0ix_counter));
        if (s0ix_counter == pmcdev->s0ix_counter)
                return true;
  
@@@ -1232,12 -1230,16 +1229,16 @@@ static __maybe_unused int pmc_core_resu
        const struct pmc_bit_map **maps = pmcdev->map->lpm_sts;
        int offset = pmcdev->map->lpm_status_offset;
  
-       if (!pmcdev->check_counters)
+       /* Check if the syspend used S0ix */
+       if (pm_suspend_via_firmware())
                return 0;
  
        if (!pmc_core_is_s0ix_failed(pmcdev))
                return 0;
  
+       if (!warn_on_s0ix_failures)
+               return 0;
        if (pmc_core_is_pc10_failed(pmcdev)) {
                /* S0ix failed because of PC10 entry failure */
                dev_info(dev, "CPU did not enter PC10!!! (PC10 cnt=0x%llx)\n",
@@@ -1274,7 -1276,7 +1275,7 @@@ static struct platform_driver pmc_core_
                .dev_groups = pmc_dev_groups,
        },
        .probe = pmc_core_probe,
 -      .remove = pmc_core_remove,
 +      .remove_new = pmc_core_remove,
  };
  
  module_platform_driver(pmc_core_driver);