linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/5] platform/x86: intel_pmc_core: Add bug fixes or code
@ 2020-03-01 20:44 Gayatri Kammela
  2020-03-01 20:44 ` [PATCH v3 1/5] platform/x86: intel_pmc_core: fix: Relocate pmc_core_slps0_display() and pmc_core_lpm_display() to outside of CONFIG_DEBUG_FS Gayatri Kammela
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Gayatri Kammela @ 2020-03-01 20:44 UTC (permalink / raw)
  To: platform-driver-x86
  Cc: linux-kernel, vishwanath.somayaji, dvhart, mika.westerberg,
	peterz, charles.d.prestopine, Gayatri Kammela, Chen Zhou,
	Andy Shevchenko, David Box

Hi,

This patch series consists of bug fixes and code optimization for the
series https://patchwork.kernel.org/patch/11365325/

Patch 1: Relocate both pmc_core_slps0_display() and pmc_core_lpm_display()
Patch 2: Remove the duplicate if() condition to create debugfs entry
Patch 3: Add back slp_s0_offset attribute back to tgl_reg_map
Patch 4: Make pmc_core_substate_res_show() generic
Patch 5: Make pmc_core_lpm_display() generic

Changes since v1:
1) Changed the order of the patches i.e., patch 2 in v1 is made first in
   the order for v2.
2) Fixed the warnings reported by kbuild test robot.

Changes since v2:
1) Add "Make pmc_core_substate_res_show() generic" patch to v3.
2) Fixed the memory leak issue in pmc_core_lpm_display().
3) Moved patch 2 in v2 to the last in the series in v3.

Gayatri Kammela (5):
  platform/x86: intel_pmc_core: fix: Relocate pmc_core_slps0_display()
    and pmc_core_lpm_display() to outside of CONFIG_DEBUG_FS
  platform/x86: intel_pmc_core: fix: Remove the duplicate if() to create
    debugfs entry for substate_live_status_registers
  platform/x86: intel_pmc_core: fix: Add slp_s0_offset attribute back to
    tgl_reg_map
  platform/x86: intel_pmc_core: Make pmc_core_substate_res_show()
    generic
  platform/x86: intel_pmc_core: fix: Make pmc_core_lpm_display() generic
    for platforms that support sub-states

 drivers/platform/x86/intel_pmc_core.c | 148 +++++++++++++++-----------
 drivers/platform/x86/intel_pmc_core.h |   3 +-
 2 files changed, 85 insertions(+), 66 deletions(-)

base-commit: 7adb1e8aeeb5d4d88012568b2049599c1a247cf2

Cc: Chen Zhou <chenzhou10@huawei.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: David Box <david.e.box@intel.com>
-- 
2.17.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH v3 1/5] platform/x86: intel_pmc_core: fix: Relocate pmc_core_slps0_display() and pmc_core_lpm_display() to outside of CONFIG_DEBUG_FS
  2020-03-01 20:44 [PATCH v3 0/5] platform/x86: intel_pmc_core: Add bug fixes or code Gayatri Kammela
@ 2020-03-01 20:44 ` Gayatri Kammela
  2020-03-01 20:44 ` [PATCH v3 2/5] platform/x86: intel_pmc_core: fix: Remove the duplicate if() to create debugfs entry for substate_live_status_registers Gayatri Kammela
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 15+ messages in thread
From: Gayatri Kammela @ 2020-03-01 20:44 UTC (permalink / raw)
  To: platform-driver-x86
  Cc: linux-kernel, vishwanath.somayaji, dvhart, mika.westerberg,
	peterz, charles.d.prestopine, Gayatri Kammela, Chen Zhou,
	Andy Shevchenko, David E . Box

Since pmc_core_slps0_display() and pmc_core_lpm_display() is responsible
for dumping as well as displaying debug registers, there is no need for
these two functions to be defined under CONFIG_DEBUG_FS.

Hence, relocate these functions from under CONFIG_DEBUG_FS to above the
block.

Cc: Chen Zhou <chenzhou10@huawei.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: David E. Box <david.e.box@intel.com>
Signed-off-by: Gayatri Kammela <gayatri.kammela@intel.com>
---
 drivers/platform/x86/intel_pmc_core.c | 122 +++++++++++++-------------
 1 file changed, 61 insertions(+), 61 deletions(-)

diff --git a/drivers/platform/x86/intel_pmc_core.c b/drivers/platform/x86/intel_pmc_core.c
index f4a36fbabf4c..20b2f49726cf 100644
--- a/drivers/platform/x86/intel_pmc_core.c
+++ b/drivers/platform/x86/intel_pmc_core.c
@@ -612,6 +612,67 @@ static int pmc_core_check_read_lock_bit(void)
 	return value & BIT(pmcdev->map->pm_read_disable_bit);
 }
 
+static void pmc_core_slps0_display(struct pmc_dev *pmcdev, struct device *dev,
+				   struct seq_file *s)
+{
+	const struct pmc_bit_map **maps = pmcdev->map->slps0_dbg_maps;
+	const struct pmc_bit_map *map;
+	int offset = pmcdev->map->slps0_dbg_offset;
+	u32 data;
+
+	while (*maps) {
+		map = *maps;
+		data = pmc_core_reg_read(pmcdev, offset);
+		offset += 4;
+		while (map->name) {
+			if (dev)
+				dev_dbg(dev, "SLP_S0_DBG: %-32s\tState: %s\n",
+					map->name,
+					data & map->bit_mask ? "Yes" : "No");
+			if (s)
+				seq_printf(s, "SLP_S0_DBG: %-32s\tState: %s\n",
+					   map->name,
+					   data & map->bit_mask ? "Yes" : "No");
+			++map;
+		}
+		++maps;
+	}
+}
+
+static void pmc_core_lpm_display(struct pmc_dev *pmcdev, struct device *dev,
+				 struct seq_file *s, u32 offset,
+				 const char *str,
+				 const struct pmc_bit_map **maps)
+{
+	u32 lpm_regs[ARRAY_SIZE(tgl_lpm_maps)-1];
+	int index, idx, len = 32, bit_mask;
+
+	for (index = 0; tgl_lpm_maps[index]; index++) {
+		lpm_regs[index] = pmc_core_reg_read(pmcdev, offset);
+		offset += 4;
+	}
+
+	for (idx = 0; maps[idx]; idx++) {
+		if (dev)
+			dev_dbg(dev, "\nLPM_%s_%d:\t0x%x\n", str, idx,
+				lpm_regs[idx]);
+		if (s)
+			seq_printf(s, "\nLPM_%s_%d:\t0x%x\n", str, idx,
+				   lpm_regs[idx]);
+		for (index = 0; maps[idx][index].name && index < len; index++) {
+			bit_mask = maps[idx][index].bit_mask;
+			if (dev)
+				dev_dbg(dev, "%-30s %-30d\n",
+					maps[idx][index].name,
+					lpm_regs[idx] & bit_mask ? 1 : 0);
+			if (s)
+				seq_printf(s, "%-30s %-30d\n",
+					   maps[idx][index].name,
+					   lpm_regs[idx] & bit_mask ? 1 : 0);
+		}
+	}
+}
+
 #if IS_ENABLED(CONFIG_DEBUG_FS)
 static bool slps0_dbg_latch;
 
@@ -844,33 +905,6 @@ static void pmc_core_slps0_dbg_latch(struct pmc_dev *pmcdev, bool reset)
 	mutex_unlock(&pmcdev->lock);
 }
 
-static void pmc_core_slps0_display(struct pmc_dev *pmcdev, struct device *dev,
-				   struct seq_file *s)
-{
-	const struct pmc_bit_map **maps = pmcdev->map->slps0_dbg_maps;
-	const struct pmc_bit_map *map;
-	int offset = pmcdev->map->slps0_dbg_offset;
-	u32 data;
-
-	while (*maps) {
-		map = *maps;
-		data = pmc_core_reg_read(pmcdev, offset);
-		offset += 4;
-		while (map->name) {
-			if (dev)
-				dev_dbg(dev, "SLP_S0_DBG: %-32s\tState: %s\n",
-					map->name,
-					data & map->bit_mask ? "Yes" : "No");
-			if (s)
-				seq_printf(s, "SLP_S0_DBG: %-32s\tState: %s\n",
-					   map->name,
-					   data & map->bit_mask ? "Yes" : "No");
-			++map;
-		}
-		++maps;
-	}
-}
-
 static int pmc_core_slps0_dbg_show(struct seq_file *s, void *unused)
 {
 	struct pmc_dev *pmcdev = s->private;
@@ -974,40 +1008,6 @@ static int pmc_core_substate_res_show(struct seq_file *s, void *unused)
 }
 DEFINE_SHOW_ATTRIBUTE(pmc_core_substate_res);
 
-static void pmc_core_lpm_display(struct pmc_dev *pmcdev, struct device *dev,
-				 struct seq_file *s, u32 offset,
-				 const char *str,
-				 const struct pmc_bit_map **maps)
-{
-	u32 lpm_regs[ARRAY_SIZE(tgl_lpm_maps)-1];
-	int index, idx, len = 32, bit_mask;
-
-	for (index = 0; tgl_lpm_maps[index]; index++) {
-		lpm_regs[index] = pmc_core_reg_read(pmcdev, offset);
-		offset += 4;
-	}
-
-	for (idx = 0; maps[idx]; idx++) {
-		if (dev)
-			dev_dbg(dev, "\nLPM_%s_%d:\t0x%x\n", str, idx,
-				lpm_regs[idx]);
-		if (s)
-			seq_printf(s, "\nLPM_%s_%d:\t0x%x\n", str, idx,
-				   lpm_regs[idx]);
-		for (index = 0; maps[idx][index].name && index < len; index++) {
-			bit_mask = maps[idx][index].bit_mask;
-			if (dev)
-				dev_dbg(dev, "%-30s %-30d\n",
-					maps[idx][index].name,
-					lpm_regs[idx] & bit_mask ? 1 : 0);
-			if (s)
-				seq_printf(s, "%-30s %-30d\n",
-					   maps[idx][index].name,
-					   lpm_regs[idx] & bit_mask ? 1 : 0);
-		}
-	}
-}
-
 static int pmc_core_substate_sts_regs_show(struct seq_file *s, void *unused)
 {
 	struct pmc_dev *pmcdev = s->private;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v3 2/5] platform/x86: intel_pmc_core: fix: Remove the duplicate if() to create debugfs entry for substate_live_status_registers
  2020-03-01 20:44 [PATCH v3 0/5] platform/x86: intel_pmc_core: Add bug fixes or code Gayatri Kammela
  2020-03-01 20:44 ` [PATCH v3 1/5] platform/x86: intel_pmc_core: fix: Relocate pmc_core_slps0_display() and pmc_core_lpm_display() to outside of CONFIG_DEBUG_FS Gayatri Kammela
@ 2020-03-01 20:44 ` Gayatri Kammela
  2020-03-01 20:44 ` [PATCH v3 3/5] platform/x86: intel_pmc_core: fix: Add slp_s0_offset attribute back to tgl_reg_map Gayatri Kammela
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 15+ messages in thread
From: Gayatri Kammela @ 2020-03-01 20:44 UTC (permalink / raw)
  To: platform-driver-x86
  Cc: linux-kernel, vishwanath.somayaji, dvhart, mika.westerberg,
	peterz, charles.d.prestopine, Gayatri Kammela, Chen Zhou,
	Andy Shevchenko, David E . Box

A debugfs entry for substate_live_status_registers is created only if
the platform has sub-states, which requires the same condition to create
substate_status_registers debugfs entry. Hence remove the redundant
condition and re-use the exisiting one.

Cc: Chen Zhou <chenzhou10@huawei.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: David E. Box <david.e.box@intel.com>
Signed-off-by: Gayatri Kammela <gayatri.kammela@intel.com>
---
 drivers/platform/x86/intel_pmc_core.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/platform/x86/intel_pmc_core.c b/drivers/platform/x86/intel_pmc_core.c
index 20b2f49726cf..a36051c2a18c 100644
--- a/drivers/platform/x86/intel_pmc_core.c
+++ b/drivers/platform/x86/intel_pmc_core.c
@@ -1108,9 +1108,6 @@ static void pmc_core_dbgfs_register(struct pmc_dev *pmcdev)
 		debugfs_create_file("substate_status_registers", 0444,
 				    pmcdev->dbgfs_dir, pmcdev,
 				    &pmc_core_substate_sts_regs_fops);
-	}
-
-	if (pmcdev->map->lpm_status_offset) {
 		debugfs_create_file("substate_live_status_registers", 0444,
 				    pmcdev->dbgfs_dir, pmcdev,
 				    &pmc_core_substate_l_sts_regs_fops);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v3 3/5] platform/x86: intel_pmc_core: fix: Add slp_s0_offset attribute back to tgl_reg_map
  2020-03-01 20:44 [PATCH v3 0/5] platform/x86: intel_pmc_core: Add bug fixes or code Gayatri Kammela
  2020-03-01 20:44 ` [PATCH v3 1/5] platform/x86: intel_pmc_core: fix: Relocate pmc_core_slps0_display() and pmc_core_lpm_display() to outside of CONFIG_DEBUG_FS Gayatri Kammela
  2020-03-01 20:44 ` [PATCH v3 2/5] platform/x86: intel_pmc_core: fix: Remove the duplicate if() to create debugfs entry for substate_live_status_registers Gayatri Kammela
