All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] MIPS: Remove unused asm/asm.h macros
@ 2018-10-15 18:33 Paul Burton
  2018-10-15 18:33 ` [PATCH 2/7] MIPS: Remove unused PIC macros Paul Burton
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Paul Burton @ 2018-10-15 18:33 UTC (permalink / raw)
  To: linux-mips; +Cc: Paul Burton

This series removes a bunch of unused code from the MIPS asm/asm.h
header, shaving off a little over a hundred lines of dead code.

Applies cleanly atop mips-next as of commit 8b656253a7a4 ("MIPS: Provide
actually relaxed MMIO accessors").

Paul Burton (7):
  MIPS: Remove unused MOVN & MOVZ macros
  MIPS: Remove unused PIC macros
  MIPS: Remove unused TTABLE macro
  MIPS: Remove unused CAT macro
  MIPS: Add kernel_pref & user_pref helpers
  MIPS: lib: Use kernel_pref & user_pref in memcpy()
  MIPS: Remove unused PREF, PREFE & PREFX macros

 arch/mips/include/asm/asm-eva.h |   6 ++
 arch/mips/include/asm/asm.h     | 116 --------------------------------
 arch/mips/lib/memcpy.S          |  12 ++--
 3 files changed, 14 insertions(+), 120 deletions(-)

-- 
2.19.1

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

* [PATCH 2/7] MIPS: Remove unused PIC macros
  2018-10-15 18:33 [PATCH 0/7] MIPS: Remove unused asm/asm.h macros Paul Burton
@ 2018-10-15 18:33 ` Paul Burton
  2018-11-22 16:31   ` Maciej W. Rozycki
  2018-10-15 18:33 ` [PATCH 1/7] MIPS: Remove unused MOVN & MOVZ macros Paul Burton
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 11+ messages in thread
From: Paul Burton @ 2018-10-15 18:33 UTC (permalink / raw)
  To: linux-mips; +Cc: Paul Burton

asm/asm.h contains CPRESTORE, CPADD & CPLOAD macros that are intended
for use with position independent code, but are not used anywhere in the
kernel - along with a comment to that effect. Remove the dead code.

Signed-off-by: Paul Burton <paul.burton@mips.com>
---

 arch/mips/include/asm/asm.h | 17 -----------------
 1 file changed, 17 deletions(-)

diff --git a/arch/mips/include/asm/asm.h b/arch/mips/include/asm/asm.h
index 4e4f60597c72..03711771d51f 100644
--- a/arch/mips/include/asm/asm.h
+++ b/arch/mips/include/asm/asm.h
@@ -29,23 +29,6 @@
 #define CAT(str1, str2) __CAT(str1, str2)
 #endif
 
-/*
- * PIC specific declarations
- * Not used for the kernel but here seems to be the right place.
- */
-#ifdef __PIC__
-#define CPRESTORE(register)				\
-		.cprestore register
-#define CPADD(register)					\
-		.cpadd	register
-#define CPLOAD(register)				\
-		.cpload register
-#else
-#define CPRESTORE(register)
-#define CPADD(register)
-#define CPLOAD(register)
-#endif
-
 /*
  * LEAF - declare leaf routine
  */
-- 
2.19.1

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

