summaryrefslogtreecommitdiff
path: root/packages/sys-kernel/linux-sources-redcore-lts/files/0007-Replace-all-schedule-timeout-1-with-schedule_min_hrt.patch
diff options
context:
space:
mode:
Diffstat (limited to 'packages/sys-kernel/linux-sources-redcore-lts/files/0007-Replace-all-schedule-timeout-1-with-schedule_min_hrt.patch')
-rw-r--r--packages/sys-kernel/linux-sources-redcore-lts/files/0007-Replace-all-schedule-timeout-1-with-schedule_min_hrt.patch529
1 files changed, 529 insertions, 0 deletions
diff --git a/packages/sys-kernel/linux-sources-redcore-lts/files/0007-Replace-all-schedule-timeout-1-with-schedule_min_hrt.patch b/packages/sys-kernel/linux-sources-redcore-lts/files/0007-Replace-all-schedule-timeout-1-with-schedule_min_hrt.patch
new file mode 100644
index 0000000..ff071da
--- /dev/null
+++ b/packages/sys-kernel/linux-sources-redcore-lts/files/0007-Replace-all-schedule-timeout-1-with-schedule_min_hrt.patch
@@ -0,0 +1,529 @@
+diff -Nur a/drivers/block/swim.c b/drivers/block/swim.c
+--- a/drivers/block/swim.c 2018-10-10 07:54:28.000000000 +0100
++++ b/drivers/block/swim.c 2018-11-03 16:30:39.471807304 +0000
+@@ -332,7 +332,7 @@
+ if (swim_readbit(base, MOTOR_ON))
+ break;
+ current->state = TASK_INTERRUPTIBLE;
+- schedule_timeout(1);
++ schedule_min_hrtimeout();
+ }
+ } else if (action == OFF) {
+ swim_action(base, MOTOR_OFF);
+@@ -351,7 +351,7 @@
+ if (!swim_readbit(base, DISK_IN))
+ break;
+ current->state = TASK_INTERRUPTIBLE;
+- schedule_timeout(1);
++ schedule_min_hrtimeout();
+ }
+ swim_select(base, RELAX);
+ }
+@@ -375,7 +375,7 @@
+ for (wait = 0; wait < HZ; wait++) {
+
+ current->state = TASK_INTERRUPTIBLE;
+- schedule_timeout(1);
++ schedule_min_hrtimeout();
+
+ swim_select(base, RELAX);
+ if (!swim_readbit(base, STEP))
+diff -Nur a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
+--- a/drivers/bluetooth/hci_qca.c 2018-10-10 07:54:28.000000000 +0100
++++ b/drivers/bluetooth/hci_qca.c 2018-11-03 16:31:56.065260061 +0000
+@@ -880,7 +880,7 @@
+ * then host can communicate with new baudrate to controller
+ */
+ set_current_state(TASK_UNINTERRUPTIBLE);
+- schedule_timeout(msecs_to_jiffies(BAUDRATE_SETTLE_TIMEOUT_MS));
++ schedule_msec_hrtimeout((BAUDRATE_SETTLE_TIMEOUT_MS));
+ set_current_state(TASK_RUNNING);
+
+ return 0;
+diff -Nur a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
+--- a/drivers/char/ipmi/ipmi_msghandler.c 2018-10-10 07:54:28.000000000 +0100
++++ b/drivers/char/ipmi/ipmi_msghandler.c 2018-11-03 16:30:39.473807368 +0000
+@@ -2953,7 +2953,7 @@
+ /* Current message first, to preserve order */
+ while (intf->curr_msg && !list_empty(&intf->waiting_rcv_msgs)) {
+ /* Wait for the message to clear out. */
+- schedule_timeout(1);
++ schedule_min_hrtimeout();
+ }
+
+ /* No need for locks, the interface is down. */
+diff -Nur a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c
+--- a/drivers/char/ipmi/ipmi_ssif.c 2018-10-10 07:54:28.000000000 +0100
++++ b/drivers/char/ipmi/ipmi_ssif.c 2018-11-03 16:30:39.473807368 +0000
+@@ -1200,7 +1200,7 @@
+
+ /* make sure the driver is not looking for flags any more. */
+ while (ssif_info->ssif_state != SSIF_NORMAL)
+- schedule_timeout(1);
++ schedule_min_hrtimeout();
+
+ ssif_info->stopping = true;
+ del_timer_sync(&ssif_info->retry_timer);
+diff -Nur a/drivers/char/snsc.c b/drivers/char/snsc.c
+--- a/drivers/char/snsc.c 2018-10-10 07:54:28.000000000 +0100
++++ b/drivers/char/snsc.c 2018-11-03 16:30:39.474807400 +0000
+@@ -198,7 +198,7 @@
+ add_wait_queue(&sd->sd_rq, &wait);
+ spin_unlock_irqrestore(&sd->sd_rlock, flags);
+
+- schedule_timeout(msecs_to_jiffies(SCDRV_TIMEOUT));
++ schedule_msec_hrtimeout((SCDRV_TIMEOUT));
+
+ remove_wait_queue(&sd->sd_rq, &wait);
+ if (signal_pending(current)) {
+@@ -294,7 +294,7 @@
+ add_wait_queue(&sd->sd_wq, &wait);
+ spin_unlock_irqrestore(&sd->sd_wlock, flags);
+
+- schedule_timeout(msecs_to_jiffies(SCDRV_TIMEOUT));
++ schedule_msec_hrtimeout((SCDRV_TIMEOUT));
+
+ remove_wait_queue(&sd->sd_wq, &wait);
+ if (signal_pending(current)) {
+diff -Nur a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
+--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c 2018-10-10 07:54:28.000000000 +0100
++++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c 2018-11-03 16:30:39.474807400 +0000
+@@ -235,7 +235,7 @@
+ DRM_ERROR("SVGA device lockup.\n");
+ break;
+ }
+- schedule_timeout(1);
++ schedule_min_hrtimeout();
+ if (interruptible && signal_pending(current)) {
+ ret = -ERESTARTSYS;
+ break;
+diff -Nur a/drivers/gpu/drm/vmwgfx/vmwgfx_irq.c b/drivers/gpu/drm/vmwgfx/vmwgfx_irq.c
+--- a/drivers/gpu/drm/vmwgfx/vmwgfx_irq.c 2018-10-10 07:54:28.000000000 +0100
++++ b/drivers/gpu/drm/vmwgfx/vmwgfx_irq.c 2018-11-03 16:30:39.474807400 +0000
+@@ -202,7 +202,7 @@
+ break;
+ }
+ if (lazy)
+- schedule_timeout(1);
++ schedule_min_hrtimeout();
+ else if ((++count & 0x0F) == 0) {
+ /**
+ * FIXME: Use schedule_hr_timeout here for
+diff -Nur a/drivers/media/pci/ivtv/ivtv-ioctl.c b/drivers/media/pci/ivtv/ivtv-ioctl.c
+--- a/drivers/media/pci/ivtv/ivtv-ioctl.c 2018-10-10 07:54:28.000000000 +0100
++++ b/drivers/media/pci/ivtv/ivtv-ioctl.c 2018-11-03 16:30:39.475807432 +0000
+@@ -1154,7 +1154,7 @@
+ TASK_UNINTERRUPTIBLE);
+ if ((read_reg(IVTV_REG_DEC_LINE_FIELD) >> 16) < 100)
+ break;
+- schedule_timeout(msecs_to_jiffies(25));
++ schedule_msec_hrtimeout((25));
+ }
+ finish_wait(&itv->vsync_waitq, &wait);
+ mutex_lock(&itv->serialize_lock);
+diff -Nur a/drivers/media/pci/ivtv/ivtv-streams.c b/drivers/media/pci/ivtv/ivtv-streams.c
+--- a/drivers/media/pci/ivtv/ivtv-streams.c 2018-10-10 07:54:28.000000000 +0100
++++ b/drivers/media/pci/ivtv/ivtv-streams.c 2018-11-03 16:30:39.475807432 +0000
+@@ -834,7 +834,7 @@
+ while (!test_bit(IVTV_F_I_EOS, &itv->i_flags) &&
+ time_before(jiffies,
+ then + msecs_to_jiffies(2000))) {
+- schedule_timeout(msecs_to_jiffies(10));
++ schedule_msec_hrtimeout((10));
+ }
+
+ /* To convert jiffies to ms, we must multiply by 1000
+diff -Nur a/drivers/mfd/ucb1x00-core.c b/drivers/mfd/ucb1x00-core.c
+--- a/drivers/mfd/ucb1x00-core.c 2018-10-10 07:54:28.000000000 +0100
++++ b/drivers/mfd/ucb1x00-core.c 2018-11-03 16:30:39.476807464 +0000
+@@ -253,7 +253,7 @@
+ break;
+ /* yield to other processes */
+ set_current_state(TASK_INTERRUPTIBLE);
+- schedule_timeout(1);
++ schedule_min_hrtimeout();
+ }
+
+ return UCB_ADC_DAT(val);
+diff -Nur a/drivers/misc/sgi-xp/xpc_channel.c b/drivers/misc/sgi-xp/xpc_channel.c
+--- a/drivers/misc/sgi-xp/xpc_channel.c 2018-10-10 07:54:28.000000000 +0100
++++ b/drivers/misc/sgi-xp/xpc_channel.c 2018-11-03 16:30:39.476807464 +0000
+@@ -837,7 +837,7 @@
+
+ atomic_inc(&ch->n_on_msg_allocate_wq);
+ prepare_to_wait(&ch->msg_allocate_wq, &wait, TASK_INTERRUPTIBLE);
+- ret = schedule_timeout(1);
++ ret = schedule_min_hrtimeout();
+ finish_wait(&ch->msg_allocate_wq, &wait);
+ atomic_dec(&ch->n_on_msg_allocate_wq);
+
+diff -Nur a/drivers/net/caif/caif_hsi.c b/drivers/net/caif/caif_hsi.c
+--- a/drivers/net/caif/caif_hsi.c 2018-10-10 07:54:28.000000000 +0100
++++ b/drivers/net/caif/caif_hsi.c 2018-11-03 16:30:39.477807497 +0000
+@@ -940,7 +940,7 @@
+ break;
+
+ set_current_state(TASK_INTERRUPTIBLE);
+- schedule_timeout(1);
++ schedule_min_hrtimeout();
+ retry--;
+ }
+
+diff -Nur a/drivers/net/can/usb/peak_usb/pcan_usb.c b/drivers/net/can/usb/peak_usb/pcan_usb.c
+--- a/drivers/net/can/usb/peak_usb/pcan_usb.c 2018-10-10 07:54:28.000000000 +0100
++++ b/drivers/net/can/usb/peak_usb/pcan_usb.c 2018-11-03 16:30:39.477807497 +0000
+@@ -250,7 +250,7 @@
+ } else {
+ /* the PCAN-USB needs time to init */
+ set_current_state(TASK_INTERRUPTIBLE);
+- schedule_timeout(msecs_to_jiffies(PCAN_USB_STARTUP_TIMEOUT));
++ schedule_msec_hrtimeout((PCAN_USB_STARTUP_TIMEOUT));
+ }
+
+ return err;
+diff -Nur a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
+--- a/drivers/net/usb/lan78xx.c 2018-10-10 07:54:28.000000000 +0100
++++ b/drivers/net/usb/lan78xx.c 2018-11-03 16:30:39.478807529 +0000
+@@ -2567,7 +2567,7 @@
+ while (!skb_queue_empty(&dev->rxq) &&
+ !skb_queue_empty(&dev->txq) &&
+ !skb_queue_empty(&dev->done)) {
+- schedule_timeout(msecs_to_jiffies(UNLINK_TIMEOUT_MS));
++ schedule_msec_hrtimeout((UNLINK_TIMEOUT_MS));
+ set_current_state(TASK_UNINTERRUPTIBLE);
+ netif_dbg(dev, ifdown, dev->net,
+ "waited for %d urb completions\n", temp);
+diff -Nur a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
+--- a/drivers/net/usb/usbnet.c 2018-10-10 07:54:28.000000000 +0100
++++ b/drivers/net/usb/usbnet.c 2018-11-03 16:30:39.479807561 +0000
+@@ -772,7 +772,7 @@
+ spin_lock_irqsave(&q->lock, flags);
+ while (!skb_queue_empty(q)) {
+ spin_unlock_irqrestore(&q->lock, flags);
+- schedule_timeout(msecs_to_jiffies(UNLINK_TIMEOUT_MS));
++ schedule_msec_hrtimeout((UNLINK_TIMEOUT_MS));
+ set_current_state(TASK_UNINTERRUPTIBLE);
+ spin_lock_irqsave(&q->lock, flags);
+ }
+diff -Nur a/drivers/ntb/test/ntb_perf.c b/drivers/ntb/test/ntb_perf.c
+--- a/drivers/ntb/test/ntb_perf.c 2018-10-10 07:54:28.000000000 +0100
++++ b/drivers/ntb/test/ntb_perf.c 2018-11-03 16:30:39.479807561 +0000
+@@ -310,7 +310,7 @@
+ if (unlikely((jiffies - last_sleep) > 5 * HZ)) {
+ last_sleep = jiffies;
+ set_current_state(TASK_INTERRUPTIBLE);
+- schedule_timeout(1);
++ schedule_min_hrtimeout();
+ }
+
+ if (unlikely(kthread_should_stop()))
+diff -Nur a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c
+--- a/drivers/scsi/fnic/fnic_scsi.c 2018-10-10 07:54:28.000000000 +0100
++++ b/drivers/scsi/fnic/fnic_scsi.c 2018-11-03 16:30:39.480807592 +0000
+@@ -217,7 +217,7 @@
+
+ /* wait for io cmpl */
+ while (atomic_read(&fnic->in_flight))
+- schedule_timeout(msecs_to_jiffies(1));
++ schedule_msec_hrtimeout((1));
+
+ spin_lock_irqsave(&fnic->wq_copy_lock[0], flags);
+
+@@ -2255,7 +2255,7 @@
+ }
+ }
+
+- schedule_timeout(msecs_to_jiffies(2 * fnic->config.ed_tov));
++ schedule_msec_hrtimeout((2 * fnic->config.ed_tov));
+
+ /* walk again to check, if IOs are still pending in fw */
+ if (fnic_is_abts_pending(fnic, lr_sc))
+diff -Nur a/drivers/scsi/snic/snic_scsi.c b/drivers/scsi/snic/snic_scsi.c
+--- a/drivers/scsi/snic/snic_scsi.c 2018-10-10 07:54:28.000000000 +0100
++++ b/drivers/scsi/snic/snic_scsi.c 2018-11-03 16:30:39.481807625 +0000
+@@ -2354,7 +2354,7 @@
+
+ /* Wait for all the IOs that are entered in Qcmd */
+ while (atomic_read(&snic->ios_inflight))
+- schedule_timeout(msecs_to_jiffies(1));
++ schedule_msec_hrtimeout((1));
+
+ ret = snic_issue_hba_reset(snic, sc);
+ if (ret) {
+diff -Nur a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c
+--- a/drivers/staging/comedi/drivers/ni_mio_common.c 2018-10-10 07:54:28.000000000 +0100
++++ b/drivers/staging/comedi/drivers/ni_mio_common.c 2018-11-03 16:30:39.483807688 +0000
+@@ -4657,7 +4657,7 @@
+ if ((status & NI67XX_CAL_STATUS_BUSY) == 0)
+ break;
+ set_current_state(TASK_INTERRUPTIBLE);
+- if (schedule_timeout(1))
++ if (schedule_min_hrtimeout())
+ return -EIO;
+ }
+ if (i == timeout) {
+diff -Nur a/drivers/staging/lustre/lnet/lnet/lib-eq.c b/drivers/staging/lustre/lnet/lnet/lib-eq.c
+--- a/drivers/staging/lustre/lnet/lnet/lib-eq.c 2018-10-10 07:54:28.000000000 +0100
++++ b/drivers/staging/lustre/lnet/lnet/lib-eq.c 2018-11-03 16:30:39.483807688 +0000
+@@ -329,7 +329,7 @@
+ schedule();
+ } else {
+ now = jiffies;
+- schedule_timeout(msecs_to_jiffies(tms));
++ schedule_msec_hrtimeout((tms));
+ tms -= jiffies_to_msecs(jiffies - now);
+ if (tms < 0) /* no more wait but may have new event */
+ tms = 0;
+diff -Nur a/drivers/staging/rts5208/rtsx.c b/drivers/staging/rts5208/rtsx.c
+--- a/drivers/staging/rts5208/rtsx.c 2018-10-10 07:54:28.000000000 +0100
++++ b/drivers/staging/rts5208/rtsx.c 2018-11-03 16:30:39.483807688 +0000
+@@ -524,7 +524,7 @@
+
+ for (;;) {
+ set_current_state(TASK_INTERRUPTIBLE);
+- schedule_timeout(msecs_to_jiffies(POLLING_INTERVAL));
++ schedule_msec_hrtimeout((POLLING_INTERVAL));
+
+ /* lock the device pointers */
+ mutex_lock(&dev->dev_mutex);
+diff -Nur a/drivers/staging/speakup/speakup_acntpc.c b/drivers/staging/speakup/speakup_acntpc.c
+--- a/drivers/staging/speakup/speakup_acntpc.c 2018-10-10 07:54:28.000000000 +0100
++++ b/drivers/staging/speakup/speakup_acntpc.c 2018-11-03 16:30:39.484807721 +0000
+@@ -206,7 +206,7 @@
+ full_time_val = full_time->u.n.value;
+ spin_unlock_irqrestore(&speakup_info.spinlock, flags);
+ if (synth_full()) {
+- schedule_timeout(msecs_to_jiffies(full_time_val));
++ schedule_msec_hrtimeout((full_time_val));
+ continue;
+ }
+ set_current_state(TASK_RUNNING);
+@@ -234,7 +234,7 @@
+ jiffy_delta_val = jiffy_delta->u.n.value;
+ delay_time_val = delay_time->u.n.value;
+ spin_unlock_irqrestore(&speakup_info.spinlock, flags);
+- schedule_timeout(msecs_to_jiffies(delay_time_val));
++ schedule_msec_hrtimeout(delay_time_val);
+ jiff_max = jiffies + jiffy_delta_val;
+ }
+ }
+diff -Nur a/drivers/staging/speakup/speakup_apollo.c b/drivers/staging/speakup/speakup_apollo.c
+--- a/drivers/staging/speakup/speakup_apollo.c 2018-10-10 07:54:28.000000000 +0100
++++ b/drivers/staging/speakup/speakup_apollo.c 2018-11-03 16:30:39.484807721 +0000
+@@ -174,7 +174,7 @@
+ if (!synth->io_ops->synth_out(synth, ch)) {
+ synth->io_ops->tiocmset(0, UART_MCR_RTS);
+ synth->io_ops->tiocmset(UART_MCR_RTS, 0);
+- schedule_timeout(msecs_to_jiffies(full_time_val));
++ schedule_msec_hrtimeout(full_time_val);
+ continue;
+ }
+ if (time_after_eq(jiffies, jiff_max) && (ch == SPACE)) {
+diff -Nur a/drivers/staging/speakup/speakup_decext.c b/drivers/staging/speakup/speakup_decext.c
+--- a/drivers/staging/speakup/speakup_decext.c 2018-10-10 07:54:28.000000000 +0100
++++ b/drivers/staging/speakup/speakup_decext.c 2018-11-03 16:30:39.484807721 +0000
+@@ -185,7 +185,7 @@
+ if (ch == '\n')
+ ch = 0x0D;
+ if (synth_full() || !synth->io_ops->synth_out(synth, ch)) {
+- schedule_timeout(msecs_to_jiffies(delay_time_val));
++ schedule_msec_hrtimeout(delay_time_val);
+ continue;
+ }
+ set_current_state(TASK_RUNNING);
+diff -Nur a/drivers/staging/speakup/speakup_decpc.c b/drivers/staging/speakup/speakup_decpc.c
+--- a/drivers/staging/speakup/speakup_decpc.c 2018-10-10 07:54:28.000000000 +0100
++++ b/drivers/staging/speakup/speakup_decpc.c 2018-11-03 16:30:39.484807721 +0000
+@@ -403,7 +403,7 @@
+ if (ch == '\n')
+ ch = 0x0D;
+ if (dt_sendchar(ch)) {
+- schedule_timeout(msecs_to_jiffies(delay_time_val));
++ schedule_msec_hrtimeout((delay_time_val));
+ continue;
+ }
+ set_current_state(TASK_RUNNING);
+diff -Nur a/drivers/staging/speakup/speakup_dectlk.c b/drivers/staging/speakup/speakup_dectlk.c
+--- a/drivers/staging/speakup/speakup_dectlk.c 2018-10-10 07:54:28.000000000 +0100
++++ b/drivers/staging/speakup/speakup_dectlk.c 2018-11-03 16:30:39.485807753 +0000
+@@ -253,7 +253,7 @@
+ if (ch == '\n')
+ ch = 0x0D;
+ if (synth_full_val || !synth->io_ops->synth_out(synth, ch)) {
+- schedule_timeout(msecs_to_jiffies(delay_time_val));
++ schedule_msec_hrtimeout(delay_time_val);
+ continue;
+ }
+ set_current_state(TASK_RUNNING);
+diff -Nur a/drivers/staging/speakup/speakup_dtlk.c b/drivers/staging/speakup/speakup_dtlk.c
+--- a/drivers/staging/speakup/speakup_dtlk.c 2018-10-10 07:54:28.000000000 +0100
++++ b/drivers/staging/speakup/speakup_dtlk.c 2018-11-03 16:30:39.485807753 +0000
+@@ -220,7 +220,7 @@
+ delay_time_val = delay_time->u.n.value;
+ spin_unlock_irqrestore(&speakup_info.spinlock, flags);
+ if (synth_full()) {
+- schedule_timeout(msecs_to_jiffies(delay_time_val));
++ schedule_msec_hrtimeout((delay_time_val));
+ continue;
+ }
+ set_current_state(TASK_RUNNING);
+@@ -236,7 +236,7 @@
+ delay_time_val = delay_time->u.n.value;
+ jiffy_delta_val = jiffy_delta->u.n.value;
+ spin_unlock_irqrestore(&speakup_info.spinlock, flags);
+- schedule_timeout(msecs_to_jiffies(delay_time_val));
++ schedule_msec_hrtimeout((delay_time_val));
+ jiff_max = jiffies + jiffy_delta_val;
+ }
+ }
+diff -Nur a/drivers/staging/speakup/speakup_keypc.c b/drivers/staging/speakup/speakup_keypc.c
+--- a/drivers/staging/speakup/speakup_keypc.c 2018-10-10 07:54:28.000000000 +0100
++++ b/drivers/staging/speakup/speakup_keypc.c 2018-11-03 16:30:39.485807753 +0000
+@@ -208,7 +208,7 @@
+ full_time_val = full_time->u.n.value;
+ spin_unlock_irqrestore(&speakup_info.spinlock, flags);
+ if (synth_full()) {
+- schedule_timeout(msecs_to_jiffies(full_time_val));
++ schedule_msec_hrtimeout((full_time_val));
+ continue;
+ }
+ set_current_state(TASK_RUNNING);
+@@ -241,7 +241,7 @@
+ jiffy_delta_val = jiffy_delta->u.n.value;
+ delay_time_val = delay_time->u.n.value;
+ spin_unlock_irqrestore(&speakup_info.spinlock, flags);
+- schedule_timeout(msecs_to_jiffies(delay_time_val));
++ schedule_msec_hrtimeout((delay_time_val));
+ jiff_max = jiffies+jiffy_delta_val;
+ }
+ }
+diff -Nur a/drivers/staging/speakup/synth.c b/drivers/staging/speakup/synth.c
+--- a/drivers/staging/speakup/synth.c 2018-10-10 07:54:28.000000000 +0100
++++ b/drivers/staging/speakup/synth.c 2018-11-03 16:30:39.486807785 +0000
+@@ -92,7 +92,7 @@
+ if (ch == '\n')
+ ch = synth->procspeech;
+ if (!synth->io_ops->synth_out(synth, ch)) {
+- schedule_timeout(msecs_to_jiffies(full_time_val));
++ schedule_msec_hrtimeout(full_time_val);
+ continue;
+ }
+ if (time_after_eq(jiffies, jiff_max) && (ch == SPACE)) {
+diff -Nur a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c
+--- a/drivers/staging/unisys/visornic/visornic_main.c 2018-10-10 07:54:28.000000000 +0100
++++ b/drivers/staging/unisys/visornic/visornic_main.c 2018-11-03 16:30:39.486807785 +0000
+@@ -556,7 +556,7 @@
+ }
+ set_current_state(TASK_INTERRUPTIBLE);
+ spin_unlock_irqrestore(&devdata->priv_lock, flags);
+- wait += schedule_timeout(msecs_to_jiffies(10));
++ wait += schedule_msec_hrtimeout((10));
+ spin_lock_irqsave(&devdata->priv_lock, flags);
+ }
+
+@@ -567,7 +567,7 @@
+ while (1) {
+ set_current_state(TASK_INTERRUPTIBLE);
+ spin_unlock_irqrestore(&devdata->priv_lock, flags);
+- schedule_timeout(msecs_to_jiffies(10));
++ schedule_msec_hrtimeout((10));
+ spin_lock_irqsave(&devdata->priv_lock, flags);
+ if (atomic_read(&devdata->usage))
+ break;
+@@ -721,7 +721,7 @@
+ }
+ set_current_state(TASK_INTERRUPTIBLE);
+ spin_unlock_irqrestore(&devdata->priv_lock, flags);
+- wait += schedule_timeout(msecs_to_jiffies(10));
++ wait += schedule_msec_hrtimeout((10));
+ spin_lock_irqsave(&devdata->priv_lock, flags);
+ }
+
+diff -Nur a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c
+--- a/drivers/target/target_core_user.c 2018-10-10 07:54:28.000000000 +0100
++++ b/drivers/target/target_core_user.c 2018-11-03 16:30:39.487807817 +0000
+@@ -808,10 +808,9 @@
+ pr_debug("sleeping for ring space\n");
+ mutex_unlock(&udev->cmdr_lock);
+ if (udev->cmd_time_out)
+- ret = schedule_timeout(
+- msecs_to_jiffies(udev->cmd_time_out));
++ ret = schedule_msec_hrtimeout(udev->cmd_time_out);
+ else
+- ret = schedule_timeout(msecs_to_jiffies(TCMU_TIME_OUT));
++ ret = schedule_msec_hrtimeout(TCMU_TIME_OUT);
+ finish_wait(&udev->wait_cmdr, &__wait);
+ if (!ret) {
+ pr_warn("tcmu: command timed out\n");
+diff -Nur a/drivers/video/fbdev/omap/hwa742.c b/drivers/video/fbdev/omap/hwa742.c
+--- a/drivers/video/fbdev/omap/hwa742.c 2018-10-10 07:54:28.000000000 +0100
++++ b/drivers/video/fbdev/omap/hwa742.c 2018-11-03 16:30:39.487807817 +0000
+@@ -926,7 +926,7 @@
+ if (hwa742_read_reg(HWA742_PLL_DIV_REG) & (1 << 7))
+ break;
+ set_current_state(TASK_UNINTERRUPTIBLE);
+- schedule_timeout(msecs_to_jiffies(5));
++ schedule_msec_hrtimeout((5));
+ }
+ hwa742_set_update_mode(hwa742.update_mode_before_suspend);
+ }
+diff -Nur a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c
+--- a/drivers/video/fbdev/pxafb.c 2018-10-10 07:54:28.000000000 +0100
++++ b/drivers/video/fbdev/pxafb.c 2018-11-03 16:30:39.488807849 +0000
+@@ -1286,7 +1286,7 @@
+ mutex_unlock(&fbi->ctrlr_lock);
+
+ set_current_state(TASK_INTERRUPTIBLE);
+- schedule_timeout(msecs_to_jiffies(30));
++ schedule_msec_hrtimeout((30));
+ }
+
+ pr_debug("%s(): task ending\n", __func__);
+diff -Nur a/fs/afs/vlocation.c b/fs/afs/vlocation.c
+--- a/fs/afs/vlocation.c 2018-10-10 07:54:28.000000000 +0100
++++ b/fs/afs/vlocation.c 2018-11-03 16:30:39.488807849 +0000
+@@ -129,7 +129,7 @@
+ if (vl->upd_busy_cnt > 1) {
+ /* second+ BUSY - sleep a little bit */
+ set_current_state(TASK_UNINTERRUPTIBLE);
+- schedule_timeout(1);
++ schedule_min_hrtimeout();
+ }
+ continue;
+ }
+diff -Nur a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
+--- a/fs/btrfs/extent-tree.c 2018-10-10 07:54:28.000000000 +0100
++++ b/fs/btrfs/extent-tree.c 2018-11-03 16:30:39.491807945 +0000
+@@ -6106,7 +6106,7 @@
+
+ if (flush != BTRFS_RESERVE_NO_FLUSH &&
+ btrfs_transaction_in_commit(fs_info))
+- schedule_timeout(1);
++ schedule_min_hrtimeout();
+
+ if (delalloc_lock)
+ mutex_lock(&inode->delalloc_mutex);
+diff -Nur a/fs/btrfs/inode-map.c b/fs/btrfs/inode-map.c
+--- a/fs/btrfs/inode-map.c 2018-10-10 07:54:28.000000000 +0100
++++ b/fs/btrfs/inode-map.c 2018-11-03 16:30:39.492807977 +0000
+@@ -89,7 +89,7 @@
+ btrfs_release_path(path);
+ root->ino_cache_progress = last;
+ up_read(&fs_info->commit_root_sem);
+- schedule_timeout(1);
++ schedule_min_hrtimeout();
+ goto again;
+ } else
+ continue;
+diff -Nur a/sound/usb/line6/pcm.c b/sound/usb/line6/pcm.c
+--- a/sound/usb/line6/pcm.c 2018-10-10 07:54:28.000000000 +0100
++++ b/sound/usb/line6/pcm.c 2018-11-03 16:30:39.492807977 +0000
+@@ -131,7 +131,7 @@
+ if (!alive)
+ break;
+ set_current_state(TASK_UNINTERRUPTIBLE);
+- schedule_timeout(1);
++ schedule_min_hrtimeout();
+ } while (--timeout > 0);
+ if (alive)
+ dev_err(line6pcm->line6->ifcdev,