[lkml]   [2003]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] Fix prefetch patching in 2.5-bk

On Thu, 1 May 2003, Andi Kleen wrote:
> If your machine BUG()s in apply_alternatives at booting
> or module loading you need this patch.

I applied it, but I don't have to like it..

How about doing this differently, and having something like this:

#define nop_alternative(newinstr, feature) \
".section .altinstructions,\"a\"\n" \
" .align 4\n"
" .long 660f\n"
" .long 663f\n"
" .byte %c0\n"
" .byte 0\n"
" .byte 664f-663f\n"
".section .altinstr_replacement",\"ax\"\n"
"663:\n\t" newinstr "\n664:\n"
".rept 664b-663b, 0x90\n\t"

and making "sourcelen==0" a special case for replacement (replace with the
proper destination length nop, instead of having that "0x90 0x90 0x90"

This allows you to use arbitrary-sized things without having to worry
about having to have the size right, or without having to use
unnecessarily long nop-sequences. You'll always get the right-size nop.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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