[FOSS_TLK]security: tlk_driver: get_cpu() in place of smp_processor_id()
authorVandana Salve <vsalve@nvidia.com>
Fri, 7 Nov 2014 11:15:52 +0000 (16:15 +0530)
committerVarun Wadekar <vwadekar@nvidia.com>
Thu, 18 Jun 2015 12:08:37 +0000 (05:08 -0700)
commit8446c8ea47256cbe6e4e36bac24d9fcba3c9cffe
tree837c5cf7c23c95070430602f3052b2c38dcd7f66
parent6fa337386dedd8fc908755a20f59e2b2dbddcb04
[FOSS_TLK]security: tlk_driver: get_cpu() in place of smp_processor_id()

if DEBUG_PREEMPT is enabled, smp_processor_id() "helpfully"
screams when called outside preemptible, so making use of
get_cpu/put_cpu in place of smp_processor_id

<3>[  168.572811] BUG: using smp_processor_id() in preemptible [00000000] code: vpr-shrink_thre/67
<4>[  168.582061] caller is te_set_vpr_params+0x44/0x100
<4>[  168.586998] CPU: 0 PID: 67 Comm: vpr-shrink_thre Tainted: G        W    3.10.49-g5870b28 #1
<4>[  168.595633] Call trace:
<4>[  168.598439] [<ffffffc000089c78>] dump_backtrace+0x0/0xf4
<4>[  168.603917] [<ffffffc000089f70>] show_stack+0x10/0x1c
<4>[  168.609187] [<ffffffc00035cb90>] dump_stack+0x1c/0x28
<4>[  168.614364] [<ffffffc000371a08>] debug_smp_processor_id+0xd4/0xfc
<4>[  168.620647] [<ffffffc00032f634>] te_set_vpr_params+0x40/0x100
<4>[  168.626413] [<ffffffc0008c6e90>] tegra_update_resize_cfg+0x50/0xa8
<4>[  168.632609] [<ffffffc00050d778>] shrink_chunk_locked+0x1b0/0x288
<4>[  168.638640] [<ffffffc00050d8fc>] shrink_resizable_heap+0xac/0xd8
<4>[  168.644681] [<ffffffc00050ded8>] shrink_thread+0x64/0x90

Change-Id: Ief7da2098080b764d1946da088cc4d72634f572d
Signed-off-by: Vandana Salve <vsalve@nvidia.com>
Reviewed-on: http://git-master/r/755003
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>
security/tlk_driver/ote_comms.c