1 # Upgrade single-threaded checkpoints to be properly supported with SMT.
2 # SMT adds per-thread interrupts. Thus we must move the interrupt status
3 # from the CPU and into the execution context.
5 for sec
in cpt
.sections():
8 re_cpu_match
= re
.match('^(.*sys.*\.cpu[^._]*)$', sec
)
9 if re_cpu_match
!= None:
10 interrupts
= cpt
.get(sec
, 'interrupts')
11 intStatus
= cpt
.get(sec
, 'intStatus')
13 cpu_name
= re_cpu_match
.group(1)
15 cpt
.set(cpu_name
+ ".xc.0", 'interrupts', interrupts
)
16 cpt
.set(cpu_name
+ ".xc.0", 'intStatus', intStatus
)
18 cpt
.remove_option(sec
, 'interrupts')
19 cpt
.remove_option(sec
, 'intStatus')