From patchwork Mon Feb 26 15:04:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 129664 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp300327lja; Mon, 26 Feb 2018 07:05:52 -0800 (PST) X-Google-Smtp-Source: AH8x225rmZVRbdznOYNbECkWdC5YissVlNit3eP33Lqj15Cku783PiaBjiUS1Wr3maRemqZEpd0w X-Received: by 2002:a17:902:901:: with SMTP id 1-v6mr10995575plm.404.1519657552210; Mon, 26 Feb 2018 07:05:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519657552; cv=none; d=google.com; s=arc-20160816; b=ME9LrTXe8RO8fMxdz2/7TUUs4hN+fP02MC1wnw3LfknZVugqWpWnarEpdZ6DFR2Nhu a43b/83D0NhDmizgyq2m87CwGkqNEFpEEjVaouSSYHg7ZTLQ5KrH3DaS/8BeD8cL/etj 6uQdRDYjr5KvqYV70GJMeuIxTMqtw+HE1pm8x3BOl/prP9TmXxoDhb6RQPpDyTrFBRBN llC0StzGTeBEW8WI5aNy4F5NprCh9WTeJ+gWvGzP5JhqY4pdUHUVPGVZcsMaptJffHFA BXzxl1ik0DZlTbm5ZHv/kBzHv1wXi5OiI5mnmIeqnR38LjlGoejt+RYaJ2Japjb3a2FX 2E7g== 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=rBWWznJcIes3IEkFcTvfnSrZgkNwLnE/maG84/Al8b5Nca5garioyxc3NghHf0QsA0 Uq4wAf5JrgZd1S2r2u/1N9kddmJyVdko9uxAZqRGZook2FFXrrKHV8hS0lwNriK9EGkR hH+qYsM8xcff5lhDx9v3PMUMYOU9vSzOMtlbrlMy4tYb5C3Y4+6LjbCYgVHg//LxAp4T ugwLU2H1DtVXmyDLfdt7U9Dvnq1pq/tXmKJ/AhRQJv9sfS9xKZGcf32anKifg/9YpDIO HLqtBa7EjtdLXdsr1JBi89teP8QgaDAaYtz4qhDcKX86Y1p4kIFR5PLJd6y7W0cKTs3R tZmQ== 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 n13si5669818pgc.528.2018.02.26.07.05.51; Mon, 26 Feb 2018 07:05:52 -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; 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 S1754076AbeBZPFG (ORCPT + 28 others); Mon, 26 Feb 2018 10:05:06 -0500 Received: from foss.arm.com ([217.140.101.70]:51140 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753903AbeBZPFA (ORCPT ); Mon, 26 Feb 2018 10:05:00 -0500 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 120041610; Mon, 26 Feb 2018 07:05:00 -0800 (PST) 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 D7E583F614; Mon, 26 Feb 2018 07:04:59 -0800 (PST) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 60CED1AE53AA; Mon, 26 Feb 2018 15:05:01 +0000 (GMT) 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: [RFC PATCH v2 02/12] m68k: Don't use asm-generic/bitops/lock.h Date: Mon, 26 Feb 2018 15:04:50 +0000 Message-Id: <1519657500-15094-3-git-send-email-will.deacon@arm.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1519657500-15094-1-git-send-email-will.deacon@arm.com> References: <1519657500-15094-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 */