diff mbox series

[1/3] arm64: Add missing include of asm/cpufeature.h to asm/mmu.h

Message ID 20211202171048.26924-2-will@kernel.org (mailing list archive)
State New, archived
Headers show
Series KVM: arm64: Keep hyp and host headers separate where possible | expand

Commit Message

Will Deacon Dec. 2, 2021, 5:10 p.m. UTC
asm/mmu.h refers to cpus_have_const_cap() in the definition of
arm64_kernel_unmapped_at_el0() so include asm/cpufeature.h directly
rather than force all users of the header to do it themselves.

Signed-off-by: Will Deacon <will@kernel.org>
---
 arch/arm64/include/asm/mmu.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Fuad Tabba Dec. 3, 2021, 8:24 a.m. UTC | #1
Hi Will,

On Thu, Dec 2, 2021 at 5:10 PM Will Deacon <will@kernel.org> wrote:
>
> asm/mmu.h refers to cpus_have_const_cap() in the definition of
> arm64_kernel_unmapped_at_el0() so include asm/cpufeature.h directly
> rather than force all users of the header to do it themselves.

Simplifies the code and makes it cleaner.

I tested this code (the complete patch series) as well and it ran fine.

Tested-by: Fuad Tabba <tabba@google.com>
Reviewed-by: Fuad Tabba <tabba@google.com>

Cheers,
/fuad


> Signed-off-by: Will Deacon <will@kernel.org>
> ---
>  arch/arm64/include/asm/mmu.h | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm64/include/asm/mmu.h b/arch/arm64/include/asm/mmu.h
> index e9c30859f80c..48f8466a4be9 100644
> --- a/arch/arm64/include/asm/mmu.h
> +++ b/arch/arm64/include/asm/mmu.h
> @@ -15,6 +15,7 @@
>  #ifndef __ASSEMBLY__
>
>  #include <linux/refcount.h>
> +#include <asm/cpufeature.h>
>
>  typedef struct {
>         atomic64_t      id;
> --
> 2.34.0.rc2.393.gf8c9666880-goog
>
diff mbox series

Patch

diff --git a/arch/arm64/include/asm/mmu.h b/arch/arm64/include/asm/mmu.h
index e9c30859f80c..48f8466a4be9 100644
--- a/arch/arm64/include/asm/mmu.h
+++ b/arch/arm64/include/asm/mmu.h
@@ -15,6 +15,7 @@ 
 #ifndef __ASSEMBLY__
 
 #include <linux/refcount.h>
+#include <asm/cpufeature.h>
 
 typedef struct {
 	atomic64_t	id;