Skip to content

Commit

Permalink
[PATCH] initialize TCE tables
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
John Rose authored and Paul Mackerras committed Jun 20, 2005
1 parent 0231c29 commit d3588ba
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/ppc64/kernel/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,9 @@ struct iommu_table *iommu_init_table(struct iommu_table *tbl)
tbl->it_largehint = tbl->it_halfpoint;
spin_lock_init(&tbl->it_lock);

/* Clear the hardware table in case firmware left allocations in it */
ppc_md.tce_free(tbl, tbl->it_offset, tbl->it_size);

if (!welcomed) {
printk(KERN_INFO "IOMMU table initialized, virtual merging %s\n",
novmerge ? "disabled" : "enabled");
Expand Down

0 comments on commit d3588ba

Please sign in to comment.