From: Gabe Black Date: Sat, 6 Jan 2018 00:17:44 +0000 (-0800) Subject: arm: Make translateFunctional override the base implementation. X-Git-Tag: v19.0.0.0~2400 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7221a00fdfe6a3f380f573d8bee1063d374b6bdf;p=gem5.git arm: Make translateFunctional override the base implementation. Now that translateFunctional is a virtual function, having an extra parameter with a default value makes the compiler fall through to the base implementation instead of overriding it. This change removes the default value for the extra parameter, and adds a small wrapper with the correct signature which overrides the base implementation and calls the full version with the previously default value for the extra parameter. To callers this will look like the same thing, but the the right function will get called. This was what was already being done for transateAtomic and translateTiming. Change-Id: I0b71adf34fd6f326005edbb8eaac93275b437c55 Reviewed-on: https://gem5-review.googlesource.com/7121 Reviewed-by: Jason Lowe-Power Maintainer: Gabe Black --- diff --git a/src/arch/arm/tlb.hh b/src/arch/arm/tlb.hh index 7521e718c..212a79f79 100644 --- a/src/arch/arm/tlb.hh +++ b/src/arch/arm/tlb.hh @@ -311,7 +311,12 @@ class TLB : public BaseTLB * behaves like a normal lookup without modifying any page table state. */ Fault translateFunctional(RequestPtr req, ThreadContext *tc, Mode mode, - ArmTranslationType tranType = NormalTran); + ArmTranslationType tranType); + Fault + translateFunctional(RequestPtr req, ThreadContext *tc, Mode mode) override + { + return translateFunctional(req, tc, mode, NormalTran); + } /** Accessor functions for memory attributes for last accessed TLB entry */