* [PATCH 1/7] MIPS: Remove unused MOVN & MOVZ macros
  2018-10-15 18:33 [PATCH 0/7] MIPS: Remove unused asm/asm.h macros Paul Burton
  2018-10-15 18:33 ` [PATCH 2/7] MIPS: Remove unused PIC macros Paul Burton
@ 2018-10-15 18:33 ` Paul Burton
  2018-10-15 18:33 ` [PATCH 3/7] MIPS: Remove unused TTABLE macro Paul Burton
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Paul Burton @ 2018-10-15 18:33 UTC (permalink / raw)
  To: linux-mips; +Cc: Paul Burton

We have macros in asm/asm.h to allow for use of the MOVN & MOVZ
instructions with compare-and-branch sequences providing compatibility
for ISA versions which don't include those instructions. However the
macros are unused, and appear to have always been unused. Delete the
dead code.

Signed-off-by: Paul Burton <paul.burton@mips.com>
---

 arch/mips/include/asm/asm.h | 43 -------------------------------------
 1 file changed, 43 deletions(-)

diff --git a/arch/mips/include/asm/asm.h b/arch/mips/include/asm/asm.h
index 81fae23ce7cd..4e4f60597c72 100644
--- a/arch/mips/include/asm/asm.h
+++ b/arch/mips/include/asm/asm.h
@@ -176,49 +176,6 @@ symbol		=	value
 
 #endif /* !CONFIG_CPU_HAS_PREFETCH */
 
-/*
- * MIPS ISA IV/V movn/movz instructions and equivalents for older CPUs.
- */
-#if (_MIPS_ISA == _MIPS_ISA_MIPS1)
-#define MOVN(rd, rs, rt)				\
-		.set	push;				\
-		.set	reorder;			\
-		beqz	rt, 9f;				\
-		move	rd, rs;				\
-		.set	pop;				\
-9:
-#define MOVZ(rd, rs, rt)				\
-		.set	push;				\
-		.set	reorder;			\
-		bnez	rt, 9f;				\
-		move	rd, rs;				\
-		.set	pop;				\
-9:
-#endif /* _MIPS_ISA == _MIPS_ISA_MIPS1 */
-#if (_MIPS_ISA == _MIPS_ISA_MIPS2) || (_MIPS_ISA == _MIPS_ISA_MIPS3)
-#define MOVN(rd, rs, rt)				\
-		.set	push;				\
-		.set	noreorder;			\
-		bnezl	rt, 9f;				\
-		 move	rd, rs;				\
-		.set	pop;				\
-9:
-#define MOVZ(rd, rs, rt)				\
-		.set	push;				\
-		.set	noreorder;			\
-		beqzl	rt, 9f;				\
-		 move	rd, rs;				\
-		.set	pop;				\
-9:
-#endif /* (_MIPS_ISA == _MIPS_ISA_MIPS2) || (_MIPS_ISA == _MIPS_ISA_MIPS3) */
-#if (_MIPS_ISA == _MIPS_ISA_MIPS4 ) || (_MIPS_ISA == _MIPS_ISA_MIPS5) || \
-    (_MIPS_ISA == _MIPS_ISA_MIPS32) || (_MIPS_ISA == _MIPS_ISA_MIPS64)
-#define MOVN(rd, rs, rt)				\
-		movn	rd, rs, rt
-#define MOVZ(rd, rs, rt)				\
-		movz	rd, rs, rt
-#endif /* MIPS IV, MIPS V, MIPS32 or MIPS64 */
-
 /*
  * Stack alignment
  */
-- 
2.19.1

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

* [PATCH 3/7] MIPS: Remove unused TTABLE macro
  2018-10-15 18:33 [PATCH 0/7] MIPS: Remove unused asm/asm.h macros Paul Burton
  2018-10-15 18:33 ` [PATCH 2/7] MIPS: Remove unused PIC macros Paul Burton
  2018-10-15 18:33 ` [PATCH 1/7] MIPS: Remove unused MOVN & MOVZ macros Paul Burton
@ 2018-10-15 18:33 ` Paul Burton
  2018-10-15 18:33 ` [PATCH 4/7] MIPS: Remove unused CAT macro Paul Burton
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Paul Burton @ 2018-10-15 18:33 UTC (permalink / raw)
  To: linux-mips; +Cc: Paul Burton

asm/asm.h contains a TTABLE macro to generate "text tables" which would
appear to be arrays of pointers to strings. It is unused throughout the
kernel tree, so delete the dead code.

Signed-off-by: Paul Burton <paul.burton@mips.com>
---

 arch/mips/include/asm/asm.h | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/arch/mips/include/asm/asm.h b/arch/mips/include/asm/asm.h
index 03711771d51f..0cd72b43079f 100644
--- a/arch/mips/include/asm/asm.h
+++ b/arch/mips/include/asm/asm.h
@@ -112,17 +112,6 @@ symbol		=	value
 8:		.asciiz msg;				\
 		.popsection;
 
-/*
- * Build text tables
- */
-#define TTABLE(string)					\
-		.pushsection .text;			\
-		.word	1f;				\
-		.popsection				\
-		.pushsection .data;			\
-1:		.asciiz string;				\
-		.popsection
-
 /*
  * MIPS IV pref instruction.
  * Use with .set noreorder only!
-- 
2.19.1

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

* [PATCH 4/7] MIPS: Remove unused CAT macro
  2018-10-15 18:33 [PATCH 0/7] MIPS: Remove unused asm/asm.h macros Paul Burton
                   ` (2 preceding siblings ...)
  2018-10-15 18:33 ` [PATCH 3/7] MIPS: Remove unused TTABLE macro Paul Burton
@ 2018-10-15 18:33 ` Paul Burton
  2018-10-15 18:33 ` [PATCH 5/7] MIPS: Add kernel_pref & user_pref helpers Paul Burton
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Paul Burton @ 2018-10-15 18:33 UTC (permalink / raw)
  To: linux-mips; +Cc: Paul Burton

asm/asm.h provides a CAT macro which is unused throughout the tree, and
if anyone wanted it the generic CONCATENATE macro in linux/kernel.h
provides the same functionality. Delete the dead code.

Signed-off-by: Paul Burton <paul.burton@mips.com>
---

 arch/mips/include/asm/asm.h | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/arch/mips/include/asm/asm.h b/arch/mips/include/asm/asm.h
index 0cd72b43079f..74b1c6fd8277 100644
--- a/arch/mips/include/asm/asm.h
+++ b/arch/mips/include/asm/asm.h
@@ -20,15 +20,6 @@
 #include <asm/sgidefs.h>
 #include <asm/asm-eva.h>
 
-#ifndef CAT
-#ifdef __STDC__
-#define __CAT(str1, str2) str1##str2
-#else
-#define __CAT(str1, str2) str1/**/str2
-#endif
-#define CAT(str1, str2) __CAT(str1, str2)
-#endif
-
 /*
  * LEAF - declare leaf routine
  */
-- 
2.19.1

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

* [PATCH 5/7] MIPS: Add kernel_pref & user_pref helpers
  2018-10-15 18:33 [PATCH 0/7] MIPS: Remove unused asm/asm.h macros Paul Burton
                   ` (3 preceding siblings ...)
  2018-10-15 18:33 ` [PATCH 4/7] MIPS: Remove unused CAT macro Paul Burton
@ 2018-10-15 18:33 ` Paul Burton
  2018-10-15 18:33 ` [PATCH 6/7] MIPS: lib: Use kernel_pref & user_pref in memcpy() Paul Burton
  2018-10-15 18:33 ` [PATCH 7/7] MIPS: Remove unused PREF, PREFE & PREFX macros Paul Burton
  6 siblings, 0 replies; 11+ messages in thread
