Re: [PATCH] IP27: Fix spaces.h to prevent a build error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Joshua,

On Sat, Jan 28, 2017 at 11:32:10PM -0500, Joshua Kinard wrote:
> From: Joshua Kinard <kumba@xxxxxxxxxx>
> 
> Fix IP27's spaces.h file to avoid the below build error:
> 
>     CC      arch/mips/vdso/gettimeofday-o32.o
>   In file included from ./arch/mips/include/asm/mach-ip27/spaces.h:29:0,
>                    from ./arch/mips/include/asm/page.h:12,
>                    from arch/mips/vdso/vdso.h:26,
>                    from arch/mips/vdso/gettimeofday.c:11:
>   ./arch/mips/include/asm/mach-generic/spaces.h:28:0: error: "CAC_BASE" redefined [-Werror]
>    #define CAC_BASE  _AC(0x80000000, UL)
>   
>   In file included from ./arch/mips/include/asm/page.h:12:0,
>                    from arch/mips/vdso/vdso.h:26,
>                    from arch/mips/vdso/gettimeofday.c:11:
>   ./arch/mips/include/asm/mach-ip27/spaces.h:22:0: note: this is the location of the previous definition
>    #define CAC_BASE  0xa800000000000000
>   
>   cc1: all warnings being treated as errors
>   make[2]: *** [arch/mips/vdso/Makefile:117: arch/mips/vdso/gettimeofday-o32.o] Error 1
>   make[1]: *** [scripts/Makefile.build:551: arch/mips/vdso] Error 2
>   make[1]: *** Waiting for unfinished jobs....
> 
> Fixes include using the _AC() constant to protect addresses if used in
> assembly and wrapping the addresses with a CONFIG_64BIT ifdef.
> 
> Signed-off-by: Joshua Kinard <kumba@xxxxxxxxxx>

FYI, this similar patch is already applied:

https://patchwork.linux-mips.org/patch/15039/

If you need _AC around them for assembly use, please submit a new patch.

Thanks
James

> ---
>  arch/mips/include/asm/mach-ip27/spaces.h |   15 +++++++++------
>  1 file changed, 9 insertions(+), 6 deletions(-)
> 
> linux-mips-4.10-ip27-fix-spaces_h.patch
> diff --git a/arch/mips/include/asm/mach-ip27/spaces.h b/arch/mips/include/asm/mach-ip27/spaces.h
> index 4775a1136a5b..27d32da8442c 100644
> --- a/arch/mips/include/asm/mach-ip27/spaces.h
> +++ b/arch/mips/include/asm/mach-ip27/spaces.h
> @@ -10,21 +10,24 @@
>  #ifndef _ASM_MACH_IP27_SPACES_H
>  #define _ASM_MACH_IP27_SPACES_H
>  
> +#include <linux/const.h>
> +
>  /*
>   * IP27 uses the R10000's uncached attribute feature.  Attribute 3 selects
>   * uncached memory addressing.
>   */
> -
> -#define HSPEC_BASE		0x9000000000000000
> -#define IO_BASE			0x9200000000000000
> -#define MSPEC_BASE		0x9400000000000000
> -#define UNCAC_BASE		0x9600000000000000
> -#define CAC_BASE		0xa800000000000000
> +#ifdef CONFIG_64BIT
> +#define HSPEC_BASE		_AC(0x9000000000000000, UL)
> +#define IO_BASE			_AC(0x9200000000000000, UL)
> +#define MSPEC_BASE		_AC(0x9400000000000000, UL)
> +#define UNCAC_BASE		_AC(0x9600000000000000, UL)
> +#define CAC_BASE		_AC(0xa800000000000000, UL)
>  
>  #define TO_MSPEC(x)		(MSPEC_BASE | ((x) & TO_PHYS_MASK))
>  #define TO_HSPEC(x)		(HSPEC_BASE | ((x) & TO_PHYS_MASK))
>  
>  #define HIGHMEM_START		(~0UL)
> +#endif /* CONFIG_64BIT */
>  
>  #include <asm/mach-generic/spaces.h>
>  
> 

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux