[powerpc:next-test 76/183] arch/powerpc/kernel/vdso32/gettimeofday.S:40: Error: syntax error; found `@', expected `,'

kernel test robot lkp at intel.com
Wed Oct 7 07:41:50 AEDT 2020


Hi Michael,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next-test
head:   72cdd117c449896c707fc6cfe5b90978160697d0
commit: 231b232df8f67e7d37af01259c21f2a131c3911e [76/183] powerpc/64: Make VDSO32 track COMPAT on 64-bit
config: powerpc-randconfig-r033-20201005 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 1127662c6dc2a276839c75a42238b11a3ad00f32)
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
        # install powerpc cross compiling tool for clang build
        # apt-get install binutils-powerpc-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id=231b232df8f67e7d37af01259c21f2a131c3911e
        git remote add powerpc https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git
        git fetch --no-tags powerpc next-test
        git checkout 231b232df8f67e7d37af01259c21f2a131c3911e
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>

All errors (new ones prefixed by >>):

   arch/powerpc/kernel/vdso32/gettimeofday.S: Assembler messages:
>> arch/powerpc/kernel/vdso32/gettimeofday.S:40: Error: syntax error; found `@', expected `,'
>> arch/powerpc/kernel/vdso32/gettimeofday.S:40: Error: junk at end of line: `@local'
   arch/powerpc/kernel/vdso32/gettimeofday.S:68: Warning: invalid register expression
>> arch/powerpc/kernel/vdso32/gettimeofday.S:68: Error: operand out of range (3 is not between 0 and 1)
   arch/powerpc/kernel/vdso32/gettimeofday.S:68: Error: missing operand
   arch/powerpc/kernel/vdso32/gettimeofday.S:69: Warning: invalid register expression
   arch/powerpc/kernel/vdso32/gettimeofday.S:69: Error: operand out of range (3 is not between 0 and 1)
   arch/powerpc/kernel/vdso32/gettimeofday.S:69: Error: missing operand
   arch/powerpc/kernel/vdso32/gettimeofday.S:72: Warning: invalid register expression
   arch/powerpc/kernel/vdso32/gettimeofday.S:72: Error: operand out of range (3 is not between 0 and 1)
   arch/powerpc/kernel/vdso32/gettimeofday.S:72: Error: missing operand
   arch/powerpc/kernel/vdso32/gettimeofday.S:73: Warning: invalid register expression
   arch/powerpc/kernel/vdso32/gettimeofday.S:73: Error: operand out of range (3 is not between 0 and 1)
   arch/powerpc/kernel/vdso32/gettimeofday.S:73: Error: missing operand
   arch/powerpc/kernel/vdso32/gettimeofday.S:86: Error: syntax error; found `@', expected `,'
   arch/powerpc/kernel/vdso32/gettimeofday.S:86: Error: junk at end of line: `@local'
   arch/powerpc/kernel/vdso32/gettimeofday.S:110: Warning: invalid register expression
   arch/powerpc/kernel/vdso32/gettimeofday.S:110: Error: operand out of range (8 is not between 0 and 1)
   arch/powerpc/kernel/vdso32/gettimeofday.S:110: Error: missing operand
   arch/powerpc/kernel/vdso32/gettimeofday.S:144: Warning: invalid register expression
   arch/powerpc/kernel/vdso32/gettimeofday.S:144: Error: missing operand
   arch/powerpc/kernel/vdso32/gettimeofday.S:213: Warning: invalid register expression
   arch/powerpc/kernel/vdso32/gettimeofday.S:213: Error: operand out of range (4 is not between 0 and 1)
   arch/powerpc/kernel/vdso32/gettimeofday.S:213: Error: missing operand
   clang-12: error: assembler command failed with exit code 1 (use -v to see invocation)

vim +40 arch/powerpc/kernel/vdso32/gettimeofday.S

597bc5c00b666fe Paul Mackerras         2008-10-27   22  
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   23  	.text
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   24  /*
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   25   * Exact prototype of gettimeofday
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   26   *
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   27   * int __kernel_gettimeofday(struct timeval *tv, struct timezone *tz);
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   28   *
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   29   */
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   30  V_FUNCTION_BEGIN(__kernel_gettimeofday)
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   31    .cfi_startproc
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   32  	mflr	r12
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   33    .cfi_register lr,r12
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   34  
bfc2eae0ad72a43 Christophe Leroy       2019-12-02   35  	mr.	r10,r3			/* r10 saves tv */
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   36  	mr	r11,r4			/* r11 saves tz */
ec0895f08f99515 Christophe Leroy       2019-12-02   37  	get_datapage	r9, r0
74609f4536f2b8f Tony Breeds            2007-06-26   38  	beq	3f
6e2f9e9cfd560f5 Christophe Leroy       2019-12-02   39  	LOAD_REG_IMMEDIATE(r7, 1000000)	/* load up USEC_PER_SEC */
8fd63a9ea752846 Paul Mackerras         2010-06-20  @40  	bl	__do_get_tspec at local	/* get sec/usec from tb & kernel */
8fd63a9ea752846 Paul Mackerras         2010-06-20   41  	stw	r3,TVAL32_TV_SEC(r10)
8fd63a9ea752846 Paul Mackerras         2010-06-20   42  	stw	r4,TVAL32_TV_USEC(r10)
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   43  
74609f4536f2b8f Tony Breeds            2007-06-26   44  3:	cmplwi	r11,0			/* check if tz is NULL */
bfc2eae0ad72a43 Christophe Leroy       2019-12-02   45  	mtlr	r12
bfc2eae0ad72a43 Christophe Leroy       2019-12-02   46  	crclr	cr0*4+so
bfc2eae0ad72a43 Christophe Leroy       2019-12-02   47  	li	r3,0
bfc2eae0ad72a43 Christophe Leroy       2019-12-02   48  	beqlr
bfc2eae0ad72a43 Christophe Leroy       2019-12-02   49  
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   50  	lwz	r4,CFG_TZ_MINUTEWEST(r9)/* fill tz */
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   51  	lwz	r5,CFG_TZ_DSTTIME(r9)
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   52  	stw	r4,TZONE_TZ_MINWEST(r11)
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   53  	stw	r5,TZONE_TZ_DSTTIME(r11)
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   54  
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   55  	blr
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   56    .cfi_endproc
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   57  V_FUNCTION_END(__kernel_gettimeofday)
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   58  
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   59  /*
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   60   * Exact prototype of clock_gettime()
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   61   *
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   62   * int __kernel_clock_gettime(clockid_t clock_id, struct timespec *tp);
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   63   *
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   64   */
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   65  V_FUNCTION_BEGIN(__kernel_clock_gettime)
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   66    .cfi_startproc
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   67  	/* Check for supported clock IDs */
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11  @68  	cmpli	cr0,r3,CLOCK_REALTIME
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   69  	cmpli	cr1,r3,CLOCK_MONOTONIC
0c37ec2aa88bd8a Benjamin Herrenschmidt 2005-11-14   70  	cror	cr0*4+eq,cr0*4+eq,cr1*4+eq
654abc69ef2e697 Christophe Leroy       2019-12-02   71  
654abc69ef2e697 Christophe Leroy       2019-12-02   72  	cmpli	cr5,r3,CLOCK_REALTIME_COARSE
654abc69ef2e697 Christophe Leroy       2019-12-02   73  	cmpli	cr6,r3,CLOCK_MONOTONIC_COARSE
654abc69ef2e697 Christophe Leroy       2019-12-02   74  	cror	cr5*4+eq,cr5*4+eq,cr6*4+eq
654abc69ef2e697 Christophe Leroy       2019-12-02   75  
654abc69ef2e697 Christophe Leroy       2019-12-02   76  	cror	cr0*4+eq,cr0*4+eq,cr5*4+eq
654abc69ef2e697 Christophe Leroy       2019-12-02   77  	bne	cr0, .Lgettime_fallback
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   78  
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   79  	mflr	r12			/* r12 saves lr */
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   80    .cfi_register lr,r12
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   81  	mr	r11,r4			/* r11 saves tp */
ec0895f08f99515 Christophe Leroy       2019-12-02   82  	get_datapage	r9, r0
6e2f9e9cfd560f5 Christophe Leroy       2019-12-02   83  	LOAD_REG_IMMEDIATE(r7, NSEC_PER_SEC)	/* load up NSEC_PER_SEC */
654abc69ef2e697 Christophe Leroy       2019-12-02   84  	beq	cr5, .Lcoarse_clocks
654abc69ef2e697 Christophe Leroy       2019-12-02   85  .Lprecise_clocks:
654abc69ef2e697 Christophe Leroy       2019-12-02   86  	bl	__do_get_tspec at local	/* get sec/nsec from tb & kernel */
654abc69ef2e697 Christophe Leroy       2019-12-02   87  	bne	cr1, .Lfinish		/* not monotonic -> all done */
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   88  
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   89  	/*
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   90  	 * CLOCK_MONOTONIC
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   91  	 */
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   92  
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   93  	/* now we must fixup using wall to monotonic. We need to snapshot
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   94  	 * that value and do the counter trick again. Fortunately, we still
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   95  	 * have the counter value in r8 that was returned by __do_get_xsec.
597bc5c00b666fe Paul Mackerras         2008-10-27   96  	 * At this point, r3,r4 contain our sec/nsec values, r5 and r6
597bc5c00b666fe Paul Mackerras         2008-10-27   97  	 * can be used, r7 contains NSEC_PER_SEC.
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   98  	 */
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11   99  
dd9a994fc68d196 Christophe Leroy       2019-04-04  100  	lwz	r5,(WTOM_CLOCK_SEC+LOPART)(r9)
597bc5c00b666fe Paul Mackerras         2008-10-27  101  	lwz	r6,WTOM_CLOCK_NSEC(r9)
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11  102  
597bc5c00b666fe Paul Mackerras         2008-10-27  103  	/* We now have our offset in r5,r6. We create a fake dependency
597bc5c00b666fe Paul Mackerras         2008-10-27  104  	 * on that value and re-check the counter
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11  105  	 */
597bc5c00b666fe Paul Mackerras         2008-10-27  106  	or	r0,r6,r5
597bc5c00b666fe Paul Mackerras         2008-10-27  107  	xor	r0,r0,r0
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11  108  	add	r9,r9,r0
597bc5c00b666fe Paul Mackerras         2008-10-27  109  	lwz	r0,(CFG_TB_UPDATE_COUNT+LOPART)(r9)
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11  110          cmpl    cr0,r8,r0		/* check if updated */
654abc69ef2e697 Christophe Leroy       2019-12-02  111  	bne-	.Lprecise_clocks
654abc69ef2e697 Christophe Leroy       2019-12-02  112  	b	.Lfinish_monotonic
654abc69ef2e697 Christophe Leroy       2019-12-02  113  
654abc69ef2e697 Christophe Leroy       2019-12-02  114  	/*
654abc69ef2e697 Christophe Leroy       2019-12-02  115  	 * For coarse clocks we get data directly from the vdso data page, so
654abc69ef2e697 Christophe Leroy       2019-12-02  116  	 * we don't need to call __do_get_tspec, but we still need to do the
654abc69ef2e697 Christophe Leroy       2019-12-02  117  	 * counter trick.
654abc69ef2e697 Christophe Leroy       2019-12-02  118  	 */
654abc69ef2e697 Christophe Leroy       2019-12-02  119  .Lcoarse_clocks:
654abc69ef2e697 Christophe Leroy       2019-12-02  120  	lwz	r8,(CFG_TB_UPDATE_COUNT+LOPART)(r9)
654abc69ef2e697 Christophe Leroy       2019-12-02  121  	andi.	r0,r8,1                 /* pending update ? loop */
654abc69ef2e697 Christophe Leroy       2019-12-02  122  	bne-	.Lcoarse_clocks
654abc69ef2e697 Christophe Leroy       2019-12-02  123  	add	r9,r9,r0		/* r0 is already 0 */
654abc69ef2e697 Christophe Leroy       2019-12-02  124  
654abc69ef2e697 Christophe Leroy       2019-12-02  125  	/*
654abc69ef2e697 Christophe Leroy       2019-12-02  126  	 * CLOCK_REALTIME_COARSE, below values are needed for MONOTONIC_COARSE
654abc69ef2e697 Christophe Leroy       2019-12-02  127  	 * too
654abc69ef2e697 Christophe Leroy       2019-12-02  128  	 */
654abc69ef2e697 Christophe Leroy       2019-12-02  129  	lwz	r3,STAMP_XTIME_SEC+LOPART(r9)
654abc69ef2e697 Christophe Leroy       2019-12-02  130  	lwz	r4,STAMP_XTIME_NSEC+LOPART(r9)
654abc69ef2e697 Christophe Leroy       2019-12-02  131  	bne	cr6,1f
654abc69ef2e697 Christophe Leroy       2019-12-02  132  
654abc69ef2e697 Christophe Leroy       2019-12-02  133  	/* CLOCK_MONOTONIC_COARSE */
654abc69ef2e697 Christophe Leroy       2019-12-02  134  	lwz	r5,(WTOM_CLOCK_SEC+LOPART)(r9)
654abc69ef2e697 Christophe Leroy       2019-12-02  135  	lwz	r6,WTOM_CLOCK_NSEC(r9)
654abc69ef2e697 Christophe Leroy       2019-12-02  136  
654abc69ef2e697 Christophe Leroy       2019-12-02  137  	/* check if counter has updated */
654abc69ef2e697 Christophe Leroy       2019-12-02  138  	or	r0,r6,r5
654abc69ef2e697 Christophe Leroy       2019-12-02  139  1:	or	r0,r0,r3
654abc69ef2e697 Christophe Leroy       2019-12-02  140  	or	r0,r0,r4
654abc69ef2e697 Christophe Leroy       2019-12-02  141  	xor	r0,r0,r0
654abc69ef2e697 Christophe Leroy       2019-12-02  142  	add	r3,r3,r0
654abc69ef2e697 Christophe Leroy       2019-12-02  143  	lwz	r0,CFG_TB_UPDATE_COUNT+LOPART(r9)
654abc69ef2e697 Christophe Leroy       2019-12-02  144  	cmpl	cr0,r0,r8               /* check if updated */
654abc69ef2e697 Christophe Leroy       2019-12-02  145  	bne-	.Lcoarse_clocks
654abc69ef2e697 Christophe Leroy       2019-12-02  146  
654abc69ef2e697 Christophe Leroy       2019-12-02  147  	/* Counter has not updated, so continue calculating proper values for
654abc69ef2e697 Christophe Leroy       2019-12-02  148  	 * sec and nsec if monotonic coarse, or just return with the proper
654abc69ef2e697 Christophe Leroy       2019-12-02  149  	 * values for realtime.
654abc69ef2e697 Christophe Leroy       2019-12-02  150  	 */
654abc69ef2e697 Christophe Leroy       2019-12-02  151  	bne	cr6, .Lfinish
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11  152  
597bc5c00b666fe Paul Mackerras         2008-10-27  153  	/* Calculate and store result. Note that this mimics the C code,
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11  154  	 * which may cause funny results if nsec goes negative... is that
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11  155  	 * possible at all ?
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11  156  	 */
654abc69ef2e697 Christophe Leroy       2019-12-02  157  .Lfinish_monotonic:
597bc5c00b666fe Paul Mackerras         2008-10-27  158  	add	r3,r3,r5
597bc5c00b666fe Paul Mackerras         2008-10-27  159  	add	r4,r4,r6
597bc5c00b666fe Paul Mackerras         2008-10-27  160  	cmpw	cr0,r4,r7
597bc5c00b666fe Paul Mackerras         2008-10-27  161  	cmpwi	cr1,r4,0
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11  162  	blt	1f
597bc5c00b666fe Paul Mackerras         2008-10-27  163  	subf	r4,r7,r4
a7f290dad32ee34 Benjamin Herrenschmidt 2005-11-11  164  	addi	r3,r3,1
654abc69ef2e697 Christophe Leroy       2019-12-02  165  1:	bge	cr1, .Lfinish
0c37ec2aa88bd8a Benjamin Herrenschmidt 2005-11-14  166  	addi	r3,r3,-1
597bc5c00b666fe Paul Mackerras         2008-10-27  167  	add	r4,r4,r7
597bc5c00b666fe Paul Mackerras         2008-10-27  168  

:::::: The code at line 40 was first introduced by commit
:::::: 8fd63a9ea7528463211a6c88d500c51851d960c8 powerpc: Rework VDSO gettimeofday to prevent time going backwards

:::::: TO: Paul Mackerras <paulus at samba.org>
:::::: CC: Benjamin Herrenschmidt <benh at kernel.crashing.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 29000 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20201007/2bd1d533/attachment-0001.gz>


More information about the Linuxppc-dev mailing list