Commit a500fc91 authored by Ingo Molnar's avatar Ingo Molnar

Merge branch 'locking/core' into x86/mm, to resolve conflict

There's a non-trivial conflict between the parallel TLB flush
framework and the IPI flush debugging code - merge them
manually.

Conflicts:
	kernel/smp.c
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents d43f17a1 bdb1050e
...@@ -784,6 +784,16 @@ ...@@ -784,6 +784,16 @@
cs89x0_media= [HW,NET] cs89x0_media= [HW,NET]
Format: { rj45 | aui | bnc } Format: { rj45 | aui | bnc }
csdlock_debug= [KNL] Enable debug add-ons of cross-CPU function call
handling. When switched on, additional debug data is
printed to the console in case a hanging CPU is
detected, and that CPU is pinged again in order to try
to resolve the hang situation.
0: disable csdlock debugging (default)
1: enable basic csdlock debugging (minor impact)
ext: enable extended csdlock debugging (more impact,
but more data)
dasd= [HW,NET] dasd= [HW,NET]
See header of drivers/s390/block/dasd_devmap.c. See header of drivers/s390/block/dasd_devmap.c.
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include <linux/stringify.h> #include <linux/stringify.h>
#include <linux/types.h> #include <linux/types.h>
static __always_inline bool arch_static_branch(struct static_key *key, bool branch) static __always_inline bool arch_static_branch(struct static_key * const key, const bool branch)
{ {
asm_volatile_goto("1:" asm_volatile_goto("1:"
".byte " __stringify(STATIC_KEY_INIT_NOP) "\n\t" ".byte " __stringify(STATIC_KEY_INIT_NOP) "\n\t"
...@@ -36,7 +36,7 @@ static __always_inline bool arch_static_branch(struct static_key *key, bool bran ...@@ -36,7 +36,7 @@ static __always_inline bool arch_static_branch(struct static_key *key, bool bran
return true; return true;
} }
static __always_inline bool arch_static_branch_jump(struct static_key *key, bool branch) static __always_inline bool arch_static_branch_jump(struct static_key * const key, const bool branch)
{ {
asm_volatile_goto("1:" asm_volatile_goto("1:"
".byte 0xe9\n\t .long %l[l_yes] - 2f\n\t" ".byte 0xe9\n\t .long %l[l_yes] - 2f\n\t"
......
...@@ -4727,6 +4727,8 @@ static void ath10k_mac_op_wake_tx_queue(struct ieee80211_hw *hw, ...@@ -4727,6 +4727,8 @@ static void ath10k_mac_op_wake_tx_queue(struct ieee80211_hw *hw,
/* Must not be called with conf_mutex held as workers can use that also. */ /* Must not be called with conf_mutex held as workers can use that also. */
void ath10k_drain_tx(struct ath10k *ar) void ath10k_drain_tx(struct ath10k *ar)
{ {
lockdep_assert_not_held(&ar->conf_mutex);
/* make sure rcu-protected mac80211 tx path itself is drained */ /* make sure rcu-protected mac80211 tx path itself is drained */
synchronize_net(); synchronize_net();
......
...@@ -268,6 +268,11 @@ extern void lock_acquire(struct lockdep_map *lock, unsigned int subclass, ...@@ -268,6 +268,11 @@ extern void lock_acquire(struct lockdep_map *lock, unsigned int subclass,
extern void lock_release(struct lockdep_map *lock, unsigned long ip); extern void lock_release(struct lockdep_map *lock, unsigned long ip);
/* lock_is_held_type() returns */
#define LOCK_STATE_UNKNOWN -1
#define LOCK_STATE_NOT_HELD 0
#define LOCK_STATE_HELD 1
/* /*
* Same "read" as for lock_acquire(), except -1 means any. * Same "read" as for lock_acquire(), except -1 means any.
*/ */
...@@ -301,8 +306,14 @@ extern void lock_unpin_lock(struct lockdep_map *lock, struct pin_cookie); ...@@ -301,8 +306,14 @@ extern void lock_unpin_lock(struct lockdep_map *lock, struct pin_cookie);
#define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0) #define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0)
#define lockdep_assert_held(l) do { \ #define lockdep_assert_held(l) do { \
WARN_ON(debug_locks && !lockdep_is_held(l)); \ WARN_ON(debug_locks && \
lockdep_is_held(l) == LOCK_STATE_NOT_HELD); \
} while (0)
#define lockdep_assert_not_held(l) do { \
WARN_ON(debug_locks && \
lockdep_is_held(l) == LOCK_STATE_HELD); \
} while (0) } while (0)
#define lockdep_assert_held_write(l) do { \ #define lockdep_assert_held_write(l) do { \
...@@ -393,7 +404,8 @@ extern int lockdep_is_held(const void *); ...@@ -393,7 +404,8 @@ extern int lockdep_is_held(const void *);
#define lockdep_is_held_type(l, r) (1) #define lockdep_is_held_type(l, r) (1)
#define lockdep_assert_held(l) do { (void)(l); } while (0) #define lockdep_assert_held(l) do { (void)(l); } while (0)
#define lockdep_assert_held_write(l) do { (void)(l); } while (0) #define lockdep_assert_not_held(l) do { (void)(l); } while (0)
#define lockdep_assert_held_write(l) do { (void)(l); } while (0)
#define lockdep_assert_held_read(l) do { (void)(l); } while (0) #define lockdep_assert_held_read(l) do { (void)(l); } while (0)
#define lockdep_assert_held_once(l) do { (void)(l); } while (0) #define lockdep_assert_held_once(l) do { (void)(l); } while (0)
......
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
#include <linux/nmi.h> #include <linux/nmi.h>
#include <linux/rcupdate.h> #include <linux/rcupdate.h>
#include <linux/kprobes.h> #include <linux/kprobes.h>
#include <linux/lockdep.h>
#include <asm/sections.h> #include <asm/sections.h>
...@@ -5252,13 +5253,13 @@ int __lock_is_held(const struct lockdep_map *lock, int read) ...@@ -5252,13 +5253,13 @@ int __lock_is_held(const struct lockdep_map *lock, int read)
if (match_held_lock(hlock, lock)) { if (match_held_lock(hlock, lock)) {
if (read == -1 || hlock->read == read) if (read == -1 || hlock->read == read)
return 1; return LOCK_STATE_HELD;
return 0; return LOCK_STATE_NOT_HELD;
} }
} }
return 0; return LOCK_STATE_NOT_HELD;
} }
static struct pin_cookie __lock_pin_lock(struct lockdep_map *lock) static struct pin_cookie __lock_pin_lock(struct lockdep_map *lock)
...@@ -5537,10 +5538,14 @@ EXPORT_SYMBOL_GPL(lock_release); ...@@ -5537,10 +5538,14 @@ EXPORT_SYMBOL_GPL(lock_release);
noinstr int lock_is_held_type(const struct lockdep_map *lock, int read) noinstr int lock_is_held_type(const struct lockdep_map *lock, int read)
{ {
unsigned long flags; unsigned long flags;
int ret = 0; int ret = LOCK_STATE_NOT_HELD;
/*
* Avoid false negative lockdep_assert_held() and
* lockdep_assert_not_held().
*/
if (unlikely(!lockdep_enabled())) if (unlikely(!lockdep_enabled()))
return 1; /* avoid false negative lockdep_assert_held() */ return LOCK_STATE_UNKNOWN;
raw_local_irq_save(flags); raw_local_irq_save(flags);
check_flags(flags); check_flags(flags);
......
This diff is collapsed.
...@@ -349,7 +349,8 @@ static int static_call_add_module(struct module *mod) ...@@ -349,7 +349,8 @@ static int static_call_add_module(struct module *mod)
struct static_call_site *site; struct static_call_site *site;
for (site = start; site != stop; site++) { for (site = start; site != stop; site++) {
unsigned long addr = (unsigned long)static_call_key(site); unsigned long s_key = (long)site->key + (long)&site->key;
unsigned long addr = s_key & ~STATIC_CALL_SITE_FLAGS;
unsigned long key; unsigned long key;
/* /*
...@@ -373,8 +374,8 @@ static int static_call_add_module(struct module *mod) ...@@ -373,8 +374,8 @@ static int static_call_add_module(struct module *mod)
return -EINVAL; return -EINVAL;
} }
site->key = (key - (long)&site->key) | key |= s_key & STATIC_CALL_SITE_FLAGS;
(site->key & STATIC_CALL_SITE_FLAGS); site->key = key - (long)&site->key;
} }
return __static_call_init(mod, start, stop); return __static_call_init(mod, start, stop);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment