.. | .. |
---|
796 | 796 | int ret = 0; |
---|
797 | 797 | ktime_t now; |
---|
798 | 798 | |
---|
| 799 | + /* |
---|
| 800 | + * If there is no broadcast device, tell the caller not to go |
---|
| 801 | + * into deep idle. |
---|
| 802 | + */ |
---|
| 803 | + if (!tick_broadcast_device.evtdev) |
---|
| 804 | + return -EBUSY; |
---|
| 805 | + |
---|
| 806 | + dev = this_cpu_ptr(&tick_cpu_device)->evtdev; |
---|
| 807 | + |
---|
| 808 | + /* |
---|
| 809 | + * If proxying the hardware timer for high-precision tick |
---|
| 810 | + * delivery to the out-of-band stage, the whole broadcast |
---|
| 811 | + * dance is a no-go. Deny entering deep idle. |
---|
| 812 | + */ |
---|
| 813 | + if (dev->features & CLOCK_EVT_FEAT_PROXY) |
---|
| 814 | + return -EBUSY; |
---|
| 815 | + |
---|
799 | 816 | raw_spin_lock(&tick_broadcast_lock); |
---|
800 | 817 | bc = tick_broadcast_device.evtdev; |
---|
801 | 818 | |
---|