Commit 343cf390 authored by Wang ShaoBo's avatar Wang ShaoBo Committed by Yu Liao
Browse files

Revert "arm64/mpam: Fix mpam corrupt when cpu online"

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7R0WK



-------------------------------------------------

BUG 'sleeping function called from invalid context' reported when
setup MPAM driver, it was blamed to bc9e3f98 ("arm64/mpam:
Fix mpam corrupt when cpu online"), which reported a 'Bad PC' BUG,
but missing the right conclusion, finally disabling irqs before calling
cpuhp_setup_state() may only affect the probability of reproduction.

The reason why triggerring 'Bad PC' BUG report is because mpam_enable()
is __init type function, and may schedule out after calling
__cpuhp_setup_state()->__might_sleep(), so the space of mpam_enable()
might be freed after scheduling back.

As we have changed mpam_enable() to non-init type function, we can
revert commit bc9e3f98 directly, to solve these both two problems.

Fixes: bc9e3f98 ("arm64/mpam: Fix mpam corrupt when cpu online")
Signed-off-by: default avatarWang ShaoBo <bobo.shaobowang@huawei.com>
Signed-off-by: default avatarYu Liao <liaoyu15@huawei.com>
parent 411657bf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment