linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/2] arm64: cpufeature.h: resolve hidden header dependencies
Date: Wed, 2 Sep 2015 15:23:54 +0100	[thread overview]
Message-ID: <20150902142353.GB15051@leverpostej> (raw)
In-Reply-To: <1441202438-27005-2-git-send-email-ynorov@caviumnetworks.com>

On Wed, Sep 02, 2015 at 03:00:37PM +0100, Yury Norov wrote:
> 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.)
> 
> Signed-off-by: Yury Norov <ynorov@caviumnetworks.com>

It would be worth mentioning that the cpu_feature() macro was moved as
it depends on the include of <linux/log2.h> for ilog2().

Otherwise this looks like a sensible cleanup/fix to me:

Reviewed-by: Mark Rutland <mark.rutland@arm.com>

Mark.

> ---
>  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
> 

  reply	other threads:[~2015-09-02 14:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-02 14:00 [PATCH v2 0/2] arm64: introduce run-time detection of aarch32 support Yury Norov
2015-09-02 14:00 ` [PATCH v2 1/2] arm64: cpufeature.h: resolve hidden header dependencies Yury Norov
2015-09-02 14:23   ` Mark Rutland [this message]
2015-09-02 14:00 ` [PATCH v2 2/2] arm64: don't load 32-bit binaries if platform has no aarch32_el0 Yury Norov
2015-09-02 14:15   ` Ard Biesheuvel
2015-09-02 14:38     ` Yury Norov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150902142353.GB15051@leverpostej \
    --to=mark.rutland@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).