Commit 4309cfe3 authored by Sudeep Holla's avatar Sudeep Holla Committed by Lorenzo Pieralisi

drivers: psci: annotate timer on stack to silence odebug messages

When DEBUG_OBJECTS config is enabled, we get the below odebug warnings:

ODEBUG: object is on stack, but not annotated

WARNING: CPU: 3 PID: 1304 at kernel/lib/debugobjects.c:300 __debug_object_init+0x1f0/0x458
CPU: 3 PID: 1304 Comm: psci_suspend_te Tainted: G W 4.9.0-06564-gf80f3f199260 #284
task: ffffe9e1b55a1600 task.stack: ffffe9e1b51c0000
PC is at __debug_object_init+0x1f0/0x458
LR is at __debug_object_init+0x1ec/0x458
Call trace:
 __debug_object_init+0x1f0/0x458
 debug_object_activate+0x150/0x260
 mod_timer+0xb4/0x4c0
 suspend_test_thread+0x1cc/0x3c0
 kthread+0x110/0x140
 ret_from_fork+0x10/0x40

This patch annotates the timer on the stack using setup_timer_on_stack
function to remove the above warnings.

Cc: Kevin Brodsky <kevin.brodsky@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: default avatarSudeep Holla <sudeep.holla@arm.com>
Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
parent 0c744ea4
...@@ -270,8 +270,7 @@ static int suspend_test_thread(void *arg) ...@@ -270,8 +270,7 @@ static int suspend_test_thread(void *arg)
struct cpuidle_device *dev; struct cpuidle_device *dev;
struct cpuidle_driver *drv; struct cpuidle_driver *drv;
/* No need for an actual callback, we just want to wake up the CPU. */ /* No need for an actual callback, we just want to wake up the CPU. */
struct timer_list wakeup_timer = struct timer_list wakeup_timer;
TIMER_INITIALIZER(dummy_callback, 0, 0);
/* Wait for the main thread to give the start signal. */ /* Wait for the main thread to give the start signal. */
wait_for_completion(&suspend_threads_started); wait_for_completion(&suspend_threads_started);
...@@ -287,6 +286,7 @@ static int suspend_test_thread(void *arg) ...@@ -287,6 +286,7 @@ static int suspend_test_thread(void *arg)
pr_info("CPU %d entering suspend cycles, states 1 through %d\n", pr_info("CPU %d entering suspend cycles, states 1 through %d\n",
cpu, drv->state_count - 1); cpu, drv->state_count - 1);
setup_timer_on_stack(&wakeup_timer, dummy_callback, 0);
for (i = 0; i < NUM_SUSPEND_CYCLE; ++i) { for (i = 0; i < NUM_SUSPEND_CYCLE; ++i) {
int index; int index;
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment