Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1752100ybl; Sat, 11 Jan 2020 02:06:26 -0800 (PST) X-Google-Smtp-Source: APXvYqzNqIevpKopijMI7V8Udat7xFn0tExKnGJ/dN1YTPP5vPlkXj2luocssYG/8hyxvKhx8XZJ X-Received: by 2002:aca:5793:: with SMTP id l141mr5508813oib.38.1578737186187; Sat, 11 Jan 2020 02:06:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578737186; cv=none; d=google.com; s=arc-20160816; b=W1UDhIEImuo+j4RnEUkce8EXVquz9eQH7xONtE2Au8UispSLAFfqWm2RNAy6EnmaJS 11njWkcoN4c78R4OCiuHpZbaRcOVJNUSaDLM9nyhp84HEoo4L3D6mCasAEodbvHPWWUB 44x1zDjM4cqbr97SWcZnyx5Lr080ryPz2lKYk8wQ3/Tx2jPJZ3lVl5Fopwh8ItpZkMTx oH/ypCmg9e4Kl52MEhpu0YlsEqwkpL4R3oxce9/+wmJD3y03uCEeZzSggbT/UWDTGvgG WHwnkDDIakK0yLS5nOOjfN32lsQCeC1lpfq/Z8F2cCCyUCMvt+xwER6QwIBk97lzt1R9 KCiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=PZ7sgg7sALLRY9GrsEfZm0ZPXVQkuTCcfvkaKIjdHkM=; b=q30ehWw3nJXOwzqqsnpGefXdOkH6qJO1casGJb52zANV0TQFer830rUK1P+MWVwjJE 3ApZXsjrLZik+pdVMOxteYrf5IBTtN/X3N3/cOWWW85zwm1N+lZdmIMVvS5Y2kO5yU1I Kb9slu6f6mRZASkMSSMHpeoOnktz8MtJwSh0/pxhpBQPJ1OmrHbcdcn86Qf7mVtTIY2n axG/0+3Jkox9OEvk73oRgEEVXgl8hjHblYjQdRQ2pwragGsWt5gnDcnfaoWSXWgn2MLa 4uHXV6TdQ/OWjqIsY3YMghtBIXtAgy8RodHzT8Q63OsvLgeuav5hyy3XHZ2F1Qv62iiS v9pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=D5uJAc+6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o206si2845214oih.143.2020.01.11.02.06.15; Sat, 11 Jan 2020 02:06:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=D5uJAc+6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729070AbgAKKE1 (ORCPT + 99 others); Sat, 11 Jan 2020 05:04:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:36626 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729517AbgAKKEZ (ORCPT ); Sat, 11 Jan 2020 05:04:25 -0500 Received: from localhost (unknown [62.119.166.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AF58920848; Sat, 11 Jan 2020 10:04:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578737064; bh=zzWo/VpO3F0hQ1irh1MATqWf6Naq9PBHIWWuISSMs5A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D5uJAc+6T+DnPxwl4gBPtBhVUNGV9TQF//t0QY2L/uSGtmsDHKjVAYekklKwu6KbP sbjikCmfioKmbmYak1lXJDGFvnRy8Mzf4mY6Qm/w/G2MdKXyRxAQS/M9T9I1dH2VJB T87CckR43csRhZzaV6ST0KB5rEuJKrpVQ8eIDYc0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mark Rutland , Dmitry Vyukov , "Peter Zijlstra (Intel)" , Andrew Morton , Andrey Ryabinin , "H. Peter Anvin" , Linus Torvalds , Thomas Gleixner , Ingo Molnar , Ben Hutchings Subject: [PATCH 4.9 55/91] locking/x86: Remove the unused atomic_inc_short() methd Date: Sat, 11 Jan 2020 10:49:48 +0100 Message-Id: <20200111094905.611021015@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200111094844.748507863@linuxfoundation.org> References: <20200111094844.748507863@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dmitry Vyukov commit 31b35f6b4d5285a311e10753f4eb17304326b211 upstream. It is completely unused and implemented only on x86. Remove it. Suggested-by: Mark Rutland Signed-off-by: Dmitry Vyukov Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Andrey Ryabinin Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170526172900.91058-1-dvyukov@google.com Signed-off-by: Ingo Molnar Cc: Ben Hutchings Signed-off-by: Greg Kroah-Hartman --- arch/tile/lib/atomic_asm_32.S | 3 +-- arch/x86/include/asm/atomic.h | 13 ------------- 2 files changed, 1 insertion(+), 15 deletions(-) --- a/arch/tile/lib/atomic_asm_32.S +++ b/arch/tile/lib/atomic_asm_32.S @@ -24,8 +24,7 @@ * has an opportunity to return -EFAULT to the user if needed. * The 64-bit routines just return a "long long" with the value, * since they are only used from kernel space and don't expect to fault. - * Support for 16-bit ops is included in the framework but we don't provide - * any (x86_64 has an atomic_inc_short(), so we might want to some day). + * Support for 16-bit ops is included in the framework but we don't provide any. * * Note that the caller is advised to issue a suitable L1 or L2 * prefetch on the address being manipulated to avoid extra stalls. --- a/arch/x86/include/asm/atomic.h +++ b/arch/x86/include/asm/atomic.h @@ -249,19 +249,6 @@ static __always_inline int __atomic_add_ return c; } -/** - * atomic_inc_short - increment of a short integer - * @v: pointer to type int - * - * Atomically adds 1 to @v - * Returns the new value of @u - */ -static __always_inline short int atomic_inc_short(short int *v) -{ - asm(LOCK_PREFIX "addw $1, %0" : "+m" (*v)); - return *v; -} - #ifdef CONFIG_X86_32 # include #else