[PATCH 08/10] soc: fujitsu: hwb: Add release operation

misono.tomohiro at fujitsu.com misono.tomohiro at fujitsu.com
Tue Jan 12 05:38:25 EST 2021


> On Fri, Jan 8, 2021 at 11:52 AM Misono Tomohiro
> <misono.tomohiro at jp.fujitsu.com> wrote:
> >
> > Upon release, we cleanup remaining resources/registers if necessary.
> > This happens when user does not call IOC_BB_FREE properly and the
> > function will do effectively the same operation as IOC_BB_FREE.
> >
> > Signed-off-by: Misono Tomohiro <misono.tomohiro at jp.fujitsu.com>
> 
> What is the benefit of calling IOC_BB_FREE instead of always relying
> on close() to do this? Would it be easier to just not implement IOC_BB_FREE?
> 

This is up to applications.
When the application want to reuse barrier driver resource with diffent
barrier settings (i.e. when changing which PEs joinining synchronization),
it can use IOC_BB_FREE rather than close and open device file again.

Regards,
Tomohiro


More information about the linux-arm-kernel mailing list