From: Paul Burton @ 2018-10-15 18:33 UTC (permalink / raw)
  To: linux-mips; +Cc: Paul Burton

Add kernel_pref & user_pref macros to asm/asm-eva.h, providing an
abstraction around EVA & non-EVA pref instructions consistent with the
existing macros we have for cache & load/store instructions.

Signed-off-by: Paul Burton <paul.burton@mips.com>
---

 arch/mips/include/asm/asm-eva.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/mips/include/asm/asm-eva.h b/arch/mips/include/asm/asm-eva.h
index 1e38f0e1ea3e..d80be38c4144 100644
--- a/arch/mips/include/asm/asm-eva.h
+++ b/arch/mips/include/asm/asm-eva.h
@@ -15,6 +15,7 @@
 /* Kernel variants */
 
 #define kernel_cache(op, base)		"cache " op ", " base "\n"
+#define kernel_pref(hint, base)		"pref " hint ", " base "\n"
 #define kernel_ll(reg, addr)		"ll " reg ", " addr "\n"
 #define kernel_sc(reg, addr)		"sc " reg ", " addr "\n"
 #define kernel_lw(reg, addr)		"lw " reg ", " addr "\n"
@@ -51,6 +52,7 @@
 				"	.set	pop\n"
 
 #define user_cache(op, base)		__BUILD_EVA_INSN("cachee", op, base)
+#define user_pref(hint, base)		__BUILD_EVA_INSN("prefe", hint, base)
 #define user_ll(reg, addr)		__BUILD_EVA_INSN("lle", reg, addr)
 #define user_sc(reg, addr)		__BUILD_EVA_INSN("sce", reg, addr)
 #define user_lw(reg, addr)		__BUILD_EVA_INSN("lwe", reg, addr)
@@ -72,6 +74,7 @@
 #else
 
 #define user_cache(op, base)		kernel_cache(op, base)
+#define user_pref(hint, base)		kernel_pref(hint, base)
 #define user_ll(reg, addr)		kernel_ll(reg, addr)
 #define user_sc(reg, addr)		kernel_sc(reg, addr)
 #define user_lw(reg, addr)		kernel_lw(reg, addr)
@@ -99,6 +102,7 @@
 #else /* __ASSEMBLY__ */
 
 #define kernel_cache(op, base)		cache op, base
+#define kernel_pref(hint, base)		pref hint, base
 #define kernel_ll(reg, addr)		ll reg, addr
 #define kernel_sc(reg, addr)		sc reg, addr
 #define kernel_lw(reg, addr)		lw reg, addr
@@ -135,6 +139,7 @@
 				.set	pop;
 
 #define user_cache(op, base)		__BUILD_EVA_INSN(cachee, op, base)
+#define user_pref(hint, base)		__BUILD_EVA_INSN(prefe, hint, base)
 #define user_ll(reg, addr)		__BUILD_EVA_INSN(lle, reg, addr)
 #define user_sc(reg, addr)		__BUILD_EVA_INSN(sce, reg, addr)
 #define user_lw(reg, addr)		__BUILD_EVA_INSN(lwe, reg, addr)
@@ -155,6 +160,7 @@
 #else
 
 #define user_cache(op, base)		kernel_cache(op, base)
+#define user_pref(hint, base)		kernel_pref(hint, base)
 #define user_ll(reg, addr)		kernel_ll(reg, addr)
 #define user_sc(reg, addr)		kernel_sc(reg, addr)
 #define user_lw(reg, addr)		kernel_lw(reg, addr)
-- 
2.19.1

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

* [PATCH 6/7] MIPS: lib: Use kernel_pref & user_pref in memcpy()
  2018-10-15 18:33 [PATCH 0/7] MIPS: Remove unused asm/asm.h macros Paul Burton
                   ` (4 preceding siblings ...)
  2018-10-15 18:33 ` [PATCH 5/7] MIPS: Add kernel_pref & user_pref helpers Paul Burton
@ 2018-10-15 18:33 ` Paul Burton
  2018-10-15 18:33 ` [PATCH 7/7] MIPS: Remove unused PREF, PREFE & PREFX macros Paul Burton
  6 siblings, 0 replies; 11+ messages in thread
From: Paul Burton @ 2018-10-15 18:33 UTC (permalink / raw)
  To: linux-mips; +Cc: Paul Burton

memcpy() is the only user of the PREF() & PREFE() macros from asm/asm.h.
Switch to using the kernel_pref() & user_pref() macros from
asm/asm-eva.h which fit more consistently with other abstractions of EVA
vs non-EVA instructions.

Signed-off-by: Paul Burton <paul.burton@mips.com>
---

 arch/mips/lib/memcpy.S | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/mips/lib/memcpy.S b/arch/mips/lib/memcpy.S
index 207b320aa81d..cdd19d8561e8 100644
--- a/arch/mips/lib/memcpy.S
+++ b/arch/mips/lib/memcpy.S
@@ -204,9 +204,10 @@
 #define LOADB(reg, addr, handler)	EXC(lb, LD_INSN, reg, addr, handler)
 #define STOREB(reg, addr, handler)	EXC(sb, ST_INSN, reg, addr, handler)
 
-#define _PREF(hint, addr, type)						\
+#ifdef CONFIG_CPU_HAS_PREFETCH
+# define _PREF(hint, addr, type)					\
 	.if \mode == LEGACY_MODE;					\
-		PREF(hint, addr);					\
+		kernel_pref(hint, addr);				\
 	.else;								\
 		.if ((\from == USEROP) && (type == SRC_PREFETCH)) ||	\
 		    ((\to == USEROP) && (type == DST_PREFETCH));	\
@@ -218,12 +219,15 @@
 			 * used later on. Therefore use $v1.		\
 			 */						\
 			.set at=v1;					\
-			PREFE(hint, addr);				\
+			user_pref(hint, addr);				\
 			.set noat;					\
 		.else;							\
-			PREF(hint, addr);				\
+			kernel_pref(hint, addr);			\
 		.endif;							\
 	.endif
+#else
+# define _PREF(hint, addr, type)
+#endif
 
 #define PREFS(hint, addr) _PREF(hint, addr, SRC_PREFETCH)
 #define PREFD(hint, addr) _PREF(hint, addr, DST_PREFETCH)
-- 
2.19.1

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

* [PATCH 7/7] MIPS: Remove unused PREF, PREFE & PREFX macros
  2018-10-15 18:33 [PATCH 0/7] MIPS: Remove unused asm/asm.h macros Paul Burton
                   ` (5 preceding siblings ...)
  2018-10-15 18:33 ` [PATCH 6/7] MIPS: lib: Use kernel_pref & user_pref in memcpy() Paul Burton
