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: 10444003 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 053DC602BD for ; Fri, 1 Jun 2018 16:37:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F019B28726 for ; Fri, 1 Jun 2018 16:37:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E4F3528D60; Fri, 1 Jun 2018 16:37:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 68E0728726 for ; Fri, 1 Jun 2018 16:37:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=zAGg2BUYHBGU0uTMgIfUOaJI3Z0ynxtEdc88ZZ6NDkc=; b=WTD/s0+FV+sED114UKzBSjb72R oZp2Fit0pDlhvOXqNnw52W5AjL7RJe6DsHQ08LCNTdqhKARVdXCq9GQaw0RBz4gQQmH1cWNw0goJI AwK3R32RPNOUZ8w8lufNxnojtBN+TjAYvRl7qh4WzGohR6sQ4XU7PD8Tgb39FGRe+uRv+hs3ZaZd/ c0Gi3DCxacpHxDZjafQJJG6od3JPDPCfBpe6JG2gglFqJ2uzUCn/qz4DaBV6jWoM/bnRuqYsWGb9Z Yp/IO8D1fYYBgevA1+MjiKcOIB+GOAC0FWiM6ZCF5py/Rf1Pczqcj9cO+NJciotlqVtlKgv9GEYcC 3p1wOnkA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fOn3F-0005qp-8U; Fri, 01 Jun 2018 16:37:17 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fOmc8-00031U-78 for linux-arm-kernel@bombadil.infradead.org; Fri, 01 Jun 2018 16:09:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=KPoO3xkmTJNlaTbhFQlzQWdV0d+0c5MF04CUiFuVFTI=; b=U3MSnBXhqWby6QtLClRRHlyhG AjZW0ukyx3pJa5/cMeNPchuIm/sTgoWUAg9UcNbLGORPWM9fMVq9HCrWIEwa8iqenZsjYRytTKOOt NvS0/qD/Cc8JKWsQCniWTluY7a5gbZrEW/IPX7JxPR/u1bg4S2BUGaZYcrd4N4lrNErCBK3FiDu0Y 2aqWSGmSpei+cpH62jVpi5fY9a3sV323reVx+KwINuy3mqlqak8IJJ7rxYvIBk0tL9EU9USRmo+6n iKxhrEoAEzO2rYCsA6bpGzDA/qaTXD2kFdbIVQnqfE7rKCYdE8s2jl75db6InBRXlBfRMy723llU7 4QFoCGe/w==; Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by casper.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fOmZ9-00026M-UX for linux-arm-kernel@lists.infradead.org; Fri, 01 Jun 2018 16:06:16 +0000 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180601_170612_267929_BBA1B8BE X-CRM114-Status: GOOD ( 11.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peterz@infradead.org, yamada.masahiro@socionext.com, Will Deacon , mingo@kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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 */