diff options
| author | Robert Richter <robert.richter@amd.com> | 2010-10-25 10:28:14 -0400 |
|---|---|---|
| committer | Robert Richter <robert.richter@amd.com> | 2010-10-25 10:29:12 -0400 |
| commit | dbd1e66e04558a582e673bc4a9cd933ce0228d93 (patch) | |
| tree | 85f3633276282cde0a3ac558d988704eaa3e68af /arch/x86/include/asm/gart.h | |
| parent | 328b8f1ba50b708a1b3c0acd7c41ee1b356822f6 (diff) | |
| parent | 4a60cfa9457749f7987fd4f3c956dbba5a281129 (diff) | |
Merge commit 'linux-2.6/master' (early part) into oprofile/core
This branch depends on these apic patches:
apic, x86: Use BIOS settings for IBS and MCE threshold interrupt LVT offsets
apic, x86: Check if EILVT APIC registers are available (AMD only)
Signed-off-by: Robert Richter <robert.richter@amd.com>
Diffstat (limited to 'arch/x86/include/asm/gart.h')
| -rw-r--r-- | arch/x86/include/asm/gart.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/arch/x86/include/asm/gart.h b/arch/x86/include/asm/gart.h index 4ac5b0f33fc1..bf357f9b25f0 100644 --- a/arch/x86/include/asm/gart.h +++ b/arch/x86/include/asm/gart.h | |||
| @@ -17,6 +17,7 @@ extern int fix_aperture; | |||
| 17 | #define GARTEN (1<<0) | 17 | #define GARTEN (1<<0) |
| 18 | #define DISGARTCPU (1<<4) | 18 | #define DISGARTCPU (1<<4) |
| 19 | #define DISGARTIO (1<<5) | 19 | #define DISGARTIO (1<<5) |
| 20 | #define DISTLBWALKPRB (1<<6) | ||
| 20 | 21 | ||
| 21 | /* GART cache control register bits. */ | 22 | /* GART cache control register bits. */ |
| 22 | #define INVGART (1<<0) | 23 | #define INVGART (1<<0) |
| @@ -27,7 +28,6 @@ extern int fix_aperture; | |||
| 27 | #define AMD64_GARTAPERTUREBASE 0x94 | 28 | #define AMD64_GARTAPERTUREBASE 0x94 |
| 28 | #define AMD64_GARTTABLEBASE 0x98 | 29 | #define AMD64_GARTTABLEBASE 0x98 |
| 29 | #define AMD64_GARTCACHECTL 0x9c | 30 | #define AMD64_GARTCACHECTL 0x9c |
| 30 | #define AMD64_GARTEN (1<<0) | ||
| 31 | 31 | ||
| 32 | #ifdef CONFIG_GART_IOMMU | 32 | #ifdef CONFIG_GART_IOMMU |
| 33 | extern int gart_iommu_aperture; | 33 | extern int gart_iommu_aperture; |
| @@ -57,6 +57,19 @@ static inline void gart_iommu_hole_init(void) | |||
| 57 | 57 | ||
| 58 | extern int agp_amd64_init(void); | 58 | extern int agp_amd64_init(void); |
| 59 | 59 | ||
| 60 | static inline void gart_set_size_and_enable(struct pci_dev *dev, u32 order) | ||
| 61 | { | ||
| 62 | u32 ctl; | ||
| 63 | |||
| 64 | /* | ||
| 65 | * Don't enable translation but enable GART IO and CPU accesses. | ||
| 66 | * Also, set DISTLBWALKPRB since GART tables memory is UC. | ||
| 67 | */ | ||
| 68 | ctl = DISTLBWALKPRB | order << 1; | ||
| 69 | |||
| 70 | pci_write_config_dword(dev, AMD64_GARTAPERTURECTL, ctl); | ||
| 71 | } | ||
| 72 | |||
| 60 | static inline void enable_gart_translation(struct pci_dev *dev, u64 addr) | 73 | static inline void enable_gart_translation(struct pci_dev *dev, u64 addr) |
| 61 | { | 74 | { |
| 62 | u32 tmp, ctl; | 75 | u32 tmp, ctl; |
