Index: kernel/generic/include/mm/as.h
===================================================================
--- kernel/generic/include/mm/as.h	(revision 06e1e95342d7b9a9c85c7492529a309d51a3fb6c)
+++ kernel/generic/include/mm/as.h	(revision f1d1f5d3d65116db3fe2744bb3cf38c85e99f14c)
@@ -94,4 +94,7 @@
 	/** Address space identifier. Constant on architectures that do not support ASIDs.*/
 	asid_t asid;
+	
+	/** Architecture specific content. */
+	as_arch_t arch;
 };
 
Index: kernel/generic/src/mm/as.c
===================================================================
--- kernel/generic/src/mm/as.c	(revision 06e1e95342d7b9a9c85c7492529a309d51a3fb6c)
+++ kernel/generic/src/mm/as.c	(revision f1d1f5d3d65116db3fe2744bb3cf38c85e99f14c)
@@ -360,5 +360,5 @@
 					i = (start_free - b) >> PAGE_WIDTH;
 					if (!used_space_remove(area, start_free, c - i))
-						panic("Could not remove used space.");
+						panic("Could not remove used space.\n");
 				} else {
 					/*
@@ -390,4 +390,9 @@
 		tlb_invalidate_pages(AS->asid, area->base + pages*PAGE_SIZE, area->pages - pages);
 		tlb_shootdown_finalize();
+		
+		/*
+		 * Invalidate software translation caches (e.g. TSB on sparc64).
+		 */
+		as_invalidate_translation_cache(as, area->base + pages*PAGE_SIZE, area->pages - pages);
 	} else {
 		/*
@@ -441,5 +446,5 @@
 	 * Start TLB shootdown sequence.
 	 */
-	tlb_shootdown_start(TLB_INVL_PAGES, AS->asid, area->base, area->pages);
+	tlb_shootdown_start(TLB_INVL_PAGES, as->asid, area->base, area->pages);
 
 	/*
@@ -464,5 +469,5 @@
 						b + j*PAGE_SIZE, PTE_GET_FRAME(pte));
 				}
-				page_mapping_remove(as, b + j*PAGE_SIZE);
+				page_mapping_remove(as, b + j*PAGE_SIZE);				
 				page_table_unlock(as, false);
 			}
@@ -473,6 +478,11 @@
 	 * Finish TLB shootdown sequence.
 	 */
-	tlb_invalidate_pages(AS->asid, area->base, area->pages);
+	tlb_invalidate_pages(as->asid, area->base, area->pages);
 	tlb_shootdown_finalize();
+	
+	/*
+	 * Invalidate potential software translation caches (e.g. TSB on sparc64).
+	 */
+	as_invalidate_translation_cache(as, area->base, area->pages);
 	
 	btree_destroy(&area->used_space);
@@ -488,9 +498,9 @@
 	 * Remove the empty area from address space.
 	 */
-	btree_remove(&AS->as_area_btree, base, NULL);
+	btree_remove(&as->as_area_btree, base, NULL);
 	
 	free(area);
 	
-	mutex_unlock(&AS->lock);
+	mutex_unlock(&as->lock);
 	interrupts_restore(ipl);
 	return 0;
