linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Hogan <james.hogan@imgtec.com>
To: Joshua Kinard <kumba@gentoo.org>
Cc: Ralf Baechle <ralf@linux-mips.org>,
	"Maciej W. Rozycki" <macro@linux-mips.org>,
	Linux/MIPS <linux-mips@linux-mips.org>
Subject: Re: [PATCH] IP27: Fix spaces.h to prevent a build error
Date: Mon, 13 Feb 2017 22:39:28 +0000	[thread overview]
Message-ID: <20170213223928.GN24226@jhogan-linux.le.imgtec.org> (raw)
In-Reply-To: <a6e09082-643a-b8f6-8a48-0783309f482a@gentoo.org>

[-- Attachment #1: Type: text/plain, Size: 3045 bytes --]

Hi Joshua,

On Sat, Jan 28, 2017 at 11:32:10PM -0500, Joshua Kinard wrote:
> From: Joshua Kinard <kumba@gentoo.org>
> 
> 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@gentoo.org>

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 #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

      reply	other threads:[~2017-02-13 22:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-29  4:32 [PATCH] IP27: Fix spaces.h to prevent a build error Joshua Kinard
2017-02-13 22:39 ` James Hogan [this message]

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=20170213223928.GN24226@jhogan-linux.le.imgtec.org \
    --to=james.hogan@imgtec.com \
    --cc=kumba@gentoo.org \
    --cc=linux-mips@linux-mips.org \
    --cc=macro@linux-mips.org \
    --cc=ralf@linux-mips.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).