@ 2020-03-01 20:44 ` Gayatri Kammela
  2020-03-01 20:44 ` [PATCH v3 4/5] platform/x86: intel_pmc_core: Make pmc_core_substate_res_show() generic Gayatri Kammela
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 15+ messages in thread
From: Gayatri Kammela @ 2020-03-01 20:44 UTC (permalink / raw)
  To: platform-driver-x86
  Cc: linux-kernel, vishwanath.somayaji, dvhart, mika.westerberg,
	peterz, charles.d.prestopine, Gayatri Kammela, Chen Zhou,
	Andy Shevchenko, David E . Box

If platforms such as Tiger Lake has sub-states of S0ix, then attributes
such as slps0_dbg_offset become invalid. But slp_s0_offset is still
valid as it is used to get the pmcdev_base_addr.

Hence, add back slp_s0_offset and remove slps0_dbg_offset attributes.

Cc: Chen Zhou <chenzhou10@huawei.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: David E. Box <david.e.box@intel.com>
Signed-off-by: Gayatri Kammela <gayatri.kammela@intel.com>
---
 drivers/platform/x86/intel_pmc_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/intel_pmc_core.c b/drivers/platform/x86/intel_pmc_core.c
index a36051c2a18c..986fe677d6fe 100644
--- a/drivers/platform/x86/intel_pmc_core.c
+++ b/drivers/platform/x86/intel_pmc_core.c
@@ -556,9 +556,9 @@ static const struct pmc_bit_map *tgl_lpm_maps[] = {
 
 static const struct pmc_reg_map tgl_reg_map = {
 	.pfear_sts = ext_tgl_pfear_map,
+	.slp_s0_offset = CNP_PMC_SLP_S0_RES_COUNTER_OFFSET,
 	.ltr_show_sts = cnp_ltr_show_map,
 	.msr_sts = msr_map,
-	.slps0_dbg_offset = CNP_PMC_SLPS0_DBG_OFFSET,
 	.ltr_ignore_offset = CNP_PMC_LTR_IGNORE_OFFSET,
 	.regmap_length = CNP_PMC_MMIO_REG_LEN,
 	.ppfear0_offset = CNP_PMC_HOST_PPFEAR0A,
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v3 4/5] platform/x86: intel_pmc_core: Make pmc_core_substate_res_show() generic
  2020-03-01 20:44 [PATCH v3 0/5] platform/x86: intel_pmc_core: Add bug fixes or code Gayatri Kammela
                   ` (2 preceding siblings ...)
  2020-03-01 20:44 ` [PATCH v3 3/5] platform/x86: intel_pmc_core: fix: Add slp_s0_offset attribute back to tgl_reg_map Gayatri Kammela
@ 2020-03-01 20:44 ` Gayatri Kammela
  2020-03-01 20:44 ` [PATCH v3 5/5] platform/x86: intel_pmc_core: fix: Make pmc_core_lpm_display() generic for platforms that support sub-states Gayatri Kammela
  2020-03-02 12:54 ` [PATCH v3 0/5] platform/x86: intel_pmc_core: Add bug fixes or code Andy Shevchenko
  5 siblings, 0 replies; 15+ messages in thread
From: Gayatri Kammela @ 2020-03-01 20:44 UTC (permalink / raw)
  To: platform-driver-x86
  Cc: linux-kernel, vishwanath.somayaji, dvhart, mika.westerberg,
	peterz, charles.d.prestopine, Gayatri Kammela, Chen Zhou,
	Andy Shevchenko, David E . Box

Currently pmc_core_substate_res_show() uses array of char pointers
i.e., lpm_modes for Tiger Lake directly to iterate through and to get
the number of low power modes which is hardcoded and cannot be re-used
for future platforms that support sub-states. To maintain readability,
make pmc_core_substate_res_show() generic, so that it can re-used for
future platforms.

Cc: Chen Zhou <chenzhou10@huawei.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: David E. Box <david.e.box@intel.com>
Signed-off-by: Gayatri Kammela <gayatri.kammela@intel.com>
---
 drivers/platform/x86/intel_pmc_core.c | 2 ++
 drivers/platform/x86/intel_pmc_core.h | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/platform/x86/intel_pmc_core.c b/drivers/platform/x86/intel_pmc_core.c
index 986fe677d6fe..04ac058b9871 100644
--- a/drivers/platform/x86/intel_pmc_core.c
+++ b/drivers/platform/x86/intel_pmc_core.c
@@ -566,6 +566,7 @@ static const struct pmc_reg_map tgl_reg_map = {
 	.pm_cfg_offset = CNP_PMC_PM_CFG_OFFSET,
 	.pm_read_disable_bit = CNP_PMC_READ_DISABLE_BIT,
 	.ltr_ignore_max = TGL_NUM_IP_IGN_ALLOWED,
+	.lpm_modes = tgl_lpm_modes,
 	.lpm_en_offset = TGL_LPM_EN_OFFSET,
 	.lpm_residency_offset = TGL_LPM_RESIDENCY_OFFSET,
 	.lpm_sts = tgl_lpm_maps,
@@ -991,6 +992,7 @@ DEFINE_SHOW_ATTRIBUTE(pmc_core_ltr);
 static int pmc_core_substate_res_show(struct seq_file *s, void *unused)
 {
 	struct pmc_dev *pmcdev = s->private;
+	const char **lpm_modes = pmcdev->map->lpm_modes;
 	u32 offset = pmcdev->map->lpm_residency_offset;
 	u32 lpm_en;
 	int index;
diff --git a/drivers/platform/x86/intel_pmc_core.h b/drivers/platform/x86/intel_pmc_core.h
index 1bbdffe80bde..0d50b2402abe 100644
--- a/drivers/platform/x86/intel_pmc_core.h
+++ b/drivers/platform/x86/intel_pmc_core.h
@@ -198,7 +198,7 @@ enum ppfear_regs {
 #define TGL_LPM_STATUS_OFFSET			0x1C3C
 #define TGL_LPM_LIVE_STATUS_OFFSET		0x1C5C
 
-const char *lpm_modes[] = {
+const char *tgl_lpm_modes[] = {
 	"S0i2.0",
 	"S0i2.1",
 	"S0i2.2",
@@ -255,6 +255,7 @@ struct pmc_reg_map {
 	const u32 ltr_ignore_max;
 	const u32 pm_vric1_offset;
 	/* Low Power Mode registers */
+	const char **lpm_modes;
 	const u32 lpm_en_offset;
 	const u32 lpm_residency_offset;
 	const u32 lpm_status_offset;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v3 5/5] platform/x86: intel_pmc_core: fix: Make pmc_core_lpm_display() generic for platforms that support sub-states
  2020-03-01 20:44 [PATCH v3 0/5] platform/x86: intel_pmc_core: Add bug fixes or code Gayatri Kammela
                   ` (3 preceding siblings ...)
  2020-03-01 20:44 ` [PATCH v3 4/5] platform/x86: intel_pmc_core: Make pmc_core_substate_res_show() generic Gayatri Kammela
@ 2020-03-01 20:44 ` Gayatri Kammela
  2020-03-02 12:53   ` Andy Shevchenko
  2020-03-02 12:54 ` [PATCH v3 0/5] platform/x86: intel_pmc_core: Add bug fixes or code Andy Shevchenko
  5 siblings, 1 reply; 15+ messages in thread
From: Gayatri Kammela @ 2020-03-01 20:44 UTC (permalink / raw)
  To: platform-driver-x86
  Cc: linux-kernel, vishwanath.somayaji, dvhart, mika.westerberg,
	peterz, charles.d.prestopine, Gayatri Kammela, Chen Zhou,
	Andy Shevchenko, David E . Box

Currently pmc_core_lpm_display() uses array of struct pointers i.e.,
tgl_lpm_maps for Tiger Lake directly to iterate through and to get the
number of status/live status registers which is hardcoded and cannot
be re-used for future platforms that support sub-states. To maintain
readability, make pmc_core_lpm_display() generic, so that it can re-used
for future platforms.

Cc: Chen Zhou <chenzhou10@huawei.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: David E. Box <david.e.box@intel.com>
Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Gayatri Kammela <gayatri.kammela@intel.com>
---
 drivers/platform/x86/intel_pmc_core.c | 25 ++++++++++++++++++++++---
 1 file changed, 22 insertions(+), 3 deletions(-)

diff --git a/drivers/platform/x86/intel_pmc_core.c b/drivers/platform/x86/intel_pmc_core.c
index 04ac058b9871..cf3aaace21d5 100644
--- a/drivers/platform/x86/intel_pmc_core.c
+++ b/drivers/platform/x86/intel_pmc_core.c
@@ -20,6 +20,7 @@
 #include <linux/module.h>
 #include <linux/pci.h>
 #include <linux/platform_device.h>
+#include <linux/slab.h>
 #include <linux/suspend.h>
 #include <linux/uaccess.h>
 
@@ -640,15 +641,30 @@ static void pmc_core_slps0_display(struct pmc_dev *pmcdev, struct device *dev,
 	}
 }
 
