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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKohpo=_BR49Og4MRPB9SfDEwnD3OoKwFWiCsTKNfpYFSyp25Q@mail.gmail.com>
Date:	Wed, 23 Jan 2013 15:21:42 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	Andy Shevchenko <andy.shevchenko@...il.com>
Cc:	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
	Vinod Koul <vinod.koul@...el.com>,
	linux-kernel@...r.kernel.org, spear-devel <spear-devel@...t.st.com>
Subject: Re: [PATCH 2/2] dw_dmac: return proper residue value

On 23 January 2013 15:06, Andy Shevchenko <andy.shevchenko@...il.com> wrote:
> On Wed, Jan 23, 2013 at 11:22 AM, Viresh Kumar <viresh.kumar@...aro.org> wrote:

>> Firstly i believe we can have a union of both list_heads as only one is used
>> at any time. Can you patch it down?
>
> Okay, separately and later to avoid additional testing. Will it work for you?

Yes.

>> Second to solve your problem, you can add another field here: total_len.
>> I know it will consume 4 bytes per desc but i think that's the drawback we need
>> to accept.
>
> I found already better solution I guess.

Wow!!

> I introduced two functions to get amount of sent bytes like
>
> u32 calc_sent(u32 ctlhi, u32 ctllo)
> {
>  return f1(ctlhi) * f2(ctllo);
> }
>
> u32 get_sent(dwc)
> {
>  return calc_sent(read(CTL_HI), read(CTL_LO));
> }
>
> And usage like
>
> /* initial residue */
> desc->len - calc_sent(desc->lli.ctlhi, desc->lli.ctllo).
>
> What do you think?

You plan to use it for
- the first descriptor in a list as others already have length embedded in them?
- And the descriptor currently getting used, by reading its ctlhi/lo
from registers
  instead of lli.*** ?

Looks good. but still keeping len of individual descriptors in all
descriptors leaving
the first one is not the code i would like to keep :)
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