函数源码 |
Source File:arch\x86\kernel\alternative.c |
Create Date:2022-07-27 08:44:53 |
首页 | Copyright©Brick |
337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 | /* * "noinline" to cause control flow change and thus invalidate I$ and * cause refetch after modification. */ static void __init_or_module noinline optimize_nops( struct alt_instr *a, u8 *instr) { unsigned long flags; int i; for (i = 0; i < a->padlen; i++) { if (instr[i] != 0x90) return ; } local_irq_save(flags); add_nops(instr + (a->instrlen - a->padlen), a->padlen); local_irq_restore(flags); DUMP_BYTES(instr, a->instrlen, "%px: [%d:%d) optimized NOPs: " , instr, a->instrlen - a->padlen, a->padlen); } |