From a5c4eb3de9deb3a71a6a5230a25ff5962e584980 Mon Sep 17 00:00:00 2001 From: Mitch Hayenga Date: Wed, 30 Sep 2015 11:14:19 -0500 Subject: isa,cpu: Add support for FS SMT Interrupts Adds per-thread interrupt controllers and thread/context logic so that interrupts properly get routed in SMT systems. --- util/cpt_upgraders/smt-interrupts.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 util/cpt_upgraders/smt-interrupts.py (limited to 'util/cpt_upgraders') diff --git a/util/cpt_upgraders/smt-interrupts.py b/util/cpt_upgraders/smt-interrupts.py new file mode 100644 index 000000000..2c7109c04 --- /dev/null +++ b/util/cpt_upgraders/smt-interrupts.py @@ -0,0 +1,19 @@ +# Upgrade single-threaded checkpoints to be properly supported with SMT. +# SMT adds per-thread interrupts. Thus we must move the interrupt status +# from the CPU and into the execution context. +def upgrader(cpt): + for sec in cpt.sections(): + import re + + re_cpu_match = re.match('^(.*sys.*\.cpu[^._]*)$', sec) + if re_cpu_match != None: + interrupts = cpt.get(sec, 'interrupts') + intStatus = cpt.get(sec, 'intStatus') + + cpu_name = re_cpu_match.group(1) + + cpt.set(cpu_name + ".xc.0", 'interrupts', interrupts) + cpt.set(cpu_name + ".xc.0", 'intStatus', intStatus) + + cpt.remove_option(sec, 'interrupts') + cpt.remove_option(sec, 'intStatus') -- cgit v1.2.3