[patch 13/27] amd_iommu: fix nasty bug that caused ILLEGAL_DEVICE_TABLE_ENTRY errors

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Greg KH
Date: Thursday, October 23, 2008 - 9:34 pm

2.6.27-stable review patch.  If anyone has any objections, please let us 
know.

------------------
From: Andreas Herrmann <andreas.herrmann3@amd.com>

commit f609891f428e1c20e270e7c350daf8c93cc459d7 upstream

We are on 64-bit so better use u64 instead of u32 to deal with
addresses:

static void __init iommu_set_device_table(struct amd_iommu *iommu)
{
        u64 entry;
  ...
        entry = virt_to_phys(amd_iommu_dev_table);
  ...

(I am wondering why gcc 4.2.x did not warn about the assignment
between u32 and unsigned long.)

Cc: iommu@lists.linux-foundation.org
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/kernel/amd_iommu_init.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/x86/kernel/amd_iommu_init.c
+++ b/arch/x86/kernel/amd_iommu_init.c
@@ -210,7 +210,7 @@ static void __init iommu_set_exclusion_r
 /* Programs the physical address of the device table into the IOMMU hardware */
 static void __init iommu_set_device_table(struct amd_iommu *iommu)
 {
-	u32 entry;
+	u64 entry;
 
 	BUG_ON(iommu->mmio_base == NULL);
 

-- 
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 00/27] 2.6.27.4-stable review, Greg KH, (Thu Oct 23, 9:33 pm)
[patch 02/27] edac cell: fix incorrect edac_mode, Greg KH, (Thu Oct 23, 9:33 pm)
[patch 04/27] sched: fix the wrong mask_len, Greg KH, (Thu Oct 23, 9:33 pm)
[patch 07/27] USB: fix memory leak in cdc-acm, Greg KH, (Thu Oct 23, 9:33 pm)
[patch 09/27] dm kcopyd: avoid queue shuffle, Greg KH, (Thu Oct 23, 9:34 pm)
[patch 10/27] dm snapshot: fix primary_pe race, Greg KH, (Thu Oct 23, 9:34 pm)
[patch 13/27] amd_iommu: fix nasty bug that caused ILLEGAL ..., Greg KH, (Thu Oct 23, 9:34 pm)
Re: [patch 00/27] 2.6.27.4-stable review, Greg KH, (Thu Oct 23, 10:41 pm)
Re: [patch 11/27] dm exception store: refactor zero_area, Mikulas Patocka, (Fri Oct 24, 6:40 pm)