diff options
-rw-r--r-- | arch/sparc/kernel/ioport.c | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c index e87ed519ffaf..82ef20161910 100644 --- a/arch/sparc/kernel/ioport.c +++ b/arch/sparc/kernel/ioport.c | |||
@@ -383,7 +383,7 @@ void sbus_free_consistent(struct device *dev, long n, void *p, u32 ba) | |||
383 | kfree(res); | 383 | kfree(res); |
384 | 384 | ||
385 | /* mmu_inval_dma_area(va, n); */ /* it's consistent, isn't it */ | 385 | /* mmu_inval_dma_area(va, n); */ /* it's consistent, isn't it */ |
386 | pgv = mmu_translate_dvma(ba); | 386 | pgv = virt_to_page(p); |
387 | mmu_unmap_dma_area(ba, n); | 387 | mmu_unmap_dma_area(ba, n); |
388 | 388 | ||
389 | __free_pages(pgv, get_order(n)); | 389 | __free_pages(pgv, get_order(n)); |
@@ -428,46 +428,12 @@ void sbus_unmap_sg(struct device *dev, struct scatterlist *sg, int n, int direct | |||
428 | mmu_release_scsi_sgl(dev, sg, n); | 428 | mmu_release_scsi_sgl(dev, sg, n); |
429 | } | 429 | } |
430 | 430 | ||
431 | /* | ||
432 | */ | ||
433 | void sbus_dma_sync_single_for_cpu(struct device *dev, dma_addr_t ba, size_t size, int direction) | 431 | void sbus_dma_sync_single_for_cpu(struct device *dev, dma_addr_t ba, size_t size, int direction) |
434 | { | 432 | { |
435 | #if 0 | ||
436 | unsigned long va; | ||
437 | struct resource *res; | ||
438 | |||
439 | /* We do not need the resource, just print a message if invalid. */ | ||
440 | res = _sparc_find_resource(&_sparc_dvma, ba); | ||
441 | if (res == NULL) | ||
442 | panic("sbus_dma_sync_single: 0x%x\n", ba); | ||
443 | |||
444 | va = page_address(mmu_translate_dvma(ba)); /* XXX higmem */ | ||
445 | /* | ||
446 | * XXX This bogosity will be fixed with the iommu rewrite coming soon | ||
447 | * to a kernel near you. - Anton | ||
448 | */ | ||
449 | /* mmu_inval_dma_area(va, (size + PAGE_SIZE-1) & PAGE_MASK); */ | ||
450 | #endif | ||
451 | } | 433 | } |
452 | 434 | ||
453 | void sbus_dma_sync_single_for_device(struct device *dev, dma_addr_t ba, size_t size, int direction) | 435 | void sbus_dma_sync_single_for_device(struct device *dev, dma_addr_t ba, size_t size, int direction) |
454 | { | 436 | { |
455 | #if 0 | ||
456 | unsigned long va; | ||
457 | struct resource *res; | ||
458 | |||
459 | /* We do not need the resource, just print a message if invalid. */ | ||
460 | res = _sparc_find_resource(&_sparc_dvma, ba); | ||
461 | if (res == NULL) | ||
462 | panic("sbus_dma_sync_single: 0x%x\n", ba); | ||
463 | |||
464 | va = page_address(mmu_translate_dvma(ba)); /* XXX higmem */ | ||
465 | /* | ||
466 | * XXX This bogosity will be fixed with the iommu rewrite coming soon | ||
467 | * to a kernel near you. - Anton | ||
468 | */ | ||
469 | /* mmu_inval_dma_area(va, (size + PAGE_SIZE-1) & PAGE_MASK); */ | ||
470 | #endif | ||
471 | } | 437 | } |
472 | 438 | ||
473 | /* Support code for sbus_init(). */ | 439 | /* Support code for sbus_init(). */ |