Re: [PATCH v3] media:uvc_driver: add uvc support on no-mmu arch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 21, 2011 at 5:47 PM, Daniel GlÃckner <daniel-gl@xxxxxxx> wrote:
> On Thu, Apr 21, 2011 at 04:20:36PM +0800, Bob Liu wrote:
>> > on mmu systems do_mmap_pgoff contains a len = PAGE_ALIGN(len); line.
>> > If we depend on this behavior, why not do it here as well and get rid
>> > of the #ifdef?
>> >
>>
>> If do it in do_mmap_pgoff() the whole system will be effected, I am
>> not sure whether
>> it's correct and needed for other subsystem.
>
> With "here" I was referring to uvc_queue_mmap.
>

I am sorry, I didn't get your idea. You mean using  PAGE_ALIGN() here for both
mmu and no-mmu arch ?

>> >> + Â Â addr = (unsigned long)queue->mem + buffer->buf.m.offset;
>> >> + Â Â ret = addr;
>> >
>> > Why the intermediate step using addr?
>> >
>>
>> If don't return addr, do_mmap_pgoff() will return failure and we can't
>> setup vma correctly.
>> See mm/nommu.c line 1386(add = file->f_op->get_unmmapped_area() ).
>
> I know, but why not do
> Â Â Â Âret = (unsigned long)queue->mem + buffer->buf.m.offset;
> instead?
>

Okay.
Thanks

-- 
Regards,
--Bob
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux