[Top] [All Lists]

Re: [PATCH] Synthesize TLB refill handler at runtime

To: Thiemo Seufer <>
Subject: Re: [PATCH] Synthesize TLB refill handler at runtime
From: "Maciej W. Rozycki" <>
Date: Mon, 22 Nov 2004 18:39:02 +0000 (GMT)
Cc: Geert Uytterhoeven <>, Linux/MIPS Development <>, Ralf Baechle <>
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <> <> <>
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).


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