Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 112640
b: refs/heads/master
c: cf1337f
h: refs/heads/master
v: v3
  • Loading branch information
Suresh Siddha authored and Ingo Molnar committed Jul 12, 2008
1 parent 6447e5a commit 8f5c209
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 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: ad3ad3f6a2caebf56869b83b69e23eb9fa5e0ab6
refs/heads/master: cf1337f0447e5be8e66daa944f0ea3bcac2b6179
15 changes: 0 additions & 15 deletions trunk/drivers/pci/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@

#define DEFAULT_DOMAIN_ADDRESS_WIDTH 48

#define DMAR_OPERATION_TIMEOUT ((cycles_t) tsc_khz*10*1000) /* 10sec */

#define DOMAIN_MAX_ADDR(gaw) ((((u64)1) << gaw) - 1)


Expand Down Expand Up @@ -486,19 +484,6 @@ static int iommu_alloc_root_entry(struct intel_iommu *iommu)
return 0;
}

#define IOMMU_WAIT_OP(iommu, offset, op, cond, sts) \
{\
cycles_t start_time = get_cycles();\
while (1) {\
sts = op (iommu->reg + offset);\
if (cond)\
break;\
if (DMAR_OPERATION_TIMEOUT < (get_cycles() - start_time))\
panic("DMAR hardware is malfunctioning\n");\
cpu_relax();\
}\
}

static void iommu_set_root_entry(struct intel_iommu *iommu)
{
void *addr;
Expand Down
15 changes: 15 additions & 0 deletions trunk/drivers/pci/intel-iommu.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,21 @@ static inline void dmar_writeq(void __iomem *addr, u64 val)
#define dma_frcd_source_id(c) (c & 0xffff)
#define dma_frcd_page_addr(d) (d & (((u64)-1) << 12)) /* low 64 bit */

#define DMAR_OPERATION_TIMEOUT ((cycles_t) tsc_khz*10*1000) /* 10sec */

#define IOMMU_WAIT_OP(iommu, offset, op, cond, sts) \
{\
cycles_t start_time = get_cycles();\
while (1) {\
sts = op (iommu->reg + offset);\
if (cond)\
break;\
if (DMAR_OPERATION_TIMEOUT < (get_cycles() - start_time))\
panic("DMAR hardware is malfunctioning\n");\
cpu_relax();\
}\
}

struct intel_iommu {
void __iomem *reg; /* Pointer to hardware regs, virtual addr */
u64 cap;
Expand Down

0 comments on commit 8f5c209

Please sign in to comment.