mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-26 23:55:40 +08:00
powerpc/pseries: Avoid harmless preempt warning
Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20200320152436.1468651-1-npiggin@gmail.com
This commit is contained in:
parent
e86350f70a
commit
adde8715cf
@ -636,8 +636,16 @@ static const struct proc_ops vcpudispatch_stats_freq_proc_ops = {
|
|||||||
|
|
||||||
static int __init vcpudispatch_stats_procfs_init(void)
|
static int __init vcpudispatch_stats_procfs_init(void)
|
||||||
{
|
{
|
||||||
if (!lppaca_shared_proc(get_lppaca()))
|
/*
|
||||||
|
* Avoid smp_processor_id while preemptible. All CPUs should have
|
||||||
|
* the same value for lppaca_shared_proc.
|
||||||
|
*/
|
||||||
|
preempt_disable();
|
||||||
|
if (!lppaca_shared_proc(get_lppaca())) {
|
||||||
|
preempt_enable();
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
preempt_enable();
|
||||||
|
|
||||||
if (!proc_create("powerpc/vcpudispatch_stats", 0600, NULL,
|
if (!proc_create("powerpc/vcpudispatch_stats", 0600, NULL,
|
||||||
&vcpudispatch_stats_proc_ops))
|
&vcpudispatch_stats_proc_ops))
|
||||||
|
Loading…
Reference in New Issue
Block a user