+static int pmc_core_lpm_get_arr_size(const struct pmc_bit_map **maps)
+{
+	int idx, arr_size = 0;
+
+	for (idx = 0; maps[idx]; idx++)
+		arr_size++;
+
+	return arr_size;
+}
+
 static void pmc_core_lpm_display(struct pmc_dev *pmcdev, struct device *dev,
 				 struct seq_file *s, u32 offset,
 				 const char *str,
 				 const struct pmc_bit_map **maps)
 {
-	u32 lpm_regs[ARRAY_SIZE(tgl_lpm_maps)-1];
-	int index, idx, len = 32, bit_mask;
+	int arr_size = pmc_core_lpm_get_arr_size(maps);
+	int index, idx, bit_mask, len = 32;
+	u32 *lpm_regs;
+
+	lpm_regs = kmalloc_array(arr_size, sizeof(*lpm_regs), GFP_KERNEL);
+	if(!lpm_regs)
+		goto err;
 
-	for (index = 0; tgl_lpm_maps[index]; index++) {
+	for (index = 0; maps[index]; index++) {
 		lpm_regs[index] = pmc_core_reg_read(pmcdev, offset);
 		offset += 4;
 	}
@@ -672,6 +688,9 @@ static void pmc_core_lpm_display(struct pmc_dev *pmcdev, struct device *dev,
 					   lpm_regs[idx] & bit_mask ? 1 : 0);
 		}
 	}
+
+err:
+	kfree(lpm_regs);
 }
 
 #if IS_ENABLED(CONFIG_DEBUG_FS)
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH v3 5/5] platform/x86: intel_pmc_core: fix: Make pmc_core_lpm_display() generic for platforms that support sub-states
  2020-03-01 20:44 ` [PATCH v3 5/5] platform/x86: intel_pmc_core: fix: Make pmc_core_lpm_display() generic for platforms that support sub-states Gayatri Kammela
@ 2020-03-02 12:53   ` Andy Shevchenko
  2020-03-02 18:57     ` Kammela, Gayatri
  0 siblings, 1 reply; 15+ messages in thread
From: Andy Shevchenko @ 2020-03-02 12:53 UTC (permalink / raw)
  To: Gayatri Kammela
  Cc: platform-driver-x86, linux-kernel, vishwanath.somayaji, dvhart,
	mika.westerberg, peterz, charles.d.prestopine, Chen Zhou,
	David E . Box

On Sun, Mar 01, 2020 at 12:44:26PM -0800, Gayatri Kammela wrote:
> Currently pmc_core_lpm_display() uses array of struct pointers i.e.,
> tgl_lpm_maps for Tiger Lake directly to iterate through and to get the
> number of status/live status registers which is hardcoded and cannot
> be re-used for future platforms that support sub-states. To maintain
> readability, make pmc_core_lpm_display() generic, so that it can re-used
> for future platforms.

My comments below.

...

> +static int pmc_core_lpm_get_arr_size(const struct pmc_bit_map **maps)
> +{
> +	int idx, arr_size = 0;

And why do you need arr_size variable at all?

> +
> +	for (idx = 0; maps[idx]; idx++)
> +		arr_size++;
> +
> +	return arr_size;
> +}

...

> -	int index, idx, len = 32, bit_mask;
> +	int index, idx, bit_mask, len = 32;

What's the point of shuffling this?

> +	int arr_size = pmc_core_lpm_get_arr_size(maps);

This would be better in a split manner, i.e.

	int arr_size;

	...

	arr_size = ...;

...

> +	lpm_regs = kmalloc_array(arr_size, sizeof(*lpm_regs), GFP_KERNEL);
> +	if(!lpm_regs)

> +		goto err;

There is no point to have the label. Simple return will work.

> -	for (index = 0; tgl_lpm_maps[index]; index++) {
> +	for (index = 0; maps[index]; index++) {

Why not to reuse arr_size here?

>  		lpm_regs[index] = pmc_core_reg_read(pmcdev, offset);
>  		offset += 4;
>  	}

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v3 0/5] platform/x86: intel_pmc_core: Add bug fixes or code
  2020-03-01 20:44 [PATCH v3 0/5] platform/x86: intel_pmc_core: Add bug fixes or code Gayatri Kammela
                   ` (4 preceding siblings ...)
  2020-03-01 20:44 ` [PATCH v3 5/5] platform/x86: intel_pmc_core: fix: Make pmc_core_lpm_display() generic for platforms that support sub-states Gayatri Kammela
@ 2020-03-02 12:54 ` Andy Shevchenko
  2020-03-02 18:29   ` Kammela, Gayatri
  5 siblings, 1 reply; 15+ messages in thread
From: Andy Shevchenko @ 2020-03-02 12:54 UTC (permalink / raw)
  To: Gayatri Kammela
  Cc: platform-driver-x86, linux-kernel, vishwanath.somayaji, dvhart,
	mika.westerberg, peterz, charles.d.prestopine, Chen Zhou,
	David Box

On Sun, Mar 01, 2020 at 12:44:21PM -0800, Gayatri Kammela wrote:
> Hi,
> 
> This patch series consists of bug fixes and code optimization for the
> series https://patchwork.kernel.org/patch/11365325/
> 

I had applied first four, the fifth requires additional work.
When send a new version, do it only for last one.

> Patch 1: Relocate both pmc_core_slps0_display() and pmc_core_lpm_display()
> Patch 2: Remove the duplicate if() condition to create debugfs entry
> Patch 3: Add back slp_s0_offset attribute back to tgl_reg_map
> Patch 4: Make pmc_core_substate_res_show() generic
> Patch 5: Make pmc_core_lpm_display() generic
> 
> Changes since v1:
> 1) Changed the order of the patches i.e., patch 2 in v1 is made first in
>    the order for v2.
> 2) Fixed the warnings reported by kbuild test robot.
> 
> Changes since v2:
> 1) Add "Make pmc_core_substate_res_show() generic" patch to v3.
> 2) Fixed the memory leak issue in pmc_core_lpm_display().
> 3) Moved patch 2 in v2 to the last in the series in v3.
> 
> Gayatri Kammela (5):
>   platform/x86: intel_pmc_core: fix: Relocate pmc_core_slps0_display()
>     and pmc_core_lpm_display() to outside of CONFIG_DEBUG_FS
>   platform/x86: intel_pmc_core: fix: Remove the duplicate if() to create
>     debugfs entry for substate_live_status_registers
>   platform/x86: intel_pmc_core: fix: Add slp_s0_offset attribute back to
>     tgl_reg_map
>   platform/x86: intel_pmc_core: Make pmc_core_substate_res_show()
>     generic
>   platform/x86: intel_pmc_core: fix: Make pmc_core_lpm_display() generic
>     for platforms that support sub-states
> 
>  drivers/platform/x86/intel_pmc_core.c | 148 +++++++++++++++-----------
>  drivers/platform/x86/intel_pmc_core.h |   3 +-
>  2 files changed, 85 insertions(+), 66 deletions(-)
> 
> base-commit: 7adb1e8aeeb5d4d88012568b2049599c1a247cf2
> 
> Cc: Chen Zhou <chenzhou10@huawei.com>
> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Cc: David Box <david.e.box@intel.com>
> -- 
> 2.17.1
> 

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [PATCH v3 0/5] platform/x86: intel_pmc_core: Add bug fixes or code
  2020-03-02 12:54 ` [PATCH v3 0/5] platform/x86: intel_pmc_core: Add bug fixes or code Andy Shevchenko
