Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 97617
b: refs/heads/master
c: cd76374
h: refs/heads/master
i:
  97615: c8f8390
v: v3
  • Loading branch information
Pavel Machek authored and Thomas Gleixner committed Jun 4, 2008
1 parent 2690531 commit 4d08f33
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 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: be524fb96081e9e511d993ebf39b05a32b19476e
refs/heads/master: cd76374e9de4501acc74f833dc6cb5e7a5dca115
31 changes: 30 additions & 1 deletion trunk/arch/x86/kernel/pci-gart_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <linux/kdebug.h>
#include <linux/scatterlist.h>
#include <linux/iommu-helper.h>
#include <linux/sysdev.h>
#include <asm/atomic.h>
#include <asm/io.h>
#include <asm/mtrr.h>
Expand Down Expand Up @@ -548,6 +549,28 @@ static __init unsigned read_aperture(struct pci_dev *dev, u32 *size)
return aper_base;
}

static int gart_resume(struct sys_device *dev)
{
return 0;
}

static int gart_suspend(struct sys_device *dev, pm_message_t state)
{
return -EINVAL;
}

static struct sysdev_class gart_sysdev_class = {
.name = "gart",
.suspend = gart_suspend,
.resume = gart_resume,

};

static struct sys_device device_gart = {
.id = 0,
.cls = &gart_sysdev_class,
};

/*
* Private Northbridge GATT initialization in case we cannot use the
* AGP driver for some reason.
Expand All @@ -558,7 +581,7 @@ static __init int init_k8_gatt(struct agp_kern_info *info)
unsigned aper_base, new_aper_base;
struct pci_dev *dev;
void *gatt;
int i;
int i, error;

printk(KERN_INFO "PCI-DMA: Disabling AGP.\n");
aper_size = aper_base = info->aper_size = 0;
Expand Down Expand Up @@ -606,6 +629,12 @@ static __init int init_k8_gatt(struct agp_kern_info *info)

pci_write_config_dword(dev, 0x90, ctl);
}

error = sysdev_class_register(&gart_sysdev_class);
if (!error)
error = sysdev_register(&device_gart);
if (error)
panic("Could not register gart_sysdev -- would corrupt data on next suspend");
flush_gart();

printk(KERN_INFO "PCI-DMA: aperture base @ %x size %u KB\n",
Expand Down

0 comments on commit 4d08f33

Please sign in to comment.