lkml.org 
[lkml]   [2003]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    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"
    ".previous\n"
    ".section .altinstr_replacement",\"ax\"\n"
    "663:\n\t" newinstr "\n664:\n"
    ".previous"
    "660:\n\t"
    ".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"
    sequence).

    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.

    Linus

    -
    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:35    [W:0.021 / U:31.608 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site