dev-arm: A9SCU fixup
authorTiago Muck <tiago.muck@arm.com>
Thu, 16 May 2019 21:27:36 +0000 (16:27 -0500)
committerTiago Mück <tiago.muck@arm.com>
Wed, 10 Jul 2019 19:36:34 +0000 (19:36 +0000)
Shifting instead of expensive power.

Change-Id: I164933257db125e18721c5b8bcaf9702030ebf40
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/19408
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/dev/arm/a9scu.cc

index 677101b36a40b6f18898bc18c210cf65e669ddaf..20a0c337b71e946c438615d20ccefeb649aa30b9 100644 (file)
@@ -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;