linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nicholas Piggin <npiggin@gmail.com>
To: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
Cc: Denis Kirjanov <kda@linux-powerpc.org>,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>
Subject: Re: compiling master.
Date: Thu, 3 Nov 2016 18:09:21 +1100	[thread overview]
Message-ID: <20161103180921.5506327e@roar.ozlabs.ibm.com> (raw)
In-Reply-To: <20161103065317.8537-1-naveen.n.rao@linux.vnet.ibm.com>

On Thu,  3 Nov 2016 12:23:17 +0530
"Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> wrote:

> On 2016/11/03 03:55PM, Nicholas Piggin wrote:
> > On Wed, 2 Nov 2016 13:49:39 +0300
> > Denis Kirjanov <kda@linux-powerpc.org> wrote:
> >   
> > > Hi guys,
> > > 
> > > compiling ppc head with bunch of asm errors on power8 box (gcc version 4.8.3 )
> > > checked commit log but found nothing special. Looks like it's asm issue?
> > > Has anybody seen that?
> > > 
> > > arch/powerpc/kernel/exceptions-64s.S: Assembler messages:
> > > arch/powerpc/kernel/exceptions-64s.S:421: Error: operand out of range
> > > (0xffffffffffff8680 is not between 0x0000000000000000 and
> > > 0x000000000000ffff)  
> > 
> > Hey, thanks for the report. It's likely due to the exception vectors rewrite,
> > and yes it's an assembler issue (what's your binutils version?). Your errors
> > look like they're coming from LOAD_HANDLER(). For some reason it seems to be
> > interpreting the immediate as signed, or the actual calculation ends up being
> > negative, neither of which should happen.
> > 
> > It might take a bit of trial and error, and the assembler doesn't give a lot
> > of good options to debug it, so if I can reproduce it here with your bintuils
> > version it will be helpful.  
> 
> I saw this issue when trying to do a BE build on RHEL 7.1. The below
> fixes this for me and it indeed looks like an issue with the assembler.
> Interestingly, the same assembler version on RHEL 7.1 LE does not throw
> these errors.
> 
> [root@rhel71be linux]# gcc --version
> gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-8)
> <snip>
> [root@rhel71be linux]# as --version
> GNU assembler version 2.23.52.0.1-26.el7 20130226
> <snip>
> 
> Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
> ---
>  arch/powerpc/include/asm/exception-64s.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/include/asm/exception-64s.h b/arch/powerpc/include/asm/exception-64s.h
> index 2e4e7d8..9b7b302 100644
> --- a/arch/powerpc/include/asm/exception-64s.h
> +++ b/arch/powerpc/include/asm/exception-64s.h
> @@ -91,7 +91,7 @@
>   */
>  #define LOAD_HANDLER(reg, label)					\
>  	ld	reg,PACAKBASE(r13);	/* get high part of &label */	\
> -	ori	reg,reg,(FIXED_SYMBOL_ABS_ADDR(label))@l;
> +	ori	reg,reg,((FIXED_SYMBOL_ABS_ADDR(label)) & 0xffff);
>  
>  /* Exception register prefixes */
>  #define EXC_HV	H

Thanks for taking a look. Does this patch fix it, or just hide the build
error? This would presumably hide real bugs too, so it will be good if we
can make it conditional on older assemblers, or otherwise do a test for
out of bounds value (you could try asm directives like .if/.error)

Thanks,
Nick

  reply	other threads:[~2016-11-03  7:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-02 10:49 compiling master Denis Kirjanov
2016-11-03  4:55 ` Nicholas Piggin
2016-11-03  6:53   ` Naveen N. Rao
2016-11-03  7:09     ` Nicholas Piggin [this message]
2016-11-03 10:34       ` Naveen N. Rao
2016-11-03  8:18     ` Denis Kirjanov
2016-11-03  9:51     ` Michael Ellerman
2016-11-03 10:30       ` Naveen N. Rao
2016-11-03 10:52         ` Denis Kirjanov
2016-11-08  7:26     ` Michael Ellerman
2016-11-08  8:21       ` Denis Kirjanov
2016-11-08 17:33       ` Naveen N. Rao

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=20161103180921.5506327e@roar.ozlabs.ibm.com \
    --to=npiggin@gmail.com \
    --cc=kda@linux-powerpc.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=naveen.n.rao@linux.vnet.ibm.com \
    /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).