Skip to content

Commit 00fb543

Browse files
committed
Merge branches 'iommu/fixes', 'arm/omap' and 'x86/amd' into next
Conflicts: drivers/pci/hotplug/acpiphp_glue.c
3 parents 805a6af + 1a36ea8 + 1456e9d commit 00fb543

39 files changed

+2789
-317
lines changed

Documentation/ABI/testing/sysfs-bus-pci

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,24 @@ Description:
6666
re-discover previously removed devices.
6767
Depends on CONFIG_HOTPLUG.
6868

69+
What: /sys/bus/pci/devices/.../msi_irqs/
70+
Date: September, 2011
71+
Contact: Neil Horman <nhorman@tuxdriver.com>
72+
Description:
73+
The /sys/devices/.../msi_irqs directory contains a variable set
74+
of sub-directories, with each sub-directory being named after a
75+
corresponding msi irq vector allocated to that device. Each
76+
numbered sub-directory N contains attributes of that irq.
77+
Note that this directory is not created for device drivers which
78+
do not support msi irqs
79+
80+
What: /sys/bus/pci/devices/.../msi_irqs/<N>/mode
81+
Date: September 2011
82+
Contact: Neil Horman <nhorman@tuxdriver.com>
83+
Description:
84+
This attribute indicates the mode that the irq vector named by
85+
the parent directory is in (msi vs. msix)
86+
6987
What: /sys/bus/pci/devices/.../remove
7088
Date: January 2009
7189
Contact: Linux PCI developers <linux-pci@vger.kernel.org>

Documentation/kernel-parameters.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
329329
is a lot of faster
330330
off - do not initialize any AMD IOMMU found in
331331
the system
332+
force_isolation - Force device isolation for all
333+
devices. The IOMMU driver is not
334+
allowed anymore to lift isolation
335+
requirements as needed. This option
336+
does not override iommu=pt
332337

333338
amijoy.map= [HW,JOY] Amiga joystick support
334339
Map of devices attached to JOY0DAT and JOY1DAT

arch/arm/mach-omap2/devices.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <plat/board.h>
2929
#include <plat/mcbsp.h>
3030
#include <plat/mmc.h>
31+
#include <plat/iommu.h>
3132
#include <plat/dma.h>
3233
#include <plat/omap_hwmod.h>
3334
#include <plat/omap_device.h>
@@ -211,9 +212,15 @@ static struct platform_device omap3isp_device = {
211212
.resource = omap3isp_resources,
212213
};
213214

215+
static struct omap_iommu_arch_data omap3_isp_iommu = {
216+
.name = "isp",
217+
};
218+
214219
int omap3_init_camera(struct isp_platform_data *pdata)
215220
{
216221
omap3isp_device.dev.platform_data = pdata;
222+
omap3isp_device.dev.archdata.iommu = &omap3_isp_iommu;
223+
217224
return platform_device_register(&omap3isp_device);
218225
}
219226

arch/arm/plat-omap/include/plat/iommu.h

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,32 @@ struct iommu_platform_data {
111111
u32 da_end;
112112
};
113113

114+
/**
115+
* struct iommu_arch_data - omap iommu private data
116+
* @name: name of the iommu device
117+
* @iommu_dev: handle of the iommu device
118+
*
119+
* This is an omap iommu private data object, which binds an iommu user
120+
* to its iommu device. This object should be placed at the iommu user's
121+
* dev_archdata so generic IOMMU API can be used without having to
122+
* utilize omap-specific plumbing anymore.
123+
*/
124+
struct omap_iommu_arch_data {
125+
const char *name;
126+
struct omap_iommu *iommu_dev;
127+
};
128+
129+
/**
130+
* dev_to_omap_iommu() - retrieves an omap iommu object from a user device
131+
* @dev: iommu client device
132+
*/
133+
static inline struct omap_iommu *dev_to_omap_iommu(struct device *dev)
134+
{
135+
struct omap_iommu_arch_data *arch_data = dev->archdata.iommu;
136+
137+
return arch_data->iommu_dev;
138+
}
139+
114140
/* IOMMU errors */
115141
#define OMAP_IOMMU_ERR_TLB_MISS (1 << 0)
116142
#define OMAP_IOMMU_ERR_TRANS_FAULT (1 << 1)
@@ -163,8 +189,8 @@ extern int omap_iommu_set_isr(const char *name,
163189
void *priv),
164190
void *isr_priv);
165191

166-
extern void omap_iommu_save_ctx(struct omap_iommu *obj);
167-
extern void omap_iommu_restore_ctx(struct omap_iommu *obj);
192+
extern void omap_iommu_save_ctx(struct device *dev);
193+
extern void omap_iommu_restore_ctx(struct device *dev);
168194

