linux-mips
[Top] [All Lists]

Re: [PATCH] Synthesize TLB refill handler at runtime

To: Thiemo Seufer <ica2_ts@csv.ica.uni-stuttgart.de>
Subject: Re: [PATCH] Synthesize TLB refill handler at runtime
From: "Maciej W. Rozycki" <macro@linux-mips.org>
Date: Mon, 22 Nov 2004 18:39:02 +0000 (GMT)
Cc: Geert Uytterhoeven <geert@linux-m68k.org>, Linux/MIPS Development <linux-mips@linux-mips.org>, Ralf Baechle <ralf@linux-mips.org>
In-reply-to: <20041122155631.GD902@rembrandt.csv.ica.uni-stuttgart.de>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20041121170242.GR20986@rembrandt.csv.ica.uni-stuttgart.de> <Pine.GSO.4.61.0411212048520.26374@waterleaf.sonytel.be> <20041121203757.GS20986@rembrandt.csv.ica.uni-stuttgart.de> <Pine.LNX.4.58L.0411221428330.31113@blysk.ds.pg.gda.pl> <20041122155631.GD902@rembrandt.csv.ica.uni-stuttgart.de>
Sender: linux-mips-bounce@linux-mips.org
On Mon, 22 Nov 2004, Thiemo Seufer wrote:

> >  Great stuff!  Thanks a lot.  I gave it some testing on hardware available 
> > to me and it works just fine.  I've got a couple of warnings upon 
> > building, though:
> > 
> > arch/mips/mm/tlbex.c:500: warning: 'i_LA' defined but not used
> > arch/mips/mm/tlbex.c:568: warning: 'insn_has_bdelay' defined but not used
> > arch/mips/mm/tlbex.c:582: warning: 'il_bltz' defined but not used
> > arch/mips/mm/tlbex.c:588: warning: 'il_b' defined but not used
> > 
> > How about marking them "attribute((unused))"?  I can do that if you agree.
> 
> Please do so, but IIRC there's a compiler-independent Linux-specific

 It is the reverse -- there is a macro called "__attribute_used__" for use
to prevent object removal and it normally expands to "attribute((used))",
unless the compiler is old enough not to support it.  Only then it expands
to "attribute((unused))", merely to kill this warning.  But in this case
we don't mind such removals -- they are actually welcome and we (now) know
of that, so we just want to get rid of the warnings completely.

 I don't think we support building with GCC that doesn't support this
attribute; a brief research suggests this dates back to GCC 2.7.  Anyone
please feel free to correct me.

 Oh yeah -- there is a macro called "ACPI_UNUSED_VAR"; to deal with
incorrect compilers I suppose... ;-)

> define which is preferable. Newest gcc just removes unused static
> functions without further notice, AFAIK.

 This is with 3.4.2 -- 4.0 could be different indeed (docs suggest
otherwise, but they could lag a bit; I'm too lazy to dig change logs).

  Maciej

<Prev in Thread] Current Thread [Next in Thread>