diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-28 11:39:19 -0800 | 
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-28 11:39:19 -0800 | 
| commit | 81d6e59dabb1ae0c782e9eb7e3d88f699d25b314 (patch) | |
| tree | 532afd14c119f1c95206ef0d23db9c4c26a0aa34 /arch/sh/mm/consistent.c | |
| parent | 4a6908a3a050aacc9c3a2f36b276b46c0629ad91 (diff) | |
| parent | 59de580af1c2fd671b0cb27c41ff958859ae5288 (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (132 commits)
  sh: oprofile: Fix up the module build.
  sh: add UIO support for JPU on SH7722.
  serial: sh-sci: Fix up port pinmux for SH7366.
  sh: mach-rsk: Use uImage generation by default for rsk7201/7203.
  sh: mach-sh03: Fix up pata_platform build breakage.
  sh: enable deferred io LCDC on Migo-R
  video: sh_mobile_lcdcfb deferred io support
  video: deferred io with physically contiguous memory
  video: deferred io cleanup
  video: fix deferred io fsync()
  sh: add LCDC interrupt configuration to AP325 and Migo-R
  sh_mobile_lcdc: use FB_SYS helpers instead of FB_CFB
  sh: split coherent pages
  sh: dma: Kill off ISA DMA wrapper.
  sh: Conditionalize the code dumper on CONFIG_DUMP_CODE.
  sh: Kill off the unused SH_ALPHANUMERIC debug option.
  sh: Enable skipping of bss on debug platforms for sh32 also.
  doc: Update sh cpufreq documentation.
  sh: mrshpc_setup_windows() needs to be inline.
  serial: sh-sci: sci_poll_get_char() is only used by CONFIG_CONSOLE_POLL.
  ...
Diffstat (limited to 'arch/sh/mm/consistent.c')
| -rw-r--r-- | arch/sh/mm/consistent.c | 7 | 
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/sh/mm/consistent.c b/arch/sh/mm/consistent.c index 9f8ea3ada4db..edcd5fbf9651 100644 --- a/arch/sh/mm/consistent.c +++ b/arch/sh/mm/consistent.c @@ -42,6 +42,8 @@ void *dma_alloc_coherent(struct device *dev, size_t size,  		return NULL;  	} +	split_page(pfn_to_page(virt_to_phys(ret) >> PAGE_SHIFT), order); +  	*dma_handle = virt_to_phys(ret);  	return ret_nocache;  } @@ -51,10 +53,13 @@ void dma_free_coherent(struct device *dev, size_t size,  			 void *vaddr, dma_addr_t dma_handle)  {  	int order = get_order(size); +	unsigned long pfn = dma_handle >> PAGE_SHIFT; +	int k;  	if (!dma_release_from_coherent(dev, order, vaddr)) {  		WARN_ON(irqs_disabled());	/* for portability */ -		free_pages((unsigned long)phys_to_virt(dma_handle), order); +		for (k = 0; k < (1 << order); k++) +			__free_pages(pfn_to_page(pfn + k), 0);  		iounmap(vaddr);  	}  }  | 
