lkml.org 
[lkml]   [2001]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] take 2 of the tr-based current
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/

\
 
 \ /
  Last update: 2005-03-22 13:13    [W:0.110 / U:16.112 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site