2023-12-23 03:26:00

by David E. Box

[permalink] [raw]
Subject: [PATCH 0/8] 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
--
2.34.1



2023-12-23 03:26:12

by David E. Box

[permalink] [raw]
Subject: [PATCH 2/8] platform/x86/intel/pmc/lnl.c: Remove probe time LTR ignore

Remove the probe time LTR ignore 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]>
---
drivers/platform/x86/intel/pmc/lnl.c | 6 ------
1 file changed, 6 deletions(-)

diff --git a/drivers/platform/x86/intel/pmc/lnl.c b/drivers/platform/x86/intel/pmc/lnl.c
index 88b35931f5df..fe97ad09a1a6 100644
--- a/drivers/platform/x86/intel/pmc/lnl.c
+++ b/drivers/platform/x86/intel/pmc/lnl.c
@@ -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)
--
2.34.1


2023-12-23 03:26:15

by David E. Box

[permalink] [raw]
Subject: [PATCH 1/8] platform/x86/intel/pmc/arl.c: Remove probe time LTR ignore

Remove the probe time LTR ignore 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]>
---
drivers/platform/x86/intel/pmc/arl.c | 6 ------
1 file changed, 6 deletions(-)

diff --git a/drivers/platform/x86/intel/pmc/arl.c b/drivers/platform/x86/intel/pmc/arl.c
index c20506a9f4a6..31e1fa538e32 100644
--- a/drivers/platform/x86/intel/pmc/arl.c
+++ b/drivers/platform/x86/intel/pmc/arl.c
@@ -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)
--
2.34.1


2023-12-23 03:26:20

by David E. Box

[permalink] [raw]
Subject: [PATCH 6/8] platform/x86/intel/pmc/arl: Add GBE LTR ignore during suspend

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]>
---
drivers/platform/x86/intel/pmc/arl.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/platform/x86/intel/pmc/arl.c b/drivers/platform/x86/intel/pmc/arl.c
index 31e1fa538e32..ae3a9a96f845 100644
--- a/drivers/platform/x86/intel/pmc/arl.c
+++ b/drivers/platform/x86/intel/pmc/arl.c
@@ -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;

--
2.34.1


2023-12-23 03:26:48

by David E. Box

[permalink] [raw]
Subject: [PATCH 7/8] platform/x86/intel/pmc/lnl: Add GBE LTR ignore during suspend

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]>
---
drivers/platform/x86/intel/pmc/lnl.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/platform/x86/intel/pmc/lnl.c b/drivers/platform/x86/intel/pmc/lnl.c
index fe97ad09a1a6..eb350d64efdf 100644
--- a/drivers/platform/x86/intel/pmc/lnl.c
+++ b/drivers/platform/x86/intel/pmc/lnl.c
@@ -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);
--
2.34.1


2023-12-23 03:26:49

by David E. Box

[permalink] [raw]
Subject: [PATCH 5/8] platform/x86/intel/pmc: Move GBE LTR ignore to suspend callback

Commit 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.

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 | 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(-)

diff --git a/drivers/platform/x86/intel/pmc/adl.c b/drivers/platform/x86/intel/pmc/adl.c
index fbe0678f766c..e7878558fd90 100644
--- a/drivers/platform/x86/intel/pmc/adl.c
+++ b/drivers/platform/x86/intel/pmc/adl.c
@@ -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;
}
diff --git a/drivers/platform/x86/intel/pmc/cnp.c b/drivers/platform/x86/intel/pmc/cnp.c
index 80f73242f9dd..dd72974bf71e 100644
--- a/drivers/platform/x86/intel/pmc/cnp.c
+++ b/drivers/platform/x86/intel/pmc/cnp.c
@@ -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;
}
diff --git a/drivers/platform/x86/intel/pmc/core.h b/drivers/platform/x86/intel/pmc/core.h
index 90f2dbc4df72..ce7b1cd2b194 100644
--- a/drivers/platform/x86/intel/pmc/core.h
+++ b/drivers/platform/x86/intel/pmc/core.h
@@ -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; \
diff --git a/drivers/platform/x86/intel/pmc/mtl.c b/drivers/platform/x86/intel/pmc/mtl.c
index ef78d14fc27f..c7d15d864039 100644
--- a/drivers/platform/x86/intel/pmc/mtl.c
+++ b/drivers/platform/x86/intel/pmc/mtl.c
@@ -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);

diff --git a/drivers/platform/x86/intel/pmc/tgl.c b/drivers/platform/x86/intel/pmc/tgl.c
index 8213961975fc..e0580de18077 100644
--- a/drivers/platform/x86/intel/pmc/tgl.c
+++ b/drivers/platform/x86/intel/pmc/tgl.c
@@ -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;
}
--
2.34.1


2023-12-23 03:27:01

by David E. Box

[permalink] [raw]
Subject: [PATCH 8/8] platform/x86/intel/pmc: Add missing extern

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]>
---
drivers/platform/x86/intel/pmc/core.h | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/platform/x86/intel/pmc/core.h b/drivers/platform/x86/intel/pmc/core.h
index ce7b1cd2b194..2a797fccf5e6 100644
--- a/drivers/platform/x86/intel/pmc/core.h
+++ b/drivers/platform/x86/intel/pmc/core.h
@@ -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[];
--
2.34.1


2023-12-23 03:27:06

by David E. Box

[permalink] [raw]
Subject: [PATCH 4/8] platform/x86/intel/pmc: Allow reenabling LTRs

Commit 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.

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(-)

diff --git a/drivers/platform/x86/intel/pmc/adl.c b/drivers/platform/x86/intel/pmc/adl.c
index 882f2d5d8937..fbe0678f766c 100644
--- a/drivers/platform/x86/intel/pmc/adl.c
+++ b/drivers/platform/x86/intel/pmc/adl.c
@@ -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;
}
diff --git a/drivers/platform/x86/intel/pmc/cnp.c b/drivers/platform/x86/intel/pmc/cnp.c
index 59298f184d0e..80f73242f9dd 100644
--- a/drivers/platform/x86/intel/pmc/cnp.c
+++ b/drivers/platform/x86/intel/pmc/cnp.c
@@ -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;
}
diff --git a/drivers/platform/x86/intel/pmc/core.c b/drivers/platform/x86/intel/pmc/core.c
index 31905003bb05..aa44c6612af9 100644
--- a/drivers/platform/x86/intel/pmc/core.c
+++ b/drivers/platform/x86/intel/pmc/core.c
@@ -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;
}
diff --git a/drivers/platform/x86/intel/pmc/core.h b/drivers/platform/x86/intel/pmc/core.h
index ce9b9efc9790..90f2dbc4df72 100644
--- a/drivers/platform/x86/intel/pmc/core.h
+++ 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);

int pmc_core_resume_common(struct pmc_dev *pmcdev);
int get_primary_reg_base(struct pmc *pmc);
diff --git a/drivers/platform/x86/intel/pmc/mtl.c b/drivers/platform/x86/intel/pmc/mtl.c
index e75431325dda..ef78d14fc27f 100644
--- a/drivers/platform/x86/intel/pmc/mtl.c
+++ b/drivers/platform/x86/intel/pmc/mtl.c
@@ -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);
diff --git a/drivers/platform/x86/intel/pmc/tgl.c b/drivers/platform/x86/intel/pmc/tgl.c
index 91fd725951e5..8213961975fc 100644
--- a/drivers/platform/x86/intel/pmc/tgl.c
+++ b/drivers/platform/x86/intel/pmc/tgl.c
@@ -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;
}
--
2.34.1


2023-12-23 03:27:32

by David E. Box

[permalink] [raw]
Subject: [PATCH 3/8] platform/x86/intel/pmc: Add suspend callback

Add 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()").

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/core.c | 3 +++
drivers/platform/x86/intel/pmc/core.h | 2 ++
2 files changed, 5 insertions(+)

