diff options
Diffstat (limited to 'drivers/char/agp/i460-agp.c')
-rw-r--r-- | drivers/char/agp/i460-agp.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/char/agp/i460-agp.c b/drivers/char/agp/i460-agp.c index 58944cd271ea..34a444658ffe 100644 --- a/drivers/char/agp/i460-agp.c +++ b/drivers/char/agp/i460-agp.c | |||
@@ -111,8 +111,10 @@ static int i460_fetch_size (void) | |||
111 | 111 | ||
112 | if (i460.io_page_shift != I460_IO_PAGE_SHIFT) { | 112 | if (i460.io_page_shift != I460_IO_PAGE_SHIFT) { |
113 | printk(KERN_ERR PFX | 113 | printk(KERN_ERR PFX |
114 | "I/O (GART) page-size %ZuKB doesn't match expected size %ZuKB\n", | 114 | "I/O (GART) page-size %luKB doesn't match expected " |
115 | 1UL << (i460.io_page_shift - 10), 1UL << (I460_IO_PAGE_SHIFT)); | 115 | "size %luKB\n", |
116 | 1UL << (i460.io_page_shift - 10), | ||
117 | 1UL << (I460_IO_PAGE_SHIFT)); | ||
116 | return 0; | 118 | return 0; |
117 | } | 119 | } |
118 | 120 | ||
@@ -514,9 +516,10 @@ static void *i460_alloc_page (struct agp_bridge_data *bridge) | |||
514 | { | 516 | { |
515 | void *page; | 517 | void *page; |
516 | 518 | ||
517 | if (I460_IO_PAGE_SHIFT <= PAGE_SHIFT) | 519 | if (I460_IO_PAGE_SHIFT <= PAGE_SHIFT) { |
518 | page = agp_generic_alloc_page(agp_bridge); | 520 | page = agp_generic_alloc_page(agp_bridge); |
519 | else | 521 | global_flush_tlb(); |
522 | } else | ||
520 | /* Returning NULL would cause problems */ | 523 | /* Returning NULL would cause problems */ |
521 | /* AK: really dubious code. */ | 524 | /* AK: really dubious code. */ |
522 | page = (void *)~0UL; | 525 | page = (void *)~0UL; |
@@ -525,8 +528,10 @@ static void *i460_alloc_page (struct agp_bridge_data *bridge) | |||
525 | 528 | ||
526 | static void i460_destroy_page (void *page) | 529 | static void i460_destroy_page (void *page) |
527 | { | 530 | { |
528 | if (I460_IO_PAGE_SHIFT <= PAGE_SHIFT) | 531 | if (I460_IO_PAGE_SHIFT <= PAGE_SHIFT) { |
529 | agp_generic_destroy_page(page); | 532 | agp_generic_destroy_page(page); |
533 | global_flush_tlb(); | ||
534 | } | ||
530 | } | 535 | } |
531 | 536 | ||
532 | #endif /* I460_LARGE_IO_PAGES */ | 537 | #endif /* I460_LARGE_IO_PAGES */ |
@@ -536,7 +541,7 @@ static unsigned long i460_mask_memory (struct agp_bridge_data *bridge, | |||
536 | { | 541 | { |
537 | /* Make sure the returned address is a valid GATT entry */ | 542 | /* Make sure the returned address is a valid GATT entry */ |
538 | return bridge->driver->masks[0].mask | 543 | return bridge->driver->masks[0].mask |
539 | | (((addr & ~((1 << I460_IO_PAGE_SHIFT) - 1)) & 0xffffff000) >> 12); | 544 | | (((addr & ~((1 << I460_IO_PAGE_SHIFT) - 1)) & 0xfffff000) >> 12); |
540 | } | 545 | } |
541 | 546 | ||
542 | struct agp_bridge_driver intel_i460_driver = { | 547 | struct agp_bridge_driver intel_i460_driver = { |