AMD IOMMU fixes for 2.6.31-rc1
Hi Ingo,
The following changes since commit 7c5371c403abb29f01bc6cff6c5096abdf2dc524:
Yinghai Lu (1):
x86: add boundary check for 32bit res before expand e820 resource to alignment
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/joro/linux-2.6-iommu.git amd-iommu/fixes
Joerg Roedel (2):
amd-iommu: handle alias entries correctly in init code
amd-iommu: set evt_buf_size correctly
arch/x86/kernel/amd_iommu_init.c | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-)
These two patches fix an uncorrect device table initialization issue and a divide-by-zero error on an event log interrupt. Please pull.
Thanks,
Joerg
PATCH 1/2 amd-iommu: handle alias entries correctly in init code
An alias entry in the ACPI table means that the device can send requests to the IOMMU with both device ids, its own and the alias. This is not handled properly in the ACPI init code. This patch fixes the issue.
--- arch/x86/kernel/amd_iommu_init.c | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-)
arch/x86/kernel/amd_iommu_init.c +7 -4
@@ -691,6 +691,7 @@ static void __init init_iommu_from_acpi(struct amd_iommu *iommu, devid = e->devid; devid_to = e->ext >>8 ; +set_dev_entry_from_acpi (iommu, devid , e->flags,0 );set_dev_entry_from_acpi (iommu, devid_to, e->flags,0 ); amd_iommu_alias_table[devid] = devid_to;break ;
@@ -749,11 +750,13 @@ static void __init init_iommu_from_acpi(struct amd_iommu *iommu, devid = e->devid;for (dev_i = devid_start; dev_i <= devid; ++dev_i) { -if (alias) +if (alias) { amd_iommu_alias_table[dev_i] = devid_to; -set_dev_entry_from_acpi (iommu, - amd_iommu_alias_table[dev_i], - flags, ext_flags); +set_dev_entry_from_acpi (iommu, + devid_to, flags, ext_flags); + } +set_dev_entry_from_acpi (iommu, dev_i, + flags, ext_flags); }break ;default :
Signature · 1 line
1.6.3.3
PATCH 2/2 amd-iommu: set evt_buf_size correctly
In reply to Joerg RoedelThe setting of this variable got lost during the suspend/resume implementation. But keeping this variable zero causes a divide-by-zero error in the interrupt handler. This patch fixes this.
--- arch/x86/kernel/amd_iommu_init.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
arch/x86/kernel/amd_iommu_init.c +2 -0
@@ -472,6 +472,8 @@ static u8 * __init alloc_event_buffer(struct amd_iommu *iommu)if (iommu->evt_buf ==NULL )return NULL ; + iommu->evt_buf_size =EVT_BUFFER_SIZE ; +return iommu->evt_buf; }
Signature · 1 line
1.6.3.3
Quoted 14 lines · Joerg Roedel
Hi Ingo,
The following changes since commit
7c5371c403abb29f01bc6cff6c5096abdf2dc524:
Yinghai Lu (1):
x86: add boundary check for 32bit res before expand e820 resource to alignmentare available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/joro/linux-2.6-iommu.gitamd-iommu/fixesJoerg Roedel (2):
amd-iommu: handle alias entries correctly in init code
amd-iommu: setevt_buf_sizecorrectly
Quoted 6 lines
arch/x86/kernel/amd_iommu_init.c | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-)These two patches fix an uncorrect device table initialization issue and a divide-by-zero error on an event log interrupt. Please pull.
Pulled, thanks a lot Joerg!
Ingo