Skip to content

Commit

Permalink
Add wrapper fix bug
Browse files Browse the repository at this point in the history
The check for core or ex target was not working
for ex targets.  I think == should work for it.
Only accept EX targets

Change-Id: I2670f6a8971380dbbda6d79aa54c97170e254221
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/22189
Tested-by: Jenkins Server
Reviewed-by: Joseph J. McGill <jmcgill@us.ibm.com>
Reviewed-by: Thi N. Tran <thi@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/47175
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
BenAtIBM authored and dcrowell77 committed Oct 5, 2017
1 parent 2df39d4 commit 32b2ffd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 46 deletions.
44 changes: 3 additions & 41 deletions src/import/chips/p9/procedures/hwp/nest/p9_l2_flush.C
Original file line number Diff line number Diff line change
Expand Up @@ -78,20 +78,6 @@ enum
// Function definitions
//------------------------------------------------------------------------------

//------------------------------------------------------------------------------
///
/// @brief l2_flush: Utility subroutine to start flush and check the status
/// @param[in] i_target Ex target
/// @param[in] i_purgeData Structure having values for MEM, CGC, BANK
/// passed by the user
/// @return FAPI2_RC_SUCCESS if purge operation was started,
/// RC_P9_L2_FLUSH_PURGE_REQ_OUTSTANDING if a prior purge
/// operation has not yet completed
/// else FAPI getscom/putscom return code for failing operation
//------------------------------------------------------------------------------
fapi2::ReturnCode l2_flush(const fapi2::Target<fapi2::TARGET_TYPE_EX>& i_target,
const p9core::purgeData_t& i_purgeData);

//------------------------------------------------------------------------------
///
/// @brief l2_flush_start: Utility subroutine to initiate L2 cache flush
Expand Down Expand Up @@ -235,8 +221,9 @@ fapi_try_exit:
//------------------------------------------------------------------------------
// Hardware Procedure
//------------------------------------------------------------------------------
fapi2::ReturnCode l2_flush(const fapi2::Target<fapi2::TARGET_TYPE_EX>& i_target,
const p9core::purgeData_t& i_purgeData)
fapi2::ReturnCode p9_l2_flush(const fapi2::Target < fapi2::TARGET_TYPE_EX >
& i_target,
const p9core::purgeData_t& i_purgeData)
{
FAPI_DBG("i_purgeData.iv_cmdType: 0x%x", i_purgeData.iv_cmdType);
FAPI_DBG("i_purgeData.iv_cmdMem : 0x%x", i_purgeData.iv_cmdMem);
Expand Down Expand Up @@ -278,28 +265,3 @@ fapi_try_exit:
return fapi2::current_err;
}

fapi2::ReturnCode p9_l2_flush(const fapi2::Target < fapi2::TARGET_TYPE_CORE
| fapi2::TARGET_TYPE_EX >
&i_target,
const p9core::purgeData_t& i_purgeData)
{
FAPI_IMP("p9_l2_flush, Core|Ex 0x%lx: Enter", i_target.get());

fapi2::Target<fapi2::TARGET_TYPE_EX> l_exTarget;

if(i_target.getType() & fapi2::TARGET_TYPE_CORE)
{
l_exTarget = i_target.getParent<fapi2::TARGET_TYPE_EX>();
}
else
{
// We got an Ex target.
l_exTarget = i_target.get();
}

FAPI_TRY(l2_flush(l_exTarget, i_purgeData));

fapi_try_exit:
FAPI_IMP("p9_l2_flush, Core: Exit");
return fapi2::current_err;
}
9 changes: 4 additions & 5 deletions src/import/chips/p9/procedures/hwp/nest/p9_l2_flush.H
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,15 @@ struct purgeData_t
//------------------------------------------------------------------------------

typedef fapi2::ReturnCode (*p9_l2_flush_FP_t)
(const fapi2::Target < fapi2::TARGET_TYPE_CORE | fapi2::TARGET_TYPE_EX > &i_target,
(const fapi2::Target < fapi2::TARGET_TYPE_EX >& i_target,
const p9core::purgeData_t& i_purgeData);

extern "C"
{

///
/// @brief p9_l2_flush HWP to flush entire content of L2 cache via purge engine
/// @param[in] i_target Core target or Ex target
/// @param[in] i_target Ex target
/// @param[in] i_purgeData Specifies a particular purge type
/// @return: FAPI2_RC_SUCCESS if purge operation completes successfully,
/// RC_P9_L2_FLUSH_UNKNOWN_PLATFORM
Expand All @@ -113,9 +113,8 @@ extern "C"
/// if purge operation reports error,
/// else FAPI getscom/putscom return code for failing operation
///
fapi2::ReturnCode p9_l2_flush(const fapi2::Target < fapi2::TARGET_TYPE_CORE
| fapi2::TARGET_TYPE_EX >
&i_target,
fapi2::ReturnCode p9_l2_flush(const fapi2::Target < fapi2::TARGET_TYPE_EX >
& i_target,
const p9core::purgeData_t& i_purgeData);

} // end of extern C
Expand Down

0 comments on commit 32b2ffd

Please sign in to comment.