From: Gabe Black Date: Wed, 19 Aug 2020 09:07:25 +0000 (-0700) Subject: arch: Make ThreadInfo::curThreadInfo virtual, protected. X-Git-Tag: v20.1.0.0~266 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=df8a58895b66acb810e7a4e19d6d8742c9e92008;p=gem5.git arch: Make ThreadInfo::curThreadInfo virtual, protected. Also remove it's Alpha centric implementation. All existing ISAs will panic since they all define the guarding constant as false. Even if they defined it as true, this function assumes that there is necessarily a misc reg which can be read to find the current thread_info struct, and how the contents of that register should be manipulated. This code is already fairly fragile since it depends on things in the Linux kernel having certain names and relationships with each other, but that's a larger problem I don't want to fix right now. Change-Id: Ic107793ebcd25ee25c4d3713c84c1d2b5209f1a3 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32921 Reviewed-by: Andreas Sandberg Maintainer: Gabe Black Tested-by: kokoro --- diff --git a/src/arch/generic/linux/threadinfo.hh b/src/arch/generic/linux/threadinfo.hh index 7bbf2dfdb..01271051c 100644 --- a/src/arch/generic/linux/threadinfo.hh +++ b/src/arch/generic/linux/threadinfo.hh @@ -71,22 +71,10 @@ class ThreadInfo ~ThreadInfo() {} - Addr + virtual Addr curThreadInfo() { - if (!TheISA::CurThreadInfoImplemented) - panic("curThreadInfo() not implemented for this ISA"); - - Addr addr = pcbb; - Addr sp; - - if (!addr) - addr = tc->readMiscRegNoEffect(TheISA::CurThreadInfoReg); - - PortProxy &p = tc->getPhysProxy(); - p.readBlob(addr, &sp, sizeof(Addr)); - - return sp & ~ULL(0x3fff); + panic("curThreadInfo() not implemented."); } Addr