mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	kernel test robot <lkp@intel.com>,
	"linux-snps-arc@lists.infradead.org" 
	<linux-snps-arc@lists.infradead.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
	"kbuild-all@lists.01.org" <kbuild-all@lists.01.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ofer Levi <oferle@mellanox.com>,
	Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Subject: Re: {standard input}:5973: Error: operand out of range (512 is not between -512 and 511)
Date: Mon, 24 Aug 2020 18:21:21 +0000	[thread overview]
Message-ID: <28384fea-4a07-c57d-04b0-f44f1c70adc2@synopsys.com> (raw)
In-Reply-To: <20200824095831.5lpkmkafelnvlpi2@linutronix.de>

+CC Ofer

On 8/24/20 2:58 AM, Sebastian Andrzej Siewior wrote:
> On 2020-08-24 10:17:19 [+0800], kernel test robot wrote:
>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>> head:   d012a7190fc1fd72ed48911e77ca97ba4521bccd
>> commit: de8f5e4f2dc1f032b46afda0a78cab5456974f89 lockdep: Introduce wait-type checks
>> date:   5 months ago
>> config: arc-randconfig-r004-20200824 (attached as .config)
>> compiler: arc-elf-gcc (GCC) 9.3.0
>> reproduce (this is a W=1 build):
>>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>>         chmod +x ~/bin/make.cross
>>         git checkout de8f5e4f2dc1f032b46afda0a78cab5456974f89
>>         # save the attached .config to linux build tree
>>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc 
>>
>> If you fix the issue, kindly add following tag as appropriate
>> Reported-by: kernel test robot <lkp@intel.com>
>>
>> All errors (new ones prefixed by >>):
>>
>>    {standard input}: Assembler messages:
>>>> {standard input}:5973: Error: operand out of range (512 is not between -512 and 511)
>>

The error above was fixed back in April:
799587d5731db9dc ("ARC: [plat-eznps]: Restrict to CONFIG_ISA_ARCOMPACT")

> I have here gcc 10 and the output is:

I suppose this is mainline gcc 10 ? Although it doesn't seem like compiler version
related.


> |  CC      arch/arc/kernel/signal.o
> |arch/arc/include/asm/bitops.h: Assembler messages:
> |arch/arc/include/asm/bitops.h:236: Error: junk at end of line, first unrecognized character is `0'
> |arch/arc/include/asm/bitops.h:236: Error: junk at end of line, first unrecognized character is `0'
> |make[3]: *** [scripts/Makefile.build:283: arch/arc/kernel/signal.o] Error 1
> |make[2]: *** [scripts/Makefile.build:500: arch/arc/kernel] Error 2
> |make[1]: *** [Makefile:1788: arch/arc] Error 2
> 
> the reason is that:
> | #ifndef CONFIG_ARC_PLAT_EZNPS
> | BIT_OPS(set, |, bset)
> | BIT_OPS(clear, & ~, bclr)
> | BIT_OPS(change, ^, bxor)
> | #else
> | BIT_OPS(set, |, CTOP_INST_AOR_DI_R2_R2_R3)
> | BIT_OPS(clear, & ~, CTOP_INST_AAND_DI_R2_R2_R3)
> | BIT_OPS(change, ^, CTOP_INST_AXOR_DI_R2_R2_R3)
> | #endif
> 
> and the config supplied does not accept CTOP_INST_AAND_DI_R2_R2_R3
> (which is
> 	#define CTOP_INST_AAND_DI_R2_R2_R3              0x4A664C04
> )


> and the assembler does not like that.
> After the removal CONFIG_ARC_PLAT_EZNPS I got to stage 2:
> |drivers/irqchip/irq-eznps.c:80:16: error: 'CTOP_AUX_IACK' undeclared (first use in this function)
> |   80 |  write_aux_reg(CTOP_AUX_IACK, 1 << irq);
> 

Indeed this is a problem I can reproduce. Enabling CONFIG_EZNPS_GIC on a non
ARC700 build causes the issue: the ctop header is inside platform code
(arch/arc/plat-eznps/include/plat/ctop.h) which obviously fails if not building
for ARC.

My solution is to move ctop.h to include/soc/nps/plat/.

> so I removed CONFIG_EZNPS_GIC. And then I ended with:
> |  LD      vmlinux.o
> |arc-linux-ld: gcc-10.1.0-nolibc/arc-linux/bin/../lib/gcc/arc-linux/10.1.0/arc700/libgcc.a(_muldi3.o): compiled for a little endian system and target is big endian
> |arc-linux-ld: failed to merge target specific data of file gcc-10.1.0-nolibc/arc-linux/bin/../lib/gcc/arc-linux/10.1.0/arc700/libgcc.a(_muldi3.o)

This is unrelated since original .config with CONFIG_ARC_PLAT_EZNPS would have
selected Big endina build, but you need a BE toolchain to get that working (since
libgcc emulation code still comes from toolchain).

> 
> Please update CI and ARC.

Nothing to update in CI. I'll send the ARC patch as a follow up.


> 
> Sebastian
> 

Thx for reporting.
-Vineet

  reply	other threads:[~2020-08-24 18:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-24  2:17 kernel test robot
2020-08-24  9:58 ` Sebastian Andrzej Siewior
2020-08-24 18:21   ` Vineet Gupta [this message]
2020-08-24 19:27     ` Vineet Gupta
2020-08-24 19:35     ` Sebastian Andrzej Siewior
2020-08-24 20:29       ` Vineet Gupta

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=28384fea-4a07-c57d-04b0-f44f1c70adc2@synopsys.com \
    --to=vineet.gupta1@synopsys.com \
    --cc=Alexey.Brodkin@synopsys.com \
    --cc=bigeasy@linutronix.de \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-snps-arc@lists.infradead.org \
    --cc=lkp@intel.com \
    --cc=oferle@mellanox.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /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

all inboxes | Powered by JetHome®