x86/iommu: make GART driver checkpatch clean
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Родитель
1615965e54
Коммит
237a62247c
|
@ -27,8 +27,8 @@
|
||||||
#include <linux/scatterlist.h>
|
#include <linux/scatterlist.h>
|
||||||
#include <linux/iommu-helper.h>
|
#include <linux/iommu-helper.h>
|
||||||
#include <linux/sysdev.h>
|
#include <linux/sysdev.h>
|
||||||
|
#include <linux/io.h>
|
||||||
#include <asm/atomic.h>
|
#include <asm/atomic.h>
|
||||||
#include <asm/io.h>
|
|
||||||
#include <asm/mtrr.h>
|
#include <asm/mtrr.h>
|
||||||
#include <asm/pgtable.h>
|
#include <asm/pgtable.h>
|
||||||
#include <asm/proto.h>
|
#include <asm/proto.h>
|
||||||
|
@ -175,7 +175,8 @@ static void dump_leak(void)
|
||||||
iommu_leak_pages);
|
iommu_leak_pages);
|
||||||
for (i = 0; i < iommu_leak_pages; i += 2) {
|
for (i = 0; i < iommu_leak_pages; i += 2) {
|
||||||
printk(KERN_DEBUG "%lu: ", iommu_pages-i);
|
printk(KERN_DEBUG "%lu: ", iommu_pages-i);
|
||||||
printk_address((unsigned long) iommu_leak_tab[iommu_pages-i], 0);
|
printk_address((unsigned long) iommu_leak_tab[iommu_pages-i],
|
||||||
|
0);
|
||||||
printk(KERN_CONT "%c", (i+1)%2 == 0 ? '\n' : ' ');
|
printk(KERN_CONT "%c", (i+1)%2 == 0 ? '\n' : ' ');
|
||||||
}
|
}
|
||||||
printk(KERN_DEBUG "\n");
|
printk(KERN_DEBUG "\n");
|
||||||
|
@ -688,7 +689,8 @@ static __init int init_k8_gatt(struct agp_kern_info *info)
|
||||||
if (!error)
|
if (!error)
|
||||||
error = sysdev_register(&device_gart);
|
error = sysdev_register(&device_gart);
|
||||||
if (error)
|
if (error)
|
||||||
panic("Could not register gart_sysdev -- would corrupt data on next suspend");
|
panic("Could not register gart_sysdev -- "
|
||||||
|
"would corrupt data on next suspend");
|
||||||
|
|
||||||
flush_gart();
|
flush_gart();
|
||||||
|
|
||||||
|
@ -710,8 +712,6 @@ static __init int init_k8_gatt(struct agp_kern_info *info)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern int agp_amd64_init(void);
|
|
||||||
|
|
||||||
static struct dma_mapping_ops gart_dma_ops = {
|
static struct dma_mapping_ops gart_dma_ops = {
|
||||||
.map_single = gart_map_single,
|
.map_single = gart_map_single,
|
||||||
.unmap_single = gart_unmap_single,
|
.unmap_single = gart_unmap_single,
|
||||||
|
@ -777,8 +777,8 @@ void __init gart_iommu_init(void)
|
||||||
(no_agp && init_k8_gatt(&info) < 0)) {
|
(no_agp && init_k8_gatt(&info) < 0)) {
|
||||||
if (max_pfn > MAX_DMA32_PFN) {
|
if (max_pfn > MAX_DMA32_PFN) {
|
||||||
printk(KERN_WARNING "More than 4GB of memory "
|
printk(KERN_WARNING "More than 4GB of memory "
|
||||||
"but GART IOMMU not available.\n"
|
"but GART IOMMU not available.\n");
|
||||||
KERN_WARNING "falling back to iommu=soft.\n");
|
printk(KERN_WARNING "falling back to iommu=soft.\n");
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -868,7 +868,8 @@ void __init gart_parse_options(char *p)
|
||||||
if (!strncmp(p, "leak", 4)) {
|
if (!strncmp(p, "leak", 4)) {
|
||||||
leak_trace = 1;
|
leak_trace = 1;
|
||||||
p += 4;
|
p += 4;
|
||||||
if (*p == '=') ++p;
|
if (*p == '=')
|
||||||
|
++p;
|
||||||
if (isdigit(*p) && get_option(&p, &arg))
|
if (isdigit(*p) && get_option(&p, &arg))
|
||||||
iommu_leak_pages = arg;
|
iommu_leak_pages = arg;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,8 @@ extern int fix_aperture;
|
||||||
#define AMD64_GARTCACHECTL 0x9c
|
#define AMD64_GARTCACHECTL 0x9c
|
||||||
#define AMD64_GARTEN (1<<0)
|
#define AMD64_GARTEN (1<<0)
|
||||||
|
|
||||||
|
extern int agp_amd64_init(void);
|
||||||
|
|
||||||
static inline void enable_gart_translation(struct pci_dev *dev, u64 addr)
|
static inline void enable_gart_translation(struct pci_dev *dev, u64 addr)
|
||||||
{
|
{
|
||||||
u32 tmp, ctl;
|
u32 tmp, ctl;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче