diff options
author | Dave Airlie <airlied@redhat.com> | 2009-06-12 00:11:41 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-06-18 20:21:42 -0400 |
commit | 07613ba2f464f59949266f4337b75b91eb610795 (patch) | |
tree | 8e43a82571686492aba2269c2e7a49c323783af1 /drivers/char/agp/efficeon-agp.c | |
parent | 2908826d045a89805714e0a3055a99dc40565d41 (diff) |
agp: switch AGP to use page array instead of unsigned long array
This switches AGP to use an array of pages for tracking the
pages allocated to the GART. This should enable GEM on PAE to work
a lot better as we can pass highmem pages to the PAT code and it will
do the right thing with them.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/char/agp/efficeon-agp.c')
-rw-r--r-- | drivers/char/agp/efficeon-agp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/char/agp/efficeon-agp.c b/drivers/char/agp/efficeon-agp.c index 453543a1f293..35d50f2861b6 100644 --- a/drivers/char/agp/efficeon-agp.c +++ b/drivers/char/agp/efficeon-agp.c | |||
@@ -65,8 +65,9 @@ static const struct gatt_mask efficeon_generic_masks[] = | |||
65 | }; | 65 | }; |
66 | 66 | ||
67 | /* This function does the same thing as mask_memory() for this chipset... */ | 67 | /* This function does the same thing as mask_memory() for this chipset... */ |
68 | static inline unsigned long efficeon_mask_memory(unsigned long addr) | 68 | static inline unsigned long efficeon_mask_memory(struct page *page) |
69 | { | 69 | { |
70 | unsigned long addr = phys_to_gart(page_to_phys(page)); | ||
70 | return addr | 0x00000001; | 71 | return addr | 0x00000001; |
71 | } | 72 | } |
72 | 73 | ||
@@ -257,7 +258,7 @@ static int efficeon_insert_memory(struct agp_memory * mem, off_t pg_start, int t | |||
257 | last_page = NULL; | 258 | last_page = NULL; |
258 | for (i = 0; i < count; i++) { | 259 | for (i = 0; i < count; i++) { |
259 | int index = pg_start + i; | 260 | int index = pg_start + i; |
260 | unsigned long insert = efficeon_mask_memory(mem->memory[i]); | 261 | unsigned long insert = efficeon_mask_memory(mem->pages[i]); |
261 | 262 | ||
262 | page = (unsigned int *) efficeon_private.l1_table[index >> 10]; | 263 | page = (unsigned int *) efficeon_private.l1_table[index >> 10]; |
263 | 264 | ||