alternative.c (abc745f85c1193d2a052addf0031d59b4436c246) alternative.c (5c83511bdb9832c86be20fb86b783356e2f58062)
1#define pr_fmt(fmt) "SMP alternatives: " fmt
2
3#include <linux/module.h>
4#include <linux/sched.h>
5#include <linux/mutex.h>
6#include <linux/list.h>
7#include <linux/stringify.h>
8#include <linux/mm.h>

--- 580 unchanged lines hidden (view full) ---

589 char insnbuf[MAX_PATCH_LEN];
590
591 for (p = start; p < end; p++) {
592 unsigned int used;
593
594 BUG_ON(p->len > MAX_PATCH_LEN);
595 /* prep the buffer with the original instructions */
596 memcpy(insnbuf, p->instr, p->len);
1#define pr_fmt(fmt) "SMP alternatives: " fmt
2
3#include <linux/module.h>
4#include <linux/sched.h>
5#include <linux/mutex.h>
6#include <linux/list.h>
7#include <linux/stringify.h>
8#include <linux/mm.h>

--- 580 unchanged lines hidden (view full) ---

589 char insnbuf[MAX_PATCH_LEN];
590
591 for (p = start; p < end; p++) {
592 unsigned int used;
593
594 BUG_ON(p->len > MAX_PATCH_LEN);
595 /* prep the buffer with the original instructions */
596 memcpy(insnbuf, p->instr, p->len);
597 used = pv_init_ops.patch(p->instrtype, insnbuf,
597 used = pv_ops.init.patch(p->instrtype, insnbuf,
598 (unsigned long)p->instr, p->len);
599
600 BUG_ON(used > p->len);
601
602 /* Pad the rest with nops */
603 add_nops(insnbuf + used, p->len - used);
604 text_poke_early(p->instr, insnbuf, p->len);
605 }

--- 226 unchanged lines hidden ---
598 (unsigned long)p->instr, p->len);
599
600 BUG_ON(used > p->len);
601
602 /* Pad the rest with nops */
603 add_nops(insnbuf + used, p->len - used);
604 text_poke_early(p->instr, insnbuf, p->len);
605 }

--- 226 unchanged lines hidden ---