diff --git a/drivers/platform/x86/intel/pmc/core.c b/drivers/platform/x86/intel/pmc/core.c
index cdaab728e942..31905003bb05 100644
--- a/drivers/platform/x86/intel/pmc/core.c
+++ b/drivers/platform/x86/intel/pmc/core.c
@@ -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;
diff --git a/drivers/platform/x86/intel/pmc/core.h b/drivers/platform/x86/intel/pmc/core.h
index 2891d8d04fad..ce9b9efc9790 100644
--- a/drivers/platform/x86/intel/pmc/core.h
+++ b/drivers/platform/x86/intel/pmc/core.h
@@ -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;
--
2.34.1


2023-12-27 17:55:04

by Ilpo Järvinen

[permalink] [raw]
Subject: Re: [PATCH 4/8] platform/x86/intel/pmc: Allow reenabling LTRs

On Fri, 22 Dec 2023, David E. Box wrote:

> Commit 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.
>
> 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(-)
>
> diff --git a/drivers/platform/x86/intel/pmc/adl.c b/drivers/platform/x86/intel/pmc/adl.c
> index 882f2d5d8937..fbe0678f766c 100644
> --- a/drivers/platform/x86/intel/pmc/adl.c
> +++ b/drivers/platform/x86/intel/pmc/adl.c
> @@ -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;
> }
> diff --git a/drivers/platform/x86/intel/pmc/cnp.c b/drivers/platform/x86/intel/pmc/cnp.c
> index 59298f184d0e..80f73242f9dd 100644
> --- a/drivers/platform/x86/intel/pmc/cnp.c
> +++ b/drivers/platform/x86/intel/pmc/cnp.c
> @@ -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;
> }
> diff --git a/drivers/platform/x86/intel/pmc/core.c b/drivers/platform/x86/intel/pmc/core.c
> index 31905003bb05..aa44c6612af9 100644
> --- a/drivers/platform/x86/intel/pmc/core.c
> +++ b/drivers/platform/x86/intel/pmc/core.c
> @@ -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

> {
> 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;
> }
> diff --git a/drivers/platform/x86/intel/pmc/core.h b/drivers/platform/x86/intel/pmc/core.h
> index ce9b9efc9790..90f2dbc4df72 100644
> --- a/drivers/platform/x86/intel/pmc/core.h
> +++ 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.

> int pmc_core_resume_common(struct pmc_dev *pmcdev);
> int get_primary_reg_base(struct pmc *pmc);
> diff --git a/drivers/platform/x86/intel/pmc/mtl.c b/drivers/platform/x86/intel/pmc/mtl.c
> index e75431325dda..ef78d14fc27f 100644
> --- a/drivers/platform/x86/intel/pmc/mtl.c
> +++ b/drivers/platform/x86/intel/pmc/mtl.c
> @@ -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);
> diff --git a/drivers/platform/x86/intel/pmc/tgl.c b/drivers/platform/x86/intel/pmc/tgl.c
> index 91fd725951e5..8213961975fc 100644
> --- a/drivers/platform/x86/intel/pmc/tgl.c
> +++ b/drivers/platform/x86/intel/pmc/tgl.c
> @@ -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;
> }
>

--
i.


2023-12-27 18:14:42

by Ilpo Järvinen

[permalink] [raw]
Subject: Re: [PATCH 0/8] Intel PMC Core GBE LTR regression fix

On Fri, 22 Dec 2023, David E. Box wrote:

