arm: tegra: powergate: use raw_smp_processor_id() in traces
Sami Liedes [Thu, 31 Jan 2013 17:50:09 +0000 (19:50 +0200)]
The power_domain_target tracepoint takes a processor id; however the
event usually happens in a preemptible context. Calling
smp_processor_id() in a preemptible context causes a warning with
CONFIG_DEBUG_PREEMPT.

Fix this by changing the call to raw_smp_processor_id(), which merely
circumvents the warning. This means that the cpu ids in the trace
events are only indicative and should only be used for what they are
worth. However otherwise this is entirely harmless.

Change-Id: I34a241b0c7d712bbf4b52131d9a9f6eef188ec70
Signed-off-by: Sami Liedes <sliedes@nvidia.com>
Reviewed-on: http://git-master/r/196059
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>

arch/arm/mach-tegra/powergate.c

index 6f3c33e..edf8cde 100644 (file)
@@ -2,7 +2,7 @@
  * arch/arm/mach-tegra/powergate.c
  *
  * Copyright (c) 2010 Google, Inc
- * Copyright (c) 2011 - 2012, NVIDIA CORPORATION.  All rights reserved.
+ * Copyright (c) 2011 - 2013, NVIDIA CORPORATION.  All rights reserved.
  *
  * Author:
  *     Colin Cross <ccross@google.com>
@@ -103,7 +103,7 @@ int tegra_powergate_set(int id, bool new_state)
        }
 
        trace_power_domain_target(tegra_powergate_get_name(id), new_state,
-                       smp_processor_id());
+                       raw_smp_processor_id());
 #endif
 
        return 0;