Commit 22a39c3d authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'locking-core-2022-08-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull locking updates from Ingo Molnar:
 "This was a fairly quiet cycle for the locking subsystem:

   - lockdep: Fix a handful of the more complex lockdep_init_map_*()
     primitives that can lose the lock_type & cause false reports. No
     such mishap was observed in the wild.

   - jump_label improvements: simplify the cross-arch support of initial
     NOP patching by making it arch-specific code (used on MIPS only),
     and remove the s390 initial NOP patching that was superfluous"

* tag 'locking-core-2022-08-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  locking/lockdep: Fix lockdep_init_map_*() confusion
  jump_label: make initial NOP patching the special case
  jump_label: mips: move module NOP patching into arch code
  jump_label: s390: avoid pointless initial NOP patching
parents b167fdff eae6d58d
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -201,9 +201,6 @@ static_key->entry field makes use of the two least significant bits.
* ``void arch_jump_label_transform(struct jump_entry *entry, enum jump_label_type type)``,
    see: arch/x86/kernel/jump_label.c

* ``__init_or_module void arch_jump_label_transform_static(struct jump_entry *entry, enum jump_label_type type)``,
    see: arch/x86/kernel/jump_label.c

* ``struct jump_entry``,
    see: arch/x86/include/asm/jump_label.h

+0 −13
Original line number Diff line number Diff line
@@ -96,19 +96,6 @@ void arch_jump_label_transform(struct jump_entry *entry,
	flush_icache_range(entry->code, entry->code + JUMP_LABEL_NOP_SIZE);
}

void arch_jump_label_transform_static(struct jump_entry *entry,
				      enum jump_label_type type)
{
	/*
	 * We use only one NOP type (1x, 4 byte) in arch_static_branch, so
	 * there's no need to patch an identical NOP over the top of it here.
	 * The generic code calls 'arch_jump_label_transform' if the NOP needs
	 * to be replaced by a branch, so 'arch_jump_label_transform_static' is
	 * never called with type other than JUMP_LABEL_NOP.
	 */
	BUG_ON(type != JUMP_LABEL_NOP);
}

#ifdef CONFIG_ARC_DBG_JUMP_LABEL
#define SELFTEST_MSG	"ARC: instruction generation self-test: "

+0 −6
Original line number Diff line number Diff line
@@ -27,9 +27,3 @@ void arch_jump_label_transform(struct jump_entry *entry,
{
	__arch_jump_label_transform(entry, type, false);
}

void arch_jump_label_transform_static(struct jump_entry *entry,
				      enum jump_label_type type)
{
	__arch_jump_label_transform(entry, type, true);
}
+0 −11
Original line number Diff line number Diff line
@@ -26,14 +26,3 @@ void arch_jump_label_transform(struct jump_entry *entry,

	aarch64_insn_patch_text_nosync(addr, insn);
}

void arch_jump_label_transform_static(struct jump_entry *entry,
				      enum jump_label_type type)
{
	/*
	 * We use the architected A64 NOP in arch_static_branch, so there's no
	 * need to patch an identical A64 NOP over the top of it here. The core
	 * will call arch_jump_label_transform from a module notifier if the
	 * NOP needs to be replaced by a branch.
	 */
}
+2 −0
Original line number Diff line number Diff line
@@ -8,6 +8,8 @@
#ifndef _ASM_MIPS_JUMP_LABEL_H
#define _ASM_MIPS_JUMP_LABEL_H

#define arch_jump_label_transform_static arch_jump_label_transform

#ifndef __ASSEMBLY__

#include <linux/types.h>
Loading