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