@ 2020-03-02 18:29   ` Kammela, Gayatri
  2020-03-19 17:57     ` Kammela, Gayatri
  0 siblings, 1 reply; 15+ messages in thread
From: Kammela, Gayatri @ 2020-03-02 18:29 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: platform-driver-x86, linux-kernel, Somayaji, Vishwanath, dvhart,
	Westerberg, Mika, peterz, Prestopine, Charles D, Chen Zhou, Box,
	David E

> -----Original Message-----
> From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Sent: Monday, March 2, 2020 4:54 AM
> To: Kammela, Gayatri <gayatri.kammela@intel.com>
> Cc: platform-driver-x86@vger.kernel.org; linux-kernel@vger.kernel.org;
> Somayaji, Vishwanath <vishwanath.somayaji@intel.com>;
> dvhart@infradead.org; Westerberg, Mika <mika.westerberg@intel.com>;
> peterz@infradead.org; Prestopine, Charles D
> <charles.d.prestopine@intel.com>; Chen Zhou <chenzhou10@huawei.com>;
> Box, David E <david.e.box@intel.com>
> Subject: Re: [PATCH v3 0/5] platform/x86: intel_pmc_core: Add bug fixes or
> code
> 
> On Sun, Mar 01, 2020 at 12:44:21PM -0800, Gayatri Kammela wrote:
> > Hi,
> >
> > This patch series consists of bug fixes and code optimization for the
> > series https://patchwork.kernel.org/patch/11365325/
> >
> 
> I had applied first four, the fifth requires additional work.
> When send a new version, do it only for last one.

Thanks Andy! I will send the 5th patch alone in new version.

> 
> > Patch 1: Relocate both pmc_core_slps0_display() and
> > pmc_core_lpm_display() Patch 2: Remove the duplicate if() condition to
> > create debugfs entry Patch 3: Add back slp_s0_offset attribute back to
> > tgl_reg_map Patch 4: Make pmc_core_substate_res_show() generic Patch
> > 5: Make pmc_core_lpm_display() generic
> >
> > Changes since v1:
> > 1) Changed the order of the patches i.e., patch 2 in v1 is made first in
> >    the order for v2.
> > 2) Fixed the warnings reported by kbuild test robot.
> >
> > Changes since v2:
> > 1) Add "Make pmc_core_substate_res_show() generic" patch to v3.
> > 2) Fixed the memory leak issue in pmc_core_lpm_display().
> > 3) Moved patch 2 in v2 to the last in the series in v3.
> >
> > Gayatri Kammela (5):
> >   platform/x86: intel_pmc_core: fix: Relocate pmc_core_slps0_display()
> >     and pmc_core_lpm_display() to outside of CONFIG_DEBUG_FS
> >   platform/x86: intel_pmc_core: fix: Remove the duplicate if() to create
> >     debugfs entry for substate_live_status_registers
> >   platform/x86: intel_pmc_core: fix: Add slp_s0_offset attribute back to
> >     tgl_reg_map
> >   platform/x86: intel_pmc_core: Make pmc_core_substate_res_show()
> >     generic
> >   platform/x86: intel_pmc_core: fix: Make pmc_core_lpm_display() generic
> >     for platforms that support sub-states
> >
> >  drivers/platform/x86/intel_pmc_core.c | 148 +++++++++++++++-----------
> >  drivers/platform/x86/intel_pmc_core.h |   3 +-
> >  2 files changed, 85 insertions(+), 66 deletions(-)
> >
> > base-commit: 7adb1e8aeeb5d4d88012568b2049599c1a247cf2
> >
> > Cc: Chen Zhou <chenzhou10@huawei.com>
> > Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > Cc: David Box <david.e.box@intel.com>
> > --
> > 2.17.1
> >
> 
> --
> With Best Regards,
> Andy Shevchenko
> 


^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [PATCH v3 5/5] platform/x86: intel_pmc_core: fix: Make pmc_core_lpm_display() generic for platforms that support sub-states
  2020-03-02 12:53   ` Andy Shevchenko
@ 2020-03-02 18:57     ` Kammela, Gayatri
  0 siblings, 0 replies; 15+ messages in thread
