Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 112613
b: refs/heads/master
c: b514e55
h: refs/heads/master
i:
  112611: 6bec7a5
v: v3
  • Loading branch information
Joerg Roedel authored and Ingo Molnar committed Sep 19, 2008
1 parent cb62d85 commit 82a4c3b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 199d0d501202f077fe647a5c14fe046b17abc46b
refs/heads/master: b514e55569855bbaab782a8ec073630ed4e99c68
12 changes: 10 additions & 2 deletions trunk/arch/x86/kernel/amd_iommu_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,14 @@ static void __init iommu_unmap_mmio_space(struct amd_iommu *iommu)
*
****************************************************************************/

/*
* This function calculates the length of a given IVHD entry
*/
static inline int ivhd_entry_length(u8 *ivhd)
{
return 0x04 << (*ivhd >> 6);
}

/*
* This function reads the last device id the IOMMU has to handle from the PCI
* capability header for this IOMMU
Expand Down Expand Up @@ -340,7 +348,7 @@ static int __init find_last_devid_from_ivhd(struct ivhd_header *h)
default:
break;
}
p += 0x04 << (*p >> 6);
p += ivhd_entry_length(p);
}

WARN_ON(p != end);
Expand Down Expand Up @@ -641,7 +649,7 @@ static void __init init_iommu_from_acpi(struct amd_iommu *iommu,
break;
}

p += 0x04 << (e->type >> 6);
p += ivhd_entry_length(p);
}
}

Expand Down

0 comments on commit 82a4c3b

Please sign in to comment.