Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4ca5ded2 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'x86-fixes-for-linus' of...

Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86/agp: Fix agp_amd64_init regression
  x86: Add quirk for Intel DG45FC board to avoid low memory corruption
  x86: Add Dell OptiPlex 760 reboot quirk
  x86, UV: Fix RTC latency bug by reading replicated cachelines
  oprofile/x86: add Xeon 7500 series support
  oprofile/x86: fix crash when profiling more than 28 events
  lib/dma-debug.c: mark file-local struct symbol static.
  x86/amd-iommu: Fix deassignment of a device from the pt_domain
  x86/amd-iommu: Fix IOMMU-API initialization for iommu=pt
  x86/amd-iommu: Fix NULL pointer dereference in __detach_device()
  x86/amd-iommu: Fix possible integer overflow
parents ed23690d 61684cea
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ extern void amd_iommu_reset_cmd_buffer(struct amd_iommu *iommu);
extern int amd_iommu_init_devices(void);
extern void amd_iommu_uninit_devices(void);
extern void amd_iommu_init_notifier(void);
extern void amd_iommu_init_api(void);
#ifndef CONFIG_AMD_IOMMU_STATS

static inline void amd_iommu_stats_init(void) { }
+16 −7
Original line number Diff line number Diff line
@@ -980,7 +980,7 @@ static int alloc_new_range(struct dma_ops_domain *dma_dom,
{
	int index = dma_dom->aperture_size >> APERTURE_RANGE_SHIFT;
	struct amd_iommu *iommu;
	int i;
	unsigned long i;

#ifdef CONFIG_IOMMU_STRESS
	populate = false;
@@ -1489,11 +1489,14 @@ static void __detach_device(struct device *dev)
{
	struct iommu_dev_data *dev_data = get_dev_data(dev);
	struct iommu_dev_data *alias_data;
	struct protection_domain *domain;
	unsigned long flags;

	BUG_ON(!dev_data->domain);

	spin_lock_irqsave(&dev_data->domain->lock, flags);
	domain = dev_data->domain;

	spin_lock_irqsave(&domain->lock, flags);

	if (dev_data->alias != dev) {
		alias_data = get_dev_data(dev_data->alias);
@@ -1504,13 +1507,15 @@ static void __detach_device(struct device *dev)
	if (atomic_dec_and_test(&dev_data->bind))
		do_detach(dev);

	spin_unlock_irqrestore(&dev_data->domain->lock, flags);
	spin_unlock_irqrestore(&domain->lock, flags);

	/*
	 * If we run in passthrough mode the device must be assigned to the
	 * passthrough domain if it is detached from any other domain
	 * passthrough domain if it is detached from any other domain.
	 * Make sure we can deassign from the pt_domain itself.
	 */
	if (iommu_pass_through && dev_data->domain == NULL)
	if (iommu_pass_through &&
	    (dev_data->domain == NULL && domain != pt_domain))
		__attach_device(dev, pt_domain);
}

@@ -2218,6 +2223,12 @@ static struct dma_map_ops amd_iommu_dma_ops = {
/*
 * The function which clues the AMD IOMMU driver into dma_ops.
 */

void __init amd_iommu_init_api(void)
{
	register_iommu(&amd_iommu_ops);
}

int __init amd_iommu_init_dma_ops(void)
{
	struct amd_iommu *iommu;
@@ -2253,8 +2264,6 @@ int __init amd_iommu_init_dma_ops(void)
	/* Make the driver finally visible to the drivers */
	dma_ops = &amd_iommu_dma_ops;

	register_iommu(&amd_iommu_ops);

	amd_iommu_stats_init();

	return 0;
+3 −0
Original line number Diff line number Diff line
@@ -1292,9 +1292,12 @@ static int __init amd_iommu_init(void)
		ret = amd_iommu_init_passthrough();
	else
		ret = amd_iommu_init_dma_ops();

	if (ret)
		goto free;

	amd_iommu_init_api();

	amd_iommu_init_notifier();

	enable_iommus();
+9 −0
Original line number Diff line number Diff line
@@ -203,6 +203,15 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {
			DMI_MATCH(DMI_BOARD_NAME, "0T656F"),
		},
	},
	{	/* Handle problems with rebooting on Dell OptiPlex 760 with 0G919G*/
		.callback = set_bios_reboot,
		.ident = "Dell OptiPlex 760",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
			DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 760"),
			DMI_MATCH(DMI_BOARD_NAME, "0G919G"),
		},
	},
	{	/* Handle problems with rebooting on Dell 2400's */
		.callback = set_bios_reboot,
		.ident = "Dell PowerEdge 2400",
+11 −3
Original line number Diff line number Diff line
@@ -642,19 +642,27 @@ static struct dmi_system_id __initdata bad_bios_dmi_table[] = {
			DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix/MSC"),
		},
	},
	{
	/*
	 * AMI BIOS with low memory corruption was found on Intel DG45ID board.
	 * It hase different DMI_BIOS_VENDOR = "Intel Corp.", for now we will
	 * AMI BIOS with low memory corruption was found on Intel DG45ID and
	 * DG45FC boards.
	 * It has a different DMI_BIOS_VENDOR = "Intel Corp.", for now we will
	 * match only DMI_BOARD_NAME and see if there is more bad products
	 * with this vendor.
	 */
	{
		.callback = dmi_low_memory_corruption,
		.ident = "AMI BIOS",
		.matches = {
			DMI_MATCH(DMI_BOARD_NAME, "DG45ID"),
		},
	},
	{
		.callback = dmi_low_memory_corruption,
		.ident = "AMI BIOS",
		.matches = {
			DMI_MATCH(DMI_BOARD_NAME, "DG45FC"),
		},
	},
#endif
	{}
};
Loading