aboutsummaryrefslogtreecommitdiff
path: root/core/init.c
diff options
context:
space:
mode:
authorShilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>2018-03-05 07:33:08 +0530
committerStewart Smith <stewart@linux.ibm.com>2018-04-19 18:56:06 -0500
commitdf62a033675da4d620731133c0cda1b320adeac8 (patch)
treef99f18b80ae426001bdd33177b64cd65a56d60a8 /core/init.c
parent7d559d19b8151515098109bb5ee149dd810fcafa (diff)
downloadskiboot-df62a033675da4d620731133c0cda1b320adeac8.zip
skiboot-df62a033675da4d620731133c0cda1b320adeac8.tar.gz
skiboot-df62a033675da4d620731133c0cda1b320adeac8.tar.bz2
sensors: Dont add DTS sensors when OCC inband sensors are available
There are two sets of core temperature sensors today. One is DTS scom based core temperature sensors and the second group is the sensors provided by OCC. DTS is the highest temperature among the different temperature zones in the core while OCC core temperature sensors are the average temperature of the core. DTS sensors are read directly by the host by SCOMing the DTS sensors while OCC sensors are read and updated by OCC to main memory. Reading DTS sensors by SCOMing is a heavy and slower operation as compared to reading OCC sensors which is as good as reading memory. So dont add DTS sensors when OCC sensors are available. Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> Acked-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'core/init.c')
-rw-r--r--core/init.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/init.c b/core/init.c
index b91e34b..612391c 100644
--- a/core/init.c
+++ b/core/init.c
@@ -50,6 +50,7 @@
#include <libstb/trustedboot.h>
#include <phys-map.h>
#include <imc.h>
+#include <dts.h>
enum proc_gen proc_gen;
unsigned int pcie_max_link_speed;
@@ -517,7 +518,8 @@ void __noreturn load_and_boot_kernel(bool is_reboot)
* OCC takes few secs to boot. Call this as late as
* as possible to avoid delay.
*/
- occ_sensors_init();
+ if (!occ_sensors_init())
+ dts_sensor_create_nodes(sensor_node);
} else {
/* fdt will be rebuilt */