Re: [PATCH 1/3] platform/x86/intel: pmt: Remove bin_attribute mmap support to runtime pm

From: David E. Box
Date: Mon Feb 21 2022 - 12:07:06 EST


On Mon, 2022-02-21 at 10:05 +0100, Hans de Goede wrote:
> Hi,
>
> On 2/14/22 22:32, David E. Box wrote:
> > PMT devices need to support runtime D3. However, binary attributes
> > don't
> > provide access to open/release methods that could be used to
> > control
> > runtime pm. Therefore, remove the mmap operation. The data may
> > still be
> > accessed with read() calls.
> >
> > Signed-off-by: David E. Box <david.e.box@xxxxxxxxxxxxxxx>
> > ---
> > V0 comments:
> >
> > I expect that this is an undesirable solution because of the ABI
> > change.
> > I don't know if anyone is using this ABI outside of our Intel tools
> > which
> > are willing to make this change. I'd rather find a solution to keep
> > the
> > mmap support. I initially wrote a patch to simply add the missing
> > open and
> > release callbacks to binary attributes but this was thought to be
> > too heavy
> > handed in our internal review. I'm open to suggestions. Thanks.
>
> We really cannot go and break userspace API like this. Even if you
> are
> dropping mmap support from the Intel tools; and we assume that the
> Intel
> tools are the only consumer, then we still cannot drop mmap support
> because users may install a new kernel without updating the tools.
>
> The never break userspace rule applies here and that is a very clear
> and hard rule.
>
> So please respin the series using the approach with open and release
> callbacks.

Thanks Hans. I'll send out that series for comment.

David