arch: Bring closure out of p_global_let
The python interpreter might complain when exec() (the function, not the
python2 keyword) is used in a function and the function contains a nested
block.
See: https://www.python.org/dev/peps/pep-0227/
The patch is moving the nested function out of p_global_let.
Change-Id: Idb3a08a8cd42455af1e5ec2c3ec8f8a1438047d3
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/26303
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>