diff options
| author | Joerg Roedel <joerg.roedel@amd.com> | 2008-07-11 11:14:35 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-07-11 12:01:18 -0400 |
| commit | d591b0a3ae25f587d0c4da1e1d1a425143590790 (patch) | |
| tree | 8a59693815fefc41236e8207774e23a865d04f2e /include | |
| parent | 83f5aac18ccd02170f4a61e7289ceabd5101c1a0 (diff) | |
x86, AMD IOMMU: replace DEVID macro with a function
This patch replaces the DEVID macro with a function and uses them where
apropriate (also in the core code).
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Cc: iommu@lists.linux-foundation.org
Cc: bhavna.sarathy@amd.com
Cc: robert.richter@amd.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-x86/amd_iommu_types.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/asm-x86/amd_iommu_types.h b/include/asm-x86/amd_iommu_types.h index 2e8601b0f006..22aa58ca1991 100644 --- a/include/asm-x86/amd_iommu_types.h +++ b/include/asm-x86/amd_iommu_types.h | |||
| @@ -332,4 +332,11 @@ static inline void print_devid(u16 devid, int nl) | |||
| 332 | printk("\n"); | 332 | printk("\n"); |
| 333 | } | 333 | } |
| 334 | 334 | ||
| 335 | /* takes bus and device/function and returns the device id | ||
| 336 | * FIXME: should that be in generic PCI code? */ | ||
| 337 | static inline u16 calc_devid(u8 bus, u8 devfn) | ||
| 338 | { | ||
| 339 | return (((u16)bus) << 8) | devfn; | ||
| 340 | } | ||
| 341 | |||
| 335 | #endif | 342 | #endif |
