aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc64/kernel/iommu.c
diff options
context:
space:
mode:
authorJohn Rose <johnrose@austin.ibm.com>2005-06-20 07:43:48 -0400
committerPaul Mackerras <paulus@samba.org>2005-06-20 07:43:48 -0400
commitd3588ba9bbade7f1fde59726c9af43eeeb08e092 (patch)
tree13018804984c735be26325a234c09b1d6c4f6d4b /arch/ppc64/kernel/iommu.c
parent0231c290d817513d448963520a97eadd51a370b7 (diff)
[PATCH] initialize TCE tables
A fairly recent platform requirement states that the OS must clear the whole TCE table at setup time, in case firmware left any active mappings in it. Without this initialization, dynamic bus removes can fail. Firmware rejects these requests if active mappings still exist for a slot that has been deallocated by the OS. Signed-off-by: John Rose <johnrose@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc64/kernel/iommu.c')
-rw-r--r--arch/ppc64/kernel/iommu.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/ppc64/kernel/iommu.c b/arch/ppc64/kernel/iommu.c
index 344164681d2c..8316426ccaf6 100644
--- a/arch/ppc64/kernel/iommu.c
+++ b/arch/ppc64/kernel/iommu.c
@@ -423,6 +423,9 @@ struct iommu_table *iommu_init_table(struct iommu_table *tbl)
423 tbl->it_largehint = tbl->it_halfpoint; 423 tbl->it_largehint = tbl->it_halfpoint;
424 spin_lock_init(&tbl->it_lock); 424 spin_lock_init(&tbl->it_lock);
425 425
426 /* Clear the hardware table in case firmware left allocations in it */
427 ppc_md.tce_free(tbl, tbl->it_offset, tbl->it_size);
428
426 if (!welcomed) { 429 if (!welcomed) {
427 printk(KERN_INFO "IOMMU table initialized, virtual merging %s\n", 430 printk(KERN_INFO "IOMMU table initialized, virtual merging %s\n",
428 novmerge ? "disabled" : "enabled"); 431 novmerge ? "disabled" : "enabled");