@ 2018-10-15 18:33 ` Paul Burton
  6 siblings, 0 replies; 11+ messages in thread
From: Paul Burton @ 2018-10-15 18:33 UTC (permalink / raw)
  To: linux-mips; +Cc: Paul Burton

asm/asm.h provides PREF(), PREFE() & PREFX() macros which are now
entirely unused. Delete the dead code.

Signed-off-by: Paul Burton <paul.burton@mips.com>

---

 arch/mips/include/asm/asm.h | 36 ------------------------------------
 1 file changed, 36 deletions(-)

diff --git a/arch/mips/include/asm/asm.h b/arch/mips/include/asm/asm.h
index 74b1c6fd8277..c23527ba65d0 100644
--- a/arch/mips/include/asm/asm.h
+++ b/arch/mips/include/asm/asm.h
@@ -103,42 +103,6 @@ symbol		=	value
 8:		.asciiz msg;				\
 		.popsection;
 
-/*
- * MIPS IV pref instruction.
- * Use with .set noreorder only!
- *
- * MIPS IV implementations are free to treat this as a nop.  The R5000
- * is one of them.  So we should have an option not to use this instruction.
- */
-#ifdef CONFIG_CPU_HAS_PREFETCH
-
-#define PREF(hint,addr)					\
-		.set	push;				\
-		.set	arch=r5000;			\
-		pref	hint, addr;			\
-		.set	pop
-
-#define PREFE(hint, addr)				\
-		.set	push;				\
-		.set	mips0;				\
-		.set	eva;				\
-		prefe	hint, addr;			\
-		.set	pop
-
-#define PREFX(hint,addr)				\
-		.set	push;				\
-		.set	arch=r5000;			\
-		prefx	hint, addr;			\
-		.set	pop
-
-#else /* !CONFIG_CPU_HAS_PREFETCH */
-
-#define PREF(hint, addr)
-#define PREFE(hint, addr)
-#define PREFX(hint, addr)
-
-#endif /* !CONFIG_CPU_HAS_PREFETCH */
-
 /*
  * Stack alignment
  */
-- 
2.19.1

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

* Re: [PATCH 2/7] MIPS: Remove unused PIC macros
  2018-10-15 18:33 ` [PATCH 2/7] MIPS: Remove unused PIC macros Paul Burton
@ 2018-11-22 16:31   ` Maciej W. Rozycki
  2018-11-26 18:17     ` Paul Burton
  0 siblings, 1 reply; 11+ messages in thread
From: Maciej W. Rozycki @ 2018-11-22 16:31 UTC (permalink / raw)
  To: Paul Burton; +Cc: linux-mips, Paul Burton

On Mon, 15 Oct 2018, Paul Burton wrote:

> asm/asm.h contains CPRESTORE, CPADD & CPLOAD macros that are intended
> for use with position independent code, but are not used anywhere in the
> kernel - along with a comment to that effect. Remove the dead code.

 FYI, this was I believe for consistency with the <sys/asm.h> glibc header 
and in the days since lost in the mist to time may have actually been used 
by the userland too.

 Overall the contents of this header used to be somewhat standardised in a 
platform-independent way, e.g. the IDT MIPS software manual says[1]:

"Many toolchains supply a header file <asm.h>, which provides C-style 
macros to generate the appropriate directives, as required [...]"

and then goes on to use <idtc/asm.h> across the many snippets of code 
included throughout.

References:

[1] "IDT MIPS Microprocessor Family Software Reference Manual", Integrated 
    Device Technology, Inc., Version 2.0, October 1996, Chapter 9 
    "Assembler Language Programming", p. 9-17

[Yes, it did have a chapter on the MIPS assembly language, including the 
syntax, which some people confuse with the syntax architecture manuals use 
for the instruction set.]

  Maciej

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

