From patchwork Fri Feb 12 14:57:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 61866 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp873208lbl; Fri, 12 Feb 2016 06:59:39 -0800 (PST) X-Received: by 10.66.151.177 with SMTP id ur17mr2707321pab.68.1455289179038; Fri, 12 Feb 2016 06:59:39 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id x28si10485065pfa.181.2016.02.12.06.59.38 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Feb 2016 06:59:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aUFB8-0003CY-L5; Fri, 12 Feb 2016 14:58:38 +0000 Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aUFAZ-0002sY-F2 for linux-arm-kernel@lists.infradead.org; Fri, 12 Feb 2016 14:58:05 +0000 Received: by mail-wm0-x22a.google.com with SMTP id p63so22789760wmp.1 for ; Fri, 12 Feb 2016 06:57:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=noo1RMlIUQsUkCesXSwTa8gH4SIw5GHlHqiE9ewY4ic=; b=JC6vlvtvkw0BAmOTgx8RaBq4D5xIRl58y23FMfEFSP1KNT3zOFLrGKUPAPxrE+XT9d ACRosXBdz49P6stCZn+gferZZYXjrUeBALc0BWQf6sgU9YDHse7WKGNhiAH80nP/34UL XDSWRkh4jkE+HII+i0TTc2Fo7a6egSQGSSOd4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=noo1RMlIUQsUkCesXSwTa8gH4SIw5GHlHqiE9ewY4ic=; b=FU3e0K8bSB1bWROyVFl+CVKAKmCzFv8I1OdzSFqszNP0f5rVrTQcbg26bM2HiH6i2D wSAv33aGv7LUwUGztxEzqHL7+7K8ttGkr+8gb2T7noMCyaTYcrb+v37RGJNbZvaquNWI +IiBcZhdfMxU8X40K+BRRl/Q9R95Qk28GpxNg4mPT8orNTHBsd1GPgmhV62Zi7vZJBwZ zf1VuUldJoqJSLttxpNrEyzrOVL52kOUkPZFKfp97nuRCWlCk4R2PkZn9tzCQAeO2pKV /ENh60zFzNH7iLAHWSd5zdQjcTnJRdR8JzSszTRbS/S/b/0kpebNEWlBTo0fTT5C2onA OWFQ== X-Gm-Message-State: AG10YOT446EBVmEgAO7/DZJ9JRBpWM5DLqCB1WvTidZKtOubh4lJVYoW09Y1GyJpNEBroeFR X-Received: by 10.194.63.7 with SMTP id c7mr2203035wjs.168.1455289060974; Fri, 12 Feb 2016 06:57:40 -0800 (PST) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id e9sm12412008wja.25.2016.02.12.06.57.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 12 Feb 2016 06:57:40 -0800 (PST) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will.deacon@arm.com, mark.rutland@arm.com, arnd@arndb.de Subject: [PATCH v3 3/4] arm64: prevent potential circular header dependencies in asm/bug.h Date: Fri, 12 Feb 2016 15:57:25 +0100 Message-Id: <1455289046-21321-4-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1455289046-21321-1-git-send-email-ard.biesheuvel@linaro.org> References: <1455289046-21321-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160212_065803_780498_34D1D2A6 X-CRM114-Status: GOOD ( 11.85 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c09:0:0:0:22a listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dave Martin , Ard Biesheuvel MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Currently, using BUG_ON() in header files is cumbersome, due to the fact that asm/bug.h transitively includes a lot of other header files, resulting in the actual BUG_ON() invocation appearing before its definition in the preprocessor input. So let's reverse the #include dependency between asm/bug.h and asm/debug-monitors.h, by moving the definition of BUG_BRK_IMM from the latter to the former. Also fix up one user of asm/debug-monitors.h which relied on a transitive include. Cc: Dave Martin Signed-off-by: Ard Biesheuvel --- arch/arm64/include/asm/bug.h | 2 +- arch/arm64/include/asm/debug-monitors.h | 2 +- arch/arm64/kvm/hyp/debug-sr.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) -- 2.5.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm64/include/asm/bug.h b/arch/arm64/include/asm/bug.h index 4a748ce9ba1a..679d49221998 100644 --- a/arch/arm64/include/asm/bug.h +++ b/arch/arm64/include/asm/bug.h @@ -18,7 +18,7 @@ #ifndef _ARCH_ARM64_ASM_BUG_H #define _ARCH_ARM64_ASM_BUG_H -#include +#define BUG_BRK_IMM 0x800 #ifdef CONFIG_GENERIC_BUG #define HAVE_ARCH_BUG diff --git a/arch/arm64/include/asm/debug-monitors.h b/arch/arm64/include/asm/debug-monitors.h index 279c85b5ec09..e893a1fca9c2 100644 --- a/arch/arm64/include/asm/debug-monitors.h +++ b/arch/arm64/include/asm/debug-monitors.h @@ -20,6 +20,7 @@ #include #include +#include #include #include #include @@ -57,7 +58,6 @@ #define FAULT_BRK_IMM 0x100 #define KGDB_DYN_DBG_BRK_IMM 0x400 #define KGDB_COMPILED_DBG_BRK_IMM 0x401 -#define BUG_BRK_IMM 0x800 /* * BRK instruction encoding diff --git a/arch/arm64/kvm/hyp/debug-sr.c b/arch/arm64/kvm/hyp/debug-sr.c index c9c1e97501a9..2f8bca8af295 100644 --- a/arch/arm64/kvm/hyp/debug-sr.c +++ b/arch/arm64/kvm/hyp/debug-sr.c @@ -18,6 +18,7 @@ #include #include +#include #include #include