security: tf_driver: update with latest TL drop
Hyung Taek Ryoo [Thu, 18 Jul 2013 02:02:10 +0000 (19:02 -0700)]
K3.4 does not need this code maintain to PF_KTHREAD

Bug 1244750

Change-Id: Iec2fdf2cf4646ea3415f370a45376b1757498854
Signed-off-by: Hyung Taek Ryoo <hryoo@nvidia.com>
Reviewed-on: http://git-master/r/250493
Reviewed-by: Karthik Iyer <karthiki@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

security/tf_driver/tf_comm.c

index 0153824..c1f4f65 100644 (file)
@@ -1226,17 +1226,10 @@ static int tf_send_recv(struct tf_comm *comm,
        bool wait_prepared = false;
        enum TF_COMMAND_STATE command_status = TF_COMMAND_STATE_PENDING;
        DEFINE_WAIT(wait);
-#ifdef CONFIG_FREEZER
-       unsigned long saved_flags;
-#endif
+
        dprintk(KERN_INFO "[pid=%d] tf_send_recv(%p)\n",
                 current->pid, command);
 
-#ifdef CONFIG_FREEZER
-       saved_flags = current->flags;
-       current->flags |= PF_KTHREAD;
-#endif
-
        /*
         * Read all answers from the answer queue
         */
@@ -1251,15 +1244,8 @@ copy_answers:
        wake_up(&(comm->wait_queue));
 
 #ifdef CONFIG_FREEZER
-       if (unlikely(freezing(current))) {
-
-               dprintk(KERN_INFO
-                       "Entering refrigerator.\n");
-               try_to_freeze();
-               dprintk(KERN_INFO
-                       "Left refrigerator.\n");
+       if (try_to_freeze())
                goto copy_answers;
-       }
 #endif
 
 #ifndef CONFIG_PREEMPT
@@ -1405,11 +1391,6 @@ exit:
                wait_prepared = false;
        }
 
-#ifdef CONFIG_FREEZER
-       current->flags &= ~(PF_KTHREAD);
-       current->flags |= (saved_flags & PF_KTHREAD);
-#endif
-
        return result;
 }