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

Commit 57ab43e3 authored by Borislav Petkov's avatar Borislav Petkov Committed by Ingo Molnar
Browse files

x86, GART: Remove superfluous AMD64_GARTEN



There is a GARTEN so use that and drop the duplicate.

Signed-off-by: default avatarBorislav Petkov <borislav.petkov@amd.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
LKML-Reference: <1283531981-7495-2-git-send-email-bp@amd64.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 2bfc96a1
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -27,7 +27,6 @@ extern int fix_aperture;
#define AMD64_GARTAPERTUREBASE	0x94
#define AMD64_GARTAPERTUREBASE	0x94
#define AMD64_GARTTABLEBASE	0x98
#define AMD64_GARTTABLEBASE	0x98
#define AMD64_GARTCACHECTL	0x9c
#define AMD64_GARTCACHECTL	0x9c
#define AMD64_GARTEN		(1<<0)


#ifdef CONFIG_GART_IOMMU
#ifdef CONFIG_GART_IOMMU
extern int gart_iommu_aperture;
extern int gart_iommu_aperture;
+2 −2
Original line number Original line Diff line number Diff line
@@ -307,7 +307,7 @@ void __init early_gart_iommu_check(void)
				continue;
				continue;


			ctl = read_pci_config(bus, slot, 3, AMD64_GARTAPERTURECTL);
			ctl = read_pci_config(bus, slot, 3, AMD64_GARTAPERTURECTL);
			aper_enabled = ctl & AMD64_GARTEN;
			aper_enabled = ctl & GARTEN;
			aper_order = (ctl >> 1) & 7;
			aper_order = (ctl >> 1) & 7;
			aper_size = (32 * 1024 * 1024) << aper_order;
			aper_size = (32 * 1024 * 1024) << aper_order;
			aper_base = read_pci_config(bus, slot, 3, AMD64_GARTAPERTUREBASE) & 0x7fff;
			aper_base = read_pci_config(bus, slot, 3, AMD64_GARTAPERTUREBASE) & 0x7fff;
@@ -362,7 +362,7 @@ void __init early_gart_iommu_check(void)
				continue;
				continue;


			ctl = read_pci_config(bus, slot, 3, AMD64_GARTAPERTURECTL);
			ctl = read_pci_config(bus, slot, 3, AMD64_GARTAPERTURECTL);
			ctl &= ~AMD64_GARTEN;
			ctl &= ~GARTEN;
			write_pci_config(bus, slot, 3, AMD64_GARTAPERTURECTL, ctl);
			write_pci_config(bus, slot, 3, AMD64_GARTAPERTURECTL, ctl);
		}
		}
	}
	}
+1 −1
Original line number Original line Diff line number Diff line
@@ -199,7 +199,7 @@ static void amd64_cleanup(void)
		struct pci_dev *dev = k8_northbridges[i];
		struct pci_dev *dev = k8_northbridges[i];
		/* disable gart translation */
		/* disable gart translation */
		pci_read_config_dword(dev, AMD64_GARTAPERTURECTL, &tmp);
		pci_read_config_dword(dev, AMD64_GARTAPERTURECTL, &tmp);
		tmp &= ~AMD64_GARTEN;
		tmp &= ~GARTEN;
		pci_write_config_dword(dev, AMD64_GARTAPERTURECTL, tmp);
		pci_write_config_dword(dev, AMD64_GARTAPERTURECTL, tmp);
	}
	}
}
}