inorder: ctxt switch stats
[gem5.git] / src / mem / cache / base.hh
index b77427c90bb158254a5942b61bc2f49bd86283db..c245fecd24e6235ab319069b2c106a55dd76c5d2 100644 (file)
@@ -104,7 +104,7 @@ class BaseCache : public MemObject
 
         virtual void recvStatusChange(Status status);
 
-        virtual int deviceBlockSize();
+        virtual unsigned deviceBlockSize() const;
 
         bool recvRetryCommon();
 
@@ -180,7 +180,7 @@ class BaseCache : public MemObject
     }
 
     /** Block size of this cache */
-    const int blkSize;
+    const unsigned blkSize;
 
     /**
      * The latency of a hit in this device.
@@ -372,13 +372,14 @@ class BaseCache : public MemObject
      * Query block size of a cache.
      * @return  The block size
      */
-    int getBlockSize() const
+    unsigned
+    getBlockSize() const
     {
         return blkSize;
     }
 
 
-    Addr blockAlign(Addr addr) const { return (addr & ~(blkSize - 1)); }
+    Addr blockAlign(Addr addr) const { return (addr & ~(Addr(blkSize - 1))); }
 
 
     const Range<Addr> &getAddrRange() const { return addrRange; }