Re: [PATCH] take 2 of the tr-based current

From: Jakub Jelinek (jakub@redhat.com)
Date: Fri Nov 09 2001 - 04:13:27 EST


On Thu, Nov 08, 2001 at 09:11:43PM -0500, Benjamin LaHaise wrote:
> On Thu, Nov 08, 2001 at 07:05:46PM -0500, Benjamin LaHaise wrote:
> > If other people could bang on this a bit and post any problems, I'd
> > appreciate it. tia,
>
> Ooops. A slight typo is fixed below.
>
> -ben (who shouldn't edit patches before hitting send)
>
>
> diff -ur ./v2.4.13-ac8/include/asm-i386/smp.h ../toomuch-v2.4.13-ac8+tr/include/asm-i386/smp.h
> --- ./v2.4.13-ac8/include/asm-i386/smp.h Thu Nov 8 21:07:47 2001
> +++ toomuch-v2.4.13-ac8+tr/include/asm-i386/smp.h Thu Nov 8 21:06:25 2001
> @@ -102,7 +102,8 @@
> * so this is correct in the x86 case.
> */
>
> -static unsigned get_TR(void) __attribute__ ((pure))
> +static unsigned get_TR(void) __attribute__ ((pure));
> +static unsigned get_TR(void)
> {
> unsigned tr;
> __asm__("str %w0" : "=g" (tr));

Why not
static inline unsigned __attribute__ ((const)) get_TR(void)
{
}
?
If TR register only ever changes during cpu_init, I don't see why you
cannot use const. Using pure would mean if you do get_TR, then store
something into global memory and do get_TR again, it will be done twice.
Also, I wonder why you don't inline it.

        Jakub
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Nov 15 2001 - 21:00:21 EST