return req;
 }
 
+SMMUTranslationProcess::SMMUTranslationProcess(const std::string &name,
+    SMMUv3 &_smmu, SMMUv3SlaveInterface &_ifc)
+  :
+    SMMUProcess(name, _smmu),
+    ifc(_ifc)
+{
+    // Decrease number of pending translation slots on the slave interface
+    assert(ifc.xlateSlotsRemaining > 0);
+    ifc.xlateSlotsRemaining--;
+    reinit();
+}
+
+SMMUTranslationProcess::~SMMUTranslationProcess()
+{
+    // Increase number of pending translation slots on the slave interface
+    ifc.xlateSlotsRemaining++;
+}
+
 void
 SMMUTranslationProcess::beginTransaction(const SMMUTranslRequest &req)
 {
     if (!ifc.prefetchEnable || ifc.xlateSlotsRemaining == 0)
         return;
 
-    ifc.xlateSlotsRemaining--;
-
     std::string proc_name = csprintf("%sprf", name());
     SMMUTranslationProcess *proc =
         new SMMUTranslationProcess(proc_name, smmu, ifc);
 
 
     smmu.translationTimeDist.sample(curTick() - recvTick);
-    ifc.xlateSlotsRemaining++;
     if (!request.isAtsRequest && request.isWrite)
         ifc.wrBufSlotsRemaining +=
             (request.size + (ifc.portWidth-1)) / ifc.portWidth;
 void
 SMMUTranslationProcess::completePrefetch(Yield &yield)
 {
-    ifc.xlateSlotsRemaining++;
-
     SMMUAction a;
     a.type = ACTION_TERMINATE;
     a.pkt = NULL;
 
 
   public:
     SMMUTranslationProcess(const std::string &name, SMMUv3 &_smmu,
-        SMMUv3SlaveInterface &_ifc)
-      :
-        SMMUProcess(name, _smmu),
-        ifc(_ifc)
-    {
-        reinit();
-    }
+        SMMUv3SlaveInterface &_ifc);
 
-    virtual ~SMMUTranslationProcess() {}
+    virtual ~SMMUTranslationProcess();
 
     void beginTransaction(const SMMUTranslRequest &req);
     void resumeTransaction();