cpu_affinity: restore the original cpu affinity correctly [1/1]
authorJiamin Ma <jiamin.ma@amlogic.com>
Wed, 27 Mar 2019 10:32:44 +0000 (18:32 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Thu, 28 Mar 2019 05:44:10 +0000 (22:44 -0700)
commitd5980028dd7918c154acfc0ffce9f321b0a655f7
tree39f1911b6dadf109648d9b5fc21fe43f4f983799
parent4e6774d9650e245f9db0e3bf1aa863f1aaa0d359
cpu_affinity: restore the original cpu affinity correctly [1/1]

PD#SWPL-5595

Problem:
set_cpus_allowed_ptr(current, cpu_all_mask) is always errorly
called to retore CPU affinity for current task. In some cases,
the current may be a bounded kworker thread, and we should not
set its CPU affinity to all CPUs

Solution:
Save the original CPU affinity and restore it

Verify:
W400 revB

Change-Id: I3cd65e79791563af9dacc09639b8645b97979c44
Signed-off-by: Jiamin Ma <jiamin.ma@amlogic.com>
arch/arm/mach-meson/meson-secure.c
drivers/amlogic/audioinfo/audio_data.c
drivers/amlogic/efuse/efuse_hw64.c
drivers/amlogic/jtag/meson_jtag.c
drivers/amlogic/mmc/amlsd.c
drivers/amlogic/tee/tee.c