From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H. Peter Anvin" Subject: Re: [PATCH 10/11] x86, rwsem: provide __down_write_killable Date: Wed, 20 Apr 2016 14:06:33 -0700 Message-ID: <5717EF59.1030709@zytor.com> References: <1460041951-22347-1-git-send-email-mhocko@kernel.org> <1460041951-22347-11-git-send-email-mhocko@kernel.org> <20160413090829.GB29579@gmail.com> <20160413091625.GF14351@dhcp22.suse.cz> <20160413091943.GA17858@gmail.com> <20160413102731.GA29896@gmail.com> <20160413124943.GH14351@dhcp22.suse.cz> <20160420134019.GX3448@twins.programming.kicks-ass.net> <91A11395-ACAA-4043-B770-2DF6CBAED54C@zytor.com> <20160420204501.GA6815@pd.tnic> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20160420204501.GA6815@pd.tnic> Sender: linux-ia64-owner@vger.kernel.org To: Borislav Petkov Cc: Peter Zijlstra , Michal Hocko , Ingo Molnar , LKML , Ingo Molnar , Thomas Gleixner , "David S. Miller" , Tony Luck , Andrew Morton , Chris Zankel , Max Filippov , x86@kernel.org, linux-alpha@vger.kernel.org, linux-ia64@vger.kernel.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-xtensa@linux-xtensa.org, linux-arch@vger.kernel.org, Josh Poimboeuf List-Id: linux-arch.vger.kernel.org On 04/20/2016 01:45 PM, Borislav Petkov wrote: > On Wed, Apr 20, 2016 at 11:04:05AM -0700, H. Peter Anvin wrote: >> 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? > Setting ret to sem doesn't make any sense. Just use "=a" and "a". -hpa From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from terminus.zytor.com ([198.137.202.10]:45694 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751150AbcDTVJL (ORCPT ); Wed, 20 Apr 2016 17:09:11 -0400 Subject: Re: [PATCH 10/11] x86, rwsem: provide __down_write_killable References: <1460041951-22347-1-git-send-email-mhocko@kernel.org> <1460041951-22347-11-git-send-email-mhocko@kernel.org> <20160413090829.GB29579@gmail.com> <20160413091625.GF14351@dhcp22.suse.cz> <20160413091943.GA17858@gmail.com> <20160413102731.GA29896@gmail.com> <20160413124943.GH14351@dhcp22.suse.cz> <20160420134019.GX3448@twins.programming.kicks-ass.net> <91A11395-ACAA-4043-B770-2DF6CBAED54C@zytor.com> <20160420204501.GA6815@pd.tnic> From: "H. Peter Anvin" Message-ID: <5717EF59.1030709@zytor.com> Date: Wed, 20 Apr 2016 14:06:33 -0700 MIME-Version: 1.0 In-Reply-To: <20160420204501.GA6815@pd.tnic> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-arch-owner@vger.kernel.org List-ID: To: Borislav Petkov Cc: Peter Zijlstra , Michal Hocko , Ingo Molnar , LKML , Ingo Molnar , Thomas Gleixner , "David S. Miller" , Tony Luck , Andrew Morton , Chris Zankel , Max Filippov , x86@kernel.org, linux-alpha@vger.kernel.org, linux-ia64@vger.kernel.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-xtensa@linux-xtensa.org, linux-arch@vger.kernel.org, Josh Poimboeuf Message-ID: <20160420210633.EQclLuEW5CGzAx6kqy6gIrbwuolHXwBF98JBH85rO_c@z> On 04/20/2016 01:45 PM, Borislav Petkov wrote: > On Wed, Apr 20, 2016 at 11:04:05AM -0700, H. Peter Anvin wrote: >> 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? > Setting ret to sem doesn't make any sense. Just use "=a" and "a". -hpa