All of lore.kernel.org
 help / color / mirror / Atom feed
From: asavkov@redhat.com (Artem Savkov)
To: linux-arm-kernel@lists.infradead.org
Subject: arm64 build failure with CONFIG_ARM64_LSE_ATOMICS=y
Date: Thu, 3 Nov 2016 12:12:38 +0100	[thread overview]
Message-ID: <20161103111238.GC24243@shodan.usersys.redhat.com> (raw)
In-Reply-To: <1efb101a-a8ab-5ad9-f2bd-e7d485c71904@arm.com>

On Thu, Nov 03, 2016 at 10:39:43AM +0000, Suzuki K Poulose wrote:
> On 02/11/16 23:28, Will Deacon wrote:
> > Hi Artem,
> > 
> > On Wed, Nov 02, 2016 at 05:44:27PM +0100, Artem Savkov wrote:
> > > Hello Catalin,
> > > 
> > > Looks like your patch "efd9e03 arm64: Use static keys for CPU features"
> > > breaks arm64 build with "CONFIG_ARM64_LSE_ATOMICS=y" because it creates a
> > > circular dependency for asm/lse.h through jump_label.h:
> > > 
> > >   CC      arch/arm64/kernel/asm-offsets.s
> > > In file included from ./arch/arm64/include/asm/atomic.h:34:0,
> > >                  from ./include/linux/atomic.h:4,
> > >                  from ./include/linux/jump_label.h:169,
> > >                  from ./arch/arm64/include/asm/cpufeature.h:12,
> > >                  from ./arch/arm64/include/asm/alternative.h:4,
> > >                  from ./arch/arm64/include/asm/lse.h:7,
> > >                  from ./arch/arm64/include/asm/spinlock.h:19,
> > >                  from ./include/linux/spinlock.h:87,
> > >                  from ./include/linux/seqlock.h:35,
> > >                  from ./include/linux/time.h:5,
> > >                  from ./include/uapi/linux/timex.h:56,
> > >                  from ./include/linux/timex.h:56,
> > >                  from ./include/linux/sched.h:19,
> > >                  from arch/arm64/kernel/asm-offsets.c:21:
> > > ./arch/arm64/include/asm/atomic_lse.h: In function ?atomic_andnot?:
> > > ./arch/arm64/include/asm/atomic_lse.h:35:15: error: expected string literal before ?	?
> > >   asm volatile(ARM64_LSE_ATOMIC_INSN(__LL_SC_ATOMIC(op),  \
> > > 
> > > ...
> > > 
> > > ./arch/arm64/include/asm/cmpxchg.h: In function ?__xchg_case_1?:
> > > ./arch/arm64/include/asm/cmpxchg.h:38:15: error: expected string literal before ?ARM64_LSE_ATOMIC_INSN?
> > >   asm volatile(ARM64_LSE_ATOMIC_INSN(    \
> > 
> > I'm unable to reproduce this. I've tried enabling LSE with defconfig and
> > mainline, using compilers that both do and don't support the instructions.
> 
> I am not able to reproduce it either. One minor problem I see with the commit could
> be fixed with the following change : Does it help ?

Apparently it fails with an older gcc (4.8.5), but doesn't with 6.2.0.
The different bit is that with 4.8.5 I don't have CC_HAVE_ASM_GOTO set.
It is reproducible with 6.2.0 if you manually remove CC_HAVE_ASM_GOTO.

> ----8>-----
> 
> diff --git a/arch/arm64/include/asm/cpufeature.h b/arch/arm64/include/asm/cpufeature.h
> index 758d74f..62db988 100644
> --- a/arch/arm64/include/asm/cpufeature.h
> +++ b/arch/arm64/include/asm/cpufeature.h
> @@ -9,7 +9,6 @@
>  #ifndef __ASM_CPUFEATURE_H
>  #define __ASM_CPUFEATURE_H
> -#include <linux/jump_label.h>
>  #include <asm/hwcap.h>
>  #include <asm/sysreg.h>
> @@ -45,6 +44,7 @@
>  #ifndef __ASSEMBLY__
> +#include <linux/jump_label.h>
>  #include <linux/kernel.h>
>  /* CPU feature register tracking */

No, this doesn't help.

-- 
Regards,
  Artem

WARNING: multiple messages have this Message-ID (diff)
From: Artem Savkov <asavkov@redhat.com>
To: Suzuki K Poulose <Suzuki.Poulose@arm.com>
Cc: Will Deacon <will.deacon@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: arm64 build failure with CONFIG_ARM64_LSE_ATOMICS=y
Date: Thu, 3 Nov 2016 12:12:38 +0100	[thread overview]
Message-ID: <20161103111238.GC24243@shodan.usersys.redhat.com> (raw)
In-Reply-To: <1efb101a-a8ab-5ad9-f2bd-e7d485c71904@arm.com>

On Thu, Nov 03, 2016 at 10:39:43AM +0000, Suzuki K Poulose wrote:
> On 02/11/16 23:28, Will Deacon wrote:
> > Hi Artem,
> > 
> > On Wed, Nov 02, 2016 at 05:44:27PM +0100, Artem Savkov wrote:
> > > Hello Catalin,
> > > 
> > > Looks like your patch "efd9e03 arm64: Use static keys for CPU features"
> > > breaks arm64 build with "CONFIG_ARM64_LSE_ATOMICS=y" because it creates a
> > > circular dependency for asm/lse.h through jump_label.h:
> > > 
> > >   CC      arch/arm64/kernel/asm-offsets.s
> > > In file included from ./arch/arm64/include/asm/atomic.h:34:0,
> > >                  from ./include/linux/atomic.h:4,
> > >                  from ./include/linux/jump_label.h:169,
> > >                  from ./arch/arm64/include/asm/cpufeature.h:12,
> > >                  from ./arch/arm64/include/asm/alternative.h:4,
> > >                  from ./arch/arm64/include/asm/lse.h:7,
> > >                  from ./arch/arm64/include/asm/spinlock.h:19,
> > >                  from ./include/linux/spinlock.h:87,
> > >                  from ./include/linux/seqlock.h:35,
> > >                  from ./include/linux/time.h:5,
> > >                  from ./include/uapi/linux/timex.h:56,
> > >                  from ./include/linux/timex.h:56,
> > >                  from ./include/linux/sched.h:19,
> > >                  from arch/arm64/kernel/asm-offsets.c:21:
> > > ./arch/arm64/include/asm/atomic_lse.h: In function ‘atomic_andnot’:
> > > ./arch/arm64/include/asm/atomic_lse.h:35:15: error: expected string literal before ‘	’
> > >   asm volatile(ARM64_LSE_ATOMIC_INSN(__LL_SC_ATOMIC(op),  \
> > > 
> > > ...
> > > 
> > > ./arch/arm64/include/asm/cmpxchg.h: In function ‘__xchg_case_1’:
> > > ./arch/arm64/include/asm/cmpxchg.h:38:15: error: expected string literal before ‘ARM64_LSE_ATOMIC_INSN’
> > >   asm volatile(ARM64_LSE_ATOMIC_INSN(    \
> > 
> > I'm unable to reproduce this. I've tried enabling LSE with defconfig and
> > mainline, using compilers that both do and don't support the instructions.
> 
> I am not able to reproduce it either. One minor problem I see with the commit could
> be fixed with the following change : Does it help ?

Apparently it fails with an older gcc (4.8.5), but doesn't with 6.2.0.
The different bit is that with 4.8.5 I don't have CC_HAVE_ASM_GOTO set.
It is reproducible with 6.2.0 if you manually remove CC_HAVE_ASM_GOTO.

> ----8>-----
> 
> diff --git a/arch/arm64/include/asm/cpufeature.h b/arch/arm64/include/asm/cpufeature.h
> index 758d74f..62db988 100644
> --- a/arch/arm64/include/asm/cpufeature.h
> +++ b/arch/arm64/include/asm/cpufeature.h
> @@ -9,7 +9,6 @@
>  #ifndef __ASM_CPUFEATURE_H
>  #define __ASM_CPUFEATURE_H
> -#include <linux/jump_label.h>
>  #include <asm/hwcap.h>
>  #include <asm/sysreg.h>
> @@ -45,6 +44,7 @@
>  #ifndef __ASSEMBLY__
> +#include <linux/jump_label.h>
>  #include <linux/kernel.h>
>  /* CPU feature register tracking */

No, this doesn't help.

-- 
Regards,
  Artem

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

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-02 16:44 arm64 build failure with CONFIG_ARM64_LSE_ATOMICS=y Artem Savkov
2016-11-02 16:44 ` Artem Savkov
2016-11-02 23:28 ` Will Deacon
2016-11-02 23:28   ` Will Deacon
2016-11-03 10:39   ` Suzuki K Poulose
2016-11-03 10:39     ` Suzuki K Poulose
2016-11-03 11:12     ` Artem Savkov [this message]
2016-11-03 11:12       ` Artem Savkov
2016-11-03 18:46       ` Catalin Marinas
2016-11-03 18:46         ` Catalin Marinas
2016-11-04  8:35         ` Artem Savkov
2016-11-04  8:35           ` Artem Savkov

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=20161103111238.GC24243@shodan.usersys.redhat.com \
    --to=asavkov@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.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 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.