All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Burton <paul.burton@mips.com>
To: "Maciej W. Rozycki" <macro@linux-mips.org>
Cc: "linux-mips@linux-mips.org" <linux-mips@linux-mips.org>,
	Paul Burton <pburton@wavecomp.com>
Subject: Re: [PATCH 2/7] MIPS: Remove unused PIC macros
Date: Mon, 26 Nov 2018 18:17:20 +0000	[thread overview]
Message-ID: <20181126181718.ub4djz3x2dyffy7m@pburton-laptop> (raw)
In-Reply-To: <alpine.LFD.2.21.1811221608260.22145@eddie.linux-mips.org>

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

  reply	other threads:[~2018-11-26 18:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=20181126181718.ub4djz3x2dyffy7m@pburton-laptop \
    --to=paul.burton@mips.com \
    --cc=linux-mips@linux-mips.org \
    --cc=macro@linux-mips.org \
    --cc=pburton@wavecomp.com \
    /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.