All of lore.kernel.org
 help / color / mirror / Atom feed
* [kbuild:kbuild 2/4] arch/openrisc/include/asm/spr.h:20:27: error: impossible constraint in 'asm'
@ 2018-11-11 18:17 kbuild test robot
       [not found] ` <CAAfxs76Qe7ORo7RFqSXc28bY15DR3zCy6rUAvg9T76xWS1TsWw@mail.gmail.com>
  0 siblings, 1 reply; 6+ messages in thread
From: kbuild test robot @ 2018-11-11 18:17 UTC (permalink / raw)
  To: Changbin Du; +Cc: kbuild-all, linux-kbuild, Masahiro Yamada

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git kbuild
head:   e73c4f947acbe6ff12d1f1711d6a8c0ad1c9483a
commit: cc2b86bb90b2d045b82d45a6dbe7c9285e0f00b9 [2/4] kernel hacking: add a config option to disable compiler auto-inlining
config: openrisc-allyesconfig (attached as .config)
compiler: or1k-linux-gcc (GCC) 6.0.0 20160327 (experimental)
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout cc2b86bb90b2d045b82d45a6dbe7c9285e0f00b9
        # save the attached .config to linux build tree
        make.cross ARCH=openrisc 

All errors (new ones prefixed by >>):

   In file included from arch/openrisc/mm/cache.c:17:0:
   arch/openrisc/mm/cache.c: In function 'cache_loop':
   arch/openrisc/include/asm/spr.h:20:27: warning: asm operand 0 probably doesn't match constraints
    #define mtspr(_spr, _val) __asm__ __volatile__ (  \
                              ^
   arch/openrisc/mm/cache.c:29:3: note: in expansion of macro 'mtspr'
      mtspr(reg, line);
      ^~~~~
>> arch/openrisc/include/asm/spr.h:20:27: error: impossible constraint in 'asm'
    #define mtspr(_spr, _val) __asm__ __volatile__ (  \
                              ^
   arch/openrisc/mm/cache.c:29:3: note: in expansion of macro 'mtspr'
      mtspr(reg, line);
      ^~~~~

vim +/asm +20 arch/openrisc/include/asm/spr.h

58e0166a4 Jonas Bonn 2011-06-04  19  
58e0166a4 Jonas Bonn 2011-06-04 @20  #define mtspr(_spr, _val) __asm__ __volatile__ (		\
58e0166a4 Jonas Bonn 2011-06-04  21  	"l.mtspr r0,%1,%0"					\
58e0166a4 Jonas Bonn 2011-06-04  22  	: : "K" (_spr), "r" (_val))
58e0166a4 Jonas Bonn 2011-06-04  23  #define mtspr_off(_spr, _off, _val) __asm__ __volatile__ (	\
58e0166a4 Jonas Bonn 2011-06-04  24  	"l.mtspr %0,%1,%2"					\
58e0166a4 Jonas Bonn 2011-06-04  25  	: : "r" (_off), "r" (_val), "K" (_spr))
58e0166a4 Jonas Bonn 2011-06-04  26  

:::::: The code at line 20 was first introduced by commit
:::::: 58e0166a4772aaeb10c9b0f6d59f19099d2047df OpenRISC: Headers

:::::: TO: Jonas Bonn <jonas@southpole.se>
:::::: CC: Jonas Bonn <jonas@southpole.se>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 47219 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [kbuild-all] [kbuild:kbuild 2/4] arch/openrisc/include/asm/spr.h:20:27: error: impossible constraint in 'asm'
       [not found] ` <CAAfxs76Qe7ORo7RFqSXc28bY15DR3zCy6rUAvg9T76xWS1TsWw@mail.gmail.com>
