diff mbox series

[kvm-unit-tests,RFC,13/19] arm: page.h: Add missing libcflat.h include

Message ID 20220809091558.14379-14-alexandru.elisei@arm.com (mailing list archive)
State New, archived
Headers show
Series arm/arm64: Rework cache maintenance at boot | expand

Commit Message

Alexandru Elisei Aug. 9, 2022, 9:15 a.m. UTC
Include libcflat from page.h to avoid error like this one:

/path/to/kvm-unit-tests/lib/asm/page.h:19:9: error: unknown type name ‘u64’
   19 | typedef u64 pteval_t;
      |         ^~~
[..]
/path/to/kvm-unit-tests/lib/asm/page.h:47:8: error: unknown type name ‘phys_addr_t’
   47 | extern phys_addr_t __virt_to_phys(unsigned long addr);
      |        ^~~~~~~~~~~
      |                                     ^~~~~~~~~~~
[..]
/path/to/kvm-unit-tests/lib/asm/page.h:50:47: error: unknown type name ‘size_t’
   50 | extern void *__ioremap(phys_addr_t phys_addr, size_t size);

The arm64 version of the header already includes libcflat since commit
a2d06852fe59 ("arm64: Add support for configuring the translation
granule").

Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
---
 lib/arm/asm/page.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Andrew Jones Sept. 20, 2022, 9:39 a.m. UTC | #1
I guess this should be squashed into one of the early patches in this
series since we don't have this issue with the current code.

Thanks,
drew


On Tue, Aug 09, 2022 at 10:15:52AM +0100, Alexandru Elisei wrote:
> Include libcflat from page.h to avoid error like this one:
> 
> /path/to/kvm-unit-tests/lib/asm/page.h:19:9: error: unknown type name ‘u64’
>    19 | typedef u64 pteval_t;
>       |         ^~~
> [..]
> /path/to/kvm-unit-tests/lib/asm/page.h:47:8: error: unknown type name ‘phys_addr_t’
>    47 | extern phys_addr_t __virt_to_phys(unsigned long addr);
>       |        ^~~~~~~~~~~
>       |                                     ^~~~~~~~~~~
> [..]
> /path/to/kvm-unit-tests/lib/asm/page.h:50:47: error: unknown type name ‘size_t’
>    50 | extern void *__ioremap(phys_addr_t phys_addr, size_t size);
> 
> The arm64 version of the header already includes libcflat since commit
> a2d06852fe59 ("arm64: Add support for configuring the translation
> granule").
> 
> Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
> ---
>  lib/arm/asm/page.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/lib/arm/asm/page.h b/lib/arm/asm/page.h
> index 8eb4a883808e..0a46bda018c7 100644
> --- a/lib/arm/asm/page.h
> +++ b/lib/arm/asm/page.h
> @@ -8,6 +8,8 @@
>  
>  #include <linux/const.h>
>  
> +#include <libcflat.h>
> +
>  #define PAGE_SHIFT		12
>  #define PAGE_SIZE		(_AC(1,UL) << PAGE_SHIFT)
>  #define PAGE_MASK		(~(PAGE_SIZE-1))
> -- 
> 2.37.1
>
Alexandru Elisei Sept. 26, 2022, 11:02 a.m. UTC | #2
Hi,

On Tue, Sep 20, 2022 at 11:39:56AM +0200, Andrew Jones wrote:
> 
> I guess this should be squashed into one of the early patches in this
> series since we don't have this issue with the current code.

Will do, thanks for the suggestion!

Alex

> 
> Thanks,
> drew
> 
> 
> On Tue, Aug 09, 2022 at 10:15:52AM +0100, Alexandru Elisei wrote:
> > Include libcflat from page.h to avoid error like this one:
> > 
> > /path/to/kvm-unit-tests/lib/asm/page.h:19:9: error: unknown type name ‘u64’
> >    19 | typedef u64 pteval_t;
> >       |         ^~~
> > [..]
> > /path/to/kvm-unit-tests/lib/asm/page.h:47:8: error: unknown type name ‘phys_addr_t’
> >    47 | extern phys_addr_t __virt_to_phys(unsigned long addr);
> >       |        ^~~~~~~~~~~
> >       |                                     ^~~~~~~~~~~
> > [..]
> > /path/to/kvm-unit-tests/lib/asm/page.h:50:47: error: unknown type name ‘size_t’
> >    50 | extern void *__ioremap(phys_addr_t phys_addr, size_t size);
> > 
> > The arm64 version of the header already includes libcflat since commit
> > a2d06852fe59 ("arm64: Add support for configuring the translation
> > granule").
> > 
> > Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
> > ---
> >  lib/arm/asm/page.h | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/lib/arm/asm/page.h b/lib/arm/asm/page.h
> > index 8eb4a883808e..0a46bda018c7 100644
> > --- a/lib/arm/asm/page.h
> > +++ b/lib/arm/asm/page.h
> > @@ -8,6 +8,8 @@
> >  
> >  #include <linux/const.h>
> >  
> > +#include <libcflat.h>
> > +
> >  #define PAGE_SHIFT		12
> >  #define PAGE_SIZE		(_AC(1,UL) << PAGE_SHIFT)
> >  #define PAGE_MASK		(~(PAGE_SIZE-1))
> > -- 
> > 2.37.1
> >
diff mbox series

Patch

diff --git a/lib/arm/asm/page.h b/lib/arm/asm/page.h
index 8eb4a883808e..0a46bda018c7 100644
--- a/lib/arm/asm/page.h
+++ b/lib/arm/asm/page.h
@@ -8,6 +8,8 @@ 
 
 #include <linux/const.h>
 
+#include <libcflat.h>
+
 #define PAGE_SHIFT		12
 #define PAGE_SIZE		(_AC(1,UL) << PAGE_SHIFT)
 #define PAGE_MASK		(~(PAGE_SIZE-1))