From 8ee01af225a0ac2a6de48624dfd56a3095fb9920 Mon Sep 17 00:00:00 2001 From: Christian Geddes Date: Wed, 27 Feb 2019 10:31:32 -0600 Subject: Allow child/parent lookups between DIMM and OCMB_CHIP targets Some hwps are trying to use the FAPI interfaces to lookup this relationship. We can support it so might as well allow it. Change-Id: I4677fdcabbce9798bf068263a916eedc2ee4eb44 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/72552 Reviewed-by: Matt Derksen Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: FSP CI Jenkins Tested-by: Jenkins OP HW Reviewed-by: Corey V. Swenson Reviewed-by: Daniel M. Crowell --- src/include/usr/fapi2/target.H | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/include/usr/fapi2/target.H b/src/include/usr/fapi2/target.H index 05df61a42..7b286db87 100644 --- a/src/include/usr/fapi2/target.H +++ b/src/include/usr/fapi2/target.H @@ -462,10 +462,12 @@ inline Target Target::getParent(void) const // DIMM -> MCA // DIMM -> MBA // DIMM -> MEM_PORT + // DIMM -> OCMB_CHIP static_assert(!((T_SELF == fapi2::TARGET_TYPE_DIMM) && (K_PARENT != fapi2::TARGET_TYPE_MCA) && (K_PARENT != fapi2::TARGET_TYPE_MBA) && - (K_PARENT != fapi2::TARGET_TYPE_MEM_PORT)), + (K_PARENT != fapi2::TARGET_TYPE_MEM_PORT) && + (K_PARENT != fapi2::TARGET_TYPE_OCMB_CHIP)), "improper parent of fapi2::TARGET_TYPE_DIMM"); // valid parents for PROC @@ -917,8 +919,10 @@ inline std::vector > // valid children for OCMB // OCMB -> MEM_PORT + // OCMB -> DIMM static_assert(!((T_SELF == fapi2::TARGET_TYPE_OCMB_CHIP) && - (K_CHILD != fapi2::TARGET_TYPE_MEM_PORT)), + (K_CHILD != fapi2::TARGET_TYPE_MEM_PORT) && + (K_CHILD != fapi2::TARGET_TYPE_DIMM)), "improper child of fapi2::TARGET_TYPE_OCMB_CHIP"); // valid children for MEM_PORT -- cgit v1.2.3