@ 2018-11-11 21:51   ` Stafford Horne
  2018-11-12 14:36     ` Changbin Du
  2018-11-13  0:09     ` Rong Chen
  0 siblings, 2 replies; 6+ messages in thread
From: Stafford Horne @ 2018-11-11 21:51 UTC (permalink / raw)
  To: kbuild test robot; +Cc: Changbin Du, Masahiro Yamada, kbuild-all, linux-kbuild

Again, in plain text mode:

Did something change with the compiler setup?  The error here says gcc
6.0.0.  however the version in the make.cross tool is 5.4.0, which is
strange.  Fyi, We have binaries for 7.2.0 and 9.x which can be used.

Also our toolchain is all upstream as of last week.

On Mon, Nov 12, 2018 at 6:03 AM Stafford Horne <shorne@gmail.com> wrote:
>
> Hello,
>
> Did something change with the compiler setup?  The error here says gcc 6.0.0.  however the version in the make.cross tool is 5.4.0, which is strange.  Fyi, We have binaries for 7.2.0 and 9.x which can be used.
>
> Also our toolchain is all upstream as of last week.
>
> -stafford
>
> On Mon, Nov 12, 2018, 3:17 AM kbuild test robot <lkp@intel.com wrote:
>>
>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git kbuild
>> head:   e73c4f947acbe6ff12d1f1711d6a8c0ad1c9483a
>> commit: cc2b86bb90b2d045b82d45a6dbe7c9285e0f00b9 [2/4] kernel hacking: add a config option to disable compiler auto-inlining
>> config: openrisc-allyesconfig (attached as .config)
>> compiler: or1k-linux-gcc (GCC) 6.0.0 20160327 (experimental)
>> reproduce:
>>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>>         chmod +x ~/bin/make.cross
>>         git checkout cc2b86bb90b2d045b82d45a6dbe7c9285e0f00b9
>>         # save the attached .config to linux build tree
>>         make.cross ARCH=openrisc
>>
>> All errors (new ones prefixed by >>):
>>
>>    In file included from arch/openrisc/mm/cache.c:17:0:
>>    arch/openrisc/mm/cache.c: In function 'cache_loop':
>>    arch/openrisc/include/asm/spr.h:20:27: warning: asm operand 0 probably doesn't match constraints
>>     #define mtspr(_spr, _val) __asm__ __volatile__ (  \
>>                               ^
>>    arch/openrisc/mm/cache.c:29:3: note: in expansion of macro 'mtspr'
>>       mtspr(reg, line);
>>       ^~~~~
>> >> arch/openrisc/include/asm/spr.h:20:27: error: impossible constraint in 'asm'
>>     #define mtspr(_spr, _val) __asm__ __volatile__ (  \
>>                               ^
>>    arch/openrisc/mm/cache.c:29:3: note: in expansion of macro 'mtspr'
>>       mtspr(reg, line);
>>       ^~~~~
>>
>> vim +/asm +20 arch/openrisc/include/asm/spr.h
>>
>> 58e0166a4 Jonas Bonn 2011-06-04  19
>> 58e0166a4 Jonas Bonn 2011-06-04 @20  #define mtspr(_spr, _val) __asm__ __volatile__ (           \
>> 58e0166a4 Jonas Bonn 2011-06-04  21     "l.mtspr r0,%1,%0"                                      \
>> 58e0166a4 Jonas Bonn 2011-06-04  22     : : "K" (_spr), "r" (_val))
>> 58e0166a4 Jonas Bonn 2011-06-04  23  #define mtspr_off(_spr, _off, _val) __asm__ __volatile__ ( \
>> 58e0166a4 Jonas Bonn 2011-06-04  24     "l.mtspr %0,%1,%2"                                      \
>> 58e0166a4 Jonas Bonn 2011-06-04  25     : : "r" (_off), "r" (_val), "K" (_spr))
>> 58e0166a4 Jonas Bonn 2011-06-04  26
>>
>> :::::: The code at line 20 was first introduced by commit
>> :::::: 58e0166a4772aaeb10c9b0f6d59f19099d2047df OpenRISC: Headers
>>
>> :::::: TO: Jonas Bonn <jonas@southpole.se>
>> :::::: CC: Jonas Bonn <jonas@southpole.se>
>>
>> ---
>> 0-DAY kernel test infrastructure                Open Source Technology Center
>> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
>> _______________________________________________
>> kbuild-all mailing list
>> kbuild-all@lists.01.org
>> https://lists.01.org/mailman/listinfo/kbuild-all

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [kbuild-all] [kbuild:kbuild 2/4] arch/openrisc/include/asm/spr.h:20:27: error: impossible constraint in 'asm'
  2018-11-11 21:51   ` [kbuild-all] " Stafford Horne
@ 2018-11-12 14:36     ` Changbin Du
  2018-11-13 20:36       ` Stafford Horne
  2018-11-13  0:09     ` Rong Chen
  1 sibling, 1 reply; 6+ messages in thread
From: Changbin Du @ 2018-11-12 14:36 UTC (permalink / raw)
  To: Stafford Horne
  Cc: kbuild test robot, Changbin Du, Masahiro Yamada, kbuild-all,
	linux-kbuild

On Mon, Nov 12, 2018 at 06:51:57AM +0900, Stafford Horne wrote:
> Again, in plain text mode:
> 
> Did something change with the compiler setup?  The error here says gcc
> 6.0.0.  however the version in the make.cross tool is 5.4.0, which is
> strange.  Fyi, We have binaries for 7.2.0 and 9.x which can be used.
> 
> Also our toolchain is all upstream as of last week.
> 
> On Mon, Nov 12, 2018 at 6:03 AM Stafford Horne <shorne@gmail.com> wrote:
> >
> > Hello,
> >
> > Did something change with the compiler setup?  The error here says gcc 6.0.0.  however the version in the make.cross tool is 5.4.0, which is strange.  Fyi, We have binaries for 7.2.0 and 9.x which can be used.
> >
> > Also our toolchain is all upstream as of last week.
> >
> > -stafford
> >
I added a patch which disables gcc auto-inlining by '-fno-inline-functions 
-fno-inline-small-functions -fno-inline-functions-called-once' (but default
option is false).

See series https://lkml.org/lkml/2018/5/9/213.

I am trying to make gcc happy for this corner case. Thanks!

> > On Mon, Nov 12, 2018, 3:17 AM kbuild test robot <lkp@intel.com wrote:
> >>
> >> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git kbuild
> >> head:   e73c4f947acbe6ff12d1f1711d6a8c0ad1c9483a
> >> commit: cc2b86bb90b2d045b82d45a6dbe7c9285e0f00b9 [2/4] kernel hacking: add a config option to disable compiler auto-inlining
> >> config: openrisc-allyesconfig (attached as .config)
> >> compiler: or1k-linux-gcc (GCC) 6.0.0 20160327 (experimental)
> >> reproduce:
> >>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> >>         chmod +x ~/bin/make.cross
> >>         git checkout cc2b86bb90b2d045b82d45a6dbe7c9285e0f00b9
> >>         # save the attached .config to linux build tree
> >>         make.cross ARCH=openrisc
> >>
> >> All errors (new ones prefixed by >>):
> >>
> >>    In file included from arch/openrisc/mm/cache.c:17:0:
> >>    arch/openrisc/mm/cache.c: In function 'cache_loop':
> >>    arch/openrisc/include/asm/spr.h:20:27: warning: asm operand 0 probably doesn't match constraints
> >>     #define mtspr(_spr, _val) __asm__ __volatile__ (  \
> >>                               ^
> >>    arch/openrisc/mm/cache.c:29:3: note: in expansion of macro 'mtspr'
> >>       mtspr(reg, line);
> >>       ^~~~~
> >> >> arch/openrisc/include/asm/spr.h:20:27: error: impossible constraint in 'asm'
> >>     #define mtspr(_spr, _val) __asm__ __volatile__ (  \
> >>                               ^
> >>    arch/openrisc/mm/cache.c:29:3: note: in expansion of macro 'mtspr'
> >>       mtspr(reg, line);
> >>       ^~~~~
> >>
> >> vim +/asm +20 arch/openrisc/include/asm/spr.h
> >>
> >> 58e0166a4 Jonas Bonn 2011-06-04  19
> >> 58e0166a4 Jonas Bonn 2011-06-04 @20  #define mtspr(_spr, _val) __asm__ __volatile__ (           \
> >> 58e0166a4 Jonas Bonn 2011-06-04  21     "l.mtspr r0,%1,%0"                                      \
> >> 58e0166a4 Jonas Bonn 2011-06-04  22     : : "K" (_spr), "r" (_val))
> >> 58e0166a4 Jonas Bonn 2011-06-04  23  #define mtspr_off(_spr, _off, _val) __asm__ __volatile__ ( \
> >> 58e0166a4 Jonas Bonn 2011-06-04  24     "l.mtspr %0,%1,%2"                                      \
> >> 58e0166a4 Jonas Bonn 2011-06-04  25     : : "r" (_off), "r" (_val), "K" (_spr))
> >> 58e0166a4 Jonas Bonn 2011-06-04  26
> >>
> >> :::::: The code at line 20 was first introduced by commit
> >> :::::: 58e0166a4772aaeb10c9b0f6d59f19099d2047df OpenRISC: Headers
> >>
> >> :::::: TO: Jonas Bonn <jonas@southpole.se>
> >> :::::: CC: Jonas Bonn <jonas@southpole.se>
> >>
> >> ---
> >> 0-DAY kernel test infrastructure                Open Source Technology Center
> >> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
> >> _______________________________________________
> >> kbuild-all mailing list
> >> kbuild-all@lists.01.org
> >> https://lists.01.org/mailman/listinfo/kbuild-all

-- 
Cheers,
Changbin Du

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [kbuild-all] [kbuild:kbuild 2/4] arch/openrisc/include/asm/spr.h:20:27: error: impossible constraint in 'asm'
  2018-11-11 21:51   ` [kbuild-all] " Stafford Horne
  2018-11-12 14:36     ` Changbin Du
@ 2018-11-13  0:09     ` Rong Chen
  2018-11-13 20:32       ` Stafford Horne
  1 sibling, 1 reply; 6+ messages in thread
From: Rong Chen @ 2018-11-13  0:09 UTC (permalink / raw)
  To: Stafford Horne, kbuild test robot
  Cc: Masahiro Yamada, linux-kbuild, kbuild-all, Changbin Du

Hi Atafford,

I do apologise for troubling you, we have updated the make.cross,
you could use "GCC_VERSION=6.0.0 make.cross ARCH=openrisc" to reproduce.

Best Regards,
Rong Chen

On 11/12/2018 05:51 AM, Stafford Horne wrote:
> Again, in plain text mode:
>
> Did something change with the compiler setup?  The error here says gcc
> 6.0.0.  however the version in the make.cross tool is 5.4.0, which is
> strange.  Fyi, We have binaries for 7.2.0 and 9.x which can be used.
>
> Also our toolchain is all upstream as of last week.
>
> On Mon, Nov 12, 2018 at 6:03 AM Stafford Horne <shorne@gmail.com> wrote:
>> Hello,
>>
>> Did something change with the compiler setup?  The error here says gcc 6.0.0.  however the version in the make.cross tool is 5.4.0, which is strange.  Fyi, We have binaries for 7.2.0 and 9.x which can be used.
>>
>> Also our toolchain is all upstream as of last week.
>>
>> -stafford
>>
>> On Mon, Nov 12, 2018, 3:17 AM kbuild test robot <lkp@intel.com wrote:
>>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git kbuild
>>> head:   e73c4f947acbe6ff12d1f1711d6a8c0ad1c9483a
>>> commit: cc2b86bb90b2d045b82d45a6dbe7c9285e0f00b9 [2/4] kernel hacking: add a config option to disable compiler auto-inlining
>>> config: openrisc-allyesconfig (attached as .config)
>>> compiler: or1k-linux-gcc (GCC) 6.0.0 20160327 (experimental)
>>> reproduce:
>>>          wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>>>          chmod +x ~/bin/make.cross
>>>          git checkout cc2b86bb90b2d045b82d45a6dbe7c9285e0f00b9
>>>          # save the attached .config to linux build tree
>>>          make.cross ARCH=openrisc
>>>
>>> All errors (new ones prefixed by >>):
>>>
>>>     In file included from arch/openrisc/mm/cache.c:17:0:
>>>     arch/openrisc/mm/cache.c: In function 'cache_loop':
>>>     arch/openrisc/include/asm/spr.h:20:27: warning: asm operand 0 probably doesn't match constraints
>>>      #define mtspr(_spr, _val) __asm__ __volatile__ (  \
>>>                                ^
>>>     arch/openrisc/mm/cache.c:29:3: note: in expansion of macro 'mtspr'
>>>        mtspr(reg, line);
>>>        ^~~~~
>>>>> arch/openrisc/include/asm/spr.h:20:27: error: impossible constraint in 'asm'
>>>      #define mtspr(_spr, _val) __asm__ __volatile__ (  \
>>>                                ^
>>>     arch/openrisc/mm/cache.c:29:3: note: in expansion of macro 'mtspr'
>>>        mtspr(reg, line);
>>>        ^~~~~
>>>
>>> vim +/asm +20 arch/openrisc/include/asm/spr.h
>>>
>>> 58e0166a4 Jonas Bonn 2011-06-04  19
>>> 58e0166a4 Jonas Bonn 2011-06-04 @20  #define mtspr(_spr, _val) __asm__ __volatile__ (           \
>>> 58e0166a4 Jonas Bonn 2011-06-04  21     "l.mtspr r0,%1,%0"                                      \
>>> 58e0166a4 Jonas Bonn 2011-06-04  22     : : "K" (_spr), "r" (_val))
>>> 58e0166a4 Jonas Bonn 2011-06-04  23  #define mtspr_off(_spr, _off, _val) __asm__ __volatile__ ( \
>>> 58e0166a4 Jonas Bonn 2011-06-04  24     "l.mtspr %0,%1,%2"                                      \
>>> 58e0166a4 Jonas Bonn 2011-06-04  25     : : "r" (_off), "r" (_val), "K" (_spr))
>>> 58e0166a4 Jonas Bonn 2011-06-04  26
>>>
>>> :::::: The code at line 20 was first introduced by commit
>>> :::::: 58e0166a4772aaeb10c9b0f6d59f19099d2047df OpenRISC: Headers
>>>
>>> :::::: TO: Jonas Bonn <jonas@southpole.se>
>>> :::::: CC: Jonas Bonn <jonas@southpole.se>
>>>
>>> ---
>>> 0-DAY kernel test infrastructure                Open Source Technology Center
>>> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
>>> _______________________________________________
>>> kbuild-all mailing list
>>> kbuild-all@lists.01.org
>>> https://lists.01.org/mailman/listinfo/kbuild-all
> _______________________________________________
> kbuild-all mailing list
> kbuild-all@lists.01.org
> https://lists.01.org/mailman/listinfo/kbuild-all

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [kbuild-all] [kbuild:kbuild 2/4] arch/openrisc/include/asm/spr.h:20:27: error: impossible constraint in 'asm'
  2018-11-13  0:09     ` Rong Chen
