All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rabin Vincent <rabin@rab.in>
To: jesper.nilsson@axis.com
Cc: linux-kernel@vger.kernel.org, linux-cris-kernel@axis.com,
	Rabin Vincent <rabin@rab.in>
Subject: [PATCH 2/3] CRIS: don't make asm/elf.h depend on asm/user.h
Date: Thu, 14 May 2015 17:26:51 +0200	[thread overview]
Message-ID: <1431617212-9093-2-git-send-email-rabin@rab.in> (raw)
In-Reply-To: <1431617212-9093-1-git-send-email-rabin@rab.in>

We're going to export asm/elf.h; remove its dependencies on the
non-exported asm/user.h and the unused asm/system.h include.

Signed-off-by: Rabin Vincent <rabin@rab.in>
---
 arch/cris/include/arch-v10/arch/elf.h | 5 +++--
 arch/cris/include/arch-v32/arch/elf.h | 5 +++--
 arch/cris/include/asm/elf.h           | 5 +----
 3 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/arch/cris/include/arch-v10/arch/elf.h b/arch/cris/include/arch-v10/arch/elf.h
index 1eb638a..3ea65ce 100644
--- a/arch/cris/include/arch-v10/arch/elf.h
+++ b/arch/cris/include/arch-v10/arch/elf.h
@@ -1,10 +1,11 @@
 #ifndef __ASMCRIS_ARCH_ELF_H
 #define __ASMCRIS_ARCH_ELF_H
 
-#include <arch/system.h>
-
 #define ELF_MACH EF_CRIS_VARIANT_ANY_V0_V10
 
+/* Matches struct user_regs_struct */
+#define ELF_NGREG 35
+
 /*
  * This is used to ensure we don't load something for the wrong architecture.
  */
diff --git a/arch/cris/include/arch-v32/arch/elf.h b/arch/cris/include/arch-v32/arch/elf.h
index c46d582..f09fe49 100644
--- a/arch/cris/include/arch-v32/arch/elf.h
+++ b/arch/cris/include/arch-v32/arch/elf.h
@@ -1,10 +1,11 @@
 #ifndef _ASM_CRIS_ELF_H
 #define _ASM_CRIS_ELF_H
 
-#include <arch/system.h>
-
 #define ELF_CORE_EFLAGS EF_CRIS_VARIANT_V32
 
+/* Matches struct user_regs_struct */
+#define ELF_NGREG 32
+
 /*
  * This is used to ensure we don't load something for the wrong architecture.
  */
diff --git a/arch/cris/include/asm/elf.h b/arch/cris/include/asm/elf.h
index c2a394f..986adba 100644
--- a/arch/cris/include/asm/elf.h
+++ b/arch/cris/include/asm/elf.h
@@ -5,7 +5,7 @@
  * ELF register definitions..
  */
 
-#include <asm/user.h>
+#include <arch/elf.h>
 
 #define R_CRIS_NONE             0
 #define R_CRIS_8                1
@@ -32,7 +32,6 @@ typedef unsigned long elf_greg_t;
 
 /* Note that NGREG is defined to ELF_NGREG in include/linux/elfcore.h, and is
    thus exposed to user-space. */
-#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t))
 typedef elf_greg_t elf_gregset_t[ELF_NGREG];
 
 /* A placeholder; CRIS does not have any fp regs.  */
@@ -45,8 +44,6 @@ typedef unsigned long elf_fpregset_t;
 #define ELF_DATA	ELFDATA2LSB
 #define ELF_ARCH	EM_CRIS
 
-#include <arch/elf.h>
-
 /* The master for these definitions is {binutils}/include/elf/cris.h:  */
 /* User symbols in this file have a leading underscore.  */
 #define EF_CRIS_UNDERSCORE		0x00000001
-- 
2.1.4


  reply	other threads:[~2015-05-14 15:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-14 15:26 [PATCH 1/3] CRIS: UAPI: fix ptrace.h Rabin Vincent
2015-05-14 15:26 ` Rabin Vincent [this message]
2015-05-14 15:26 ` [PATCH 3/3] CRIS: UAPI: fix elf.h export Rabin Vincent

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=1431617212-9093-2-git-send-email-rabin@rab.in \
    --to=rabin@rab.in \
    --cc=jesper.nilsson@axis.com \
    --cc=linux-cris-kernel@axis.com \
    --cc=linux-kernel@vger.kernel.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.