diff options
author | Arto Merilainen <amerilainen@nvidia.com> | 2014-05-12 11:23:34 +0300 |
---|---|---|
committer | Riham Haidar <rhaidar@nvidia.com> | 2014-05-14 14:06:19 -0700 |
commit | 77b5ee2f9c1661ff519569950d0e2082225c6d64 (patch) | |
tree | 68c329aba0438849d6385be3b3d24f22e9aae33b /security | |
parent | 3f0c66e7527a8098ee9b745e544b2f6acf78f557 (diff) |
Revert "security: tlk_driver: Allow affinity changing"
This reverts commit 7f6caab3a015a82c3f5b8842a5bd461d61d34af1. The
commit introduced a modification that made threads to change
affinity to ensure that the CPU can be changed. However, this
approach was not bullet proof and it was fixed in a separate patch.
Bug 1506585
Change-Id: I3e280a5fae1f63015032f62b45c333344411e5da
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/408076
Reviewed-by: Riham Haidar <rhaidar@nvidia.com>
Tested-by: Riham Haidar <rhaidar@nvidia.com>
Diffstat (limited to 'security')
-rw-r--r-- | security/tlk_driver/ote_comms.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/security/tlk_driver/ote_comms.c b/security/tlk_driver/ote_comms.c index a1af05021dbd..11d43b53079c 100644 --- a/security/tlk_driver/ote_comms.c +++ b/security/tlk_driver/ote_comms.c @@ -219,33 +219,19 @@ static void switch_cpumask_to_cpu0(void) { long ret; cpumask_t local_cpu_mask = CPU_MASK_NONE; - unsigned long flags; - - flags = current->flags; - current->flags &= ~PF_NO_SETAFFINITY; cpu_set(0, local_cpu_mask); cpumask_copy(&saved_cpu_mask, tsk_cpus_allowed(current)); ret = sched_setaffinity(0, &local_cpu_mask); if (ret) pr_err("sched_setaffinity #1 -> 0x%lX", ret); - - current->flags = flags; } static void restore_cpumask(void) { - unsigned long flags; - long ret; - - flags = current->flags; - current->flags &= ~PF_NO_SETAFFINITY; - - ret = sched_setaffinity(0, &saved_cpu_mask); + long ret = sched_setaffinity(0, &saved_cpu_mask); if (ret) pr_err("sched_setaffinity #2 -> 0x%lX", ret); - - current->flags = flags; } #else static inline void switch_cpumask_to_cpu0(void) {}; |