diff options
author | Mark Brown <broonie@kernel.org> | 2016-02-16 18:42:20 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-02-16 18:42:20 +0000 |
commit | bb19a07897898f424c62b4456ba100fd38cfa679 (patch) | |
tree | 23d7d6dd0e967f6d71e501adeacb856ac300489a /arch | |
parent | d56ccc9f08f60732b8b7bf7e002d53b090791aea (diff) | |
parent | e96eeada2f5d5af76d60939b7d564f3efb0a616f (diff) |
Merge tag 'v4.4.1-rt6' of git://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel into linux-linaro-lsk-v4.4-rtlsk-v4.4-16.02-rt
v4.4.1-rt6
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/kvm/arm.c | 6 | ||||
-rw-r--r-- | arch/arm64/kernel/debug-monitors.c | 21 |
2 files changed, 14 insertions, 13 deletions
diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c index 4f5c42a0924c..2ce9cc2717ac 100644 --- a/arch/arm/kvm/arm.c +++ b/arch/arm/kvm/arm.c @@ -568,7 +568,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run) * involves poking the GIC, which must be done in a * non-preemptible context. */ - preempt_disable(); + migrate_disable(); kvm_timer_flush_hwstate(vcpu); kvm_vgic_flush_hwstate(vcpu); @@ -587,7 +587,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run) local_irq_enable(); kvm_timer_sync_hwstate(vcpu); kvm_vgic_sync_hwstate(vcpu); - preempt_enable(); + migrate_enable(); continue; } @@ -641,7 +641,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run) kvm_vgic_sync_hwstate(vcpu); - preempt_enable(); + migrate_enable(); ret = handle_exit(vcpu, run, ret); } diff --git a/arch/arm64/kernel/debug-monitors.c b/arch/arm64/kernel/debug-monitors.c index 8aee3aeec3e6..c1492ba1f6d1 100644 --- a/arch/arm64/kernel/debug-monitors.c +++ b/arch/arm64/kernel/debug-monitors.c @@ -186,20 +186,21 @@ static void clear_regs_spsr_ss(struct pt_regs *regs) /* EL1 Single Step Handler hooks */ static LIST_HEAD(step_hook); -static DEFINE_RWLOCK(step_hook_lock); +static DEFINE_SPINLOCK(step_hook_lock); void register_step_hook(struct step_hook *hook) { - write_lock(&step_hook_lock); - list_add(&hook->node, &step_hook); - write_unlock(&step_hook_lock); + spin_lock(&step_hook_lock); + list_add_rcu(&hook->node, &step_hook); + spin_unlock(&step_hook_lock); } void unregister_step_hook(struct step_hook *hook) { - write_lock(&step_hook_lock); - list_del(&hook->node); - write_unlock(&step_hook_lock); + spin_lock(&step_hook_lock); + list_del_rcu(&hook->node); + spin_unlock(&step_hook_lock); + synchronize_rcu(); } /* @@ -213,15 +214,15 @@ static int call_step_hook(struct pt_regs *regs, unsigned int esr) struct step_hook *hook; int retval = DBG_HOOK_ERROR; - read_lock(&step_hook_lock); + rcu_read_lock(); - list_for_each_entry(hook, &step_hook, node) { + list_for_each_entry_rcu(hook, &step_hook, node) { retval = hook->fn(regs, esr); if (retval == DBG_HOOK_HANDLED) break; } - read_unlock(&step_hook_lock); + rcu_read_unlock(); return retval; } |