Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 98b96173 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart

* master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart:
  [AGPGART] sworks-agp: Switch to PCI ref counting APIs
  [AGPGART] Nvidia AGP: Use refcount aware PCI interfaces
  [AGPGART] Fix sparse warning in sgi-agp.c
  [AGPGART] Intel-agp adjustments
  [AGPGART] Move [un]map_page_into_agp into asm/agp.h
  [AGPGART] Add missing calls to global_flush_tlb() to ali-agp
  [AGPGART] prevent probe collision of sis-agp and amd64_agp
parents cf8ba7a9 881ba59d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -145,6 +145,7 @@ static void *m1541_alloc_page(struct agp_bridge_data *bridge)
	void *addr = agp_generic_alloc_page(agp_bridge);
	u32 temp;

	global_flush_tlb();
	if (!addr)
		return NULL;

@@ -160,6 +161,7 @@ static void ali_destroy_page(void * addr)
	if (addr) {
		global_cache_flush();	/* is this really needed?  --hch */
		agp_generic_destroy_page(addr);
		global_flush_tlb();
	}
}

+0 −22
Original line number Diff line number Diff line
@@ -51,28 +51,6 @@ int agp_memory_reserved;
 */
EXPORT_SYMBOL_GPL(agp_memory_reserved);

#if defined(CONFIG_X86)
int map_page_into_agp(struct page *page)
{
	int i;
	i = change_page_attr(page, 1, PAGE_KERNEL_NOCACHE);
	/* Caller's responsibility to call global_flush_tlb() for
	 * performance reasons */
	return i;
}
EXPORT_SYMBOL_GPL(map_page_into_agp);

int unmap_page_from_agp(struct page *page)
{
	int i;
	i = change_page_attr(page, 1, PAGE_KERNEL);
	/* Caller's responsibility to call global_flush_tlb() for
	 * performance reasons */
	return i;
}
EXPORT_SYMBOL_GPL(unmap_page_from_agp);
#endif

/*
 * Generic routines for handling agp_memory structures -
 * They use the basic page allocation routines to do the brunt of the work.
+3 −5
Original line number Diff line number Diff line
@@ -186,8 +186,9 @@ static void *i8xx_alloc_pages(void)
		return NULL;

	if (change_page_attr(page, 4, PAGE_KERNEL_NOCACHE) < 0) {
		change_page_attr(page, 4, PAGE_KERNEL);
		global_flush_tlb();
		__free_page(page);
		__free_pages(page, 2);
		return NULL;
	}
	global_flush_tlb();
@@ -209,7 +210,7 @@ static void i8xx_destroy_pages(void *addr)
	global_flush_tlb();
	put_page(page);
	unlock_page(page);
	free_pages((unsigned long)addr, 2);
	__free_pages(page, 2);
	atomic_dec(&agp_bridge->current_memory_agp);
}

@@ -315,9 +316,6 @@ static struct agp_memory *alloc_agpphysmem_i8xx(size_t pg_count, int type)
	struct agp_memory *new;
	void *addr;

	if (pg_count != 1 && pg_count != 4)
		return NULL;

	switch (pg_count) {
	case 1: addr = agp_bridge->driver->agp_alloc_page(agp_bridge);
		global_flush_tlb();
+6 −3
Original line number Diff line number Diff line
@@ -320,11 +320,11 @@ static int __devinit agp_nvidia_probe(struct pci_dev *pdev,
	u8 cap_ptr;

	nvidia_private.dev_1 =
		pci_find_slot((unsigned int)pdev->bus->number, PCI_DEVFN(0, 1));
		pci_get_bus_and_slot((unsigned int)pdev->bus->number, PCI_DEVFN(0, 1));
	nvidia_private.dev_2 =
		pci_find_slot((unsigned int)pdev->bus->number, PCI_DEVFN(0, 2));
		pci_get_bus_and_slot((unsigned int)pdev->bus->number, PCI_DEVFN(0, 2));
	nvidia_private.dev_3 =
		pci_find_slot((unsigned int)pdev->bus->number, PCI_DEVFN(30, 0));
		pci_get_bus_and_slot((unsigned int)pdev->bus->number, PCI_DEVFN(30, 0));

	if (!nvidia_private.dev_1 || !nvidia_private.dev_2 || !nvidia_private.dev_3) {
		printk(KERN_INFO PFX "Detected an NVIDIA nForce/nForce2 "
@@ -443,6 +443,9 @@ static int __init agp_nvidia_init(void)
static void __exit agp_nvidia_cleanup(void)
{
	pci_unregister_driver(&agp_nvidia_pci_driver);
	pci_dev_put(nvidia_private.dev_1);
	pci_dev_put(nvidia_private.dev_2);
	pci_dev_put(nvidia_private.dev_3);
}

module_init(agp_nvidia_init);
+2 −3
Original line number Diff line number Diff line
@@ -47,9 +47,8 @@ static void *sgi_tioca_alloc_page(struct agp_bridge_data *bridge)

	nid = info->ca_closest_node;
	page = alloc_pages_node(nid, GFP_KERNEL, 0);
	if (page == NULL) {
		return 0;
	}
	if (!page)
		return NULL;

	get_page(page);
	SetPageLocked(page);
Loading