* Re: [PATCH 2/7] MIPS: Remove unused PIC macros
  2018-11-22 16:31   ` Maciej W. Rozycki
@ 2018-11-26 18:17     ` Paul Burton
  2018-11-26 20:45       ` Maciej W. Rozycki
  0 siblings, 1 reply; 11+ messages in thread
From: Paul Burton @ 2018-11-26 18:17 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: linux-mips, Paul Burton

Hi Maciej,

On Thu, Nov 22, 2018 at 04:31:13PM +0000, Maciej W. Rozycki wrote:
> On Mon, 15 Oct 2018, Paul Burton wrote:
> > asm/asm.h contains CPRESTORE, CPADD & CPLOAD macros that are intended
> > for use with position independent code, but are not used anywhere in the
> > kernel - along with a comment to that effect. Remove the dead code.
> 
>  FYI, this was I believe for consistency with the <sys/asm.h> glibc header 
> and in the days since lost in the mist to time may have actually been used 
> by the userland too.
> 
>  Overall the contents of this header used to be somewhat standardised in a 
> platform-independent way, e.g. the IDT MIPS software manual says[1]:
> 
> "Many toolchains supply a header file <asm.h>, which provides C-style 
> macros to generate the appropriate directives, as required [...]"
> 
> and then goes on to use <idtc/asm.h> across the many snippets of code 
> included throughout.
> 
> References:
> 
> [1] "IDT MIPS Microprocessor Family Software Reference Manual", Integrated 
>     Device Technology, Inc., Version 2.0, October 1996, Chapter 9 
>     "Assembler Language Programming", p. 9-17
> 
> [Yes, it did have a chapter on the MIPS assembly language, including the 
> syntax, which some people confuse with the syntax architecture manuals use 
> for the instruction set.]
> 
>   Maciej

Thanks for the background - I figured these macros probably came from
some standard header used in multiple projects at some point in the
past, and that maybe it used to be useful keeping these macros to keep
our header in sync with some external copy of it.

In today's reality though the macros are dead code, we never do
synchronize the header with anything external, and I doubt anyone
looking to work on the kernel will start by reading the IDT MIPS
Microprocessor Family Software Reference Manual. If, bizarrely, someone
did that & got stuck because these macros aren't defined then I suspect
it would be among the least of their problems.

Thanks,
    Paul

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

* Re: [PATCH 2/7] MIPS: Remove unused PIC macros
  2018-11-26 18:17     ` Paul Burton
@ 2018-11-26 20:45       ` Maciej W. Rozycki
  0 siblings, 0 replies; 11+ messages in thread
From: Maciej W. Rozycki @ 2018-11-26 20:45 UTC (permalink / raw)
  To: Paul Burton; +Cc: linux-mips, Paul Burton

Hi Paul,

> In today's reality though the macros are dead code, we never do
> synchronize the header with anything external, and I doubt anyone
> looking to work on the kernel will start by reading the IDT MIPS
> Microprocessor Family Software Reference Manual. If, bizarrely, someone
> did that & got stuck because these macros aren't defined then I suspect
> it would be among the least of their problems.

 Sure, I have no problem to see these go nowadays, my reply was merely 
informational.

 In the 1990s and the libc 5 era (let alone a.out libc 4) user headers 
were mostly missing for Linux kernel interfaces and there was much higher 
reliance on <asm/foo.h> stuff (and pain with namespace clashes and other 
anomalies, the much more recent UAPI effort has meant to address) in the 
userland, so it was reasonable to have stuff included in a single header 
that would not only serve the kernel, but userland as well.

 I believe glibc 2 (aka libc 6) has imported their version of <sys/asm.h> 
directly from our <asm/asm.h> back in 1997, some 3 years after our port's 
creation.

  Maciej

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

end of thread, other threads:[~2018-11-26 20:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-15 18:33 [PATCH 0/7] MIPS: Remove unused asm/asm.h macros Paul Burton
2018-10-15 18:33 ` [PATCH 2/7] MIPS: Remove unused PIC macros Paul Burton
2018-11-22 16:31   ` Maciej W. Rozycki
2018-11-26 18:17     ` Paul Burton
2018-11-26 20:45       ` Maciej W. Rozycki
2018-10-15 18:33 ` [PATCH 1/7] MIPS: Remove unused MOVN & MOVZ macros Paul Burton
2018-10-15 18:33 ` [PATCH 3/7] MIPS: Remove unused TTABLE macro Paul Burton
2018-10-15 18:33 ` [PATCH 4/7] MIPS: Remove unused CAT macro Paul Burton
2018-10-15 18:33 ` [PATCH 5/7] MIPS: Add kernel_pref & user_pref helpers Paul Burton
2018-10-15 18:33 ` [PATCH 6/7] MIPS: lib: Use kernel_pref & user_pref in memcpy() Paul Burton
2018-10-15 18:33 ` [PATCH 7/7] MIPS: Remove unused PREF, PREFE & PREFX macros Paul Burton

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.