Commit 6025ca4c authored by Dave Jones's avatar Dave Jones

[AGPGART] Fix masking (causes crash on 460GX).

virt_to_page(phys_to_virt(masked_addr)) still works.  But the 460GX
sticks bits in the middle, so the free blows up.

I've tested the agp_allocate_memory() change on Intel 460GX.  I don't have
hardware to test the Intel MCH change, but it looks to me like the same
problem.
Signed-off-by: default avatarBjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: default avatarDave Jones <davej@redhat.com>
parent b7b558cd
......@@ -204,8 +204,7 @@ struct agp_memory *agp_allocate_memory(size_t page_count, u32 type)
agp_free_memory(new);
return NULL;
}
new->memory[i] =
agp_bridge->driver->mask_memory(virt_to_phys(addr), type);
new->memory[i] = virt_to_phys(addr);
new->page_count++;
}
......
......@@ -51,7 +51,7 @@ static struct agp_memory *alloc_agpphysmem_i8xx(size_t pg_count, int type)
if (new == NULL)
return NULL;
new->memory[0] = agp_bridge->driver->mask_memory(virt_to_phys(addr), type);
new->memory[0] = virt_to_phys(addr);
new->page_count = 1;
new->num_scratch_pages = 1;
new->type = AGP_PHYS_MEMORY;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment