lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:   Fri, 23 Oct 2020 13:24:26 -0600
From:   Jeffrey Hugo <jhugo@...eaurora.org>
To:     Loic Poulain <loic.poulain@...aro.org>,
        Hemant Kumar <hemantk@...eaurora.org>
Cc:     davem@...emloft.net, Jakub Kicinski <kuba@...nel.org>,
        netdev@...r.kernel.org,
        Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
        Eric Dumazet <eric.dumazet@...il.com>,
        Bhaumik Bhatt <bbhatt@...eaurora.org>
Subject: Re: [PATCH v6 1/2] bus: mhi: Add mhi_queue_is_full function

On 10/23/2020 1:11 PM, Loic Poulain wrote:
> Hi Hemant,
> 
> On Fri, 23 Oct 2020 at 05:06, Hemant Kumar <hemantk@...eaurora.org 
> <mailto:hemantk@...eaurora.org>> wrote:
> 
>     Hi Loic,
> 
>     On 10/16/20 2:20 AM, Loic Poulain wrote:
>      > This function can be used by client driver to determine whether it's
>      > possible to queue new elements in a channel ring.
>      >
>      > Signed-off-by: Loic Poulain <loic.poulain@...aro.org
>     <mailto:loic.poulain@...aro.org>>
>     [..]
>      > +static inline bool mhi_is_ring_full(struct mhi_controller
>     *mhi_cntrl,
>      > +                                 struct mhi_ring *ring)
>      >   {
>      >       void *tmp = ring->wp + ring->el_size;
>      >
>      > @@ -1173,6 +1173,17 @@ int mhi_queue_buf(struct mhi_device
>     *mhi_dev, enum dma_data_direction dir,
>      >   }
>      >   EXPORT_SYMBOL_GPL(mhi_queue_buf);
>      >
>      > +bool mhi_queue_is_full(struct mhi_device *mhi_dev, enum
>     dma_data_direction dir)
>      > +{
>      > +     struct mhi_controller *mhi_cntrl = mhi_dev->mhi_cntrl;
>      > +     struct mhi_chan *mhi_chan = (dir == DMA_TO_DEVICE) ?
>      > +                                     mhi_dev->ul_chan :
>     mhi_dev->dl_chan;
>      > +     struct mhi_ring *tre_ring = &mhi_chan->tre_ring;
>      > +
>      > +     return mhi_is_ring_full(mhi_cntrl, tre_ring);
>      > +}
>      > +EXPORT_SYMBOL_GPL(mhi_queue_is_full);
>      >
>     i was wondering if you can make use of mhi_get_free_desc() API (pushed
>     as part of MHI UCI - User Control Interface driver) here?
> 
> 
> I prefer not to depend on PR that is not yet merged to keep things 
> simple, though I could integrate it in my PR... I think this function is 
> good to have anyway for client drivers, and slightly faster since this 
> is just a pointer comparison.

Its a little bit more than that.  Frankly, unless you are counting 
assembly instructions for both methods, the difference is likely to be 
in the noise.

However, I wonder why core MHI changes were not copied to the proper 
list (namely linux-arm-msm)?

-- 
Jeffrey Hugo
Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