@ 2018-11-13 20:32       ` Stafford Horne
  0 siblings, 0 replies; 6+ messages in thread
From: Stafford Horne @ 2018-11-13 20:32 UTC (permalink / raw)
  To: Rong Chen
  Cc: kbuild test robot, Masahiro Yamada, linux-kbuild, kbuild-all,
	Changbin Du

On Tue, Nov 13, 2018 at 08:09:00AM +0800, Rong Chen wrote:
> Hi Atafford,
> 
> I do apologise for troubling you, we have updated the make.cross,
> you could use "GCC_VERSION=6.0.0 make.cross ARCH=openrisc" to reproduce.

Thanks, that explains it.  I see that Du Changbin has addressed the actualy
issue as well.

-Stafford

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [kbuild-all] [kbuild:kbuild 2/4] arch/openrisc/include/asm/spr.h:20:27: error: impossible constraint in 'asm'
  2018-11-12 14:36     ` Changbin Du
@ 2018-11-13 20:36       ` Stafford Horne
  0 siblings, 0 replies; 6+ messages in thread
From: Stafford Horne @ 2018-11-13 20:36 UTC (permalink / raw)
  To: Changbin Du; +Cc: kbuild test robot, Masahiro Yamada, kbuild-all, linux-kbuild

On Mon, Nov 12, 2018 at 10:36:06PM +0800, Changbin Du wrote:
> On Mon, Nov 12, 2018 at 06:51:57AM +0900, Stafford Horne wrote:
> > Again, in plain text mode:
> > 
> > Did something change with the compiler setup?  The error here says gcc
> > 6.0.0.  however the version in the make.cross tool is 5.4.0, which is
> > strange.  Fyi, We have binaries for 7.2.0 and 9.x which can be used.
> > 
> > Also our toolchain is all upstream as of last week.
> > 
> > On Mon, Nov 12, 2018 at 6:03 AM Stafford Horne <shorne@gmail.com> wrote:
> > >
> > > Hello,
> > >
> > > Did something change with the compiler setup?  The error here says gcc 6.0.0.  however the version in the make.cross tool is 5.4.0, which is strange.  Fyi, We have binaries for 7.2.0 and 9.x which can be used.
> > >
> > > Also our toolchain is all upstream as of last week.
> > >
> > > -stafford
> > >
> I added a patch which disables gcc auto-inlining by '-fno-inline-functions 
> -fno-inline-small-functions -fno-inline-functions-called-once' (but default
> option is false).
> 
> See series https://lkml.org/lkml/2018/5/9/213.
> 
> I am trying to make gcc happy for this corner case. Thanks!

Thanks, this looks like a really useful debug feature.  Also, thanks for sending
the other patch to fix the build issue in openrisc.

-Stafford

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-11-14  6:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-11 18:17 [kbuild:kbuild 2/4] arch/openrisc/include/asm/spr.h:20:27: error: impossible constraint in 'asm' kbuild test robot
     [not found] ` <CAAfxs76Qe7ORo7RFqSXc28bY15DR3zCy6rUAvg9T76xWS1TsWw@mail.gmail.com>
2018-11-11 21:51   ` [kbuild-all] " Stafford Horne
2018-11-12 14:36     ` Changbin Du
2018-11-13 20:36       ` Stafford Horne
2018-11-13  0:09     ` Rong Chen
2018-11-13 20:32       ` Stafford Horne

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.