[PATCH] LoongArch: addrspace: add linux/sizes.h to prevent build errors

Randy Dunlap posted 1 patch 1 year, 10 months ago
arch/loongarch/include/asm/addrspace.h |    1 +
1 file changed, 1 insertion(+)
[PATCH] LoongArch: addrspace: add linux/sizes.h to prevent build errors
Posted by Randy Dunlap 1 year, 10 months ago
LoongArch's include/asm/addrspace.h uses SZ_32M and SZ_16K, so add
<linux/sizes.h> to provide those macros to prevent build errors:

In file included from ../arch/loongarch/include/asm/io.h:11,
                 from ../include/linux/io.h:13,
                 from ../include/linux/io-64-nonatomic-lo-hi.h:5,
                 from ../drivers/cxl/pci.c:4:
../include/asm-generic/io.h: In function 'ioport_map':
../arch/loongarch/include/asm/addrspace.h:124:25: error: 'SZ_32M' undeclared (first use in this function); did you mean 'PS_32M'?
  124 | #define PCI_IOSIZE      SZ_32M

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: WANG Xuerui <kernel@xen0n.name>
Cc: loongarch@lists.linux.dev
---
 arch/loongarch/include/asm/addrspace.h |    1 +
 1 file changed, 1 insertion(+)

diff -- a/arch/loongarch/include/asm/addrspace.h b/arch/loongarch/include/asm/addrspace.h
--- a/arch/loongarch/include/asm/addrspace.h
+++ b/arch/loongarch/include/asm/addrspace.h
@@ -11,6 +11,7 @@
 #define _ASM_ADDRSPACE_H
 
 #include <linux/const.h>
+#include <linux/sizes.h>
 
 #include <asm/loongarch.h>
Re: [PATCH] LoongArch: addrspace: add linux/sizes.h to prevent build errors
Posted by Huacai Chen 1 year, 10 months ago
Queued, thanks.

Huacai

On Thu, Apr 4, 2024 at 12:57 PM Randy Dunlap <rdunlap@infradead.org> wrote:
>
> LoongArch's include/asm/addrspace.h uses SZ_32M and SZ_16K, so add
> <linux/sizes.h> to provide those macros to prevent build errors:
>
> In file included from ../arch/loongarch/include/asm/io.h:11,
>                  from ../include/linux/io.h:13,
>                  from ../include/linux/io-64-nonatomic-lo-hi.h:5,
>                  from ../drivers/cxl/pci.c:4:
> ../include/asm-generic/io.h: In function 'ioport_map':
> ../arch/loongarch/include/asm/addrspace.h:124:25: error: 'SZ_32M' undeclared (first use in this function); did you mean 'PS_32M'?
>   124 | #define PCI_IOSIZE      SZ_32M
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Huacai Chen <chenhuacai@kernel.org>
> Cc: WANG Xuerui <kernel@xen0n.name>
> Cc: loongarch@lists.linux.dev
> ---
>  arch/loongarch/include/asm/addrspace.h |    1 +
>  1 file changed, 1 insertion(+)
>
> diff -- a/arch/loongarch/include/asm/addrspace.h b/arch/loongarch/include/asm/addrspace.h
> --- a/arch/loongarch/include/asm/addrspace.h
> +++ b/arch/loongarch/include/asm/addrspace.h
> @@ -11,6 +11,7 @@
>  #define _ASM_ADDRSPACE_H
>
>  #include <linux/const.h>
> +#include <linux/sizes.h>
>
>  #include <asm/loongarch.h>
>