Intel PMC Core GBE LTR regression fix
Subsystems (2)
cover Intel PMC Core GBE LTR regression fix
This patch series addresses the network performance regression caused by commit 804951203aa5 ("platform/x86:intel/pmc: Combine core_init() and core_configure()").
Unfortunately, the regression is included in the recent Lunar Lake and Arrow Lake support patches in the review branch. Patches 1 and 2 remove the LTR ignore without a fix. They may be folded into the respective enabling patches indicated in the changelog. This is done so that the next patches fixing the regression can be backported to stable kernels with fewer, if any, conflicts.
Patches 3 and 4 provide the support needed for Patch 5 to move the GBE LTR ignore from probe-time to suspend/resume time. All three carry the same Fixes tag so that the stable kernels can pick them up without causing a separate suspend-time PC10 regression.
Patches 6 and 7 then add the LTR suspend/resume fix for Arrow Lake and Lunar Lake. Of course, they cannot be folded into the enabling patches unless the LTR fixes (3-5) are applied before. Sorry about this :(.
Patch 8 finally addresses an unrelated sparse warning for a missing extern introduced in the commit mentioned in that changelog. This could be folded back into that commit if desired.
Note that there is no current solution to address the loss of runtime PC10 with these patches. With a network cable attached to the PCH LAN, the best that can be achieved is PC8/9. However, this is unlikely to affect many mobile systems which tend not to use LAN and if they do, not the PCH LAN.
David E. Box (8):
platform/x86/intel/pmc/arl.c: Remove probe time LTR ignore platform/x86/intel/pmc/lnl.c: Remove probe time LTR ignore platform/x86/intel/pmc: Add suspend callback platform/x86/intel/pmc: Allow renabling LTRs platform/x86/intel/pmc: Move GBE LTR ignore to suspend callback platform/x86/intel/pmc/arl: Add GBE LTR ignore during suspend platform/x86/intel/pmc/lnl: Add GBE LTR ignore during suspend platform/x86/intel/pmc: Add missing extern
drivers/platform/x86/intel/pmc/adl.c | 9 +++------ drivers/platform/x86/intel/pmc/arl.c | 9 +++------ drivers/platform/x86/intel/pmc/cnp.c | 26 ++++++++++++++++++++------ drivers/platform/x86/intel/pmc/core.c | 12 +++++++++--- drivers/platform/x86/intel/pmc/core.h | 9 ++++++++- drivers/platform/x86/intel/pmc/lnl.c | 9 +++------ drivers/platform/x86/intel/pmc/mtl.c | 9 +++------ drivers/platform/x86/intel/pmc/tgl.c | 8 +++----- 8 files changed, 52 insertions(+), 39 deletions(-)
base-commit: 119652b855e6c96676406ee9a7f535f4db4e8eff
Signature · 1 line
2.34.1
PATCH 2/8 platform/x86/intel/pmc/lnl.c: Remove probe time LTR ignore
Remove the probe time LTR ignore for Lunar Lake.
--- drivers/platform/x86/intel/pmc/lnl.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/platform/x86/intel/pmc/lnl.c +0 -6
@@ -536,12 +536,6 @@ int lnl_core_init(struct pmc_dev *pmcdev)pmc_core_get_low_power_modes (pmcdev); -/* Due to a hardware limitation, the GBE LTR blocks PC10 -* when a cable is attached. Tell the PMC to ignore it. -*/ -dev_dbg (&pmcdev->pdev->dev,"ignoring GBE LTR\n" ); -pmc_core_send_ltr_ignore (pmcdev,3 ); -if (ssram_init) { ret =pmc_core_ssram_get_lpm_reqs (pmcdev);if (ret)
Signature · 1 line
2.34.1
PATCH 1/8 platform/x86/intel/pmc/arl.c: Remove probe time LTR ignore
In reply to David E. BoxRemove the probe time LTR ignore for Arrow Lake.
--- drivers/platform/x86/intel/pmc/arl.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/platform/x86/intel/pmc/arl.c +0 -6
@@ -716,12 +716,6 @@ int arl_core_init(struct pmc_dev *pmcdev)pmc_core_get_low_power_modes (pmcdev);pmc_core_punit_pmt_init (pmcdev,ARL_PMT_DMU_GUID ); -/* Due to a hardware limitation, the GBE LTR blocks PC10 -* when a cable is attached. Tell the PMC to ignore it. -*/ -dev_dbg (&pmcdev->pdev->dev,"ignoring GBE LTR\n" ); -pmc_core_send_ltr_ignore (pmcdev,3 ); -if (ssram_init) { ret =pmc_core_ssram_get_lpm_reqs (pmcdev);if (ret)
Signature · 1 line
2.34.1
PATCH 6/8 platform/x86/intel/pmc/arl: Add GBE LTR ignore during suspend
In reply to David E. BoxAdd the GBE LTR ignore suspend time fix for Arrow Lake.
--- drivers/platform/x86/intel/pmc/arl.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/platform/x86/intel/pmc/arl.c +3 -0
@@ -685,6 +685,8 @@ void arl_d3_fixup(void)int arl_resume (struct pmc_dev *pmcdev) {arl_d3_fixup (); +pmc_core_send_ltr_ignore (pmcdev,3 ,0 ); +return pmc_core_resume_common (pmcdev); }
@@ -696,6 +698,7 @@ int arl_core_init(struct pmc_dev *pmcdev)bool ssram_init = true;arl_d3_fixup (); + pmcdev->suspend = cnl_suspend; pmcdev->resume = arl_resume; pmcdev->regmap_list = arl_pmc_info_list;
Signature · 1 line
2.34.1
PATCH 4/8 platform/x86/intel/pmc: Allow reenabling LTRs
In reply to David E. BoxCommit 804951203aa5 ("platform/x86:intel/pmc: Combine core_init() and core_configure()") caused a network performance regression due to the GBE LTR ignore that it added during probe. The fix will move the ignore to occur at suspend-time (so as to not affect suspend power). This will require the ability to enable the LTR again on resume. Modify pmc_core_send_ltr_ignore() to allow enabling an LTR.
--- drivers/platform/x86/intel/pmc/adl.c | 2 +- drivers/platform/x86/intel/pmc/cnp.c | 2 +- drivers/platform/x86/intel/pmc/core.c | 9 ++++++--- drivers/platform/x86/intel/pmc/core.h | 3 ++- drivers/platform/x86/intel/pmc/mtl.c | 2 +- drivers/platform/x86/intel/pmc/tgl.c | 2 +- 6 files changed, 12 insertions(+), 8 deletions(-)
drivers/platform/x86/intel/pmc/adl.c +1 -1
@@ -327,7 +327,7 @@ int adl_core_init(struct pmc_dev *pmcdev)* when a cable is attached. Tell the PMC to ignore it. */ dev_dbg (&pmcdev->pdev->dev,"ignoring GBE LTR\n" ); -pmc_core_send_ltr_ignore (pmcdev,3 ); +pmc_core_send_ltr_ignore (pmcdev,3 ,1 );return 0 ; }
drivers/platform/x86/intel/pmc/cnp.c +1 -1
@@ -220,7 +220,7 @@ int cnp_core_init(struct pmc_dev *pmcdev)* when a cable is attached. Tell the PMC to ignore it. */ dev_dbg (&pmcdev->pdev->dev,"ignoring GBE LTR\n" ); -pmc_core_send_ltr_ignore (pmcdev,3 ); +pmc_core_send_ltr_ignore (pmcdev,3 ,1 );return 0 ; }
drivers/platform/x86/intel/pmc/core.c +6 -3
@@ -476,7 +476,7 @@ static int pmc_core_pll_show(struct seq_file *s, void *unused) }DEFINE_SHOW_ATTRIBUTE (pmc_core_pll); -int pmc_core_send_ltr_ignore (struct pmc_dev *pmcdev,u32 value) +int pmc_core_send_ltr_ignore (struct pmc_dev *pmcdev,u32 value,int ignore) {struct pmc *pmc;const struct pmc_reg_map *map;
@@ -514,7 +514,10 @@ int pmc_core_send_ltr_ignore(struct pmc_dev *pmcdev, u32 value)mutex_lock (&pmcdev->lock); reg =pmc_core_reg_read (pmc, map->ltr_ignore_offset); - reg |=BIT (ltr_index); +if (ignore) + reg |=BIT (ltr_index); +else + reg &= ~BIT (ltr_index);pmc_core_reg_write (pmc, map->ltr_ignore_offset, reg);mutex_unlock (&pmcdev->lock);
@@ -537,7 +540,7 @@ static ssize_t pmc_core_ltr_ignore_write(struct file *file,if (err)return err; - err =pmc_core_send_ltr_ignore (pmcdev, value); + err =pmc_core_send_ltr_ignore (pmcdev, value,1 );return err ==0 ? count : err; }
drivers/platform/x86/intel/pmc/core.h +2 -1
@@ -567,7 +567,8 @@ extern const struct pmc_reg_map arl_pchs_reg_map;extern void pmc_core_get_tgl_lpm_reqs (struct platform_device *pdev);extern int pmc_core_ssram_get_lpm_reqs (struct pmc_dev *pmcdev); -extern int pmc_core_send_ltr_ignore (struct pmc_dev *pmcdev,u32 value); +extern int +pmc_core_send_ltr_ignore (struct pmc_dev *pmcdev,u32 value,int ignore);int pmc_core_resume_common (struct pmc_dev *pmcdev);int get_primary_reg_base (struct pmc *pmc);
drivers/platform/x86/intel/pmc/mtl.c +1 -1
@@ -1023,7 +1023,7 @@ int mtl_core_init(struct pmc_dev *pmcdev)* when a cable is attached. Tell the PMC to ignore it. */ dev_dbg (&pmcdev->pdev->dev,"ignoring GBE LTR\n" ); -pmc_core_send_ltr_ignore (pmcdev,3 ); +pmc_core_send_ltr_ignore (pmcdev,3 ,1 );if (ssram_init)return pmc_core_ssram_get_lpm_reqs (pmcdev);
drivers/platform/x86/intel/pmc/tgl.c +1 -1
@@ -315,7 +315,7 @@ int tgl_core_generic_init(struct pmc_dev *pmcdev, int pch_tp)* when a cable is attached. Tell the PMC to ignore it. */ dev_dbg (&pmcdev->pdev->dev,"ignoring GBE LTR\n" ); -pmc_core_send_ltr_ignore (pmcdev,3 ); +pmc_core_send_ltr_ignore (pmcdev,3 ,1 );return 0 ; }
Signature · 1 line
2.34.1
PATCH 5/8 platform/x86/intel/pmc: Move GBE LTR ignore to suspend callback
In reply to David E. BoxCommit 804951203aa5 ("platform/x86:intel/pmc: Combine core_init() and core_configure()") caused a network performance regression due to the GBE LTR ignore that it added at probe. This was needed in order to allow the SoC to enter the deepest Package C state. To fix the regression and at least support PC10 during suspend, move the LTR ignore from probe to the suspend callback, and enable it again on resume. This solution will allow PC10 during suspend but restrict Package C entry at runtime to no deeper than PC8/9 while a network cable it attach to the PCH LAN.
--- drivers/platform/x86/intel/pmc/adl.c | 9 +++------ drivers/platform/x86/intel/pmc/cnp.c | 26 ++++++++++++++++++++------ drivers/platform/x86/intel/pmc/core.h | 3 +++ drivers/platform/x86/intel/pmc/mtl.c | 9 +++------ drivers/platform/x86/intel/pmc/tgl.c | 8 +++----- 5 files changed, 32 insertions(+), 23 deletions(-)
drivers/platform/x86/intel/pmc/adl.c +3 -6
@@ -316,6 +316,9 @@ int adl_core_init(struct pmc_dev *pmcdev)struct pmc *pmc = pmcdev->pmcs[PMC_IDX_MAIN ];int ret; + pmcdev->suspend = cnl_suspend; + pmcdev->resume = cnl_resume; + pmc->map = &adl_reg_map; ret =get_primary_reg_base (pmc);if (ret)
@@ -323,11 +326,5 @@ int adl_core_init(struct pmc_dev *pmcdev)pmc_core_get_low_power_modes (pmcdev); -/* Due to a hardware limitation, the GBE LTR blocks PC10 -* when a cable is attached. Tell the PMC to ignore it. -*/ -dev_dbg (&pmcdev->pdev->dev,"ignoring GBE LTR\n" ); -pmc_core_send_ltr_ignore (pmcdev,3 ,1 ); -return 0 ; }
drivers/platform/x86/intel/pmc/cnp.c +20 -6
@@ -204,11 +204,31 @@ const struct pmc_reg_map cnp_reg_map = { .etr3_offset = ETR3_OFFSET, }; +void cnl_suspend (struct pmc_dev *pmcdev) +{ +/* +* Due to a hardware limitation, the GBE LTR blocks PC10 +* when a cable is attached. To unblock PC10 during suspend, +* tell the PMC to ignore it. +*/ +pmc_core_send_ltr_ignore (pmcdev,3 ,1 ); +} + +int cnl_resume (struct pmc_dev *pmcdev) +{ +pmc_core_send_ltr_ignore (pmcdev,3 ,0 ); + +return pmc_core_resume_common (pmcdev); +} +int cnp_core_init (struct pmc_dev *pmcdev) {struct pmc *pmc = pmcdev->pmcs[PMC_IDX_MAIN ];int ret; + pmcdev->suspend = cnl_suspend; + pmcdev->resume = cnl_resume; + pmc->map = &cnp_reg_map; ret =get_primary_reg_base (pmc);if (ret)
@@ -216,11 +236,5 @@ int cnp_core_init(struct pmc_dev *pmcdev)pmc_core_get_low_power_modes (pmcdev); -/* Due to a hardware limitation, the GBE LTR blocks PC10 -* when a cable is attached. Tell the PMC to ignore it. -*/ -dev_dbg (&pmcdev->pdev->dev,"ignoring GBE LTR\n" ); -pmc_core_send_ltr_ignore (pmcdev,3 ,1 ); -return 0 ; }
drivers/platform/x86/intel/pmc/core.h +3 -0
@@ -589,6 +589,9 @@ int mtl_core_init(struct pmc_dev *pmcdev);int arl_core_init (struct pmc_dev *pmcdev);int lnl_core_init (struct pmc_dev *pmcdev); +void cnl_suspend (struct pmc_dev *pmcdev); +int cnl_resume (struct pmc_dev *pmcdev); +#define pmc_for_each_mode (i, mode, pmcdev) \ for (i = 0, mode = pmcdev->lpm_en_modes[i]; \ i < pmcdev->num_lpm_modes; \
drivers/platform/x86/intel/pmc/mtl.c +3 -6
@@ -986,6 +986,8 @@ static void mtl_d3_fixup(void)static int mtl_resume (struct pmc_dev *pmcdev) {mtl_d3_fixup (); +pmc_core_send_ltr_ignore (pmcdev,3 ,0 ); +return pmc_core_resume_common (pmcdev); }
@@ -998,6 +1000,7 @@ int mtl_core_init(struct pmc_dev *pmcdev)mtl_d3_fixup (); + pmcdev->suspend = cnl_suspend; pmcdev->resume = mtl_resume; pmcdev->regmap_list = mtl_pmc_info_list;
@@ -1019,12 +1022,6 @@ int mtl_core_init(struct pmc_dev *pmcdev)pmc_core_get_low_power_modes (pmcdev);pmc_core_punit_pmt_init (pmcdev,MTL_PMT_DMU_GUID ); -/* Due to a hardware limitation, the GBE LTR blocks PC10 -* when a cable is attached. Tell the PMC to ignore it. -*/ -dev_dbg (&pmcdev->pdev->dev,"ignoring GBE LTR\n" ); -pmc_core_send_ltr_ignore (pmcdev,3 ,1 ); -if (ssram_init)return pmc_core_ssram_get_lpm_reqs (pmcdev);
drivers/platform/x86/intel/pmc/tgl.c +3 -5
@@ -305,17 +305,15 @@ int tgl_core_generic_init(struct pmc_dev *pmcdev, int pch_tp)else pmc->map = &tgl_reg_map; + pmcdev->suspend = cnl_suspend; + pmcdev->resume = cnl_resume; + ret =get_primary_reg_base (pmc);if (ret)return ret;pmc_core_get_low_power_modes (pmcdev);pmc_core_get_tgl_lpm_reqs (pmcdev->pdev); -/* Due to a hardware limitation, the GBE LTR blocks PC10 -* when a cable is attached. Tell the PMC to ignore it. -*/ -dev_dbg (&pmcdev->pdev->dev,"ignoring GBE LTR\n" ); -pmc_core_send_ltr_ignore (pmcdev,3 ,1 );return 0 ; }
Signature · 1 line
2.34.1
PATCH 7/8 platform/x86/intel/pmc/lnl: Add GBE LTR ignore during suspend
In reply to David E. BoxAdd the GBE LTR ignore suspend time fix for Lunar Lake.
--- drivers/platform/x86/intel/pmc/lnl.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/platform/x86/intel/pmc/lnl.c +3 -0
@@ -509,6 +509,8 @@ void lnl_d3_fixup(void)int lnl_resume (struct pmc_dev *pmcdev) {lnl_d3_fixup (); +pmc_core_send_ltr_ignore (pmcdev,3 ,0 ); +return pmc_core_resume_common (pmcdev); }
@@ -521,6 +523,7 @@ int lnl_core_init(struct pmc_dev *pmcdev)lnl_d3_fixup (); + pmcdev->suspend = cnl_suspend; pmcdev->resume = lnl_resume; pmcdev->regmap_list = lnl_pmc_info_list; ret =pmc_core_ssram_init (pmcdev, func);
Signature · 1 line
2.34.1
PATCH 8/8 platform/x86/intel/pmc: Add missing extern
In reply to David E. BoxAdd missing extern for tgl_h_reg_map. Fixes sparse warning:
drivers/platform/x86/intel/pmc/tgl.c:213:26: warning: symbol 'tgl_h_reg_map' was not declared. Should it be static?
--- drivers/platform/x86/intel/pmc/core.h | 1 + 1 file changed, 1 insertion(+)
drivers/platform/x86/intel/pmc/core.h +1 -0
@@ -452,6 +452,7 @@ extern const struct pmc_bit_map tgl_vnn_misc_status_map[];extern const struct pmc_bit_map tgl_signal_status_map[];extern const struct pmc_bit_map *tgl_lpm_maps[];extern const struct pmc_reg_map tgl_reg_map; +extern const struct pmc_reg_map tgl_h_reg_map;extern const struct pmc_bit_map adl_pfear_map[];extern const struct pmc_bit_map *ext_adl_pfear_map[];extern const struct pmc_bit_map adl_ltr_show_map[];
Signature · 1 line
2.34.1
PATCH 3/8 platform/x86/intel/pmc: Add suspend callback
In reply to David E. BoxAdd a suspend callback to struct pmc for performing platform specific tasks before device suspend. This is needed in order to perform GBE LTR ignore on certain platforms at suspend-time instead of at probe-time and replace the GBE LTR ignore removal that was done in order to fix a bug introduced by commit 804951203aa5 ("platform/x86:intel/pmc: Combine core_init() and core_configure()").
--- drivers/platform/x86/intel/pmc/core.c | 3 +++ drivers/platform/x86/intel/pmc/core.h | 2 ++ 2 files changed, 5 insertions(+)
drivers/platform/x86/intel/pmc/core.c +3 -0
@@ -1430,6 +1430,9 @@ static __maybe_unused int pmc_core_suspend(struct device *dev)struct pmc_dev *pmcdev =dev_get_drvdata (dev);struct pmc *pmc = pmcdev->pmcs[PMC_IDX_MAIN ]; +if (pmcdev->suspend) + pmcdev->suspend (pmcdev); +/* Check if the syspend will actually use S0ix */ if (pm_suspend_via_firmware ())return 0 ;
drivers/platform/x86/intel/pmc/core.h +2 -0
@@ -389,6 +389,7 @@ struct pmc {* @s0ix_counter: S0ix residency (step adjusted) * @num_lpm_modes: Count of enabled modes * @lpm_en_modes: Array of enabled modes from lowest to highest priority +* @suspend: Function to perform platform specific suspend * @resume: Function to perform platform specific resume * * pmc_dev contains info about power management controller device.
@@ -406,6 +407,7 @@ struct pmc_dev {u64 s0ix_counter;int num_lpm_modes;int lpm_en_modes[LPM_MAX_NUM_MODES ]; +void (*suspend)(struct pmc_dev *pmcdev);int (*resume)(struct pmc_dev *pmcdev);bool has_die_c6;
Signature · 1 line
2.34.1
Ilpo Järvinen
maintainerRe: [PATCH 4/8] platform/x86/intel/pmc: Allow reenabling LTRs
In reply to David E. BoxQuoted 49 lines · David E. Box
Commit
804951203aa5("platform/x86:intel/pmc: Combinecore_init()andcore_configure()") caused a network performance regression due to the GBE LTR ignore that it added during probe. The fix will move the ignore to occur at suspend-time (so as to not affect suspend power). This will require the ability to enable the LTR again on resume. Modifypmc_core_send_ltr_ignore()to allow enabling an LTR.Fixes 804951203aa5 ("platform/x86:intel/pmc: Combine core_init() and core_configure()")Signed-off-by David E. Box <[email protected]>--- drivers/platform/x86/intel/pmc/adl.c | 2 +- drivers/platform/x86/intel/pmc/cnp.c | 2 +- drivers/platform/x86/intel/pmc/core.c | 9 ++++++--- drivers/platform/x86/intel/pmc/core.h | 3 ++- drivers/platform/x86/intel/pmc/mtl.c | 2 +- drivers/platform/x86/intel/pmc/tgl.c | 2 +- 6 files changed, 12 insertions(+), 8 deletions(-)drivers/platform/x86/intel/pmc/adl.c +1
-1@@ -327,7 +327,7 @@ int adl_core_init(struct pmc_dev *pmcdev)* when a cable is attached. Tell the PMC to ignore it. */ dev_dbg (&pmcdev->pdev->dev,"ignoring GBE LTR\n" ); -pmc_core_send_ltr_ignore (pmcdev,3 ); +pmc_core_send_ltr_ignore (pmcdev,3 ,1 );return 0 ; }drivers/platform/x86/intel/pmc/cnp.c +1
-1@@ -220,7 +220,7 @@ int cnp_core_init(struct pmc_dev *pmcdev)* when a cable is attached. Tell the PMC to ignore it. */ dev_dbg (&pmcdev->pdev->dev,"ignoring GBE LTR\n" ); -pmc_core_send_ltr_ignore (pmcdev,3 ); +pmc_core_send_ltr_ignore (pmcdev,3 ,1 );return 0 ; }drivers/platform/x86/intel/pmc/core.c +0
-0
drivers/platform/x86/intel/pmc/core.c static int pmc_core_pll_show(struct seq_file *s, void *unused) · line 479
Quoted 5 lines
drivers/platform/x86/intel/pmc/core.c +1
-1@@ -476,7 +476,7 @@ static int pmc_core_pll_show(struct seq_file *s, void *unused) }DEFINE_SHOW_ATTRIBUTE (pmc_core_pll); -int pmc_core_send_ltr_ignore (struct pmc_dev *pmcdev,u32 value) +int pmc_core_send_ltr_ignore (struct pmc_dev *pmcdev,u32 value,int ignore)
Nothing seems to need int for anything and it's used like a bool. So
Quoted 29 lines
drivers/platform/x86/intel/pmc/core.c +5
-2{struct pmc *pmc;const struct pmc_reg_map *map;@@ -514,7 +514,10 @@ int pmc_core_send_ltr_ignore(struct pmc_dev *pmcdev, u32 value)mutex_lock (&pmcdev->lock); reg =pmc_core_reg_read (pmc, map->ltr_ignore_offset); - reg |=BIT (ltr_index); +if (ignore) + reg |=BIT (ltr_index); +else + reg &= ~BIT (ltr_index);pmc_core_reg_write (pmc, map->ltr_ignore_offset, reg);mutex_unlock (&pmcdev->lock);@@ -537,7 +540,7 @@ static ssize_t pmc_core_ltr_ignore_write(struct file *file,if (err)return err; - err =pmc_core_send_ltr_ignore (pmcdev, value); + err =pmc_core_send_ltr_ignore (pmcdev, value,1 );return err ==0 ? count : err; }drivers/platform/x86/intel/pmc/core.h +0
-0
drivers/platform/x86/intel/pmc/core.h extern const struct pmc_reg_map arl_pchs_reg_map; · line 571
Quoted 6 lines
drivers/platform/x86/intel/pmc/core.h +2
-1@@ -567,7 +567,8 @@ extern const struct pmc_reg_map arl_pchs_reg_map;extern void pmc_core_get_tgl_lpm_reqs (struct platform_device *pdev);extern int pmc_core_ssram_get_lpm_reqs (struct pmc_dev *pmcdev); -extern int pmc_core_send_ltr_ignore (struct pmc_dev *pmcdev,u32 value); +extern int +pmc_core_send_ltr_ignore (struct pmc_dev *pmcdev,u32 value,int ignore);
extern is unnecessary.
Quoted 29 lines
drivers/platform/x86/intel/pmc/core.h +0
-0int pmc_core_resume_common (struct pmc_dev *pmcdev);int get_primary_reg_base (struct pmc *pmc);drivers/platform/x86/intel/pmc/mtl.c +1
-1@@ -1023,7 +1023,7 @@ int mtl_core_init(struct pmc_dev *pmcdev)* when a cable is attached. Tell the PMC to ignore it. */ dev_dbg (&pmcdev->pdev->dev,"ignoring GBE LTR\n" ); -pmc_core_send_ltr_ignore (pmcdev,3 ); +pmc_core_send_ltr_ignore (pmcdev,3 ,1 );if (ssram_init)return pmc_core_ssram_get_lpm_reqs (pmcdev);drivers/platform/x86/intel/pmc/tgl.c +1
-1@@ -315,7 +315,7 @@ int tgl_core_generic_init(struct pmc_dev *pmcdev, int pch_tp)* when a cable is attached. Tell the PMC to ignore it. */ dev_dbg (&pmcdev->pdev->dev,"ignoring GBE LTR\n" ); -pmc_core_send_ltr_ignore (pmcdev,3 ); +pmc_core_send_ltr_ignore (pmcdev,3 ,1 );return 0 ; }
Signature · 1 line
i.
Ilpo Järvinen
maintainerQuoted 11 lines · David E. Box
This patch series addresses the network performance regression caused by commit
804951203aa5("platform/x86:intel/pmc: Combinecore_init()andcore_configure()").Unfortunately, the regression is included in the recent Lunar Lake and Arrow Lake support patches in the review branch. Patches 1 and 2 remove the LTR ignore without a fix. They may be folded into the respective enabling patches indicated in the changelog. This is done so that the next patches fixing the regression can be backported to stable kernels with fewer, if any, conflicts.
Quoted 8 lines
Patches 3 and 4 provide the support needed for Patch 5 to move the GBE LTR ignore from probe-time to suspend/resume time. All three carry the same Fixes tag so that the stable kernels can pick them up without causing a separate suspend-time PC10 regression.
Patches 6 and 7 then add the LTR suspend/resume fix for Arrow Lake and Lunar Lake. Of course, they cannot be folded into the enabling patches unless the LTR fixes (3-5) are applied before. Sorry about this :(.
Wow, this is messy...
So the best order would be placing 3-5 before these Arrow Lake and Lunar
Lake commits in for-next:
119652b855e6 ("platform/x86/intel/pmc: Add Lunar Lake M support to intel_pmc_core driver") f34dcf397286 ("platform/x86/intel/pmc: Add Arrow Lake S support to intel_pmc_core driver")
? And then folding 1-2 and 6-7 into those respective commits?
It makes me wonder though why those two commits couldn't have been delayed slightly to get these fixes included first... :-/
Signature · 1 line
i.
Hi,
Quoted 24 lines · Ilpo Järvinen
Quoted 11 lines · David E. Box
This patch series addresses the network performance regression caused by commit
804951203aa5("platform/x86:intel/pmc: Combinecore_init()andcore_configure()").Unfortunately, the regression is included in the recent Lunar Lake and Arrow Lake support patches in the review branch. Patches 1 and 2 remove the LTR ignore without a fix. They may be folded into the respective enabling patches indicated in the changelog. This is done so that the next patches fixing the regression can be backported to stable kernels with fewer, if any, conflicts.
Quoted 8 lines
Patches 3 and 4 provide the support needed for Patch 5 to move the GBE LTR ignore from probe-time to suspend/resume time. All three carry the same Fixes tag so that the stable kernels can pick them up without causing a separate suspend-time PC10 regression.
Patches 6 and 7 then add the LTR suspend/resume fix for Arrow Lake and Lunar Lake. Of course, they cannot be folded into the enabling patches unless the LTR fixes (3-5) are applied before. Sorry about this :(.
Wow, this is messy...
Quoted 8 lines
So the best order would be placing 3-5 before these Arrow Lake and Lunar
Lake commits in for-next:
119652b855e6("platform/x86/intel/pmc: Add Lunar Lake M support tointel_pmc_coredriver")f34dcf397286("platform/x86/intel/pmc: Add Arrow Lake S support tointel_pmc_coredriver")
? And then folding 1-2 and 6-7 into those respective commits?It makes me wonder though why those two commits couldn't have been delayed slightly to get these fixes included first... :-/
To untangle this mess I have squashed patches 1-2 into the original commits in for-next, so that there won't be a conflict between next and fixes when merging patches 3-5 into fixes.
Ilpo can you pick-up patches 3-5 for the fixes branch ?
And maybe also "platform/x86: p2sb: Allow p2sb_bar() calls during PCI device probe" fix ? I know you have a small review comment on this patch, but IMHO waiting for the small unrelated cleanup to be split out is not worth delaying this deadlock fix. As for the missing fixes tag I believe that should be:
And then do one more fixes pull-request for the GBT LTR fixes + the P2SB deadlock fix ?
I know it is the holiday season, but if you feel up to it, it would be nice to get those fixes on their way to Linus and the stable kernels a bit earlier then before 6.8-rc1 .
I'll merge patches 6-8 into for-next then after back-merging the fixes.
Regards,
Hans
Ilpo Järvinen
maintainerQuoted 31 lines · Hans de Goede
Quoted 30 lines · Ilpo Järvinen
Quoted 11 lines · David E. Box
This patch series addresses the network performance regression caused by commit
804951203aa5("platform/x86:intel/pmc: Combinecore_init()andcore_configure()").Unfortunately, the regression is included in the recent Lunar Lake and Arrow Lake support patches in the review branch. Patches 1 and 2 remove the LTR ignore without a fix. They may be folded into the respective enabling patches indicated in the changelog. This is done so that the next patches fixing the regression can be backported to stable kernels with fewer, if any, conflicts.
Quoted 8 lines
Patches 3 and 4 provide the support needed for Patch 5 to move the GBE LTR ignore from probe-time to suspend/resume time. All three carry the same Fixes tag so that the stable kernels can pick them up without causing a separate suspend-time PC10 regression.
Patches 6 and 7 then add the LTR suspend/resume fix for Arrow Lake and Lunar Lake. Of course, they cannot be folded into the enabling patches unless the LTR fixes (3-5) are applied before. Sorry about this :(.
Wow, this is messy...
So the best order would be placing 3-5 before these Arrow Lake and Lunar
Lake commits in for-next:
119652b855e6("platform/x86/intel/pmc: Add Lunar Lake M support tointel_pmc_coredriver")f34dcf397286("platform/x86/intel/pmc: Add Arrow Lake S support tointel_pmc_coredriver")
? And then folding 1-2 and 6-7 into those respective commits?
Quoted 6 lines
Quoted 2 lines
It makes me wonder though why those two commits couldn't have been delayed slightly to get these fixes included first... :-/
To untangle this mess I have squashed patches 1-2 into the original commits in for-next, so that there won't be a conflict between next and fixes when merging patches 3-5 into fixes.
Dream on, there will be conflicts, rest assured...
Quoted 1 line
Ilpo can you pick-up patches 3-5 for the fixes branch ?
I've now done that and resolved a few conflicts while doing so which you'll encounter while back-merging.
Quoted 6 lines
And maybe also "platform/x86: p2sb: Allow
p2sb_bar()calls during PCI device probe" fix ? I know you have a small review comment on this patch, but IMHO waiting for the small unrelated cleanup to be split out is not worth delaying this deadlock fix. As for the missing fixes tag I believe that should be:
Quoted 8 lines
Fixes 9745fb07474f ("platform/x86/intel: Add Primary to Sideband (P2SB) bridge support")And then do one more fixes pull-request for the GBT LTR fixes + the P2SB deadlock fix ?
I know it is the holiday season, but if you feel up to it, it would be nice to get those fixes on their way to Linus and the stable kernels a bit earlier then before 6.8-rc1 .
They're in the hands of lkp.
Quoted 2 lines
I'll merge patches 6-8 into for-next then after back-merging the fixes.
Signature · 1 line
i.
Ilpo Järvinen
maintainerRe: [PATCH 4/8] platform/x86/intel/pmc: Allow reenabling LTRs
In reply to Ilpo JärvinenQuoted 54 lines · Ilpo Järvinen
Quoted 52 lines · David E. Box
Commit
804951203aa5("platform/x86:intel/pmc: Combinecore_init()andcore_configure()") caused a network performance regression due to the GBE LTR ignore that it added during probe. The fix will move the ignore to occur at suspend-time (so as to not affect suspend power). This will require the ability to enable the LTR again on resume. Modifypmc_core_send_ltr_ignore()to allow enabling an LTR.Fixes 804951203aa5 ("platform/x86:intel/pmc: Combine core_init() and core_configure()")Signed-off-by David E. Box <[email protected]>--- drivers/platform/x86/intel/pmc/adl.c | 2 +- drivers/platform/x86/intel/pmc/cnp.c | 2 +- drivers/platform/x86/intel/pmc/core.c | 9 ++++++--- drivers/platform/x86/intel/pmc/core.h | 3 ++- drivers/platform/x86/intel/pmc/mtl.c | 2 +- drivers/platform/x86/intel/pmc/tgl.c | 2 +- 6 files changed, 12 insertions(+), 8 deletions(-)drivers/platform/x86/intel/pmc/adl.c +1
-1@@ -327,7 +327,7 @@ int adl_core_init(struct pmc_dev *pmcdev)* when a cable is attached. Tell the PMC to ignore it. */ dev_dbg (&pmcdev->pdev->dev,"ignoring GBE LTR\n" ); -pmc_core_send_ltr_ignore (pmcdev,3 ); +pmc_core_send_ltr_ignore (pmcdev,3 ,1 );return 0 ; }drivers/platform/x86/intel/pmc/cnp.c +1
-1@@ -220,7 +220,7 @@ int cnp_core_init(struct pmc_dev *pmcdev)* when a cable is attached. Tell the PMC to ignore it. */ dev_dbg (&pmcdev->pdev->dev,"ignoring GBE LTR\n" ); -pmc_core_send_ltr_ignore (pmcdev,3 ); +pmc_core_send_ltr_ignore (pmcdev,3 ,1 );return 0 ; }drivers/platform/x86/intel/pmc/core.c +0
-0@@ -476,7 +476,7 @@ static int pmc_core_pll_show(struct seq_file *s, void *unused) }DEFINE_SHOW_ATTRIBUTE (pmc_core_pll);
Quoted 4 lines
drivers/platform/x86/intel/pmc/core.c static int pmc_core_pll_show(struct seq_file *s, void *unused) · line 479
Quoted 2 lines
drivers/platform/x86/intel/pmc/core.c +1
-1-int pmc_core_send_ltr_ignore (struct pmc_dev *pmcdev,u32 value) +int pmc_core_send_ltr_ignore (struct pmc_dev *pmcdev,u32 value,int ignore)Nothing seems to need int for anything and it's used like a bool. So
Note that I've merged this change without changing these into bool. Please consider making a follow up change to the type after next -rc1 when things have settled down.
Quoted 10 lines
drivers/platform/x86/intel/pmc/core.c extern const struct pmc_reg_map arl_pchs_reg_map; · line 571
Quoted 8 lines
drivers/platform/x86/intel/pmc/core.c +3
-1+++ b/drivers/platform/x86/intel/pmc/core.h@@ -567,7 +567,8 @@ extern const struct pmc_reg_map arl_pchs_reg_map;extern void pmc_core_get_tgl_lpm_reqs (struct platform_device *pdev);extern int pmc_core_ssram_get_lpm_reqs (struct pmc_dev *pmcdev); -extern int pmc_core_send_ltr_ignore (struct pmc_dev *pmcdev,u32 value); +extern int +pmc_core_send_ltr_ignore (struct pmc_dev *pmcdev,u32 value,int ignore);extern is unnecessary.
While merging, I dropped this one as I had to resolve a conflict here anyway.
Patches 3-5 are now in review-ilpo towards fixes branch. Please do double check they're correct because the conflicts were quite large.
Signature · 1 line
i.
Re: [PATCH 6/8] platform/x86/intel/pmc/arl: Add GBE LTR ignore during suspend
In reply to David E. BoxHi,
Quoted 4 lines · David E. Box
Add the GBE LTR ignore suspend time fix for Arrow Lake.
Fixes f34dcf397286 ("platform/x86/intel/pmc: Add Arrow Lake S support to intel_pmc_core driver")Signed-off-by David E. Box <[email protected]>
Thank you for your patch, I've applied this patch to my review-hans branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans
Note it will show up in my review-hans branch once I've pushed my local branch there, which might take a while.
Once I've run some tests on this branch the patches there will be added to the platform-drivers-x86/for-next branch and eventually will be included in the pdx86 pull-request to Linus for the next merge-window.
Regards,
Hans
Quoted 25 lines
--- drivers/platform/x86/intel/pmc/arl.c | 3 +++ 1 file changed, 3 insertions(+)drivers/platform/x86/intel/pmc/arl.c +3
-0@@ -685,6 +685,8 @@ void arl_d3_fixup(void)int arl_resume (struct pmc_dev *pmcdev) {arl_d3_fixup (); +pmc_core_send_ltr_ignore (pmcdev,3 ,0 ); +return pmc_core_resume_common (pmcdev); }@@ -696,6 +698,7 @@ int arl_core_init(struct pmc_dev *pmcdev)bool ssram_init = true;arl_d3_fixup (); + pmcdev->suspend = cnl_suspend; pmcdev->resume = arl_resume; pmcdev->regmap_list = arl_pmc_info_list;
Re: [PATCH 7/8] platform/x86/intel/pmc/lnl: Add GBE LTR ignore during suspend
In reply to David E. BoxHi,
Quoted 4 lines · David E. Box
Add the GBE LTR ignore suspend time fix for Lunar Lake.
Fixes 119652b855e6 ("platform/x86/intel/pmc: Add Lunar Lake M support to intel_pmc_core driver")Signed-off-by David E. Box <[email protected]>
Thank you for your patch, I've applied this patch to my review-hans branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans
Note it will show up in my review-hans branch once I've pushed my local branch there, which might take a while.
Once I've run some tests on this branch the patches there will be added to the platform-drivers-x86/for-next branch and eventually will be included in the pdx86 pull-request to Linus for the next merge-window.
Regards,
Hans
Quoted 25 lines
--- drivers/platform/x86/intel/pmc/lnl.c | 3 +++ 1 file changed, 3 insertions(+)drivers/platform/x86/intel/pmc/lnl.c +3
-0@@ -509,6 +509,8 @@ void lnl_d3_fixup(void)int lnl_resume (struct pmc_dev *pmcdev) {lnl_d3_fixup (); +pmc_core_send_ltr_ignore (pmcdev,3 ,0 ); +return pmc_core_resume_common (pmcdev); }@@ -521,6 +523,7 @@ int lnl_core_init(struct pmc_dev *pmcdev)lnl_d3_fixup (); + pmcdev->suspend = cnl_suspend; pmcdev->resume = lnl_resume; pmcdev->regmap_list = lnl_pmc_info_list; ret =pmc_core_ssram_init (pmcdev, func);
Re: [PATCH 8/8] platform/x86/intel/pmc: Add missing extern
In reply to David E. BoxHi,
Quoted 6 lines · David E. Box
Add missing extern for
tgl_h_reg_map. Fixes sparse warning:
drivers/platform/x86/intel/pmc/tgl.c:213:26: warning: symbol 'tgl_h_reg_map' was not declared. Should it be static?Fixes 544f7b7f651c ("platform/x86/intel/pmc: Add regmap for Tiger Lake H PCH")Signed-off-by David E. Box <[email protected]>
Thank you for your patch, I've applied this patch to my review-hans branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans
Note it will show up in my review-hans branch once I've pushed my local branch there, which might take a while.
Once I've run some tests on this branch the patches there will be added to the platform-drivers-x86/for-next branch and eventually will be included in the pdx86 pull-request to Linus for the next merge-window.
Regards,
Hans
Quoted 16 lines
--- drivers/platform/x86/intel/pmc/core.h | 1 + 1 file changed, 1 insertion(+)drivers/platform/x86/intel/pmc/core.h +1
-0@@ -452,6 +452,7 @@ extern const struct pmc_bit_map tgl_vnn_misc_status_map[];extern const struct pmc_bit_map tgl_signal_status_map[];extern const struct pmc_bit_map *tgl_lpm_maps[];extern const struct pmc_reg_map tgl_reg_map; +extern const struct pmc_reg_map tgl_h_reg_map;extern const struct pmc_bit_map adl_pfear_map[];extern const struct pmc_bit_map *ext_adl_pfear_map[];extern const struct pmc_bit_map adl_ltr_show_map[];