diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2015-07-07 10:34:32 -0400 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2015-07-07 12:46:47 -0400 |
| commit | b78f3f3c898c824bf56ab55cfa59fc72be49c349 (patch) | |
| tree | 635fbb3deb08581493d2c03be5f7f441de1be9cd | |
| parent | f32dd117051185da6e923b35491a44d7debeeea5 (diff) | |
tick/broadcast: Prevent deep idle if no broadcast device available
Add a check for a installed broadcast device to the oneshot control
function and return busy if not.
[ Split out from a larger combo patch ]
Reported-and-tested-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Suzuki Poulose <Suzuki.Poulose@arm.com>
Cc: Lorenzo Pieralisi <Lorenzo.Pieralisi@arm.com>
Cc: Catalin Marinas <Catalin.Marinas@arm.com>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Preeti U Murthy <preeti@linux.vnet.ibm.com>
Cc: Ingo Molnar <mingo@kernel.org>
Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1507070929360.3916@nanos
| -rw-r--r-- | kernel/time/tick-broadcast.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c index ef77b16ad5df..fad3f789beec 100644 --- a/kernel/time/tick-broadcast.c +++ b/kernel/time/tick-broadcast.c | |||
| @@ -693,6 +693,13 @@ int __tick_broadcast_oneshot_control(enum tick_broadcast_state state) | |||
| 693 | ktime_t now; | 693 | ktime_t now; |
| 694 | 694 | ||
| 695 | /* | 695 | /* |
| 696 | * If there is no broadcast device, tell the caller not to go | ||
| 697 | * into deep idle. | ||
| 698 | */ | ||
| 699 | if (!tick_broadcast_device.evtdev) | ||
| 700 | return -EBUSY; | ||
| 701 | |||
| 702 | /* | ||
| 696 | * Periodic mode does not care about the enter/exit of power | 703 | * Periodic mode does not care about the enter/exit of power |
| 697 | * states | 704 | * states |
| 698 | */ | 705 | */ |
