diff options
author | Pavel Machek <pavel@ucw.cz> | 2008-04-08 04:49:03 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-05-12 15:28:10 -0400 |
commit | aa134f1b09df6beaa4d031a50d5fda1f3cebce6c (patch) | |
tree | 3bd632e6fa8490cf5b472271d57c8c70abaa62b4 /include/asm-x86/gart.h | |
parent | 492c2e476eac010962850006c49df326919b284c (diff) |
x86: iommu: use symbolic constants, not hardcoded numbers
Move symbolic constants into gart.h, and use them instead of hardcoded
constant.
Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86/gart.h')
-rw-r--r-- | include/asm-x86/gart.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/asm-x86/gart.h b/include/asm-x86/gart.h index 90958ed993fa..248e5778e928 100644 --- a/include/asm-x86/gart.h +++ b/include/asm-x86/gart.h | |||
@@ -5,6 +5,7 @@ extern void pci_iommu_shutdown(void); | |||
5 | extern void no_iommu_init(void); | 5 | extern void no_iommu_init(void); |
6 | extern int force_iommu, no_iommu; | 6 | extern int force_iommu, no_iommu; |
7 | extern int iommu_detected; | 7 | extern int iommu_detected; |
8 | extern int agp_amd64_init(void); | ||
8 | #ifdef CONFIG_GART_IOMMU | 9 | #ifdef CONFIG_GART_IOMMU |
9 | extern void gart_iommu_init(void); | 10 | extern void gart_iommu_init(void); |
10 | extern void gart_iommu_shutdown(void); | 11 | extern void gart_iommu_shutdown(void); |
@@ -31,4 +32,24 @@ static inline void gart_iommu_shutdown(void) | |||
31 | 32 | ||
32 | #endif | 33 | #endif |
33 | 34 | ||
35 | /* PTE bits. */ | ||
36 | #define GPTE_VALID 1 | ||
37 | #define GPTE_COHERENT 2 | ||
38 | |||
39 | /* Aperture control register bits. */ | ||
40 | #define GARTEN (1<<0) | ||
41 | #define DISGARTCPU (1<<4) | ||
42 | #define DISGARTIO (1<<5) | ||
43 | |||
44 | /* GART cache control register bits. */ | ||
45 | #define INVGART (1<<0) | ||
46 | #define GARTPTEERR (1<<1) | ||
47 | |||
48 | /* K8 On-cpu GART registers */ | ||
49 | #define AMD64_GARTAPERTURECTL 0x90 | ||
50 | #define AMD64_GARTAPERTUREBASE 0x94 | ||
51 | #define AMD64_GARTTABLEBASE 0x98 | ||
52 | #define AMD64_GARTCACHECTL 0x9c | ||
53 | #define AMD64_GARTEN (1<<0) | ||
54 | |||
34 | #endif | 55 | #endif |