Skip to contentSkip to conversation

arc: ptrace: hard-code "arc" instead of UTS_MACHINE

PATCH In review Masahiro Yamada 2 participants 2 messages Apr 13, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arc: ptrace: hard-code "arc" instead of UTS_MACHINE

ARC uses the UTS_MACHINE defined in the top Makefile as follows:

  UTS_MACHINE     := $(ARCH)

We know it is "arc" when we are building the kernel for ARC. Hard-code user_regset_view::name, like many other architectures do.

---

 arch/arc/kernel/Makefile | 3 ---
 arch/arc/kernel/ptrace.c | 2 +-
 2 files changed, 1 insertion(+), 4 deletions(-)
arch/arc/kernel/Makefile +0 -3
index 75539670431a..8c4fc4b54c14 100644
@@ -3,9 +3,6 @@
 # Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
 #
 
-# Pass UTS_MACHINE for user_regset definition
-CFLAGS_ptrace.o		+= -DUTS_MACHINE='"$(UTS_MACHINE)"'
-
 obj-y	:= arcksyms.o setup.o irq.o reset.o ptrace.o process.o devtree.o
 obj-y	+= signal.o traps.o sys.o troubleshoot.o stacktrace.o disasm.o
 obj-$(CONFIG_ISA_ARCOMPACT)		+= entry-compact.o intc-compact.o
arch/arc/kernel/ptrace.c +1 -1
index d5f3fcf273b5..f49a054a1016 100644
@@ -253,7 +253,7 @@ static const struct user_regset arc_regsets[] = {
 };
 
 static const struct user_regset_view user_arc_view = {
-	.name		= UTS_MACHINE,
+	.name		= "arc",
 	.e_machine	= EM_ARC_INUSE,
 	.regsets	= arc_regsets,
 	.n		= ARRAY_SIZE(arc_regsets)
Signature · 7 lines
2.25.1


_______________________________________________
linux-snps-arc mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-snps-arc
#1 lore raw

Hi Masahiro San,

Quoted 8 lines · Masahiro Yamada

ARC uses the UTS_MACHINE defined in the top Makefile as follows:

  UTS_MACHINE     := $(ARCH)

We know it is "arc" when we are building the kernel for ARC. Hard-code user_regset_view::name, like many other architectures do.

Thx for this. Applied to for-curr.

-Vineet
_______________________________________________
linux-snps-arc mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-snps-arc