> 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 :(.

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... :-/


--
i.


2023-12-28 09:35:23

by Hans de Goede

[permalink] [raw]
Subject: Re: [PATCH 0/8] Intel PMC Core GBE LTR regression fix

Hi,

On 12/27/23 19:14, Ilpo Järvinen wrote:
> On Fri, 22 Dec 2023, David E. Box wrote:
>
>> 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 :(.
>
> 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... :-/

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:

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 .

I'll merge patches 6-8 into for-next then after back-merging
the fixes.

Regards,

Hans



2023-12-28 15:39:20

by Ilpo Järvinen

[permalink] [raw]
Subject: Re: [PATCH 0/8] Intel PMC Core GBE LTR regression fix

On Thu, 28 Dec 2023, Hans de Goede wrote:
> On 12/27/23 19:14, Ilpo J?rvinen wrote:
> > On Fri, 22 Dec 2023, David E. Box wrote:
> >
> >> 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 :(.
> >
> > 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... :-/
>
> 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...

> 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.

> 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:
>
> 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.

> I'll merge patches 6-8 into for-next then after back-merging
> the fixes.

--
i.

2023-12-28 15:43:53

by Ilpo Järvinen

[permalink] [raw]
Subject: Re: [PATCH 4/8] platform/x86/intel/pmc: Allow reenabling LTRs

On Wed, 27 Dec 2023, Ilpo J?rvinen wrote:

> On Fri, 22 Dec 2023, David E. Box wrote:
>
> > Commit 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.
> >
> > 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(-)
> >
> > diff --git a/drivers/platform/x86/intel/pmc/adl.c b/drivers/platform/x86/intel/pmc/adl.c
> > index 882f2d5d8937..fbe0678f766c 100644
> > --- a/drivers/platform/x86/intel/pmc/adl.c
> > +++ b/drivers/platform/x86/intel/pmc/adl.c
> > @@ -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;
> > }
> > diff --git a/drivers/platform/x86/intel/pmc/cnp.c b/drivers/platform/x86/intel/pmc/cnp.c
> > index 59298f184d0e..80f73242f9dd 100644
> > --- a/drivers/platform/x86/intel/pmc/cnp.c
> > +++ b/drivers/platform/x86/intel/pmc/cnp.c
> > @@ -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;
> > }
> > diff --git a/drivers/platform/x86/intel/pmc/core.c b/drivers/platform/x86/intel/pmc/core.c
> > index 31905003bb05..aa44c6612af9 100644
> > --- a/drivers/platform/x86/intel/pmc/core.c
> > +++ b/drivers/platform/x86/intel/pmc/core.c
> > @@ -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

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.

> > +++ 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.


--
i.

2024-01-02 12:25:00

by Hans de Goede

[permalink] [raw]
Subject: Re: [PATCH 6/8] platform/x86/intel/pmc/arl: Add GBE LTR ignore during suspend

Hi,

On 12/23/23 04:25, David E. Box wrote:
> 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



> ---
> drivers/platform/x86/intel/pmc/arl.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/platform/x86/intel/pmc/arl.c b/drivers/platform/x86/intel/pmc/arl.c
> index 31e1fa538e32..ae3a9a96f845 100644
> --- a/drivers/platform/x86/intel/pmc/arl.c
> +++ b/drivers/platform/x86/intel/pmc/arl.c
> @@ -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;
>


2024-01-02 12:25:20

by Hans de Goede

[permalink] [raw]
Subject: Re: [PATCH 7/8] platform/x86/intel/pmc/lnl: Add GBE LTR ignore during suspend

Hi,

On 12/23/23 04:25, David E. Box wrote:
> 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



> ---
> drivers/platform/x86/intel/pmc/lnl.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/platform/x86/intel/pmc/lnl.c b/drivers/platform/x86/intel/pmc/lnl.c
> index fe97ad09a1a6..eb350d64efdf 100644
> --- a/drivers/platform/x86/intel/pmc/lnl.c
> +++ b/drivers/platform/x86/intel/pmc/lnl.c
> @@ -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);


2024-01-02 12:25:32

by Hans de Goede

[permalink] [raw]
Subject: Re: [PATCH 8/8] platform/x86/intel/pmc: Add missing extern

Hi,

On 12/23/23 04:25, David E. Box wrote:
> 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



> ---
> drivers/platform/x86/intel/pmc/core.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/platform/x86/intel/pmc/core.h b/drivers/platform/x86/intel/pmc/core.h
> index ce7b1cd2b194..2a797fccf5e6 100644
> --- a/drivers/platform/x86/intel/pmc/core.h
> +++ b/drivers/platform/x86/intel/pmc/core.h
> @@ -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[];