From patchwork Wed Apr 6 18:31:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Zijlstra X-Patchwork-Id: 8764371 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E5DFAC0553 for ; Wed, 6 Apr 2016 18:31:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 26ABA201FE for ; Wed, 6 Apr 2016 18:31:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4B794201E4 for ; Wed, 6 Apr 2016 18:31:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752626AbcDFSbM (ORCPT ); Wed, 6 Apr 2016 14:31:12 -0400 Received: from casper.infradead.org ([85.118.1.10]:42434 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751873AbcDFSbK (ORCPT ); Wed, 6 Apr 2016 14:31:10 -0400 Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=twins) by casper.infradead.org with esmtpsa (Exim 4.85_2 #1 (Red Hat Linux)) id 1ansEI-0004Rl-Dq; Wed, 06 Apr 2016 18:31:02 +0000 Received: by twins (Postfix, from userid 1000) id C7B7910019922; Wed, 6 Apr 2016 20:31:01 +0200 (CEST) Date: Wed, 6 Apr 2016 20:31:01 +0200 From: Peter Zijlstra To: Michal Hocko Cc: LKML , Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , "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, Michal Hocko Subject: Re: [PATCH 10/11] x86, rwsem: provide __down_write_killable Message-ID: <20160406183101.GW3448@twins.programming.kicks-ass.net> References: <1459508695-14915-1-git-send-email-mhocko@kernel.org> <1459508695-14915-11-git-send-email-mhocko@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1459508695-14915-11-git-send-email-mhocko@kernel.org> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Fri, Apr 01, 2016 at 01:04:54PM +0200, Michal Hocko wrote: > diff --git a/arch/x86/lib/rwsem.S b/arch/x86/lib/rwsem.S > index 40027db99140..d1a1397e1fb3 100644 > --- a/arch/x86/lib/rwsem.S > +++ b/arch/x86/lib/rwsem.S > @@ -101,6 +101,14 @@ ENTRY(call_rwsem_down_write_failed) > ret > ENDPROC(call_rwsem_down_write_failed) > > +ENTRY(call_rwsem_down_write_failed_killable) > + save_common_regs > + movq %rax,%rdi > + call rwsem_down_write_failed_killable > + restore_common_regs > + ret > +ENDPROC(call_rwsem_down_write_failed_killable) > + I had a conflict here and made that: --- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/arch/x86/lib/rwsem.S +++ b/arch/x86/lib/rwsem.S @@ -106,6 +106,16 @@ ENTRY(call_rwsem_down_write_failed) ret ENDPROC(call_rwsem_down_write_failed) +ENTRY(call_rwsem_down_write_failed_killable) + FRAME_BEGIN + save_common_regs + movq %rax,%rdi + call rwsem_down_write_failed_killable + restore_common_regs + FRAME_END + ret +ENDPROC(call_rwsem_down_write_failed_killable) + ENTRY(call_rwsem_wake) FRAME_BEGIN /* do nothing if still outstanding active readers */