From patchwork Mon Feb 26 15:04:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 129666 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp300537lja; Mon, 26 Feb 2018 07:06:03 -0800 (PST) X-Google-Smtp-Source: AH8x226ZS1qPsVvEpzfXQzmjonynb1B0zawpaK/XOovYie/Ea2Bdnl3OZSrR9/XA2HUuwDnCPvic X-Received: by 10.99.94.67 with SMTP id s64mr8456801pgb.379.1519657563060; Mon, 26 Feb 2018 07:06:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519657563; cv=none; d=google.com; s=arc-20160816; b=0Y4OIS/5n/r+wTRhvsWddC0AAUYM5wTJ63UBUHGSp30SQts/zcD0ErjIP0SUSAPgRL oPoPnyPZON+pDZrIEQb2iCr/1YRgyw+ub82U4hIKHeGk7WW+tcpLJCraPcb3ytk494T5 KCrVes4Bkgiox9J2PtBTx+UHMY/ZaplrjQvWS7AGIbejiahJ7wV7ofElVjXPmE/5pnG/ Y7nQuL7LSI1rZDUdabEfkDVw4CKERFTJq3OJ2jIino0qCcoOqocQGzRBccrWxzusW+g7 zLHXWc1Zj9qzkLqd7bxGTpDTdjN1Skt7LutDQf1743u5FwoLBWse1zFQF1cF7R5M60uU 9uog== 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=uYayreNaCexijW8oKgvS7R7gvZQf9Kw/3zESbbf2Yx0=; b=iyZ+QRbruu1P5RwimlJ9zMuX74Lzt+oz2jZeg7i8A3SGTRAsmpvR1KJrSMtsbCNR+q EZWObKRLI406+W56eD3rqvOlkWCMfOMs5BKmXw7F5WbXshFcG4QiIa+4use4U88+mnWk i9kHp518pjuH4iZmBAAcZ18HPDY9XgJnES/6tYw5xvZSUIj+tLQQUT/UnkBbrobu0pqj p4QqcewAXbL43wrvfbAr1EBtS90wMqxQmN/PVUDh0yTvlpYtlyKG/k3omoa1RaEQjzZV DURjSxovdFBq/Rrfxcv+wG24jR1Bk6oSSqqsR/MzxRjug2djWX0XOavzvBHHRzySbx7Z YChw== 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.06.02; Mon, 26 Feb 2018 07:06:03 -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 S1754056AbeBZPFE (ORCPT + 28 others); Mon, 26 Feb 2018 10:05:04 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:51130 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753879AbeBZPFA (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 EFE8A15BE; Mon, 26 Feb 2018 07:04:59 -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 C1EA03F59D; Mon, 26 Feb 2018 07:04:59 -0800 (PST) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 4F6B31AE53A8; 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 , Yoshinori Sato Subject: [RFC PATCH v2 01/12] h8300: Don't include linux/kernel.h in asm/atomic.h Date: Mon, 26 Feb 2018 15:04:49 +0000 Message-Id: <1519657500-15094-2-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 linux/kernel.h isn't needed by asm/atomic.h and will result in circular dependencies when the asm-generic atomic bitops are built around the tomic_long_t interface. Remove the broad include and replace it with linux/compiler.h for READ_ONCE etc and asm/irqflags.h for arch_local_irq_save etc. Cc: Yoshinori Sato Signed-off-by: Will Deacon --- arch/h8300/include/asm/atomic.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.1.4 diff --git a/arch/h8300/include/asm/atomic.h b/arch/h8300/include/asm/atomic.h index 941e7554e886..b174dec099bf 100644 --- a/arch/h8300/include/asm/atomic.h +++ b/arch/h8300/include/asm/atomic.h @@ -2,8 +2,10 @@ #ifndef __ARCH_H8300_ATOMIC__ #define __ARCH_H8300_ATOMIC__ +#include #include #include +#include /* * Atomic operations that C can't guarantee us. Useful for @@ -15,8 +17,6 @@ #define atomic_read(v) READ_ONCE((v)->counter) #define atomic_set(v, i) WRITE_ONCE(((v)->counter), (i)) -#include - #define ATOMIC_OP_RETURN(op, c_op) \ static inline int atomic_##op##_return(int i, atomic_t *v) \ { \