]> git.baikalelectronics.ru Git - kernel.git/commit
net: mvpp2: use {get, put}_cpu() instead of smp_processor_id()
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 10 Jun 2017 21:18:22 +0000 (23:18 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 10 Jun 2017 22:22:55 +0000 (18:22 -0400)
commit32d19eb302177c531123f431df5eb1d824141d3a
tree5125144548d0dd924c45426591900587d4bf4959
parent8f469870d5fad1f5c00de494d225c4d2416f823e
net: mvpp2: use {get, put}_cpu() instead of smp_processor_id()

smp_processor_id() should not be used in migration-enabled contexts. We
originally thought it was OK in the specific situation of this driver,
but it was wrong, and calling smp_processor_id() in a migration-enabled
context prints a big fat warning when CONFIG_DEBUG_PREEMPT=y.

Therefore, this commit replaces the smp_processor_id() in
migration-enabled contexts by the appropriate get_cpu/put_cpu sections.

Reported-by: Marc Zyngier <marc.zyngier@arm.com>
Fixes: 50cedc9e3f2b ("net: mvpp2: handle register mapping and access for PPv2.2")
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvpp2.c