Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 83130
b: refs/heads/master
c: 6d6f8d5
h: refs/heads/master
v: v3
  • Loading branch information
Nick Piggin authored and Linus Torvalds committed Feb 5, 2008
1 parent d5d705f commit 9ca5f1f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 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: 2f78dcfd30955a48a2e738d08e4001ebd0e8402c
refs/heads/master: 6d6f8d52fd0ff5d3660368232f71c3224d7508e1
17 changes: 8 additions & 9 deletions trunk/drivers/char/agp/alpha-agp.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,28 @@

#include "agp.h"

static struct page *alpha_core_agp_vm_nopage(struct vm_area_struct *vma,
unsigned long address,
int *type)
static int alpha_core_agp_vm_fault(struct vm_area_struct *vma,
struct vm_fault *vmf)
{
alpha_agp_info *agp = agp_bridge->dev_private_data;
dma_addr_t dma_addr;
unsigned long pa;
struct page *page;

dma_addr = address - vma->vm_start + agp->aperture.bus_base;
dma_addr = (unsigned long)vmf->virtual_address - vma->vm_start
+ agp->aperture.bus_base;
pa = agp->ops->translate(agp, dma_addr);

if (pa == (unsigned long)-EINVAL)
return NULL; /* no translation */
return VM_FAULT_SIGBUS; /* no translation */

/*
* Get the page, inc the use count, and return it
*/
page = virt_to_page(__va(pa));
get_page(page);
if (type)
*type = VM_FAULT_MINOR;
return page;
vmf->page = page;
return 0;
}

static struct aper_size_info_fixed alpha_core_agp_sizes[] =
Expand All @@ -42,7 +41,7 @@ static struct aper_size_info_fixed alpha_core_agp_sizes[] =
};

struct vm_operations_struct alpha_core_agp_vm_ops = {
.nopage = alpha_core_agp_vm_nopage,
.fault = alpha_core_agp_vm_fault,
};


Expand Down

0 comments on commit 9ca5f1f

Please sign in to comment.