hc
2024-11-01 2f529f9b558ca1c1bd74be7437a84e4711743404
kernel/kernel/time/tick-broadcast.c
....@@ -796,6 +796,23 @@
796796 int ret = 0;
797797 ktime_t now;
798798
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
+
799816 raw_spin_lock(&tick_broadcast_lock);
800817 bc = tick_broadcast_device.evtdev;
801818