]> git.baikalelectronics.ru Git - kernel.git/commit
intel_idle: Fix SPR C6 optimization
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Wed, 27 Apr 2022 06:08:53 +0000 (09:08 +0300)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 27 Apr 2022 18:36:47 +0000 (20:36 +0200)
commit1ed6da3f000a3dc734fe7f170a05ffe101f551bd
tree07007493d1fad2dff1b31fcee21cca8859afffd9
parent944c474e0422fe62c971b5373fc2b8ff058c28a7
intel_idle: Fix SPR C6 optimization

The Sapphire Rapids (SPR) C6 optimization was added to the end of the
'spr_idle_state_table_update()' function. However, the function has a
'return' which may happen before the optimization has a chance to run.
And this may prevent the optimization from happening.

This is an unlikely scenario, but possible if user boots with, say,
the 'intel_idle.preferred_cstates=6' kernel boot option.

This patch fixes the issue by eliminating the problematic 'return'
statement.

Fixes: c3e064f5f286 ("intel_idle: add core C6 optimization for SPR")
Suggested-by: Jan Beulich <jbeulich@suse.com>
Reported-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
[ rjw: Minor changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/idle/intel_idle.c