Skip to content

Commit

Permalink
hrtimer: Replace all schedule timeout(1) with schedule_min_hrtimeout()
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandre Frade <kernel@xanmod.org>
  • Loading branch information
ckolivas authored and xanmod committed Oct 15, 2020
1 parent c79c34d commit b101027
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions drivers/block/swim.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ static inline void swim_motor(struct swim __iomem *base,
if (swim_readbit(base, MOTOR_ON))
break;
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(1);
schedule_min_hrtimeout();
}
} else if (action == OFF) {
swim_action(base, MOTOR_OFF);
Expand All @@ -347,7 +347,7 @@ static inline void swim_eject(struct swim __iomem *base)
if (!swim_readbit(base, DISK_IN))
break;
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(1);
schedule_min_hrtimeout();
}
swim_select(base, RELAX);
}
Expand All @@ -371,7 +371,7 @@ static inline int swim_step(struct swim __iomem *base)
for (wait = 0; wait < HZ; wait++) {

set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(1);
schedule_min_hrtimeout();

swim_select(base, RELAX);
if (!swim_readbit(base, STEP))
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/ipmi/ipmi_msghandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -3542,7 +3542,7 @@ static void cleanup_smi_msgs(struct ipmi_smi *intf)
/* 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. */
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/ipmi/ipmi_ssif.c
Original file line number Diff line number Diff line change
Expand Up @@ -1288,7 +1288,7 @@ static void shutdown_ssif(void *send_info)

/* 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->watch_timer);
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ static int vmw_fifo_wait_noirq(struct vmw_private *dev_priv,
DRM_ERROR("SVGA device lockup.\n");
break;
}
schedule_timeout(1);
schedule_min_hrtimeout();
if (interruptible && signal_pending(current)) {
ret = -ERESTARTSYS;
break;
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/vmwgfx/vmwgfx_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ int vmw_fallback_wait(struct vmw_private *dev_priv,
break;
}
if (lazy)
schedule_timeout(1);
schedule_min_hrtimeout();
else if ((++count & 0x0F) == 0) {
/**
* FIXME: Use schedule_hr_timeout here for
Expand Down
2 changes: 1 addition & 1 deletion drivers/mfd/ucb1x00-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ unsigned int ucb1x00_adc_read(struct ucb1x00 *ucb, int adc_channel, int sync)
break;
/* yield to other processes */
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(1);
schedule_min_hrtimeout();
}

return UCB_ADC_DAT(val);
Expand Down
2 changes: 1 addition & 1 deletion drivers/misc/sgi-xp/xpc_channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ xpc_allocate_msg_wait(struct xpc_channel *ch)

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);

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/caif/caif_hsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@ static void cfhsi_wake_down(struct work_struct *work)
break;

set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(1);
schedule_min_hrtimeout();
retry--;
}

Expand Down
2 changes: 1 addition & 1 deletion fs/btrfs/delalloc-space.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ int btrfs_delalloc_reserve_metadata(struct btrfs_inode *inode, u64 num_bytes)
flush = BTRFS_RESERVE_FLUSH_LIMIT;

if (btrfs_transaction_in_commit(fs_info))
schedule_timeout(1);
schedule_min_hrtimeout();
}

num_bytes = ALIGN(num_bytes, fs_info->sectorsize);
Expand Down
2 changes: 1 addition & 1 deletion fs/btrfs/inode-map.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ static int caching_kthread(void *data)
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;
Expand Down
2 changes: 1 addition & 1 deletion sound/usb/line6/pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ static void line6_wait_clear_audio_urbs(struct snd_line6_pcm *line6pcm,
if (!alive)
break;
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(1);
schedule_min_hrtimeout();
} while (--timeout > 0);
if (alive)
dev_err(line6pcm->line6->ifcdev,
Expand Down

0 comments on commit b101027

Please sign in to comment.