diff options
author | jmbills <jason.m.bills@intel.com> | 2022-01-18 21:55:05 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-18 21:55:05 +0300 |
commit | 7cf0c1cd0ce835d1833509b7b911e8a97380278b (patch) | |
tree | 0b45c3beaa9874facc4ed1a2395a31e42be0135d /meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0006-DTS_CPU-filter-first-zero-from-RdPkgConfig-10.patch | |
parent | 4dac5fcd49b5e2de1074f1363775ec0f19041072 (diff) | |
parent | 1fc0d70f658da30091bcd49f9bf29aecd6b99ba7 (diff) | |
download | openbmc-1-0.86.tar.xz |
Merge pull request #76 from Intel-BMC/update1-0.86
Update
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0006-DTS_CPU-filter-first-zero-from-RdPkgConfig-10.patch')
-rw-r--r-- | meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0006-DTS_CPU-filter-first-zero-from-RdPkgConfig-10.patch | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0006-DTS_CPU-filter-first-zero-from-RdPkgConfig-10.patch b/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0006-DTS_CPU-filter-first-zero-from-RdPkgConfig-10.patch deleted file mode 100644 index a498f9c19..000000000 --- a/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0006-DTS_CPU-filter-first-zero-from-RdPkgConfig-10.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 4d4e68e0eed7ccf899bc1b3799a93ed8eb44270d Mon Sep 17 00:00:00 2001 -From: Zhikui Ren <zhikui.ren@intel.com> -Date: Tue, 2 Feb 2021 14:49:28 -0800 -Subject: [PATCH] DTS_CPU: filter first zero from RdPkgConfig 10 - -Peci command GetPkgConfig 10 can return 0 (hot) with cc 0x40 -after cpu reset. Once pcode run time image is loaded -and it returns 0x8000 as DTS margin data not ready -Discard the first zero reading and return -ENODATA. -Consecutive zeros will be returned so that real hot -condition will still be detected and logged but possibly delayed -by the sensor polling period, which is normally one second. - -Signed-off-by: Zhikui Ren <zhikui.ren@intel.com> ---- - drivers/hwmon/peci-cputemp.c | 20 ++++++++++++++++++++ - 1 file changed, 20 insertions(+) - -diff --git a/drivers/hwmon/peci-cputemp.c b/drivers/hwmon/peci-cputemp.c -index 49670bc80530..af1c09741120 100644 ---- a/drivers/hwmon/peci-cputemp.c -+++ b/drivers/hwmon/peci-cputemp.c -@@ -17,6 +17,7 @@ struct temp_group { - struct peci_sensor_data die; - u32 die_raw_prev; - struct peci_sensor_data dts; -+ u32 dts_raw_prev; - struct peci_sensor_data tcontrol; - struct peci_sensor_data tthrottle; - struct peci_sensor_data tjmax; -@@ -159,6 +160,7 @@ static int get_dts(struct peci_cputemp *priv) - s32 dts_margin; - u8 pkg_cfg[4]; - int ret; -+ bool discard = false; - - if (!peci_sensor_need_update(&priv->temp.dts)) - return 0; -@@ -172,6 +174,24 @@ static int get_dts(struct peci_cputemp *priv) - - dts_margin = le16_to_cpup((__le16 *)pkg_cfg); - -+ /* -+ * There is a small window (500us) for read dts_margin (RdPkgConfig 10) -+ * to return cc 0x40, and dts_margin of 0 after cpu reset, before -+ * runtime image is loaded to set it to 0x8000 (dts reading not ready). -+ * DTS sensor is polled by user application at a slower rate than this -+ * window. Treat the first zero reading as data not available. -+ * Consecutive zeros will be returned so true hot condition is not be -+ * missed. -+ */ -+ if (dts_margin == 0 && priv->temp.dts_raw_prev != 0) { -+ dev_err(priv->dev, -+ "discard first 0 reading from RdPkgConfig 10\n"); -+ discard = true; -+ } -+ priv->temp.dts_raw_prev = dts_margin; -+ if (discard) -+ return -ENODATA; -+ - /** - * Processors return a value of DTS reading in 10.6 format - * (10 bits signed decimal, 6 bits fractional). --- -2.17.1 - |