cpu: Rename initiateHtmCmd to be more generic

To prepare for future CHI work, rename ExecContext::initiateHtmCmd to
ExecContext::initiateSpecialMemCmd

JIRA: https://gem5.atlassian.net/browse/GEM5-1097

Change-Id: I7c7aed8ec06a66d9023c14dba37eae42907df222
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/56598
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Samuel Stark
2021-09-21 17:32:01 +01:00
committed by Giacomo Travaglini
parent a84c987eef
commit de9cdc28ce
11 changed files with 41 additions and 31 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2013, 2015, 2018, 2020 ARM Limited
* Copyright (c) 2012-2013, 2015, 2018, 2020-2021 ARM Limited
* All rights reserved.
*
* The license below extends only to copyright in the software and shall
@@ -224,10 +224,10 @@ class AtomicSimpleCPU : public BaseSimpleCPU
override;
Fault
initiateHtmCmd(Request::Flags flags) override
initiateSpecialMemCmd(Request::Flags flags) override
{
panic("initiateHtmCmd() is for timing accesses, and should "
"never be called on AtomicSimpleCPU.\n");
panic("initiateSpecialMemCmd() is for timing accesses, and "
"should never be called on AtomicSimpleCPU.\n");
}
void

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011-2012,2015,2018,2020 ARM Limited
* Copyright (c) 2011-2012,2015,2018,2020-2021 ARM Limited
* Copyright (c) 2013 Advanced Micro Devices, Inc.
* All rights reserved
*
@@ -190,11 +190,16 @@ class BaseSimpleCPU : public BaseCPU
void serializeThread(CheckpointOut &cp, ThreadID tid) const override;
void unserializeThread(CheckpointIn &cp, ThreadID tid) override;
/** Hardware transactional memory commands (HtmCmds), e.g. start a
/**
* Special memory commands such as hardware transactional memory
* commands (HtmCmds) or TLBI commands, e.g. start a
* transaction and commit a transaction, are memory operations but are
* neither really (true) loads nor stores. For this reason the interface
* is extended and initiateHtmCmd() is used to instigate the command. */
virtual Fault initiateHtmCmd(Request::Flags flags) = 0;
* neither really (true) loads nor stores.
* For this reason the interface is extended,
* and initiateSpecialMemCmd() is used to instigate the command.
*/
virtual Fault initiateSpecialMemCmd(Request::Flags flags) = 0;
};
} // namespace gem5

View File

@@ -446,9 +446,9 @@ class SimpleExecContext : public ExecContext
}
Fault
initiateHtmCmd(Request::Flags flags) override
initiateSpecialMemCmd(Request::Flags flags) override
{
return cpu->initiateHtmCmd(flags);
return cpu->initiateSpecialMemCmd(flags);
}
/**

View File

@@ -1,6 +1,6 @@
/*
* Copyright 2014 Google, Inc.
* Copyright (c) 2010-2013,2015,2017-2018, 2020 ARM Limited
* Copyright (c) 2010-2013,2015,2017-2018, 2020-2021 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
@@ -1216,7 +1216,7 @@ TimingSimpleCPU::printAddr(Addr a)
}
Fault
TimingSimpleCPU::initiateHtmCmd(Request::Flags flags)
TimingSimpleCPU::initiateSpecialMemCmd(Request::Flags flags)
{
SimpleExecContext &t_info = *threadInfo[curThread];
SimpleThread* thread = t_info.thread;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2013,2015,2018,2020 ARM Limited
* Copyright (c) 2012-2013,2015,2018,2020-2021 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
@@ -324,8 +324,8 @@ class TimingSimpleCPU : public BaseSimpleCPU
*/
void finishTranslation(WholeTranslationState *state);
/** hardware transactional memory **/
Fault initiateHtmCmd(Request::Flags flags) override;
/** hardware transactional memory & TLBI operations **/
Fault initiateSpecialMemCmd(Request::Flags flags) override;
void htmSendAbortSignal(ThreadID tid, uint64_t htm_uid,
HtmFailureFaultCause) override;