From patchwork Tue Jun 19 12:53:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 139111 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp5170370lji; Tue, 19 Jun 2018 05:53:02 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKYrAKvjWy7vWoeimCVgMg6moYJLwkoNJgg7L20qhIkjp8saMRd4MPnCMqa8Fa584cTCEKH X-Received: by 2002:a62:e005:: with SMTP id f5-v6mr18149472pfh.88.1529412781861; Tue, 19 Jun 2018 05:53:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529412781; cv=none; d=google.com; s=arc-20160816; b=B/RTMVmYMCsUfoqEpDsTr4YptfA5XJGBHeh/1xbNBdQeiGkxDZfRLVuLFG/YFMuquY hOGPqQrcu54KuEL9Um3PnB/LcezxQH3I5M0mffF1vnUMryQHAeUJ4iUSK+IniEZsaxo/ xm3oCynVDcqmVJsGqmw4+1L7DYLz5atJR0fYT0CYe/5n30cK2Xm6cLpRRaa15nNaWIob 8IrVGpijIPg7ommvpZKQH0Y2OIkVwN/OCJdgsRUlkxZ2JGHmYxdnpiKjzNsFjiTjIc2N mU+soecuAwNfK7/j9JY/0IqvpaRTmyrGo1mnfCu8GAcRZkr5gsP0QnIMlZlvm/P6nuhA qa2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=PgUR7T1oloEwNNr9qJji2CAZyuQHiHeevFuByilgzoU=; b=k2Sj7tHCF63kzN1pyol7XK+pgyKjUD5tvZVimXsNgj2sKu5Jmo5e02IkgUKAvai8TW NFqFzGCD+PTfisZPx1DHGG+Z7UhuXzhlVaoYG/tG9ybM9Wlq45IyAJiktK+f1VW8nCYk ElD+pZJrRrlxN8udoTOS5zlSe/T1OjI0bPRCAbko4ClCPQoUlpmEwx0cSGca6FD6AfIe hV6yIdRKh4WmAE7vGMErrt5vG46hJx6vRJ5onPKocrUOVCauKpvMcTfFxj/gp0yGu1nB 1REhrPGnsnd0S7a4XKpOuJ0p/3Hn+Kl6v3aFzNi1ZcG54jUxInSxCaNwsQhrLCu56hcw LbBg== ARC-Authentication-Results: i=1; mx.google.com; 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 n3-v6si17286642pld.116.2018.06.19.05.53.01; Tue, 19 Jun 2018 05:53:01 -0700 (PDT) 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; 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 S937901AbeFSMwp (ORCPT + 30 others); Tue, 19 Jun 2018 08:52:45 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:49306 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S937848AbeFSMwk (ORCPT ); Tue, 19 Jun 2018 08:52:40 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 38D5C15BE; Tue, 19 Jun 2018 05:52:40 -0700 (PDT) Received: from edgewater-inn.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 0A51C3F5B6; Tue, 19 Jun 2018 05:52:40 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 9B7331AE3632; Tue, 19 Jun 2018 13:53:15 +0100 (BST) From: Will Deacon To: linux-kernel@vger.kernel.org Cc: peterz@infradead.org, mingo@kernel.org, linux-arm-kernel@lists.infradead.org, yamada.masahiro@socionext.com, Will Deacon Subject: [RESEND PATCH v2 2/9] m68k: Don't use asm-generic/bitops/lock.h Date: Tue, 19 Jun 2018 13:53:07 +0100 Message-Id: <1529412794-17720-3-git-send-email-will.deacon@arm.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1529412794-17720-1-git-send-email-will.deacon@arm.com> References: <1529412794-17720-1-git-send-email-will.deacon@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org asm-generic/bitops/lock.h is shortly going to be built on top of the atomic_long_* API, which introduces a nasty circular dependency for m68k where linux/atomic.h pulls in linux/bitops.h via: linux/atomic.h asm/atomic.h linux/irqflags.h asm/irqflags.h linux/preempt.h asm/preempt.h asm-generic/preempt.h linux/thread_info.h asm/thread_info.h asm/page.h asm-generic/getorder.h linux/log2.h linux/bitops.h Since m68k isn't SMP and doesn't support ACQUIRE/RELEASE barriers, we can just define the lock bitops in terms of the atomic bitops in the asm/bitops.h header. Acked-by: Geert Uytterhoeven Acked-by: Peter Zijlstra (Intel) Signed-off-by: Will Deacon --- arch/m68k/include/asm/bitops.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) -- 2.1.4 diff --git a/arch/m68k/include/asm/bitops.h b/arch/m68k/include/asm/bitops.h index 93b47b1f6fb4..18193419f97d 100644 --- a/arch/m68k/include/asm/bitops.h +++ b/arch/m68k/include/asm/bitops.h @@ -515,12 +515,16 @@ static inline int __fls(int x) #endif +/* Simple test-and-set bit locks */ +#define test_and_set_bit_lock test_and_set_bit +#define clear_bit_unlock clear_bit +#define __clear_bit_unlock clear_bit_unlock + #include #include #include #include #include -#include #endif /* __KERNEL__ */ #endif /* _M68K_BITOPS_H */