From 2c048bb097e003ad2c623fc54225e9fd31fbc6f8 Mon Sep 17 00:00:00 2001 From: Hoa Nguyen Date: Thu, 18 Feb 2021 00:53:02 -0800 Subject: [PATCH 1/6] scons: Fixing build errors with scons 4.0.1 and 4.1.0 SCons failed to find m5 module while loading m5.util.terminal from site_scons/gem5_scons/util.py. This results in the current version of gem5 stable failed to build with scons 4.0.1 and 4.1.0. The nature of the bug and the explaination for the fix can be found here, https://gem5-review.googlesource.com/c/public/gem5/+/38616 Jira: https://gem5.atlassian.net/browse/GEM5-916 Change-Id: I3817f39ebc3021fb6fc89bcd09a96999f8ca2841 Signed-off-by: Hoa Nguyen Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/41594 Reviewed-by: Bobby R. Bruce Maintainer: Bobby R. Bruce Tested-by: kokoro --- SConstruct | 2 +- site_scons/site_tools/default.py | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/SConstruct b/SConstruct index 0d8159bbab..bb038b8fbe 100755 --- a/SConstruct +++ b/SConstruct @@ -139,7 +139,7 @@ if GetOption('no_lto') and GetOption('force_lto'): # ######################################################################## -main = Environment() +main = Environment(tools=['default', 'git']) from gem5_scons.util import get_termcap termcap = get_termcap() diff --git a/site_scons/site_tools/default.py b/site_scons/site_tools/default.py index 1965a20173..88a693237d 100644 --- a/site_scons/site_tools/default.py +++ b/site_scons/site_tools/default.py @@ -78,15 +78,9 @@ def common_config(env): # as well env.AppendENVPath('PYTHONPATH', extra_python_paths) -gem5_tool_list = [ - 'git', -] - def generate(env): common_config(env) SCons.Tool.default.generate(env) - for tool in gem5_tool_list: - SCons.Tool.Tool(tool)(env) def exists(env): return 1 From 2373934b8224e33c55ce96a0fe7751caeee13baf Mon Sep 17 00:00:00 2001 From: "Bobby R. Bruce" Date: Fri, 19 Feb 2021 15:35:05 -0800 Subject: [PATCH 2/6] misc: Updated the RELEASE-NOTES and version number Updated the RELEASE-NOTES.md and version number for the v20.1.0.4 hotfix release. Change-Id: Iaefed86cb176c3adcd66d101ac3155d30528b025 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/41713 Maintainer: Bobby R. Bruce Reviewed-by: Jason Lowe-Power Reviewed-by: Hoa Nguyen Tested-by: kokoro --- RELEASE-NOTES.md | 5 +++++ src/Doxyfile | 2 +- src/base/version.cc | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index c84d9b47df..3f1709123d 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -1,3 +1,8 @@ +# Version 20.1.0.4 + +**[HOTFIX]** [gem5 was failing to build with SCons 4.0.1 and 4.1.0](https://gem5.atlassian.net/browse/GEM5-916). +This hotfix makes the necessary changes to `site_scons/site_tools/default.py` for gem5 to compile successfully on these versions of SCons. + # Version 20.1.0.3 **[HOTFIX]** A patch was apply to fix an [error where booting Linux stalled when using the ARM ISA](https://gem5.atlassian.net/browse/GEM5-901). diff --git a/src/Doxyfile b/src/Doxyfile index ddc39338c7..4ad0ea537b 100644 --- a/src/Doxyfile +++ b/src/Doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = gem5 # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = v20.1.0.3 +PROJECT_NUMBER = v20.1.0.4 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. diff --git a/src/base/version.cc b/src/base/version.cc index d30ddd1510..0a34488e5f 100644 --- a/src/base/version.cc +++ b/src/base/version.cc @@ -29,4 +29,4 @@ /** * @ingroup api_base_utils */ -const char *gem5Version = "20.1.0.3"; +const char *gem5Version = "20.1.0.4"; From 9ea38f7147c9516976878318e08fcd77d7798aac Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Tue, 19 Jan 2021 16:05:08 +0000 Subject: [PATCH 3/6] python: Fix incorrect prefixes is m5.utils.convert The conversion functions incorrectly assumed that kibibytes are 'kiB' rather than 'KiB' (correct). Cherry-picked from: https://gem5-review.googlesource.com/c/public/gem5/+/39375 Change-Id: Ia9409218c37284514fc4fabdabf327641db8cefc Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/43146 Reviewed-by: Jason Lowe-Power Reviewed-by: Andreas Sandberg Maintainer: Jason Lowe-Power Tested-by: kokoro --- src/python/m5/util/convert.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/python/m5/util/convert.py b/src/python/m5/util/convert.py index 077b6b4dc5..ae667b3eb2 100644 --- a/src/python/m5/util/convert.py +++ b/src/python/m5/util/convert.py @@ -62,7 +62,7 @@ 'Gi': gibi, 'G': giga, 'M': mega, - 'ki': kibi, + 'Ki': kibi, 'k': kilo, 'Mi': mebi, 'm': milli, @@ -84,7 +84,7 @@ 'G' : gibi, 'Mi': mebi, 'M' : mebi, - 'ki': kibi, + 'Ki': kibi, 'k' : kibi, } From 1479ad9ef05d7ac6443c3aa03f5e02fa88179ab4 Mon Sep 17 00:00:00 2001 From: Giacomo Travaglini Date: Wed, 3 Mar 2021 11:38:06 +0000 Subject: [PATCH 4/6] arch-arm: Fix atomics permission checks in TLB For stage 2 translations, atomic accesses were not checking the access permission bits in the page table descriptors, and were instead wrongly using the nature of the request itself (r/w booleans). Cherry-picked from: https://gem5-review.googlesource.com/c/public/gem5/+/42073 Change-Id: I919a08b690287b03426d9124a61887e521f47823 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/43143 Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power Tested-by: kokoro --- src/arch/arm/tlb.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/arch/arm/tlb.cc b/src/arch/arm/tlb.cc index 413a13e78c..a09c9538fe 100644 --- a/src/arch/arm/tlb.cc +++ b/src/arch/arm/tlb.cc @@ -772,8 +772,7 @@ TLB::checkPermissions64(TlbEntry *te, const RequestPtr &req, Mode mode, // sctlr.wxn overrides the xn bit grant = !wxn && !xn; } else if (is_atomic) { - grant = r && w; - grant_read = r; + grant = hap; } else if (is_write) { grant = hap & 0x2; } else { // is_read From eb3554e0e98efce8da9094b8e7e19ee78657be8b Mon Sep 17 00:00:00 2001 From: Giacomo Travaglini Date: Fri, 12 Mar 2021 12:50:49 +0000 Subject: [PATCH 5/6] configs: Use integer division in MESI_Three_Level_HTM.py num_cpus_per_cluster and num_l2caches_per_cluster need to be integer as we are iterating over those variables Cherry-picked from: https://gem5-review.googlesource.com/c/public/gem5/+/42883 Change-Id: Ifc1f9cf06b36044289a0ba5e54666f1af2587fca Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/43144 Reviewed-by: Matt Sinclair Maintainer: Matt Sinclair Tested-by: kokoro --- configs/ruby/MESI_Three_Level_HTM.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/ruby/MESI_Three_Level_HTM.py b/configs/ruby/MESI_Three_Level_HTM.py index 89ca93c61d..b6b1c7f637 100644 --- a/configs/ruby/MESI_Three_Level_HTM.py +++ b/configs/ruby/MESI_Three_Level_HTM.py @@ -78,10 +78,10 @@ def create_system(options, full_system, system, dma_ports, bootmem, dma_cntrl_nodes = [] assert (options.num_cpus % options.num_clusters == 0) - num_cpus_per_cluster = options.num_cpus / options.num_clusters + num_cpus_per_cluster = options.num_cpus // options.num_clusters assert (options.num_l2caches % options.num_clusters == 0) - num_l2caches_per_cluster = options.num_l2caches / options.num_clusters + num_l2caches_per_cluster = options.num_l2caches // options.num_clusters l2_bits = int(math.log(num_l2caches_per_cluster, 2)) block_size_bits = int(math.log(options.cacheline_size, 2)) From 31cd81fdec46bae4b48d4f3788776936389dbdec Mon Sep 17 00:00:00 2001 From: "Bobby R. Bruce" Date: Tue, 16 Mar 2021 15:24:37 -0700 Subject: [PATCH 6/6] misc: Updated the RELEASE-NOTES and version number Updated the RELEASE-NOTES.md and version number for the v20.1.0.5 hotfix release. Change-Id: I137a12325137799b9b1f98fe67ac55bfab49cd91 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/43145 Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power Tested-by: kokoro --- RELEASE-NOTES.md | 8 ++++++++ src/Doxyfile | 2 +- src/base/version.cc | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 3f1709123d..7c3472e39a 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -1,3 +1,11 @@ +# Version 20.1.0.5 + +**[HOTFIX]** This hotfix release fixes three known bugs: + +* `src/python/m5/util/convert.py` incorrectly stated kibibytes as 'kiB' instead of 'KiB'. This has been fixed. +* Atomic accesses were not checking the access permission bits in the page table descriptors. They were incorrectly using the nature of the request itself. This is now fixed. +* `num_l2chaches_per_cluster` and `num_cpus_per_cluster` were cast to floats in `configs/ruby/MESI_Three_Level_HTM.py`, which caused errors. This has been fixed so they are correctly cast to integers. + # Version 20.1.0.4 **[HOTFIX]** [gem5 was failing to build with SCons 4.0.1 and 4.1.0](https://gem5.atlassian.net/browse/GEM5-916). diff --git a/src/Doxyfile b/src/Doxyfile index 4ad0ea537b..c9f1ed458c 100644 --- a/src/Doxyfile +++ b/src/Doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = gem5 # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = v20.1.0.4 +PROJECT_NUMBER = v20.1.0.5 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. diff --git a/src/base/version.cc b/src/base/version.cc index 0a34488e5f..3e7aa35f37 100644 --- a/src/base/version.cc +++ b/src/base/version.cc @@ -29,4 +29,4 @@ /** * @ingroup api_base_utils */ -const char *gem5Version = "20.1.0.4"; +const char *gem5Version = "20.1.0.5";