From patchwork Thu May 24 10:59:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 136733 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp2039482lji; Thu, 24 May 2018 03:59:34 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrdxO00hu4NBRW8aSXFmpszcu2Nd8BirLKoYs4a9kPfnklwd2H8ndyWJXnIDPYqbIBfFVsk X-Received: by 2002:a17:902:988b:: with SMTP id s11-v6mr6849419plp.304.1527159574821; Thu, 24 May 2018 03:59:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527159574; cv=none; d=google.com; s=arc-20160816; b=gGTnAeG7BohYRMelN9/9PpqMplH6inCtOPiIBv4b/NwUM33xK7gbauVHYs5g10E024 nU6AwwuRzGmZY97AyU5+knbyILs8yXqNt3gGy8EOugQxug+XimQ1Kr/vU/FjWv9uKqAf pgVTgTzOHdAcvmLAc6hiurMcPmdHltd5A9uy7SyJafE7OSwrJASm5OBFqZOzEsur3wcB 1wSMLZR6sxobhjdjlzoim5nATOSzvZc75DuD2cHn04MW3qFPrjqwZFgNHaSeoME1joTG L1DPw3lVVbi9XZJmSwyjd96ulN8rNvHfH3XZops97SjI6iBjyLfGDk4HgXUb27y0dMLb iFQw== 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=KPoO3xkmTJNlaTbhFQlzQWdV0d+0c5MF04CUiFuVFTI=; b=YmPGieWwBVhoZsQhOnL+9Nal1nBJ+s7eR/EvCy5aYr6KPuJCPpbpjegpcTljzKXHs7 p4D0/fz8RullCGt/NE7UKoCaPnuAgBNT1sQddjKnYoMyL9ZLg+NNua5B2J96YVmMILYX dXBKuZyj2fRdGnqeqON0+6S+sGRYima0KiDJIc/uR26obZWOSIiiUpawvsvEB9o7/9QN 9kb4JGo4ue6wLZPOA8z+xPnDWD21i2vJgP0SRqpS7JjIQUF55/ne84rtWD0Ve0JyU9vl lFDMEOsPPtoBfgHnRmYzTWQbj+mjRdc2ov6Gsp5XUJbS9QILwjLmrFrtJ235d6m6i6NO ECxA== 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 o1-v6si16338877pge.307.2018.05.24.03.59.34; Thu, 24 May 2018 03:59:34 -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 S1032760AbeEXK7c (ORCPT + 30 others); Thu, 24 May 2018 06:59:32 -0400 Received: from foss.arm.com ([217.140.101.70]:40932 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030295AbeEXK7T (ORCPT ); Thu, 24 May 2018 06:59:19 -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 8FE8F165D; Thu, 24 May 2018 03:59:19 -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 608393F762; Thu, 24 May 2018 03:59:19 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 6133C1AE372C; Thu, 24 May 2018 11:59:47 +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: [PATCH 2/9] m68k: Don't use asm-generic/bitops/lock.h Date: Thu, 24 May 2018 11:59:39 +0100 Message-Id: <1527159586-8578-3-git-send-email-will.deacon@arm.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1527159586-8578-1-git-send-email-will.deacon@arm.com> References: <1527159586-8578-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 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 */