]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
x86, AMD IOMMU: replace HIGH_U32 macro with upper_32_bits function
authorJoerg Roedel <joerg.roedel@amd.com>
Fri, 11 Jul 2008 15:14:23 +0000 (17:14 +0200)
committerIngo Molnar <mingo@elte.hu>
Fri, 11 Jul 2008 16:01:11 +0000 (18:01 +0200)
Removes a driver specific macro and replaces it with a generic function already
available in Linux.

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>
arch/x86/kernel/amd_iommu.c
include/asm-x86/amd_iommu_types.h

index 4bae96ca7c11303a29dba4af1492067d3939d735..9098f047c1a99561e50f98ba895db62deb58da5f 100644 (file)
@@ -109,7 +109,7 @@ static int iommu_completion_wait(struct amd_iommu *iommu)
 
        memset(&cmd, 0, sizeof(cmd));
        cmd.data[0] = LOW_U32(ready_phys) | CMD_COMPL_WAIT_STORE_MASK;
-       cmd.data[1] = HIGH_U32(ready_phys);
+       cmd.data[1] = upper_32_bits(ready_phys);
        cmd.data[2] = 1; /* value written to 'ready' */
        CMD_SET_TYPE(&cmd, CMD_COMPL_WAIT);
 
@@ -157,7 +157,7 @@ static int iommu_queue_inv_iommu_pages(struct amd_iommu *iommu,
        CMD_SET_TYPE(&cmd, CMD_INV_IOMMU_PAGES);
        cmd.data[1] |= domid;
        cmd.data[2] = LOW_U32(address);
-       cmd.data[3] = HIGH_U32(address);
+       cmd.data[3] = upper_32_bits(address);
        if (s) /* size bit - we flush more than one 4kb page */
                cmd.data[2] |= CMD_INV_IOMMU_PAGES_SIZE_MASK;
        if (pde) /* PDE bit - we wan't flush everything not only the PTEs */
index 945fd498a3ad3cd06a667c780028fccb4e541601..14aaffe38fe5643c29eb90c7b8f0b93fd0e676c5 100644 (file)
@@ -33,7 +33,6 @@
 
 /* helper macros */
 #define LOW_U32(x) ((x) & ((1ULL << 32)-1))
-#define HIGH_U32(x) (LOW_U32((x) >> 32))
 
 /* Length of the MMIO region for the AMD IOMMU */
 #define MMIO_REGION_LENGTH       0x4000