mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [git pull] AMD IOMMU fixes for 2.6.31-rc1
@ 2009-07-03  8:29 Joerg Roedel
  2009-07-03  8:29 ` [PATCH 1/2] amd-iommu: handle alias entries correctly in init code Joerg Roedel
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Joerg Roedel @ 2009-07-03  8:29 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel

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



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] amd-iommu: handle alias entries correctly in init code
  2009-07-03  8:29 [git pull] AMD IOMMU fixes for 2.6.31-rc1 Joerg Roedel
@ 2009-07-03  8:29 ` Joerg Roedel
  2009-07-03  8:29 ` [PATCH 2/2] amd-iommu: set evt_buf_size correctly Joerg Roedel
  2009-07-03  8:57 ` [git pull] AMD IOMMU fixes for 2.6.31-rc1 Ingo Molnar
  2 siblings, 0 replies; 4+ messages in thread
From: Joerg Roedel @ 2009-07-03  8:29 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Joerg Roedel

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.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
---
 arch/x86/kernel/amd_iommu_init.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/arch/x86/kernel/amd_iommu_init.c b/arch/x86/kernel/amd_iommu_init.c
index 10b2acc..ec72c77 100644
--- a/arch/x86/kernel/amd_iommu_init.c
+++ b/arch/x86/kernel/amd_iommu_init.c
@@ -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:
-- 
1.6.3.3



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/2] amd-iommu: set evt_buf_size correctly
  2009-07-03  8:29 [git pull] AMD IOMMU fixes for 2.6.31-rc1 Joerg Roedel
  2009-07-03  8:29 ` [PATCH 1/2] amd-iommu: handle alias entries correctly in init code Joerg Roedel
@ 2009-07-03  8:29 ` Joerg Roedel
  2009-07-03  8:57 ` [git pull] AMD IOMMU fixes for 2.6.31-rc1 Ingo Molnar
  2 siblings, 0 replies; 4+ messages in thread
From: Joerg Roedel @ 2009-07-03  8:29 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Joerg Roedel

The 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.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
---
 arch/x86/kernel/amd_iommu_init.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/amd_iommu_init.c b/arch/x86/kernel/amd_iommu_init.c
index ec72c77..c1b17e9 100644
--- a/arch/x86/kernel/amd_iommu_init.c
+++ b/arch/x86/kernel/amd_iommu_init.c
@@ -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;
 }
 
-- 
1.6.3.3



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [git pull] AMD IOMMU fixes for 2.6.31-rc1
  2009-07-03  8:29 [git pull] AMD IOMMU fixes for 2.6.31-rc1 Joerg Roedel
  2009-07-03  8:29 ` [PATCH 1/2] amd-iommu: handle alias entries correctly in init code Joerg Roedel
  2009-07-03  8:29 ` [PATCH 2/2] amd-iommu: set evt_buf_size correctly Joerg Roedel
@ 2009-07-03  8:57 ` Ingo Molnar
  2 siblings, 0 replies; 4+ messages in thread
From: Ingo Molnar @ 2009-07-03  8:57 UTC (permalink / raw)
  To: Joerg Roedel, the arch/x86 maintainers; +Cc: linux-kernel


* Joerg Roedel <joerg.roedel@amd.com> wrote:

> 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.

Pulled, thanks a lot Joerg!

	Ingo

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-07-03  8:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-03  8:29 [git pull] AMD IOMMU fixes for 2.6.31-rc1 Joerg Roedel
2009-07-03  8:29 ` [PATCH 1/2] amd-iommu: handle alias entries correctly in init code Joerg Roedel
2009-07-03  8:29 ` [PATCH 2/2] amd-iommu: set evt_buf_size correctly Joerg Roedel
2009-07-03  8:57 ` [git pull] AMD IOMMU fixes for 2.6.31-rc1 Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®