]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ARM: 7627/1: Predicate preempt logic on PREEMP_COUNT not PREEMPT alone
authorStephen Boyd <sboyd@codeaurora.org>
Mon, 14 Jan 2013 18:50:42 +0000 (19:50 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 6 Feb 2013 04:33:35 +0000 (04:33 +0000)
commit04bab8d5caa173ea1faea7103bed30e12d73d3fe
tree3caaec43082125d74240625f3e3947e2a4f5841d
parent26d5d5d031a0bc51081fc5e8957dfee69e98b4b3
ARM: 7627/1: Predicate preempt logic on PREEMP_COUNT not PREEMPT alone

commit 568dca15aa2a0f4ddee255894ec393a159f13147 upstream.

Patrik Kluba reports that the preempt count becomes invalid due
to the preempt_enable() call being unbalanced with a
preempt_disable() call in the vfp assembly routines. This happens
because preempt_enable() and preempt_disable() update preempt
counts under PREEMPT_COUNT=y but the vfp assembly routines do so
under PREEMPT=y. In a configuration where PREEMPT=n and
DEBUG_ATOMIC_SLEEP=y, PREEMPT_COUNT=y and so the preempt_enable()
call in VFP_bounce() keeps subtracting from the preempt count
until it goes negative.

Fix this by always using PREEMPT_COUNT to decided when to update
preempt counts in the ARM assembly code.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Reported-by: Patrik Kluba <pkluba@dension.com>
Tested-by: Patrik Kluba <pkluba@dension.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
arch/arm/vfp/entry.S
arch/arm/vfp/vfphw.S