From patchwork Fri Jun 1 16:06:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 137540 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp1126429lji; Fri, 1 Jun 2018 09:06:06 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI6YCIgcCtbP1Bn7PiqC89Hj8Vzy6w0OswkpFKHgkK3CDTdiEArENBnPfdozw3IO8oA5AXc X-Received: by 2002:a17:902:7688:: with SMTP id m8-v6mr8646775pll.54.1527869166075; Fri, 01 Jun 2018 09:06:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527869166; cv=none; d=google.com; s=arc-20160816; b=YvMV695UN9VCykMaJXekBWOX9fBqPQkzusNV5ae3Qqe/smgqLbublG+wK/EXXPlGgQ god86AL40W9R2JQWbnzg51jA8qqF82mpWreaVAzxISEhkzQDIU80omsCNFzb2/RtkS5/ DPGiSaByjACp0SVKc+j4AcUtiJ4MI5V/htCiH02W/+Sax7x41gnjUxM2HHBpu5ui5GKj Eksfl7smLzKZxyfSV5ekpDOgLyyWa29bu3HwtsQCrFvM48rpRNKzrR+L4fNAECMTevfl KKKMYGAhIl7WATb+kIOA9uyBT+yomKyp9on0c0mIXEijgK8otdiJCadh5xXkH4Bg99U4 O/8Q== 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=vrXdsF5Yv3YrDeKrTpV0mHzJQmzBzowr1tJwa7W5dXy2g42IS1mv+ucKVJGOCyLmiG i64ZwfC1z1ZsFeE2RzFZ7FTp+PujyP90FCTKxCD3K7BR1lZvDLnPPt2gnAzbC2V+jT8n 9fd1Sx80Sr5fFLWf6OCkeQ7DuKIYm24hE/mfjo3zFcazWo/z8rDH1y66ZQMAZDxnp7mj BZBPw1o20vYOtq/IFxiuRahk19IBLTezd1oSEpyhjCRqWImLxgs1wXlXUerFAj0+AyPq FGkrfYQZ4mSG/NqWkaCkZivmfqACA/J23WmZeX2+GPdCVbD0OTJP/hsgI0SJI7TH9Ovz wCww== 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 o10-v6si4551939pgr.175.2018.06.01.09.06.05; Fri, 01 Jun 2018 09:06:06 -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 S1752960AbeFAQGD (ORCPT + 30 others); Fri, 1 Jun 2018 12:06:03 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:54966 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751584AbeFAQGA (ORCPT ); Fri, 1 Jun 2018 12:06:00 -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 D7E8A15BE; Fri, 1 Jun 2018 09:05:59 -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 AA0D83F5C9; Fri, 1 Jun 2018 09:05:59 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 2B7FC1AE5055; Fri, 1 Jun 2018 17:06:30 +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 v2 2/9] m68k: Don't use asm-generic/bitops/lock.h Date: Fri, 1 Jun 2018 17:06:22 +0100 Message-Id: <1527869189-31512-3-git-send-email-will.deacon@arm.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1527869189-31512-1-git-send-email-will.deacon@arm.com> References: <1527869189-31512-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 */