Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2426563pxj; Mon, 10 May 2021 02:40:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwAWFQOEtrLBk7F4CZjk8ps1XhAjOqeTg2AGMwybQs+12WANwmvre9hNamvbMlo5dodWYht X-Received: by 2002:a05:6e02:d53:: with SMTP id h19mr20219398ilj.232.1620639646682; Mon, 10 May 2021 02:40:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620639646; cv=none; d=google.com; s=arc-20160816; b=xN3cNUadhAxQki7jUA1b1o1k362ORHJIyyL2anPvWBBRqLfTAzI6PY/e4f+bjWoPa+ JHxyJuen1QLZRCUIAiVSIQ16ToOzH2zoQEMI6BmipkxFe4MI70mvgDeM2teHlrq3R2fi XQYdIf96jz6aWnPw8YHlc5TLplDLQL+eb7kp9qANz8KLHthRFE6GrxkPSMlElZKvW+SS DUMi7QoQFkPgz2tlD3B1dMgI4pqKCg8Ys7AIjjSb+iOecgCPgwT10iWpCjtWYH1cfGQd k/9IAF4Cnoahiik7L99X2bvib6dFTvxpYXe3i6n621wHWn/8x7gUnnj9aK6GzyBNEZpp ZZFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=Uwj9B6+XqVZSQSKlZSIaFWvRUEwRFQj9HcDAktkWePg=; b=WXrHjwoc+qIHE8R0Vlz6fGir4C9k9XmYRyoxAA/6uufkeywNmUBlS8jlJI5RuAGTNe /bZMJ9LWVf0SimDfghlWsE+8R1XJmQwrLPTeYEOGazAPy3t7XmbGzpHgQyGc6yIt/jOX R5OyLyC5mwlYPRZV7ZrFbUdjxGQPoIWqZP7P2szTGixuXOZA1AY16Aw/zXaJoBbwtiET Q0jEFOrKltwdWV+sAuo/Ac+JBpP1LwExks5DborQmx0IgMoMmfyXu4vqbQvxy5Wt54uE 5kTMCuBJMDFkvrAypEKFQPeTHlCpOZlHGZak/3QoS/q/zH429mtvMY/llGB97njT4y7R 3ZAQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k14si16510919jad.20.2021.05.10.02.40.32; Mon, 10 May 2021 02:40:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230348AbhEJJkl (ORCPT + 99 others); Mon, 10 May 2021 05:40:41 -0400 Received: from foss.arm.com ([217.140.110.172]:50506 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230333AbhEJJkc (ORCPT ); Mon, 10 May 2021 05:40:32 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 963C911D4; Mon, 10 May 2021 02:39:27 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 6D2D83F73B; Mon, 10 May 2021 02:39:23 -0700 (PDT) From: Mark Rutland To: linux-kernel@vger.kernel.org, will@kernel.org, boqun.feng@gmail.com, peterz@infradead.org Cc: aou@eecs.berkeley.edu, arnd@arndb.de, bcain@codeaurora.org, benh@kernel.crashing.org, chris@zankel.net, dalias@libc.org, davem@davemloft.net, deanbo422@gmail.com, deller@gmx.de, geert@linux-m68k.org, green.hu@gmail.com, guoren@kernel.org, ink@jurassic.park.msu.ru, James.Bottomley@HansenPartnership.com, jcmvbkbc@gmail.com, jonas@southpole.se, ley.foon.tan@intel.com, linux@armlinux.org.uk, mark.rutland@arm.com, mattst88@gmail.com, monstr@monstr.eu, mpe@ellerman.id.au, nickhu@andestech.com, palmer@dabbelt.com, paulus@samba.org, paul.walmsley@sifive.com, rth@twiddle.net, shorne@gmail.com, stefan.kristiansson@saunalahti.fi, tsbogend@alpha.franken.de, vgupta@synopsys.com, ysato@users.sourceforge.jp Subject: [PATCH 03/33] locking/atomic: h8300: use asm-generic exclusively Date: Mon, 10 May 2021 10:37:23 +0100 Message-Id: <20210510093753.40683-4-mark.rutland@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20210510093753.40683-1-mark.rutland@arm.com> References: <20210510093753.40683-1-mark.rutland@arm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As h8300's implementation of the atomics isn't using any arch-specific functionality, and its implementation of cmpxchg only uses assembly to non-atomically swap two elements in memory, we may as well use the asm-generic atomic.h and cmpxchg.h, and avoid the duplicate code. Signed-off-by: Mark Rutland Cc: Boqun Feng Cc: Peter Zijlstra Cc: Will Deacon Cc: Yoshinori Sato --- arch/h8300/include/asm/Kbuild | 1 + arch/h8300/include/asm/atomic.h | 97 ---------------------------------------- arch/h8300/include/asm/cmpxchg.h | 66 --------------------------- 3 files changed, 1 insertion(+), 163 deletions(-) delete mode 100644 arch/h8300/include/asm/atomic.h delete mode 100644 arch/h8300/include/asm/cmpxchg.h diff --git a/arch/h8300/include/asm/Kbuild b/arch/h8300/include/asm/Kbuild index 60ee7f0d60a8..e23139c8fc0d 100644 --- a/arch/h8300/include/asm/Kbuild +++ b/arch/h8300/include/asm/Kbuild @@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 generic-y += asm-offsets.h +generic-y += cmpxchg.h generic-y += extable.h generic-y += kvm_para.h generic-y += mcs_spinlock.h diff --git a/arch/h8300/include/asm/atomic.h b/arch/h8300/include/asm/atomic.h deleted file mode 100644 index a990d151f163..000000000000 diff --git a/arch/h8300/include/asm/cmpxchg.h b/arch/h8300/include/asm/cmpxchg.h deleted file mode 100644 index c64bb38ce242..000000000000 -- 2.11.0