linux-mips
[Top] [All Lists]

[PATCH] MIPS: Quit exporting kernel internel break codes to uapi/asm/bre

To: linux-mips@linux-mips.org, ralf@linux-mips.org
Subject: [PATCH] MIPS: Quit exporting kernel internel break codes to uapi/asm/break.h
From: David Daney <ddaney.cavm@gmail.com>
Date: Fri, 8 Feb 2013 09:36:51 -0800
Cc: David Daney <david.daney@cavium.com>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=i3ns2P73+eYkZfGJdsk225D8ev3lCcZZ31Dhvnl78kA=; b=CJaBnwui32NqoXvNITiI3HU9380HxtwMMdOzalMcGaGxqR9XNMeRJG9F6R9RxSnB/r 8zLifp7+eiB6wiop2SRanqTry1jH+tKX4KhHrL/2bIsVr0E+8YlH9qmQoEhuggmRE6/s meFwLVqQp8HNEvfhGL/p9TV3XCDZ/YZANcwj3GC6gqPI5w1Xo1rkDFzmil8z1HRhHO6L TINSzRriDptpBm9zpsIlSrfFb0voaURNgIs1OxRD3OwIplpxNqGJyuivR231Ozeu/GIx 2BWmlKQgbMJY16FLILCC2lIFaVa9FwzuxJ/BRx9BaBlXSQEwAdhja2k6NQ1F4s+fDAbF pi5Q==
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Sender: linux-mips-bounce@linux-mips.org
From: David Daney <david.daney@cavium.com>

The internal codes are not part of the kernel's abi.

Signed-off-by: David Daney <david.daney@cavium.com>
---

The transition of break.h to /uapi/asm happened in 3.8rc, so it is not
too late to prevent this crap from escaping to the kernel's userspace
ABI.

 arch/mips/include/asm/break.h      | 27 +++++++++++++++++++++++++++
 arch/mips/include/uapi/asm/break.h | 12 +++---------
 2 files changed, 30 insertions(+), 9 deletions(-)
 create mode 100644 arch/mips/include/asm/break.h

diff --git a/arch/mips/include/asm/break.h b/arch/mips/include/asm/break.h
new file mode 100644
index 0000000..67b6f72
--- /dev/null
+++ b/arch/mips/include/asm/break.h
@@ -0,0 +1,27 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 1995, 2003 by Ralf Baechle
+ * Copyright (C) 1999 Silicon Graphics, Inc.
+ */
+#ifndef __ASM_BREAK_H
+#define __ASM_BREAK_H
+
+#ifdef __UAPI_ASM_BREAK_H
+#error "Error: Do not directly include <uapi/asm/break.h>"
+#endif
+#include <uapi/asm/break.h>
+
+/*
+ * Break codes used internally to the kernel.
+ */
+#define BRK_BUG                512     /* Used by BUG() */
+#define BRK_KDB                513     /* Used in KDB_ENTER() */
+#define BRK_MEMU       514     /* Used by FPU emulator */
+#define BRK_KPROBE_BP  515     /* Kprobe break */
+#define BRK_KPROBE_SSTEPBP 516 /* Kprobe single step software implementation */
+#define BRK_MULOVF     1023    /* Multiply overflow */
+
+#endif /* __ASM_BREAK_H */
diff --git a/arch/mips/include/uapi/asm/break.h 
b/arch/mips/include/uapi/asm/break.h
index 9161e68..ede4baa 100644
--- a/arch/mips/include/uapi/asm/break.h
+++ b/arch/mips/include/uapi/asm/break.h
@@ -6,8 +6,8 @@
  * Copyright (C) 1995, 2003 by Ralf Baechle
  * Copyright (C) 1999 Silicon Graphics, Inc.
  */
-#ifndef __ASM_BREAK_H
-#define __ASM_BREAK_H
+#ifndef __UAPI_ASM_BREAK_H
+#define __UAPI_ASM_BREAK_H
 
 /*
  * The following break codes are or were in use for specific purposes in
@@ -27,11 +27,5 @@
 #define BRK_STACKOVERFLOW 9    /* For Ada stackchecking */
 #define BRK_NORLD      10      /* No rld found - not used by Linux/MIPS */
 #define _BRK_THREADBP  11      /* For threads, user bp (used by debuggers) */
-#define BRK_BUG                512     /* Used by BUG() */
-#define BRK_KDB                513     /* Used in KDB_ENTER() */
-#define BRK_MEMU       514     /* Used by FPU emulator */
-#define BRK_KPROBE_BP  515     /* Kprobe break */
-#define BRK_KPROBE_SSTEPBP 516 /* Kprobe single step software implementation */
-#define BRK_MULOVF     1023    /* Multiply overflow */
 
-#endif /* __ASM_BREAK_H */
+#endif /* __UAPI_ASM_BREAK_H */
-- 
1.7.11.7


<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH] MIPS: Quit exporting kernel internel break codes to uapi/asm/break.h, David Daney <=