#define HAVE_JUMP_LABEL_BATCH
-#define JUMP_LABEL_NOP_SIZE 5
-
#include <asm/asm.h>
#include <asm/nops.h>
return true;
}
+extern int arch_jump_entry_size(struct jump_entry *entry);
+
#endif /* __ASSEMBLY__ */
#endif
#include <asm/alternative.h>
#include <asm/text-patching.h>
+#define JUMP_LABEL_NOP_SIZE JMP32_INSN_SIZE
+
+int arch_jump_entry_size(struct jump_entry *entry)
+{
+ return JMP32_INSN_SIZE;
+}
+
static const void *
__jump_label_set_jump_code(struct jump_entry *entry, enum jump_label_type type)
{
entry->key |= 2;
}
+static inline int jump_entry_size(struct jump_entry *entry)
+{
+#ifdef JUMP_LABEL_NOP_SIZE
+ return JUMP_LABEL_NOP_SIZE;
+#else
+ return arch_jump_entry_size(entry);
+#endif
+}
+
#endif
#endif
static int addr_conflict(struct jump_entry *entry, void *start, void *end)
{
if (jump_entry_code(entry) <= (unsigned long)end &&
- jump_entry_code(entry) + JUMP_LABEL_NOP_SIZE > (unsigned long)start)
+ jump_entry_code(entry) + jump_entry_size(entry) > (unsigned long)start)
return 1;
return 0;