All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: Turn "broken gas inst" into real config option
@ 2020-01-15 14:18 Vladimir Murzin
  2020-01-15 14:42 ` Will Deacon
  0 siblings, 1 reply; 4+ messages in thread
From: Vladimir Murzin @ 2020-01-15 14:18 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: will

So it is available everywhere and there is no need to keep
CONFIG_ARM64 workaround.

Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
---
 arch/arm64/Kconfig  |  3 +++
 arch/arm64/Makefile | 10 +++-------
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 63c19ef..4139c927 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -303,6 +303,9 @@ config ARCH_SUPPORTS_UPROBES
 config ARCH_PROC_KCORE_TEXT
 	def_bool y
 
+config BROKEN_GAS_INST
+	def_bool y if !$(as-instr,1:\n.inst 0\n.rept . - 1b\n\nnop\n.endr\n)
+
 config KASAN_SHADOW_OFFSET
 	hex
 	depends on KASAN
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index 6dd8eca..dca1a97 100644
--- a/arch/arm64/Makefile
+++ b/arch/arm64/Makefile
@@ -42,19 +42,15 @@ cc_has_k_constraint := $(call try-run,echo				\
 		return 0;						\
 	}' | $(CC) -S -x c -o "$$TMP" -,,-DCONFIG_CC_HAS_K_CONSTRAINT=1)
 
-ifeq ($(CONFIG_ARM64), y)
-brokengasinst := $(call as-instr,1:\n.inst 0\n.rept . - 1b\n\nnop\n.endr\n,,-DCONFIG_BROKEN_GAS_INST=1)
-
-  ifneq ($(brokengasinst),)
+ifeq ($(CONFIG_BROKEN_GAS_INST),y)
 $(warning Detected assembler with broken .inst; disassembly will be unreliable)
-  endif
 endif
 
-KBUILD_CFLAGS	+= -mgeneral-regs-only $(brokengasinst)	\
+KBUILD_CFLAGS	+= -mgeneral-regs-only	\
 		   $(compat_vdso) $(cc_has_k_constraint)
 KBUILD_CFLAGS	+= -fno-asynchronous-unwind-tables
 KBUILD_CFLAGS	+= $(call cc-disable-warning, psabi)
-KBUILD_AFLAGS	+= $(brokengasinst) $(compat_vdso)
+KBUILD_AFLAGS	+= $(compat_vdso)
 
 KBUILD_CFLAGS	+= $(call cc-option,-mabi=lp64)
 KBUILD_AFLAGS	+= $(call cc-option,-mabi=lp64)
-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] arm64: Turn "broken gas inst" into real config option
  2020-01-15 14:18 [PATCH] arm64: Turn "broken gas inst" into real config option Vladimir Murzin
@ 2020-01-15 14:42 ` Will Deacon
  2020-01-15 16:08   ` Vladimir Murzin
  0 siblings, 1 reply; 4+ messages in thread
From: Will Deacon @ 2020-01-15 14:42 UTC (permalink / raw)
  To: Vladimir Murzin; +Cc: linux-arm-kernel

On Wed, Jan 15, 2020 at 02:18:25PM +0000, Vladimir Murzin wrote:
> So it is available everywhere and there is no need to keep
> CONFIG_ARM64 workaround.
> 
> Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
> ---
>  arch/arm64/Kconfig  |  3 +++
>  arch/arm64/Makefile | 10 +++-------
>  2 files changed, 6 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 63c19ef..4139c927 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -303,6 +303,9 @@ config ARCH_SUPPORTS_UPROBES
>  config ARCH_PROC_KCORE_TEXT
>  	def_bool y
>  
> +config BROKEN_GAS_INST
> +	def_bool y if !$(as-instr,1:\n.inst 0\n.rept . - 1b\n\nnop\n.endr\n)

Guessing you can drop the 'y if' part here?

No need to resend just for that, but would be nice to know that it works.

Will

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] arm64: Turn "broken gas inst" into real config option
  2020-01-15 14:42 ` Will Deacon
@ 2020-01-15 16:08   ` Vladimir Murzin
  2020-01-15 16:12     ` Vladimir Murzin
  0 siblings, 1 reply; 4+ messages in thread
