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>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 18 Oct 2013 01:10:36 +0100
From:	Mark Brown <broonie@...nel.org>
To:	Yi Zhang <yizhang@...vell.com>
Cc:	zhouqiao@...vell.com, zhangwm@...vell.com, yizhang.mrvl@...il.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] regmap: irq: clear status when disable irq

On Tue, Oct 15, 2013 at 08:23:30PM +0800, Yi Zhang wrote:

I'm still not sure this is doing the right thing.

> +			for (j = 0; j < bits_length; j++) {
> +				if (!(d->mask_buf[i] & (0x1 << j))) {

This is checking to see if the bit is masked...

> +					ret = regmap_update_bits(d->map, reg,
> +								 (0x1 << j), 0);

...then writing a zero to that bit.  For most chips with a write 1 to
clear acknowledge this will result in all set bits in the register being
acked except the currently masked one (though if there are two masked
bits all will be acked).

It would be much quicker to just write mask_buf[i] back to the device to
acknoweldge all masked bits at once rather than try to do it
individually and the result should be the same unless the chip requires
us to set zero (which probably ought to be a quirk).

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