169195
extern int omap_install_iommu_arch(const struct iommu_functions *ops);
170196
extern void omap_uninstall_iommu_arch(const struct iommu_functions *ops);
@@ -176,6 +202,5 @@ extern ssize_t
176202
omap_iommu_dump_ctx(struct omap_iommu *obj, char *buf, ssize_t len);
177203
extern size_t
178204
omap_dump_tlb_entries(struct omap_iommu *obj, char *buf, ssize_t len);
179-
struct device *omap_find_iommu_device(const char *name);
180205

181206
#endif /* __MACH_IOMMU_H */

arch/arm/plat-omap/include/plat/iovmm.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,18 @@ struct iovm_struct {
7272
#define IOVMF_DA_FIXED (1 << (4 + IOVMF_SW_SHIFT))
7373

7474

75-
extern struct iovm_struct *omap_find_iovm_area(struct omap_iommu *obj, u32 da);
75+
extern struct iovm_struct *omap_find_iovm_area(struct device *dev, u32 da);
7676
extern u32
77-
omap_iommu_vmap(struct iommu_domain *domain, struct omap_iommu *obj, u32 da,
77+
omap_iommu_vmap(struct iommu_domain *domain, struct device *dev, u32 da,
7878
const struct sg_table *sgt, u32 flags);
7979
extern struct sg_table *omap_iommu_vunmap(struct iommu_domain *domain,
80-
struct omap_iommu *obj, u32 da);
80+
struct device *dev, u32 da);
8181
extern u32
82-
omap_iommu_vmalloc(struct iommu_domain *domain, struct omap_iommu *obj,
82+
omap_iommu_vmalloc(struct iommu_domain *domain, struct device *dev,
8383
u32 da, size_t bytes, u32 flags);
8484
extern void
85-
omap_iommu_vfree(struct iommu_domain *domain, struct omap_iommu *obj,
85+
omap_iommu_vfree(struct iommu_domain *domain, struct device *dev,
8686
const u32 da);
87-
extern void *omap_da_to_va(struct omap_iommu *obj, u32 da);
87+
extern void *omap_da_to_va(struct device *dev, u32 da);
8888

8989
#endif /* __IOMMU_MMAP_H */

drivers/acpi/pci_root.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,13 @@ static int __devinit acpi_pci_root_add(struct acpi_device *device)
596596
if (ACPI_SUCCESS(status)) {
597597
dev_info(root->bus->bridge,
598598
"ACPI _OSC control (0x%02x) granted\n", flags);
599+
if (acpi_gbl_FADT.boot_flags & ACPI_FADT_NO_ASPM) {
600+
/*
601+
* We have ASPM control, but the FADT indicates
602+
* that it's unsupported. Clear it.
603+
*/
604+
pcie_clear_aspm(root->bus);
605+
}
599606
} else {
600607
dev_info(root->bus->bridge,
601608
"ACPI _OSC request failed (%s), "

drivers/iommu/Kconfig

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ config AMD_IOMMU
3434
bool "AMD IOMMU support"
3535
select SWIOTLB
3636
select PCI_MSI
37-
select PCI_IOV
37+
select PCI_ATS
38+
select PCI_PRI
39+
select PCI_PASID
3840
select IOMMU_API
3941
depends on X86_64 && PCI && ACPI
4042
---help---
@@ -58,6 +60,15 @@ config AMD_IOMMU_STATS
5860
information to userspace via debugfs.
5961
If unsure, say N.
6062

63+
config AMD_IOMMU_V2
64+
tristate "AMD IOMMU Version 2 driver (EXPERIMENTAL)"
65+
depends on AMD_IOMMU && PROFILING && EXPERIMENTAL
66+
select MMU_NOTIFIER
67+
---help---
68+
This option enables support for the AMD IOMMUv2 features of the IOMMU
69+
hardware. Select this option if you want to use devices that support
70+
the the PCI PRI and PASID interface.
71+
6172
# Intel IOMMU support
6273
config DMAR_TABLE
6374
bool

drivers/iommu/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
obj-$(CONFIG_IOMMU_API) += iommu.o
22
obj-$(CONFIG_MSM_IOMMU) += msm_iommu.o msm_iommu_dev.o
33
obj-$(CONFIG_AMD_IOMMU) += amd_iommu.o amd_iommu_init.o
4+
obj-$(CONFIG_AMD_IOMMU_V2) += amd_iommu_v2.o
45
obj-$(CONFIG_DMAR_TABLE) += dmar.o
56
obj-$(CONFIG_INTEL_IOMMU) += iova.o intel-iommu.o
67
obj-$(CONFIG_IRQ_REMAP) += intr_remapping.o

0 commit comments

Comments
 (0)