From: Vladimir Murzin @ 2020-01-15 16:08 UTC (permalink / raw)
  To: Will Deacon; +Cc: linux-arm-kernel

On 1/15/20 2:42 PM, Will Deacon wrote:
> On Wed, Jan 15, 2020 at 02:18:25PM +0000, Vladimir Murzin wrote:
>> So it is available everywhere and there is no need to keep
>> CONFIG_ARM64 workaround.
>>
>> Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
>> ---
>>  arch/arm64/Kconfig  |  3 +++
>>  arch/arm64/Makefile | 10 +++-------
>>  2 files changed, 6 insertions(+), 7 deletions(-)
>>
>> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
>> index 63c19ef..4139c927 100644
>> --- a/arch/arm64/Kconfig
>> +++ b/arch/arm64/Kconfig
>> @@ -303,6 +303,9 @@ config ARCH_SUPPORTS_UPROBES
>>  config ARCH_PROC_KCORE_TEXT
>>  	def_bool y
>>  
>> +config BROKEN_GAS_INST
>> +	def_bool y if !$(as-instr,1:\n.inst 0\n.rept . - 1b\n\nnop\n.endr\n)
> 
> Guessing you can drop the 'y if' part here?
> 
> No need to resend just for that, but would be nice to know that it works.

With 

+config BROKEN_GAS_INST
+	def_bool if !$(as-instr,1:\n.inst 0\n.rept . - 1b\n\nnop\n.endr\n)

I'm getting

arch/arm64/Kconfig:308: syntax error
arch/arm64/Kconfig:307: invalid statement

:(

Cheers
Vladimir

> 
> Will
> 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] arm64: Turn "broken gas inst" into real config option
  2020-01-15 16:08   ` Vladimir Murzin
@ 2020-01-15 16:12     ` Vladimir Murzin
  0 siblings, 0 replies; 4+ messages in thread
From: Vladimir Murzin @ 2020-01-15 16:12 UTC (permalink / raw)
  To: Will Deacon; +Cc: linux-arm-kernel

On 1/15/20 4:08 PM, Vladimir Murzin wrote:
> On 1/15/20 2:42 PM, Will Deacon wrote:
>> On Wed, Jan 15, 2020 at 02:18:25PM +0000, Vladimir Murzin wrote:
>>> So it is available everywhere and there is no need to keep
>>> CONFIG_ARM64 workaround.
>>>
>>> Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
>>> ---
>>>  arch/arm64/Kconfig  |  3 +++
>>>  arch/arm64/Makefile | 10 +++-------
>>>  2 files changed, 6 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
>>> index 63c19ef..4139c927 100644
>>> --- a/arch/arm64/Kconfig
>>> +++ b/arch/arm64/Kconfig
>>> @@ -303,6 +303,9 @@ config ARCH_SUPPORTS_UPROBES
>>>  config ARCH_PROC_KCORE_TEXT
>>>  	def_bool y
>>>  
>>> +config BROKEN_GAS_INST
>>> +	def_bool y if !$(as-instr,1:\n.inst 0\n.rept . - 1b\n\nnop\n.endr\n)
>>
>> Guessing you can drop the 'y if' part here?
>>
>> No need to resend just for that, but would be nice to know that it works.
> 
> With 
> 
> +config BROKEN_GAS_INST
> +	def_bool if !$(as-instr,1:\n.inst 0\n.rept . - 1b\n\nnop\n.endr\n)
> 
> I'm getting
> 
> arch/arm64/Kconfig:308: syntax error
> arch/arm64/Kconfig:307: invalid statement
> 
> :(

Because I did not drop "if". Indeed, without "y if" everything still works fine.

Vladimir


> 
> Cheers
> Vladimir
> 
>>
>> Will
>>
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2020-01-15 16:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-15 14:18 [PATCH] arm64: Turn "broken gas inst" into real config option Vladimir Murzin
2020-01-15 14:42 ` Will Deacon
2020-01-15 16:08   ` Vladimir Murzin
2020-01-15 16:12     ` Vladimir Murzin

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.