From 42f32d159ba97b92ce004223c3ccfca56f0e0da7 Mon Sep 17 00:00:00 2001 From: Tiago Muck Date: Thu, 16 May 2019 16:27:36 -0500 Subject: [PATCH] dev-arm: A9SCU fixup MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Shifting instead of expensive power. Change-Id: I164933257db125e18721c5b8bcaf9702030ebf40 Signed-off-by: Tiago Mück Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/19408 Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power Tested-by: kokoro --- src/dev/arm/a9scu.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dev/arm/a9scu.cc b/src/dev/arm/a9scu.cc index 677101b36..20a0c337b 100644 --- a/src/dev/arm/a9scu.cc +++ b/src/dev/arm/a9scu.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010 ARM Limited + * Copyright (c) 2010,2019 ARM Limited * All rights reserved * * The license below extends only to copyright in the software and shall @@ -73,7 +73,7 @@ A9SCU::read(PacketPtr pkt) fatal("Too many CPUs (%d) for A9SCU!\n", sys->numContexts()); } int smp_bits, core_cnt; - smp_bits = power(2,sys->numContexts()) - 1; + smp_bits = (1 << sys->numContexts()) - 1; core_cnt = sys->numContexts() - 1; pkt->setLE(smp_bits << 4 | core_cnt); break; -- 2.30.2