Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 331519
b: refs/heads/master
c: 2e12bc2
h: refs/heads/master
i:
  331517: d243142
  331515: 91c159c
  331511: 73471a3
  331503: 2b9b62a
  331487: aff95ee
  331455: d06bfff
  331391: 4dafa54
  331263: c160b4a
v: v3
  • Loading branch information
Alex Williamson authored and Joerg Roedel committed Sep 18, 2012
1 parent c04edd5 commit 37a4877
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 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: 500c25edda62a5d39c4d3b345c2e229a3f9d26be
refs/heads/master: 2e12bc29fc5a12242d68e11875db3dd58efad9ff
10 changes: 5 additions & 5 deletions trunk/drivers/iommu/amd_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ static void iommu_poll_ppr_log(struct amd_iommu *iommu)

/*
* Release iommu->lock because ppr-handling might need to
* re-acquire it
* re-aquire it
*/
spin_unlock_irqrestore(&iommu->lock, flags);

Expand Down Expand Up @@ -802,7 +802,7 @@ static void build_inv_iommu_pages(struct iommu_cmd *cmd, u64 address,
CMD_SET_TYPE(cmd, CMD_INV_IOMMU_PAGES);
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 want to flush everything, not only the PTEs */
if (pde) /* PDE bit - we wan't flush everything not only the PTEs */
cmd->data[2] |= CMD_INV_IOMMU_PAGES_PDE_MASK;
}

Expand Down Expand Up @@ -2153,7 +2153,7 @@ static bool pci_pri_tlp_required(struct pci_dev *pdev)
}

/*
* If a device is not yet associated with a domain, this function
* If a device is not yet associated with a domain, this function does
* assigns it visible for the hardware
*/
static int attach_device(struct device *dev,
Expand Down Expand Up @@ -2403,7 +2403,7 @@ static struct protection_domain *get_domain(struct device *dev)
if (domain != NULL)
return domain;

/* Device not bound yet - bind it */
/* Device not bount yet - bind it */
dma_dom = find_protection_domain(devid);
if (!dma_dom)
dma_dom = amd_iommu_rlookup_table[devid]->default_dom;
Expand Down Expand Up @@ -2942,7 +2942,7 @@ static void __init prealloc_protection_domains(void)
alloc_passthrough_domain();
dev_data->passthrough = true;
attach_device(&dev->dev, pt_domain);
pr_info("AMD-Vi: Using passthrough domain for device %s\n",
pr_info("AMD-Vi: Using passthough domain for device %s\n",
dev_name(&dev->dev));
}

Expand Down
13 changes: 7 additions & 6 deletions trunk/drivers/iommu/amd_iommu_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <linux/msi.h>
#include <linux/amd-iommu.h>
#include <linux/export.h>
#include <linux/acpi.h>
#include <acpi/acpi.h>
#include <asm/pci-direct.h>
#include <asm/iommu.h>
Expand Down Expand Up @@ -177,7 +178,7 @@ u16 *amd_iommu_alias_table;
struct amd_iommu **amd_iommu_rlookup_table;

/*
* AMD IOMMU allows up to 2^16 different protection domains. This is a bitmap
* AMD IOMMU allows up to 2^16 differend protection domains. This is a bitmap
* to know which ones are already in use.
*/
unsigned long *amd_iommu_pd_alloc_bitmap;
Expand Down Expand Up @@ -477,7 +478,7 @@ static int __init find_last_devid_acpi(struct acpi_table_header *table)

/****************************************************************************
*
* The following functions belong to the code path which parses the ACPI table
* The following functions belong the the code path which parses the ACPI table
* the second time. In this ACPI parsing iteration we allocate IOMMU specific
* data structures, initialize the device/alias/rlookup table and also
* basically initialize the hardware.
Expand Down Expand Up @@ -690,7 +691,7 @@ static void __init set_dev_entry_from_acpi(struct amd_iommu *iommu,
}

/*
* Reads the device exclusion range from ACPI and initializes the IOMMU with
* Reads the device exclusion range from ACPI and initialize IOMMU with
* it
*/
static void __init set_device_exclusion_range(u16 devid, struct ivmd_header *m)
Expand Down Expand Up @@ -1114,8 +1115,8 @@ static void print_iommu_info(void)
if (iommu_feature(iommu, (1ULL << i)))
pr_cont(" %s", feat_str[i]);
}
pr_cont("\n");
}
pr_cont("\n");
}
}

Expand All @@ -1140,7 +1141,7 @@ static int __init amd_iommu_init_pci(void)
/****************************************************************************
*
* The following functions initialize the MSI interrupts for all IOMMUs
* in the system. It's a bit challenging because there could be multiple
* in the system. Its a bit challenging because there could be multiple
* IOMMUs per PCI BDF but we can call pci_enable_msi(x) only once per
* pci_dev.
*
Expand Down Expand Up @@ -1198,7 +1199,7 @@ static int iommu_init_msi(struct amd_iommu *iommu)
*
* The next functions belong to the third pass of parsing the ACPI
* table. In this last pass the memory mapping requirements are
* gathered (like exclusion and unity mapping ranges).
* gathered (like exclusion and unity mapping reanges).
*
****************************************************************************/

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/iommu/amd_iommu_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@
#define PAGE_SIZE_ALIGN(address, pagesize) \
((address) & ~((pagesize) - 1))
/*
* Creates an IOMMU PTE for an address and a given pagesize
* Creates an IOMMU PTE for an address an a given pagesize
* The PTE has no permission bits set
* Pagesize is expected to be a power-of-two larger than 4096
*/
Expand Down Expand Up @@ -404,7 +404,7 @@ struct iommu_dev_data {
struct list_head dev_data_list; /* For global dev_data_list */
struct iommu_dev_data *alias_data;/* The alias dev_data */
struct protection_domain *domain; /* Domain the device is bound to */
atomic_t bind; /* Domain attach reference count */
atomic_t bind; /* Domain attach reverent count */
u16 devid; /* PCI Device ID */
bool iommu_v2; /* Device can make use of IOMMUv2 */
bool passthrough; /* Default for device is pt_domain */
Expand Down
4 changes: 3 additions & 1 deletion trunk/drivers/iommu/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,9 @@ static void domain_update_iommu_coherency(struct dmar_domain *domain)
{
int i;

domain->iommu_coherency = 1;
i = find_first_bit(domain->iommu_bmp, g_num_of_iommus);

domain->iommu_coherency = i < g_num_of_iommus ? 1 : 0;

for_each_set_bit(i, domain->iommu_bmp, g_num_of_iommus) {
if (!ecap_coherent(g_iommus[i]->ecap)) {
Expand Down

0 comments on commit 37a4877

Please sign in to comment.