From: Kammela, Gayatri @ 2020-03-02 18:57 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: platform-driver-x86, linux-kernel, Somayaji, Vishwanath, dvhart,
	Westerberg, Mika, peterz, Prestopine, Charles D, Chen Zhou, Box,
	David E

> -----Original Message-----
> From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Sent: Monday, March 2, 2020 4:54 AM
> To: Kammela, Gayatri <gayatri.kammela@intel.com>
> Cc: platform-driver-x86@vger.kernel.org; linux-kernel@vger.kernel.org;
> Somayaji, Vishwanath <vishwanath.somayaji@intel.com>;
> dvhart@infradead.org; Westerberg, Mika <mika.westerberg@intel.com>;
> peterz@infradead.org; Prestopine, Charles D
> <charles.d.prestopine@intel.com>; Chen Zhou <chenzhou10@huawei.com>;
> Box, David E <david.e.box@intel.com>
> Subject: Re: [PATCH v3 5/5] platform/x86: intel_pmc_core: fix: Make
> pmc_core_lpm_display() generic for platforms that support sub-states
> 
> On Sun, Mar 01, 2020 at 12:44:26PM -0800, Gayatri Kammela wrote:
> > Currently pmc_core_lpm_display() uses array of struct pointers i.e.,
> > tgl_lpm_maps for Tiger Lake directly to iterate through and to get the
> > number of status/live status registers which is hardcoded and cannot
> > be re-used for future platforms that support sub-states. To maintain
> > readability, make pmc_core_lpm_display() generic, so that it can
> > re-used for future platforms.
> 
> My comments below.

Thanks Andy! for the comments.

> 
> ...
> 
> > +static int pmc_core_lpm_get_arr_size(const struct pmc_bit_map **maps)
> > +{
> > +	int idx, arr_size = 0;
> 
> And why do you need arr_size variable at all?

I could just return idx value at the end of the for loop. I will remove the arr_size variable.

> 
> > +
> > +	for (idx = 0; maps[idx]; idx++)
> > +		arr_size++;
> > +
> > +	return arr_size;
> > +}
> 
> ...
> 
> > -	int index, idx, len = 32, bit_mask;
> > +	int index, idx, bit_mask, len = 32;
> 
> What's the point of shuffling this?

Just wanted to have all uninitialized variables declared before initialized ones. I will just leave this out in v4.

> 
> > +	int arr_size = pmc_core_lpm_get_arr_size(maps);
> 
> This would be better in a split manner, i.e.
> 
> 	int arr_size;
> 
> 	...
> 
> 	arr_size = ...;

Sure, I will make this change in v4

> 
> ...
> 
> > +	lpm_regs = kmalloc_array(arr_size, sizeof(*lpm_regs), GFP_KERNEL);
> > +	if(!lpm_regs)
> 
> > +		goto err;
> 
> There is no point to have the label. Simple return will work.

Thought adding a label will help not to have multiple kfree() in the same function (one here at the check and one at the end of the for loop) I will add a return.

