From 6b2bdd295ec6ac4d7739efae85fb4e8b695d4fc0 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Mon, 20 Feb 2017 13:30:32 +1100 Subject: [PATCH 09/18] Replace all calls to schedule_timeout_uninterruptible of potentially under 50ms to use schedule_msec_hrtimeout_uninterruptible --- drivers/media/pci/cx18/cx18-gpio.c | 4 ++-- drivers/net/wireless/intel/ipw2x00/ipw2100.c | 4 ++-- drivers/rtc/rtc-wm8350.c | 6 +++--- drivers/scsi/lpfc/lpfc_scsi.c | 2 +- sound/pci/maestro3.c | 4 ++-- sound/soc/codecs/rt5631.c | 4 ++-- sound/soc/soc-dapm.c | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) Index: linux-4.11-ck1/drivers/media/pci/cx18/cx18-gpio.c =================================================================== --- linux-4.11-ck1.orig/drivers/media/pci/cx18/cx18-gpio.c 2017-05-12 13:25:55.595574429 +1000 +++ linux-4.11-ck1/drivers/media/pci/cx18/cx18-gpio.c 2017-05-12 13:25:55.595574429 +1000 @@ -90,11 +90,11 @@ static void gpio_reset_seq(struct cx18 * /* Assert */ gpio_update(cx, mask, ~active_lo); - schedule_timeout_uninterruptible(msecs_to_jiffies(assert_msecs)); + schedule_msec_hrtimeout_uninterruptible((assert_msecs)); /* Deassert */ gpio_update(cx, mask, ~active_hi); - schedule_timeout_uninterruptible(msecs_to_jiffies(recovery_msecs)); + schedule_msec_hrtimeout_uninterruptible((recovery_msecs)); } /* Index: linux-4.11-ck1/drivers/net/wireless/intel/ipw2x00/ipw2100.c =================================================================== --- linux-4.11-ck1.orig/drivers/net/wireless/intel/ipw2x00/ipw2100.c 2017-05-12 13:25:55.595574429 +1000 +++ linux-4.11-ck1/drivers/net/wireless/intel/ipw2x00/ipw2100.c 2017-05-12 13:25:55.595574429 +1000 @@ -830,7 +830,7 @@ static int ipw2100_hw_send_command(struc * doesn't seem to have as many firmware restart cycles... * * As a test, we're sticking in a 1/100s delay here */ - schedule_timeout_uninterruptible(msecs_to_jiffies(10)); + schedule_msec_hrtimeout_uninterruptible((10)); return 0; @@ -1281,7 +1281,7 @@ static int ipw2100_start_adapter(struct IPW_DEBUG_FW("Waiting for f/w initialization to complete...\n"); i = 5000; do { - schedule_timeout_uninterruptible(msecs_to_jiffies(40)); + schedule_msec_hrtimeout_uninterruptible((40)); /* Todo... wait for sync command ... */ read_register(priv->net_dev, IPW_REG_INTA, &inta); Index: linux-4.11-ck1/drivers/rtc/rtc-wm8350.c =================================================================== --- linux-4.11-ck1.orig/drivers/rtc/rtc-wm8350.c 2017-05-12 13:25:55.595574429 +1000 +++ linux-4.11-ck1/drivers/rtc/rtc-wm8350.c 2017-05-12 13:25:55.595574429 +1000 @@ -121,7 +121,7 @@ static int wm8350_rtc_settime(struct dev /* Wait until confirmation of stopping */ do { rtc_ctrl = wm8350_reg_read(wm8350, WM8350_RTC_TIME_CONTROL); - schedule_timeout_uninterruptible(msecs_to_jiffies(1)); + schedule_msec_hrtimeout_uninterruptible((1)); } while (--retries && !(rtc_ctrl & WM8350_RTC_STS)); if (!retries) { @@ -204,7 +204,7 @@ static int wm8350_rtc_stop_alarm(struct /* Wait until confirmation of stopping */ do { rtc_ctrl = wm8350_reg_read(wm8350, WM8350_RTC_TIME_CONTROL); - schedule_timeout_uninterruptible(msecs_to_jiffies(1)); + schedule_msec_hrtimeout_uninterruptible((1)); } while (retries-- && !(rtc_ctrl & WM8350_RTC_ALMSTS)); if (!(rtc_ctrl & WM8350_RTC_ALMSTS)) @@ -227,7 +227,7 @@ static int wm8350_rtc_start_alarm(struct /* Wait until confirmation */ do { rtc_ctrl = wm8350_reg_read(wm8350, WM8350_RTC_TIME_CONTROL); - schedule_timeout_uninterruptible(msecs_to_jiffies(1)); + schedule_msec_hrtimeout_uninterruptible((1)); } while (retries-- && rtc_ctrl & WM8350_RTC_ALMSTS); if (rtc_ctrl & WM8350_RTC_ALMSTS) Index: linux-4.11-ck1/drivers/scsi/lpfc/lpfc_scsi.c =================================================================== --- linux-4.11-ck1.orig/drivers/scsi/lpfc/lpfc_scsi.c 2017-05-12 13:25:55.595574429 +1000 +++ linux-4.11-ck1/drivers/scsi/lpfc/lpfc_scsi.c 2017-05-12 13:25:55.595574429 +1000 @@ -5121,7 +5121,7 @@ lpfc_reset_flush_io_context(struct lpfc_ tgt_id, lun_id, context); later = msecs_to_jiffies(2 * vport->cfg_devloss_tmo * 1000) + jiffies; while (time_after(later, jiffies) && cnt) { - schedule_timeout_uninterruptible(msecs_to_jiffies(20)); + schedule_msec_hrtimeout_uninterruptible((20)); cnt = lpfc_sli_sum_iocb(vport, tgt_id, lun_id, context); } if (cnt) { Index: linux-4.11-ck1/sound/pci/maestro3.c =================================================================== --- linux-4.11-ck1.orig/sound/pci/maestro3.c 2017-05-12 13:25:55.595574429 +1000 +++ linux-4.11-ck1/sound/pci/maestro3.c 2017-05-12 13:25:55.595574429 +1000 @@ -2016,7 +2016,7 @@ static void snd_m3_ac97_reset(struct snd outw(0, io + GPIO_DATA); outw(dir | GPO_PRIMARY_AC97, io + GPIO_DIRECTION); - schedule_timeout_uninterruptible(msecs_to_jiffies(delay1)); + schedule_msec_hrtimeout_uninterruptible((delay1)); outw(GPO_PRIMARY_AC97, io + GPIO_DATA); udelay(5); @@ -2024,7 +2024,7 @@ static void snd_m3_ac97_reset(struct snd outw(IO_SRAM_ENABLE | SERIAL_AC_LINK_ENABLE, io + RING_BUS_CTRL_A); outw(~0, io + GPIO_MASK); - schedule_timeout_uninterruptible(msecs_to_jiffies(delay2)); + schedule_msec_hrtimeout_uninterruptible((delay2)); if (! snd_m3_try_read_vendor(chip)) break; Index: linux-4.11-ck1/sound/soc/codecs/rt5631.c =================================================================== --- linux-4.11-ck1.orig/sound/soc/codecs/rt5631.c 2017-05-12 13:25:55.595574429 +1000 +++ linux-4.11-ck1/sound/soc/codecs/rt5631.c 2017-05-12 13:25:55.595574429 +1000 @@ -419,7 +419,7 @@ static void onebit_depop_mute_stage(stru hp_zc = snd_soc_read(codec, RT5631_INT_ST_IRQ_CTRL_2); snd_soc_write(codec, RT5631_INT_ST_IRQ_CTRL_2, hp_zc & 0xf7ff); if (enable) { - schedule_timeout_uninterruptible(msecs_to_jiffies(10)); + schedule_msec_hrtimeout_uninterruptible((10)); /* config one-bit depop parameter */ rt5631_write_index(codec, RT5631_SPK_INTL_CTRL, 0x307f); snd_soc_update_bits(codec, RT5631_HP_OUT_VOL, @@ -529,7 +529,7 @@ static void depop_seq_mute_stage(struct hp_zc = snd_soc_read(codec, RT5631_INT_ST_IRQ_CTRL_2); snd_soc_write(codec, RT5631_INT_ST_IRQ_CTRL_2, hp_zc & 0xf7ff); if (enable) { - schedule_timeout_uninterruptible(msecs_to_jiffies(10)); + schedule_msec_hrtimeout_uninterruptible((10)); /* config depop sequence parameter */ rt5631_write_index(codec, RT5631_SPK_INTL_CTRL, 0x302f); Index: linux-4.11-ck1/sound/soc/soc-dapm.c =================================================================== --- linux-4.11-ck1.orig/sound/soc/soc-dapm.c 2017-05-12 13:25:55.595574429 +1000 +++ linux-4.11-ck1/sound/soc/soc-dapm.c 2017-05-12 13:25:55.595574429 +1000 @@ -134,7 +134,7 @@ static void dapm_assert_locked(struct sn static void pop_wait(u32 pop_time) { if (pop_time) - schedule_timeout_uninterruptible(msecs_to_jiffies(pop_time)); + schedule_msec_hrtimeout_uninterruptible((pop_time)); } static void pop_dbg(struct device *dev, u32 pop_time, const char *fmt, ...)