lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1441209000-26746-2-git-send-email-ynorov@caviumnetworks.com>
Date:	Wed, 2 Sep 2015 18:49:59 +0300
From:	Yury Norov <ynorov@...iumnetworks.com>
To:	<mark.rutland@....com>, <Suzuki.Poulose@....com>,
	<Catalin.Marinas@....com>
CC:	<klimov.linux@...il.com>, <ddaney.cavm@...il.com>,
	<ard.biesheuvel@...aro.org>, <will.deacon@....com>,
	<linux-arm-kernel@...ts.infradead.org>,
	<linux-kernel@...r.kernel.org>, <yury.norov@...il.com>,
	Yury Norov <ynorov@...iumnetworks.com>
Subject: [PATCH v3 1/2] arm64: cpufeature.h: resolve hidden header dependencies

Functions implemented in cpufeature.h depend on some headers, but
cpufeature.h does not include them. This may cause build failure if
cpufeature.h user does not include that headers by itself. (Like it
happens in next patch of this series.)

cpu_feature macro is moved under "#ifndef __ASSEMBLY__" guard as
it depends on <linux/log2.h>, and can be used in C files only.

Signed-off-by: Yury Norov <ynorov@...iumnetworks.com>
Reviewed-by: Mark Rutland <mark.rutland@....com>
---
 arch/arm64/include/asm/cpufeature.h | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/include/asm/cpufeature.h b/arch/arm64/include/asm/cpufeature.h
index c104421..f0e4017 100644
--- a/arch/arm64/include/asm/cpufeature.h
+++ b/arch/arm64/include/asm/cpufeature.h
@@ -19,7 +19,6 @@
  */
 
 #define MAX_CPU_FEATURES	(8 * sizeof(elf_hwcap))
-#define cpu_feature(x)		ilog2(HWCAP_ ## x)
 
 #define ARM64_WORKAROUND_CLEAN_CACHE		0
 #define ARM64_WORKAROUND_DEVICE_LOAD_ACQUIRE	1
@@ -30,6 +29,14 @@
 
 #ifndef __ASSEMBLY__
 
+#include <linux/bitmap.h>
+#include <linux/compiler.h>
+#include <linux/log2.h>
+#include <linux/printk.h>
+#include <linux/types.h>
+
+#define cpu_feature(x)		ilog2(HWCAP_ ## x)
+
 struct arm64_cpu_capabilities {
 	const char *desc;
 	u16 capability;
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