> 
> > -	for (index = 0; tgl_lpm_maps[index]; index++) {
> > +	for (index = 0; maps[index]; index++) {
> 
> Why not to reuse arr_size here?

Good point! I missed it. I will use the arr_size here to iterate.

> 
> >  		lpm_regs[index] = pmc_core_reg_read(pmcdev, offset);
> >  		offset += 4;
> >  	}
> 
> --
> With Best Regards,
> Andy Shevchenko
> 


^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [PATCH v3 0/5] platform/x86: intel_pmc_core: Add bug fixes or code
  2020-03-02 18:29   ` Kammela, Gayatri
@ 2020-03-19 17:57     ` Kammela, Gayatri
  2020-03-19 18:06       ` Andy Shevchenko
  0 siblings, 1 reply; 15+ messages in thread
From: Kammela, Gayatri @ 2020-03-19 17:57 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: platform-driver-x86, linux-kernel, Somayaji, Vishwanath, dvhart,
	Westerberg, Mika, peterz, Prestopine, Charles D, Chen Zhou, Box,
	David E

> -----Original Message-----
> From: Kammela, Gayatri
> Sent: Monday, March 2, 2020 10:29 AM
> To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Cc: platform-driver-x86@vger.kernel.org; linux-kernel@vger.kernel.org;
> Somayaji, Vishwanath <vishwanath.somayaji@intel.com>;
> dvhart@infradead.org; Westerberg, Mika <mika.westerberg@intel.com>;
> peterz@infradead.org; Prestopine, Charles D
> <charles.d.prestopine@intel.com>; Chen Zhou <chenzhou10@huawei.com>;
> Box, David E <david.e.box@intel.com>
> Subject: RE: [PATCH v3 0/5] platform/x86: intel_pmc_core: Add bug fixes or
> code
> 
> > -----Original Message-----
> > From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > Sent: Monday, March 2, 2020 4:54 AM
> > To: Kammela, Gayatri <gayatri.kammela@intel.com>
> > Cc: platform-driver-x86@vger.kernel.org; linux-kernel@vger.kernel.org;
> > Somayaji, Vishwanath <vishwanath.somayaji@intel.com>;
> > dvhart@infradead.org; Westerberg, Mika <mika.westerberg@intel.com>;
> > peterz@infradead.org; Prestopine, Charles D
> > <charles.d.prestopine@intel.com>; Chen Zhou
> <chenzhou10@huawei.com>;
> > Box, David E <david.e.box@intel.com>
> > Subject: Re: [PATCH v3 0/5] platform/x86: intel_pmc_core: Add bug
> > fixes or code
> >
> > On Sun, Mar 01, 2020 at 12:44:21PM -0800, Gayatri Kammela wrote:
> > > Hi,
> > >
> > > This patch series consists of bug fixes and code optimization for
> > > the series https://patchwork.kernel.org/patch/11365325/
> > >
> >
> > I had applied first four, the fifth requires additional work.
> > When send a new version, do it only for last one.
> 
> Thanks Andy! I will send the 5th patch alone in new version.
> 

Hi Andy! I see first 3 patches are merged in for-next branch on 2/28 but not 4th patch. Can you please check? http://git.infradead.org/linux-platform-drivers-x86.git/shortlog/refs/heads/for-next

> >
> > > Patch 1: Relocate both pmc_core_slps0_display() and
> > > pmc_core_lpm_display() Patch 2: Remove the duplicate if() condition
> > > to create debugfs entry Patch 3: Add back slp_s0_offset attribute
> > > back to tgl_reg_map Patch 4: Make pmc_core_substate_res_show()
> > > generic Patch
> > > 5: Make pmc_core_lpm_display() generic
> > >
> > > Changes since v1:
> > > 1) Changed the order of the patches i.e., patch 2 in v1 is made first in
> > >    the order for v2.
> > > 2) Fixed the warnings reported by kbuild test robot.
> > >
> > > Changes since v2:
> > > 1) Add "Make pmc_core_substate_res_show() generic" patch to v3.
> > > 2) Fixed the memory leak issue in pmc_core_lpm_display().
> > > 3) Moved patch 2 in v2 to the last in the series in v3.
> > >
> > > Gayatri Kammela (5):
> > >   platform/x86: intel_pmc_core: fix: Relocate pmc_core_slps0_display()
> > >     and pmc_core_lpm_display() to outside of CONFIG_DEBUG_FS
> > >   platform/x86: intel_pmc_core: fix: Remove the duplicate if() to create
> > >     debugfs entry for substate_live_status_registers
> > >   platform/x86: intel_pmc_core: fix: Add slp_s0_offset attribute back to
> > >     tgl_reg_map
> > >   platform/x86: intel_pmc_core: Make pmc_core_substate_res_show()
> > >     generic
> > >   platform/x86: intel_pmc_core: fix: Make pmc_core_lpm_display()
> generic
> > >     for platforms that support sub-states
> > >
> > >  drivers/platform/x86/intel_pmc_core.c | 148 +++++++++++++++-----------
> > >  drivers/platform/x86/intel_pmc_core.h |   3 +-
> > >  2 files changed, 85 insertions(+), 66 deletions(-)
> > >
> > > base-commit: 7adb1e8aeeb5d4d88012568b2049599c1a247cf2
> > >
> > > Cc: Chen Zhou <chenzhou10@huawei.com>
> > > Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > > Cc: David Box <david.e.box@intel.com>
> > > --
> > > 2.17.1
> > >
> >
> > --
> > With Best Regards,
> > Andy Shevchenko
> >


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v3 0/5] platform/x86: intel_pmc_core: Add bug fixes or code
  2020-03-19 17:57     ` Kammela, Gayatri
@ 2020-03-19 18:06       ` Andy Shevchenko
  2020-03-19 18:15         ` Kammela, Gayatri
  0 siblings, 1 reply; 15+ messages in thread
From: Andy Shevchenko @ 2020-03-19 18:06 UTC (permalink / raw)
  To: Kammela, Gayatri
  Cc: platform-driver-x86, linux-kernel, Somayaji, Vishwanath, dvhart,
	Westerberg, Mika, peterz, Prestopine, Charles D, Chen Zhou, Box,
	David E

On Thu, Mar 19, 2020 at 05:57:06PM +0000, Kammela, Gayatri wrote:
> > -----Original Message-----
> > From: Kammela, Gayatri
> > Sent: Monday, March 2, 2020 10:29 AM
> > To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > Cc: platform-driver-x86@vger.kernel.org; linux-kernel@vger.kernel.org;
> > Somayaji, Vishwanath <vishwanath.somayaji@intel.com>;
> > dvhart@infradead.org; Westerberg, Mika <mika.westerberg@intel.com>;
> > peterz@infradead.org; Prestopine, Charles D
> > <charles.d.prestopine@intel.com>; Chen Zhou <chenzhou10@huawei.com>;
> > Box, David E <david.e.box@intel.com>
> > Subject: RE: [PATCH v3 0/5] platform/x86: intel_pmc_core: Add bug fixes or
> > code
> > 
> > > -----Original Message-----
> > > From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > > Sent: Monday, March 2, 2020 4:54 AM
> > > To: Kammela, Gayatri <gayatri.kammela@intel.com>
> > > Cc: platform-driver-x86@vger.kernel.org; linux-kernel@vger.kernel.org;
> > > Somayaji, Vishwanath <vishwanath.somayaji@intel.com>;
> > > dvhart@infradead.org; Westerberg, Mika <mika.westerberg@intel.com>;
> > > peterz@infradead.org; Prestopine, Charles D
> > > <charles.d.prestopine@intel.com>; Chen Zhou
> > <chenzhou10@huawei.com>;
> > > Box, David E <david.e.box@intel.com>
> > > Subject: Re: [PATCH v3 0/5] platform/x86: intel_pmc_core: Add bug
> > > fixes or code
> > >
> > > On Sun, Mar 01, 2020 at 12:44:21PM -0800, Gayatri Kammela wrote:
> > > > Hi,
> > > >
> > > > This patch series consists of bug fixes and code optimization for
> > > > the series https://patchwork.kernel.org/patch/11365325/
> > > >
> > >
> > > I had applied first four, the fifth requires additional work.
> > > When send a new version, do it only for last one.
> > 
> > Thanks Andy! I will send the 5th patch alone in new version.
> > 
> 
> Hi Andy! I see first 3 patches are merged in for-next branch on 2/28 but not 4th patch. Can you please check? http://git.infradead.org/linux-platform-drivers-x86.git/shortlog/refs/heads/for-next


Is it in my review and testing queue?

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [PATCH v3 0/5] platform/x86: intel_pmc_core: Add bug fixes or code
  2020-03-19 18:06       ` Andy Shevchenko
@ 2020-03-19 18:15         ` Kammela, Gayatri
  2020-03-20 13:50           ` Andy Shevchenko
  0 siblings, 1 reply; 15+ messages in thread
From: Kammela, Gayatri @ 2020-03-19 18:15 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: platform-driver-x86, linux-kernel, Somayaji, Vishwanath, dvhart,
	Westerberg, Mika, peterz, Prestopine, Charles D, Chen Zhou, Box,
	David E

> -----Original Message-----
> From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Sent: Thursday, March 19, 2020 11:06 AM
> To: Kammela, Gayatri <gayatri.kammela@intel.com>
> Cc: platform-driver-x86@vger.kernel.org; linux-kernel@vger.kernel.org;
> Somayaji, Vishwanath <vishwanath.somayaji@intel.com>;
> dvhart@infradead.org; Westerberg, Mika <mika.westerberg@intel.com>;
> peterz@infradead.org; Prestopine, Charles D
> <charles.d.prestopine@intel.com>; Chen Zhou <chenzhou10@huawei.com>;
> Box, David E <david.e.box@intel.com>
> Subject: Re: [PATCH v3 0/5] platform/x86: intel_pmc_core: Add bug fixes or
> code
> 
> On Thu, Mar 19, 2020 at 05:57:06PM +0000, Kammela, Gayatri wrote:
> > > -----Original Message-----
> > > From: Kammela, Gayatri
> > > Sent: Monday, March 2, 2020 10:29 AM
> > > To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > > Cc: platform-driver-x86@vger.kernel.org;
> > > linux-kernel@vger.kernel.org; Somayaji, Vishwanath
> > > <vishwanath.somayaji@intel.com>; dvhart@infradead.org; Westerberg,
> > > Mika <mika.westerberg@intel.com>; peterz@infradead.org; Prestopine,
> > > Charles D <charles.d.prestopine@intel.com>; Chen Zhou
> > > <chenzhou10@huawei.com>; Box, David E <david.e.box@intel.com>
> > > Subject: RE: [PATCH v3 0/5] platform/x86: intel_pmc_core: Add bug
> > > fixes or code
> > >
> > > > -----Original Message-----
> > > > From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > > > Sent: Monday, March 2, 2020 4:54 AM
> > > > To: Kammela, Gayatri <gayatri.kammela@intel.com>
> > > > Cc: platform-driver-x86@vger.kernel.org;
> > > > linux-kernel@vger.kernel.org; Somayaji, Vishwanath
> > > > <vishwanath.somayaji@intel.com>; dvhart@infradead.org;
> Westerberg,
> > > > Mika <mika.westerberg@intel.com>; peterz@infradead.org;
> > > > Prestopine, Charles D <charles.d.prestopine@intel.com>; Chen Zhou
> > > <chenzhou10@huawei.com>;
> > > > Box, David E <david.e.box@intel.com>
> > > > Subject: Re: [PATCH v3 0/5] platform/x86: intel_pmc_core: Add bug
> > > > fixes or code
> > > >
> > > > On Sun, Mar 01, 2020 at 12:44:21PM -0800, Gayatri Kammela wrote:
> > > > > Hi,
> > > > >
> > > > > This patch series consists of bug fixes and code optimization
> > > > > for the series https://patchwork.kernel.org/patch/11365325/
> > > > >
> > > >
> > > > I had applied first four, the fifth requires additional work.
> > > > When send a new version, do it only for last one.
> > >
> > > Thanks Andy! I will send the 5th patch alone in new version.
> > >
> >
> > Hi Andy! I see first 3 patches are merged in for-next branch on 2/28
> > but not 4th patch. Can you please check?
> > http://git.infradead.org/linux-platform-drivers-x86.git/shortlog/refs/
> > heads/for-next
> 
> 
> Is it in my review and testing queue?

I think it is archived and superseded https://patchwork.kernel.org/patch/11414379/

> 
> --
> With Best Regards,
> Andy Shevchenko
> 


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v3 0/5] platform/x86: intel_pmc_core: Add bug fixes or code
  2020-03-19 18:15         ` Kammela, Gayatri
@ 2020-03-20 13:50           ` Andy Shevchenko
  2020-03-20 17:34             ` Kammela, Gayatri
  0 siblings, 1 reply; 15+ messages in thread
From: Andy Shevchenko @ 2020-03-20 13:50 UTC (permalink / raw)
  To: Kammela, Gayatri
  Cc: Andy Shevchenko, platform-driver-x86, linux-kernel, Somayaji,
	Vishwanath, dvhart, Westerberg, Mika, peterz, Prestopine,
	Charles D, Chen Zhou, Box, David E

On Thu, Mar 19, 2020 at 8:16 PM Kammela, Gayatri
<gayatri.kammela@intel.com> wrote:
>
> > Is it in my review and testing queue?
>
> I think it is archived and superseded https://patchwork.kernel.org/patch/11414379/

Now everything in for-next, check if something is missed and resend.

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [PATCH v3 0/5] platform/x86: intel_pmc_core: Add bug fixes or code
  2020-03-20 13:50           ` Andy Shevchenko
@ 2020-03-20 17:34             ` Kammela, Gayatri
  0 siblings, 0 replies; 15+ messages in thread
From: Kammela, Gayatri @ 2020-03-20 17:34 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Andy Shevchenko, platform-driver-x86, linux-kernel, Somayaji,
	Vishwanath, dvhart, Westerberg, Mika, peterz, Prestopine,
	Charles D, Chen Zhou, Box, David E

> -----Original Message-----
> From: Andy Shevchenko <andy.shevchenko@gmail.com>
> Sent: Friday, March 20, 2020 6:50 AM
> To: Kammela, Gayatri <gayatri.kammela@intel.com>
> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>; platform-
> driver-x86@vger.kernel.org; linux-kernel@vger.kernel.org; Somayaji,
> Vishwanath <vishwanath.somayaji@intel.com>; dvhart@infradead.org;
> Westerberg, Mika <mika.westerberg@intel.com>; peterz@infradead.org;
> Prestopine, Charles D <charles.d.prestopine@intel.com>; Chen Zhou
> <chenzhou10@huawei.com>; Box, David E <david.e.box@intel.com>
> Subject: Re: [PATCH v3 0/5] platform/x86: intel_pmc_core: Add bug fixes or
> code
> 
> On Thu, Mar 19, 2020 at 8:16 PM Kammela, Gayatri
> <gayatri.kammela@intel.com> wrote:
> >
> > > Is it in my review and testing queue?
> >
> > I think it is archived and superseded
> > https://patchwork.kernel.org/patch/11414379/
> 
> Now everything in for-next, check if something is missed and resend.
Thanks Andy! I just noticed 5th patch in this version is accepted but 4th is still showing superseded. To avoid confusion, I will resend the 4th patch alone.
> 
> --
> With Best Regards,
> Andy Shevchenko

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2020-03-20 17:35 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-01 20:44 [PATCH v3 0/5] platform/x86: intel_pmc_core: Add bug fixes or code Gayatri Kammela
2020-03-01 20:44 ` [PATCH v3 1/5] platform/x86: intel_pmc_core: fix: Relocate pmc_core_slps0_display() and pmc_core_lpm_display() to outside of CONFIG_DEBUG_FS Gayatri Kammela
2020-03-01 20:44 ` [PATCH v3 2/5] platform/x86: intel_pmc_core: fix: Remove the duplicate if() to create debugfs entry for substate_live_status_registers Gayatri Kammela
2020-03-01 20:44 ` [PATCH v3 3/5] platform/x86: intel_pmc_core: fix: Add slp_s0_offset attribute back to tgl_reg_map Gayatri Kammela
2020-03-01 20:44 ` [PATCH v3 4/5] platform/x86: intel_pmc_core: Make pmc_core_substate_res_show() generic Gayatri Kammela
2020-03-01 20:44 ` [PATCH v3 5/5] platform/x86: intel_pmc_core: fix: Make pmc_core_lpm_display() generic for platforms that support sub-states Gayatri Kammela
2020-03-02 12:53   ` Andy Shevchenko
2020-03-02 18:57     ` Kammela, Gayatri
2020-03-02 12:54 ` [PATCH v3 0/5] platform/x86: intel_pmc_core: Add bug fixes or code Andy Shevchenko
2020-03-02 18:29   ` Kammela, Gayatri
2020-03-19 17:57     ` Kammela, Gayatri
2020-03-19 18:06       ` Andy Shevchenko
2020-03-19 18:15         ` Kammela, Gayatri
2020-03-20 13:50           ` Andy Shevchenko
2020-03-20 17:34             ` Kammela, Gayatri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).