Re: [PATCH 10/11] x86, rwsem: provide __down_write_killable

From
Michal Hocko <mhocko@kernel.org>
Date
2016-04-20 20:58:34
Also in
linux-arch, linux-s390, linux-sh, lkml, sparclinux
Reply to
Borislav Petkov, 2016-04-20
On Wed 20-04-16 22:45:01, Borislav Petkov wrote:
On Wed, Apr 20, 2016 at 11:04:05AM -0700, H. Peter Anvin wrote:
quoted
The reason it breaks is because the same register can't be an
input-output register and a separate input. However, the input side of
the input-output is probably undefined, and so gcc may not notice.
So Michal and I talked about this a while ago. Why do we need the '"a"
(sem)' input dependency if '"+a" (ret)' already supplies the same thing?

There's also that "=d" (tmp) thing which we don't really need as an
output, right?

I.e., can we simplify like this?
I am for any simplification, my gcc-asm-foo is just too weak and I
wanted my change to be as minimal as possible. So if you feel you can
clean up this I would more than welcome that. Maybe a follow up patch
would be a better approach so that we can check that the generated code
hasn't changed.

Thanks!
-- 
Michal Hocko
SUSE Labs
Thread (35 messages) 35 messages, 6 authors, last reply 2016-04-27
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help