[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANBwrj_WAqQs+-Jnj+nTBVE-1YuK6XwFeZN6biLGge+9TvZXeg@mail.gmail.com>
Date: Wed, 13 Jun 2012 14:42:49 +0800
From: Raymond Wu <wxy412@...il.com>
To: linux-kernel@...r.kernel.org
Cc: xywu@...vell.com
Subject: Re: UIO driver multi-instance issue discussion
Hi guys,
>
> I'm not sure who is the maintainer for UIO driver. Please help if you know something. Thanks in advance!
>
>
> Recently, we have some trouble when using UIO as our VPU driver.
>
> Issue description:
>
> · This issue comes from the so called "multi-instance case". This means that for one H/W device, it can be opened multiple times.
>
> · Each instance will be assigned with a FD(file descriptor) and its own uio_listener.
>
> · After one H/W interrupt comes, the global uio_device.event has been +1 ( See atomic_inc(&idev->event); ) while all other instance’s uio_listener->event_count is not +1.
>
> · So, if we have 1+ instances waiting for interrupt, all of them will be woken up because listener->event_count != event_count.
>
>
>
> Solution:
>
> · Export uio_device definition to uio.h or uio_driver.h, so that we can sync the event_count for all instances in the private driver.
>
> · Add new uio_sync_event(struct file *filep) function in uio.c, so that we can call it directly when we want to sync the event count.
>
>
>
> Please advise which one is recommended or you can propose a new one. We have a plan to submit a patch to open source community to improve it.
>
>
>
> BTW, personally, I’m curious that why you put the uio_device definition within uio.c, is there any special reason for it?
>
>
>
> Thanks,
> Raymond
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists