diff options
-rw-r--r-- | arch/arm/mm/fault.c | 2 | ||||
-rw-r--r-- | drivers/staging/media/sunxi/cedar/ion/ion_cma_heap.c | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index 34a9410e40bb..16f03c6c49bf 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c @@ -446,6 +446,8 @@ static int cedar_page_fault(struct mm_struct *mm, unsigned long addr, // printk(KERN_ERR "fault: addr %#x pc %#x\n", addr, pc_addr); + printk(KERN_ERR ">> cedar-pc %#x\n", pc_addr); + copy_from_user_nofault(&insn_orig, (unsigned long *)pc_addr, sizeof(insn_orig)); /* No emulate, no checkers */ diff --git a/drivers/staging/media/sunxi/cedar/ion/ion_cma_heap.c b/drivers/staging/media/sunxi/cedar/ion/ion_cma_heap.c index f2f126f4fcf6..2e4a9dd73dd5 100644 --- a/drivers/staging/media/sunxi/cedar/ion/ion_cma_heap.c +++ b/drivers/staging/media/sunxi/cedar/ion/ion_cma_heap.c @@ -81,6 +81,9 @@ static int ion_cma_allocate(struct ion_heap *heap, struct ion_buffer *buffer, buffer->priv_virt = info; buffer->sg_table = info->table; dev_dbg(dev, "Allocate buffer %p\n", buffer); + + printk(KERN_ERR "ion-cma-alloc: buffer %#x size %#x\n", info->handle, len); + return 0; free_table: @@ -98,6 +101,8 @@ static void ion_cma_free(struct ion_buffer *buffer) struct device *dev = cma_heap->dev; struct ion_cma_buffer_info *info = buffer->priv_virt; + printk(KERN_ERR "ion-cma-free: buffer %#x\n", info->handle); + dev_dbg(dev, "Release buffer %p\n", buffer); /* release memory */ dma_free_coherent(dev, buffer->size, info->cpu_addr, info->handle); @@ -120,7 +125,9 @@ static int ion_cma_mmap(struct ion_heap *mapper, struct ion_buffer *buffer, vma->vm_end - vma->vm_start, vma->vm_page_prot); } - + + printk(KERN_ERR "ion-cma-mmap: buffer %#x to %#x\n", info->handle, vma->vm_start); + return dma_mmap_coherent(dev, vma, info->cpu_addr, info->handle, buffer->size); } |