diff options
author | Santosh Puranik <santosh.puranik@in.ibm.com> | 2015-12-08 02:27:47 -0600 |
---|---|---|
committer | Gregory S. Still <stillgs@us.ibm.com> | 2016-01-04 08:43:05 -0600 |
commit | f0731fde6a682ed2e39031a4d9fc4371e6f2fd91 (patch) | |
tree | 2eee5c02b762dde19ac996655ca18251cd2a2f71 /hwpf/include/plat | |
parent | 32db1ba607b7c27c05d5899c6286e95a307affee (diff) | |
download | talos-sbe-f0731fde6a682ed2e39031a4d9fc4371e6f2fd91.tar.gz talos-sbe-f0731fde6a682ed2e39031a4d9fc4371e6f2fd91.zip |
Support casting EQ/CORE targets to PERV
Used the getParent() API to support such conversion
Change-Id: I6990a65e4d09ae0a31ea8954b9fbcaa9808df266
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/22535
Tested-by: Jenkins Server
Reviewed-by: Gregory S. Still <stillgs@us.ibm.com>
Diffstat (limited to 'hwpf/include/plat')
-rw-r--r-- | hwpf/include/plat/target.H | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/hwpf/include/plat/target.H b/hwpf/include/plat/target.H index db38d912..7fb907ef 100644 --- a/hwpf/include/plat/target.H +++ b/hwpf/include/plat/target.H @@ -55,10 +55,6 @@ namespace fapi2 template<TargetType K, typename V> Target<K, V>::Target(V Value) { - static_assert( ((K == TARGET_TYPE_CORE) & - (K == TARGET_TYPE_EQ) ) != true, - "TARGET_TYPE_CORE and TARGET_TYPE_EQ cannot be specified at the same time"); - // Already formed target handle? if(static_cast<union iv_handle>(Value).fields.type != 0) { @@ -173,6 +169,8 @@ namespace fapi2 template<TargetType T> inline Target<T> Target<K, V>::getParent(void) const { + static_assert(((K == TARGET_TYPE_EQ) || (K == TARGET_TYPE_CORE)) + && (T == TARGET_TYPE_PERV), "Input target type must be either EQ/CORE, and parent type must be PERV"); return this->iv_handle.value; } |