Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 169215
b: refs/heads/master
c: de95762
h: refs/heads/master
i:
  169213: 33c1bdd
  169211: 9130889
  169207: 6cb7159
  169199: fb27c6c
  169183: beba2d1
  169151: 45e5d50
  169087: 296244d
  168959: 490e891
v: v3
  • Loading branch information
FUJITA Tomonori authored and Ingo Molnar committed Nov 10, 2009
1 parent bcd6606 commit 37305e4
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d7b9f7be216b04ff9d108f856bc03d96e7b3439c
refs/heads/master: de957628ce7c84764ff41331111036b3ae5bad0f
5 changes: 1 addition & 4 deletions trunk/arch/x86/include/asm/gart.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ extern int gart_iommu_aperture_allowed;
extern int gart_iommu_aperture_disabled;

extern void early_gart_iommu_check(void);
extern void gart_iommu_init(void);
extern int gart_iommu_init(void);
extern void __init gart_parse_options(char *);
extern void gart_iommu_hole_init(void);

Expand All @@ -47,9 +47,6 @@ extern void gart_iommu_hole_init(void);
static inline void early_gart_iommu_check(void)
{
}
static inline void gart_iommu_init(void)
{
}
static inline void gart_parse_options(char *options)
{
}
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/x86/kernel/aperture_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <asm/pci-direct.h>
#include <asm/dma.h>
#include <asm/k8.h>
#include <asm/x86_init.h>

int gart_iommu_aperture;
int gart_iommu_aperture_disabled __initdata;
Expand Down Expand Up @@ -400,6 +401,7 @@ void __init gart_iommu_hole_init(void)

iommu_detected = 1;
gart_iommu_aperture = 1;
x86_init.iommu.iommu_init = gart_iommu_init;

aper_order = (read_pci_config(bus, slot, 3, AMD64_GARTAPERTURECTL) >> 1) & 7;
aper_size = (32 * 1024 * 1024) << aper_order;
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/x86/kernel/pci-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,6 @@ static int __init pci_iommu_init(void)

amd_iommu_init();

gart_iommu_init();

no_iommu_init();
return 0;
}
Expand Down
15 changes: 5 additions & 10 deletions trunk/arch/x86/kernel/pci-gart_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ static void gart_iommu_shutdown(void)
}
}

void __init gart_iommu_init(void)
int __init gart_iommu_init(void)
{
struct agp_kern_info info;
unsigned long iommu_start;
Expand All @@ -719,7 +719,7 @@ void __init gart_iommu_init(void)
long i;

if (cache_k8_northbridges() < 0 || num_k8_northbridges == 0)
return;
return 0;

#ifndef CONFIG_AGP_AMD64
no_agp = 1;
Expand All @@ -731,13 +731,6 @@ void __init gart_iommu_init(void)
(agp_copy_info(agp_bridge, &info) < 0);
#endif

if (swiotlb)
return;

/* Did we detect a different HW IOMMU? */
if (iommu_detected && !gart_iommu_aperture)
return;

if (no_iommu ||
(!force_iommu && max_pfn <= MAX_DMA32_PFN) ||
!gart_iommu_aperture ||
Expand All @@ -747,7 +740,7 @@ void __init gart_iommu_init(void)
"but GART IOMMU not available.\n");
printk(KERN_WARNING "falling back to iommu=soft.\n");
}
return;
return 0;
}

/* need to map that range */
Expand Down Expand Up @@ -840,6 +833,8 @@ void __init gart_iommu_init(void)
flush_gart();
dma_ops = &gart_dma_ops;
x86_platform.iommu_shutdown = gart_iommu_shutdown;

return 0;
}

void __init gart_parse_options(char *p)
Expand Down

0 comments on commit 37305e4

Please sign in to comment.