diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2010-09-08 11:29:51 -0400 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-09-08 16:20:06 -0400 |
commit | e2404e7c3fe6f46e161edf085c6d9bea06ebe488 (patch) | |
tree | 0d799bb55f9f508d2df4712d0ce3ac7d9fc63600 /drivers | |
parent | 02c026ced58f33bb5702d3063c05dae2b651e4ba (diff) |
agp/intel: make intel-gtt.c into a real source file
Now that the disentangling is complete, stop including intel-gtt.c
from intel-agp.c.
The linux build system _really_ doesn't allow .c source files with the
same name as the module. It fails with the following message when trying
to build such a bugger:
make[3]: Circular drivers/char/agp/intel-agp.o <- drivers/char/agp/intel-agp.o dependency dropped.
Instead of renameing intel-agp.c I've simply created a new module out
of intel-gtt.c. Renaming intel-agp.ko to something else is not an option
for it will surely kill someones boot process.
This also paves the way to use the gtt code without loading the agp
driver.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/agp/Makefile | 1 | ||||
-rw-r--r-- | drivers/char/agp/intel-agp.c | 3 | ||||
-rw-r--r-- | drivers/char/agp/intel-agp.h | 3 | ||||
-rw-r--r-- | drivers/char/agp/intel-gtt.c | 20 |
4 files changed, 22 insertions, 5 deletions
diff --git a/drivers/char/agp/Makefile b/drivers/char/agp/Makefile index 627f542827c7..8eb56e273e75 100644 --- a/drivers/char/agp/Makefile +++ b/drivers/char/agp/Makefile | |||
@@ -13,6 +13,7 @@ obj-$(CONFIG_AGP_HP_ZX1) += hp-agp.o | |||
13 | obj-$(CONFIG_AGP_PARISC) += parisc-agp.o | 13 | obj-$(CONFIG_AGP_PARISC) += parisc-agp.o |
14 | obj-$(CONFIG_AGP_I460) += i460-agp.o | 14 | obj-$(CONFIG_AGP_I460) += i460-agp.o |
15 | obj-$(CONFIG_AGP_INTEL) += intel-agp.o | 15 | obj-$(CONFIG_AGP_INTEL) += intel-agp.o |
16 | obj-$(CONFIG_AGP_INTEL) += intel-gtt.o | ||
16 | obj-$(CONFIG_AGP_NVIDIA) += nvidia-agp.o | 17 | obj-$(CONFIG_AGP_NVIDIA) += nvidia-agp.o |
17 | obj-$(CONFIG_AGP_SGI_TIOCA) += sgi-agp.o | 18 | obj-$(CONFIG_AGP_SGI_TIOCA) += sgi-agp.o |
18 | obj-$(CONFIG_AGP_SIS) += sis-agp.o | 19 | obj-$(CONFIG_AGP_SIS) += sis-agp.o |
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c index c818a4d50eab..5cd2221ab472 100644 --- a/drivers/char/agp/intel-agp.c +++ b/drivers/char/agp/intel-agp.c | |||
@@ -12,9 +12,6 @@ | |||
12 | #include <asm/smp.h> | 12 | #include <asm/smp.h> |
13 | #include "agp.h" | 13 | #include "agp.h" |
14 | #include "intel-agp.h" | 14 | #include "intel-agp.h" |
15 | #include <linux/intel-gtt.h> | ||
16 | |||
17 | #include "intel-gtt.c" | ||
18 | 15 | ||
19 | int intel_agp_enabled; | 16 | int intel_agp_enabled; |
20 | EXPORT_SYMBOL(intel_agp_enabled); | 17 | EXPORT_SYMBOL(intel_agp_enabled); |
diff --git a/drivers/char/agp/intel-agp.h b/drivers/char/agp/intel-agp.h index ee189c74d345..bf03afc57cb7 100644 --- a/drivers/char/agp/intel-agp.h +++ b/drivers/char/agp/intel-agp.h | |||
@@ -253,4 +253,7 @@ | |||
253 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IRONLAKE_MC2_HB || \ | 253 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IRONLAKE_MC2_HB || \ |
254 | IS_SNB) | 254 | IS_SNB) |
255 | 255 | ||
256 | int intel_gmch_probe(struct pci_dev *pdev, | ||
257 | struct agp_bridge_data *bridge); | ||
258 | void intel_gmch_remove(struct pci_dev *pdev); | ||
256 | #endif | 259 | #endif |
diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c index 6a89ab8fe605..72f937615056 100644 --- a/drivers/char/agp/intel-gtt.c +++ b/drivers/char/agp/intel-gtt.c | |||
@@ -15,6 +15,17 @@ | |||
15 | * /fairy-tale-mode off | 15 | * /fairy-tale-mode off |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/module.h> | ||
19 | #include <linux/pci.h> | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/kernel.h> | ||
22 | #include <linux/pagemap.h> | ||
23 | #include <linux/agp_backend.h> | ||
24 | #include <asm/smp.h> | ||
25 | #include "agp.h" | ||
26 | #include "intel-agp.h" | ||
27 | #include <linux/intel-gtt.h> | ||
28 | |||
18 | /* | 29 | /* |
19 | * If we have Intel graphics, we're not going to have anything other than | 30 | * If we have Intel graphics, we're not going to have anything other than |
20 | * an Intel IOMMU. So make the correct use of the PCI DMA API contingent | 31 | * an Intel IOMMU. So make the correct use of the PCI DMA API contingent |
@@ -1728,7 +1739,7 @@ static int find_gmch(u16 device) | |||
1728 | return 1; | 1739 | return 1; |
1729 | } | 1740 | } |
1730 | 1741 | ||
1731 | int __devinit intel_gmch_probe(struct pci_dev *pdev, | 1742 | int intel_gmch_probe(struct pci_dev *pdev, |
1732 | struct agp_bridge_data *bridge) | 1743 | struct agp_bridge_data *bridge) |
1733 | { | 1744 | { |
1734 | int i, mask; | 1745 | int i, mask; |
@@ -1766,9 +1777,14 @@ int __devinit intel_gmch_probe(struct pci_dev *pdev, | |||
1766 | 1777 | ||
1767 | return 1; | 1778 | return 1; |
1768 | } | 1779 | } |
1780 | EXPORT_SYMBOL(intel_gmch_probe); | ||
1769 | 1781 | ||
1770 | void __devexit intel_gmch_remove(struct pci_dev *pdev) | 1782 | void intel_gmch_remove(struct pci_dev *pdev) |
1771 | { | 1783 | { |
1772 | if (intel_private.pcidev) | 1784 | if (intel_private.pcidev) |
1773 | pci_dev_put(intel_private.pcidev); | 1785 | pci_dev_put(intel_private.pcidev); |
1774 | } | 1786 | } |
1787 | EXPORT_SYMBOL(intel_gmch_remove); | ||
1788 | |||
1789 | MODULE_AUTHOR("Dave Jones <davej@redhat.com>"); | ||
1790 | MODULE_LICENSE("GPL and additional rights"); | ||