parent
a3fbee018e
commit
dcdac54252
4
PKGBUILD
4
PKGBUILD
|
@ -9,7 +9,7 @@ pkgname=$pkgbase
|
||||||
pkgdesc="The Linux Kernel and modules from Linus' git tree"
|
pkgdesc="The Linux Kernel and modules from Linus' git tree"
|
||||||
depends=('coreutils' 'linux-firmware' 'module-init-tools' 'mkinitcpio')
|
depends=('coreutils' 'linux-firmware' 'module-init-tools' 'mkinitcpio')
|
||||||
|
|
||||||
pkgver=4.11.rc5
|
pkgver=4.11.rc7
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
url="http://www.kernel.org/"
|
url="http://www.kernel.org/"
|
||||||
arch=(i686 x86_64)
|
arch=(i686 x86_64)
|
||||||
|
@ -24,7 +24,7 @@ sha256sums=('SKIP')
|
||||||
# set _gitrev to a git revision (man gitrevisions) like a tag, a commit sha1
|
# set _gitrev to a git revision (man gitrevisions) like a tag, a commit sha1
|
||||||
# hash or a branch name to build from this tree instead of master
|
# hash or a branch name to build from this tree instead of master
|
||||||
|
|
||||||
_gitrev="v4.10.8"
|
_gitrev="v4.10.12"
|
||||||
|
|
||||||
####################################################################
|
####################################################################
|
||||||
# KERNEL CONFIG FILES
|
# KERNEL CONFIG FILES
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
||||||
pkgname=linux-spica
|
pkgname=linux-spica
|
||||||
kernver=4.10.8spica-dirty
|
kernver=4.10.12spica-dirty
|
||||||
#bootdevice="BOOT_IMAGE=/boot/vmlinuz-$pkgname root=UUID=d670564f-2cb3-4981-9d51-6ed9c1327d47"
|
#bootdevice="BOOT_IMAGE=/boot/vmlinuz-$pkgname root=UUID=d670564f-2cb3-4981-9d51-6ed9c1327d47"
|
||||||
#option="rw quiet clocksource=hpet initrd=EFI/spi-ca/initrd intel_iommu=on pci-stub.ids=1002:683f,1002:aab0 vfio_iommu_type1.allow_unsafe_interrupts=1,kvm.ignore_msrs=1"
|
#option="rw quiet clocksource=hpet initrd=EFI/spi-ca/initrd intel_iommu=on pci-stub.ids=1002:683f,1002:aab0 vfio_iommu_type1.allow_unsafe_interrupts=1,kvm.ignore_msrs=1"
|
||||||
#option="rw quiet clocksource=hpet initrd=EFI/spi-ca/initrd quiet intremap=no_x2apic_optout zswap.enabled=1 zswap.max_pool_percent=25 zswap.compressor=lz4"
|
#option="rw quiet clocksource=hpet initrd=EFI/spi-ca/initrd quiet intremap=no_x2apic_optout zswap.enabled=1 zswap.max_pool_percent=25 zswap.compressor=lz4"
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,111 +0,0 @@
|
||||||
From a7fb2842267fd275cae9cf44dd3037469f75eeef Mon Sep 17 00:00:00 2001
|
|
||||||
From: Con Kolivas <kernel@kolivas.org>
|
|
||||||
Date: Tue, 1 Nov 2016 12:54:20 +1100
|
|
||||||
Subject: [PATCH 09/25] Implement min and msec hrtimeout un/interruptible
|
|
||||||
schedule timeout variants with a lower resolution of 1ms to work around low
|
|
||||||
Hz time resolutions.
|
|
||||||
|
|
||||||
---
|
|
||||||
include/linux/sched.h | 6 +++++
|
|
||||||
kernel/time/hrtimer.c | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
||||||
2 files changed, 77 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/include/linux/sched.h b/include/linux/sched.h
|
|
||||||
index d752ef6..46544f4 100644
|
|
||||||
--- a/include/linux/sched.h
|
|
||||||
+++ b/include/linux/sched.h
|
|
||||||
@@ -457,6 +457,12 @@ extern signed long schedule_timeout_interruptible(signed long timeout);
|
|
||||||
extern signed long schedule_timeout_killable(signed long timeout);
|
|
||||||
extern signed long schedule_timeout_uninterruptible(signed long timeout);
|
|
||||||
extern signed long schedule_timeout_idle(signed long timeout);
|
|
||||||
+
|
|
||||||
+extern signed long schedule_msec_hrtimeout(signed long timeout);
|
|
||||||
+extern signed long schedule_min_hrtimeout(void);
|
|
||||||
+extern signed long schedule_msec_hrtimeout_interruptible(signed long timeout);
|
|
||||||
+extern signed long schedule_msec_hrtimeout_uninterruptible(signed long timeout);
|
|
||||||
+
|
|
||||||
asmlinkage void schedule(void);
|
|
||||||
extern void schedule_preempt_disabled(void);
|
|
||||||
|
|
||||||
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
|
|
||||||
index c6ecedd..a47f5b3 100644
|
|
||||||
--- a/kernel/time/hrtimer.c
|
|
||||||
+++ b/kernel/time/hrtimer.c
|
|
||||||
@@ -1796,3 +1796,74 @@ int __sched schedule_hrtimeout(ktime_t *expires,
|
|
||||||
return schedule_hrtimeout_range(expires, 0, mode);
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL_GPL(schedule_hrtimeout);
|
|
||||||
+
|
|
||||||
+/*
|
|
||||||
+ * As per schedule_hrtimeout but taskes a millisecond value and returns how
|
|
||||||
+ * many milliseconds are left.
|
|
||||||
+ */
|
|
||||||
+signed long __sched schedule_msec_hrtimeout(signed long timeout)
|
|
||||||
+{
|
|
||||||
+ struct hrtimer_sleeper t;
|
|
||||||
+ int delta, secs, jiffs;
|
|
||||||
+ ktime_t expires;
|
|
||||||
+
|
|
||||||
+ if (!timeout) {
|
|
||||||
+ __set_current_state(TASK_RUNNING);
|
|
||||||
+ return 0;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ jiffs = msecs_to_jiffies(timeout);
|
|
||||||
+ /*
|
|
||||||
+ * If regular timer resolution is adequate or hrtimer resolution is not
|
|
||||||
+ * (yet) better than Hz, as would occur during startup, use regular
|
|
||||||
+ * timers.
|
|
||||||
+ */
|
|
||||||
+ if (jiffs > 4 || hrtimer_resolution >= NSEC_PER_SEC / HZ)
|
|
||||||
+ return schedule_timeout(jiffs);
|
|
||||||
+
|
|
||||||
+ secs = timeout / 1000;
|
|
||||||
+ delta = (timeout % 1000) * NSEC_PER_MSEC;
|
|
||||||
+ expires = ktime_set(secs, delta);
|
|
||||||
+
|
|
||||||
+ hrtimer_init_on_stack(&t.timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
|
||||||
+ hrtimer_set_expires_range_ns(&t.timer, expires, delta);
|
|
||||||
+
|
|
||||||
+ hrtimer_init_sleeper(&t, current);
|
|
||||||
+
|
|
||||||
+ hrtimer_start_expires(&t.timer, HRTIMER_MODE_REL);
|
|
||||||
+
|
|
||||||
+ if (likely(t.task))
|
|
||||||
+ schedule();
|
|
||||||
+
|
|
||||||
+ hrtimer_cancel(&t.timer);
|
|
||||||
+ destroy_hrtimer_on_stack(&t.timer);
|
|
||||||
+
|
|
||||||
+ __set_current_state(TASK_RUNNING);
|
|
||||||
+
|
|
||||||
+ expires = hrtimer_expires_remaining(&t.timer);
|
|
||||||
+ timeout = ktime_to_ms(expires);
|
|
||||||
+ return timeout < 0 ? 0 : timeout;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+EXPORT_SYMBOL(schedule_msec_hrtimeout);
|
|
||||||
+
|
|
||||||
+signed long __sched schedule_min_hrtimeout(void)
|
|
||||||
+{
|
|
||||||
+ return schedule_msec_hrtimeout(1);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+EXPORT_SYMBOL(schedule_min_hrtimeout);
|
|
||||||
+
|
|
||||||
+signed long __sched schedule_msec_hrtimeout_interruptible(signed long timeout)
|
|
||||||
+{
|
|
||||||
+ __set_current_state(TASK_INTERRUPTIBLE);
|
|
||||||
+ return schedule_msec_hrtimeout(timeout);
|
|
||||||
+}
|
|
||||||
+EXPORT_SYMBOL(schedule_msec_hrtimeout_interruptible);
|
|
||||||
+
|
|
||||||
+signed long __sched schedule_msec_hrtimeout_uninterruptible(signed long timeout)
|
|
||||||
+{
|
|
||||||
+ __set_current_state(TASK_UNINTERRUPTIBLE);
|
|
||||||
+ return schedule_msec_hrtimeout(timeout);
|
|
||||||
+}
|
|
||||||
+EXPORT_SYMBOL(schedule_msec_hrtimeout_uninterruptible);
|
|
||||||
--
|
|
||||||
2.9.3
|
|
||||||
|
|
|
@ -1,48 +0,0 @@
|
||||||
From a4f3820228ebab3d5d480d720fecebd3f7e71771 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Con Kolivas <kernel@kolivas.org>
|
|
||||||
Date: Sat, 5 Nov 2016 09:27:36 +1100
|
|
||||||
Subject: [PATCH 10/25] Special case calls of schedule_timeout(1) to use the
|
|
||||||
min hrtimeout of 1ms, working around low Hz resolutions.
|
|
||||||
|
|
||||||
---
|
|
||||||
kernel/time/timer.c | 15 +++++++++++++--
|
|
||||||
1 file changed, 13 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/kernel/time/timer.c b/kernel/time/timer.c
|
|
||||||
index ef3128f..3f72c13 100644
|
|
||||||
--- a/kernel/time/timer.c
|
|
||||||
+++ b/kernel/time/timer.c
|
|
||||||
@@ -1750,6 +1750,17 @@ signed long __sched schedule_timeout(signed long timeout)
|
|
||||||
|
|
||||||
expire = timeout + jiffies;
|
|
||||||
|
|
||||||
+ if (timeout == 1 && hrtimer_resolution < NSEC_PER_SEC / HZ) {
|
|
||||||
+ /*
|
|
||||||
+ * Special case 1 as being a request for the minimum timeout
|
|
||||||
+ * and use highres timers to timeout after 1ms to workaround
|
|
||||||
+ * the granularity of low Hz tick timers.
|
|
||||||
+ */
|
|
||||||
+ if (!schedule_min_hrtimeout())
|
|
||||||
+ return 0;
|
|
||||||
+ goto out_timeout;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
setup_timer_on_stack(&timer, process_timeout, (unsigned long)current);
|
|
||||||
__mod_timer(&timer, expire, false);
|
|
||||||
schedule();
|
|
||||||
@@ -1757,10 +1768,10 @@ signed long __sched schedule_timeout(signed long timeout)
|
|
||||||
|
|
||||||
/* Remove the timer from the object tracker */
|
|
||||||
destroy_timer_on_stack(&timer);
|
|
||||||
-
|
|
||||||
+out_timeout:
|
|
||||||
timeout = expire - jiffies;
|
|
||||||
|
|
||||||
- out:
|
|
||||||
+out:
|
|
||||||
return timeout < 0 ? 0 : timeout;
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(schedule_timeout);
|
|
||||||
--
|
|
||||||
2.9.3
|
|
||||||
|
|
|
@ -1,54 +0,0 @@
|
||||||
From 534bc9d3e559420eaf57771f48d2c2f549dcc4d2 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Con Kolivas <kernel@kolivas.org>
|
|
||||||
Date: Fri, 4 Nov 2016 09:25:54 +1100
|
|
||||||
Subject: [PATCH 11/25] Convert msleep to use hrtimers when active.
|
|
||||||
|
|
||||||
---
|
|
||||||
kernel/time/timer.c | 24 ++++++++++++++++++++++--
|
|
||||||
1 file changed, 22 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/kernel/time/timer.c b/kernel/time/timer.c
|
|
||||||
index 3f72c13..bc53598 100644
|
|
||||||
--- a/kernel/time/timer.c
|
|
||||||
+++ b/kernel/time/timer.c
|
|
||||||
@@ -1892,7 +1892,19 @@ void __init init_timers(void)
|
|
||||||
*/
|
|
||||||
void msleep(unsigned int msecs)
|
|
||||||
{
|
|
||||||
- unsigned long timeout = msecs_to_jiffies(msecs) + 1;
|
|
||||||
+ int jiffs = msecs_to_jiffies(msecs);
|
|
||||||
+ unsigned long timeout;
|
|
||||||
+
|
|
||||||
+ /*
|
|
||||||
+ * Use high resolution timers where the resolution of tick based
|
|
||||||
+ * timers is inadequate.
|
|
||||||
+ */
|
|
||||||
+ if (jiffs < 5 && hrtimer_resolution < NSEC_PER_SEC / HZ) {
|
|
||||||
+ while (msecs)
|
|
||||||
+ msecs = schedule_msec_hrtimeout_uninterruptible(msecs);
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+ timeout = msecs_to_jiffies(msecs) + 1;
|
|
||||||
|
|
||||||
while (timeout)
|
|
||||||
timeout = schedule_timeout_uninterruptible(timeout);
|
|
||||||
@@ -1906,7 +1918,15 @@ EXPORT_SYMBOL(msleep);
|
|
||||||
*/
|
|
||||||
unsigned long msleep_interruptible(unsigned int msecs)
|
|
||||||
{
|
|
||||||
- unsigned long timeout = msecs_to_jiffies(msecs) + 1;
|
|
||||||
+ int jiffs = msecs_to_jiffies(msecs);
|
|
||||||
+ unsigned long timeout;
|
|
||||||
+
|
|
||||||
+ if (jiffs < 5 && hrtimer_resolution < NSEC_PER_SEC / HZ) {
|
|
||||||
+ while (msecs && !signal_pending(current))
|
|
||||||
+ msecs = schedule_msec_hrtimeout_interruptible(msecs);
|
|
||||||
+ return msecs;
|
|
||||||
+ }
|
|
||||||
+ timeout = msecs_to_jiffies(msecs) + 1;
|
|
||||||
|
|
||||||
while (timeout && !signal_pending(current))
|
|
||||||
timeout = schedule_timeout_interruptible(timeout);
|
|
||||||
--
|
|
||||||
2.9.3
|
|
||||||
|
|
|
@ -1,226 +0,0 @@
|
||||||
From 8fef7b75352d874af02881de3493f2ce2d47a341 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Con Kolivas <kernel@kolivas.org>
|
|
||||||
Date: Mon, 20 Feb 2017 13:28:30 +1100
|
|
||||||
Subject: [PATCH 12/25] Replace all schedule timeout(1) with
|
|
||||||
schedule_min_hrtimeout()
|
|
||||||
|
|
||||||
---
|
|
||||||
drivers/block/swim.c | 6 +++---
|
|
||||||
drivers/char/ipmi/ipmi_msghandler.c | 2 +-
|
|
||||||
drivers/char/ipmi/ipmi_ssif.c | 2 +-
|
|
||||||
drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c | 2 +-
|
|
||||||
drivers/gpu/drm/vmwgfx/vmwgfx_irq.c | 2 +-
|
|
||||||
drivers/mfd/ucb1x00-core.c | 2 +-
|
|
||||||
drivers/misc/sgi-xp/xpc_channel.c | 2 +-
|
|
||||||
drivers/net/caif/caif_hsi.c | 2 +-
|
|
||||||
drivers/ntb/test/ntb_perf.c | 2 +-
|
|
||||||
drivers/staging/comedi/drivers/ni_mio_common.c | 2 +-
|
|
||||||
fs/afs/vlocation.c | 2 +-
|
|
||||||
fs/btrfs/extent-tree.c | 2 +-
|
|
||||||
fs/btrfs/inode-map.c | 2 +-
|
|
||||||
sound/usb/line6/pcm.c | 2 +-
|
|
||||||
14 files changed, 16 insertions(+), 16 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/drivers/block/swim.c b/drivers/block/swim.c
|
|
||||||
index b5afd49..7d09955 100644
|
|
||||||
--- a/drivers/block/swim.c
|
|
||||||
+++ b/drivers/block/swim.c
|
|
||||||
@@ -332,7 +332,7 @@ static inline void swim_motor(struct swim __iomem *base,
|
|
||||||
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 @@ static inline void swim_eject(struct swim __iomem *base)
|
|
||||||
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 @@ static inline int swim_step(struct swim __iomem *base)
|
|
||||||
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 --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
|
|
||||||
index 92e53ac..a2418e7 100644
|
|
||||||
--- a/drivers/char/ipmi/ipmi_msghandler.c
|
|
||||||
+++ b/drivers/char/ipmi/ipmi_msghandler.c
|
|
||||||
@@ -2953,7 +2953,7 @@ static void cleanup_smi_msgs(ipmi_smi_t 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. */
|
|
||||||
diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c
|
|
||||||
index cca6e5b..fd3c7da 100644
|
|
||||||
--- a/drivers/char/ipmi/ipmi_ssif.c
|
|
||||||
+++ b/drivers/char/ipmi/ipmi_ssif.c
|
|
||||||
@@ -1185,7 +1185,7 @@ static int ssif_remove(struct i2c_client *client)
|
|
||||||
|
|
||||||
/* 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 --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
|
|
||||||
index b6a0806..b5b02cf 100644
|
|
||||||
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
|
|
||||||
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
|
|
||||||
@@ -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;
|
|
||||||
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_irq.c b/drivers/gpu/drm/vmwgfx/vmwgfx_irq.c
|
|
||||||
index 0c7e172..4c1555c 100644
|
|
||||||
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_irq.c
|
|
||||||
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_irq.c
|
|
||||||
@@ -156,7 +156,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
|
|
||||||
diff --git a/drivers/mfd/ucb1x00-core.c b/drivers/mfd/ucb1x00-core.c
|
|
||||||
index d6fb2e1..7ac951b 100644
|
|
||||||
--- a/drivers/mfd/ucb1x00-core.c
|
|
||||||
+++ b/drivers/mfd/ucb1x00-core.c
|
|
||||||
@@ -253,7 +253,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);
|
|
||||||
diff --git a/drivers/misc/sgi-xp/xpc_channel.c b/drivers/misc/sgi-xp/xpc_channel.c
|
|
||||||
index 128d561..38e68e9 100644
|
|
||||||
--- a/drivers/misc/sgi-xp/xpc_channel.c
|
|
||||||
+++ b/drivers/misc/sgi-xp/xpc_channel.c
|
|
||||||
@@ -837,7 +837,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);
|
|
||||||
|
|
||||||
diff --git a/drivers/net/caif/caif_hsi.c b/drivers/net/caif/caif_hsi.c
|
|
||||||
index ddabce7..67fb5ce 100644
|
|
||||||
--- a/drivers/net/caif/caif_hsi.c
|
|
||||||
+++ b/drivers/net/caif/caif_hsi.c
|
|
||||||
@@ -944,7 +944,7 @@ static void cfhsi_wake_down(struct work_struct *work)
|
|
||||||
break;
|
|
||||||
|
|
||||||
set_current_state(TASK_INTERRUPTIBLE);
|
|
||||||
- schedule_timeout(1);
|
|
||||||
+ schedule_min_hrtimeout();
|
|
||||||
retry--;
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/drivers/ntb/test/ntb_perf.c b/drivers/ntb/test/ntb_perf.c
|
|
||||||
index 434e1d4..2f9543b 100644
|
|
||||||
--- a/drivers/ntb/test/ntb_perf.c
|
|
||||||
+++ b/drivers/ntb/test/ntb_perf.c
|
|
||||||
@@ -308,7 +308,7 @@ static int perf_move_data(struct pthr_ctx *pctx, char __iomem *dst, char *src,
|
|
||||||
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 --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c
|
|
||||||
index b2e3828..beae38b 100644
|
|
||||||
--- a/drivers/staging/comedi/drivers/ni_mio_common.c
|
|
||||||
+++ b/drivers/staging/comedi/drivers/ni_mio_common.c
|
|
||||||
@@ -4655,7 +4655,7 @@ static int cs5529_wait_for_idle(struct comedi_device *dev)
|
|
||||||
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 --git a/fs/afs/vlocation.c b/fs/afs/vlocation.c
|
|
||||||
index 45a8639..855d08e 100644
|
|
||||||
--- a/fs/afs/vlocation.c
|
|
||||||
+++ b/fs/afs/vlocation.c
|
|
||||||
@@ -129,7 +129,7 @@ static int afs_vlocation_access_vl_by_id(struct afs_vlocation *vl,
|
|
||||||
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 --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
|
|
||||||
index dcd2e79..16bf891 100644
|
|
||||||
--- a/fs/btrfs/extent-tree.c
|
|
||||||
+++ b/fs/btrfs/extent-tree.c
|
|
||||||
@@ -5952,7 +5952,7 @@ int btrfs_delalloc_reserve_metadata(struct inode *inode, u64 num_bytes)
|
|
||||||
|
|
||||||
if (flush != BTRFS_RESERVE_NO_FLUSH &&
|
|
||||||
btrfs_transaction_in_commit(fs_info))
|
|
||||||
- schedule_timeout(1);
|
|
||||||
+ schedule_min_hrtimeout();
|
|
||||||
|
|
||||||
if (delalloc_lock)
|
|
||||||
mutex_lock(&BTRFS_I(inode)->delalloc_mutex);
|
|
||||||
diff --git a/fs/btrfs/inode-map.c b/fs/btrfs/inode-map.c
|
|
||||||
index 144b119..03d2e8e 100644
|
|
||||||
--- a/fs/btrfs/inode-map.c
|
|
||||||
+++ b/fs/btrfs/inode-map.c
|
|
||||||
@@ -89,7 +89,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;
|
|
||||||
diff --git a/sound/usb/line6/pcm.c b/sound/usb/line6/pcm.c
|
|
||||||
index fab53f5..fda1ab5 100644
|
|
||||||
--- a/sound/usb/line6/pcm.c
|
|
||||||
+++ b/sound/usb/line6/pcm.c
|
|
||||||
@@ -131,7 +131,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,
|
|
||||||
--
|
|
||||||
2.9.3
|
|
||||||
|
|
|
@ -1,397 +0,0 @@
|
||||||
From 56e8b01452fbb6c1aa85b0a52fbd352fddf7e959 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Con Kolivas <kernel@kolivas.org>
|
|
||||||
Date: Mon, 20 Feb 2017 13:29:16 +1100
|
|
||||||
Subject: [PATCH 13/25] Change all schedule_timeout with msecs_to_jiffies
|
|
||||||
potentially under 50ms to use schedule_msec_hrtimeout.
|
|
||||||
|
|
||||||
---
|
|
||||||
drivers/bluetooth/hci_qca.c | 2 +-
|
|
||||||
drivers/char/snsc.c | 4 ++--
|
|
||||||
drivers/media/pci/ivtv/ivtv-ioctl.c | 2 +-
|
|
||||||
drivers/media/pci/ivtv/ivtv-streams.c | 2 +-
|
|
||||||
drivers/net/can/usb/peak_usb/pcan_usb.c | 2 +-
|
|
||||||
drivers/net/usb/lan78xx.c | 2 +-
|
|
||||||
drivers/net/usb/usbnet.c | 2 +-
|
|
||||||
drivers/scsi/fnic/fnic_scsi.c | 4 ++--
|
|
||||||
drivers/scsi/snic/snic_scsi.c | 2 +-
|
|
||||||
drivers/staging/lustre/lnet/lnet/lib-eq.c | 2 +-
|
|
||||||
drivers/staging/rts5208/rtsx.c | 2 +-
|
|
||||||
drivers/staging/speakup/speakup_acntpc.c | 4 ++--
|
|
||||||
drivers/staging/speakup/speakup_apollo.c | 2 +-
|
|
||||||
drivers/staging/speakup/speakup_decext.c | 2 +-
|
|
||||||
drivers/staging/speakup/speakup_decpc.c | 2 +-
|
|
||||||
drivers/staging/speakup/speakup_dectlk.c | 2 +-
|
|
||||||
drivers/staging/speakup/speakup_dtlk.c | 4 ++--
|
|
||||||
drivers/staging/speakup/speakup_keypc.c | 4 ++--
|
|
||||||
drivers/staging/speakup/synth.c | 2 +-
|
|
||||||
drivers/staging/unisys/visornic/visornic_main.c | 6 +++---
|
|
||||||
drivers/target/target_core_user.c | 2 +-
|
|
||||||
drivers/video/fbdev/omap/hwa742.c | 2 +-
|
|
||||||
drivers/video/fbdev/pxafb.c | 2 +-
|
|
||||||
23 files changed, 30 insertions(+), 30 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
|
|
||||||
index 05c2307..6954d29 100644
|
|
||||||
--- a/drivers/bluetooth/hci_qca.c
|
|
||||||
+++ b/drivers/bluetooth/hci_qca.c
|
|
||||||
@@ -880,7 +880,7 @@ static int qca_set_baudrate(struct hci_dev *hdev, uint8_t baudrate)
|
|
||||||
* 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_INTERRUPTIBLE);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
diff --git a/drivers/char/snsc.c b/drivers/char/snsc.c
|
|
||||||
index ec07f0e..3410b46 100644
|
|
||||||
--- a/drivers/char/snsc.c
|
|
||||||
+++ b/drivers/char/snsc.c
|
|
||||||
@@ -198,7 +198,7 @@ scdrv_read(struct file *file, char __user *buf, size_t count, loff_t *f_pos)
|
|
||||||
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 @@ scdrv_write(struct file *file, const char __user *buf,
|
|
||||||
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 --git a/drivers/media/pci/ivtv/ivtv-ioctl.c b/drivers/media/pci/ivtv/ivtv-ioctl.c
|
|
||||||
index 2dc4b20..8e061cf 100644
|
|
||||||
--- a/drivers/media/pci/ivtv/ivtv-ioctl.c
|
|
||||||
+++ b/drivers/media/pci/ivtv/ivtv-ioctl.c
|
|
||||||
@@ -1151,7 +1151,7 @@ void ivtv_s_std_dec(struct ivtv *itv, v4l2_std_id std)
|
|
||||||
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 --git a/drivers/media/pci/ivtv/ivtv-streams.c b/drivers/media/pci/ivtv/ivtv-streams.c
|
|
||||||
index d27c6df..e9ffc4e 100644
|
|
||||||
--- a/drivers/media/pci/ivtv/ivtv-streams.c
|
|
||||||
+++ b/drivers/media/pci/ivtv/ivtv-streams.c
|
|
||||||
@@ -834,7 +834,7 @@ int ivtv_stop_v4l2_encode_stream(struct ivtv_stream *s, int gop_end)
|
|
||||||
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 --git a/drivers/net/can/usb/peak_usb/pcan_usb.c b/drivers/net/can/usb/peak_usb/pcan_usb.c
|
|
||||||
index 838545c..34f8972 100644
|
|
||||||
--- a/drivers/net/can/usb/peak_usb/pcan_usb.c
|
|
||||||
+++ b/drivers/net/can/usb/peak_usb/pcan_usb.c
|
|
||||||
@@ -250,7 +250,7 @@ static int pcan_usb_write_mode(struct peak_usb_device *dev, u8 onoff)
|
|
||||||
} 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 --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
|
|
||||||
index 08f8703..3b3bc86 100644
|
|
||||||
--- a/drivers/net/usb/lan78xx.c
|
|
||||||
+++ b/drivers/net/usb/lan78xx.c
|
|
||||||
@@ -2544,7 +2544,7 @@ static void lan78xx_terminate_urbs(struct lan78xx_net *dev)
|
|
||||||
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 --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
|
|
||||||
index 3de65ea..f8a4b18 100644
|
|
||||||
--- a/drivers/net/usb/usbnet.c
|
|
||||||
+++ b/drivers/net/usb/usbnet.c
|
|
||||||
@@ -767,7 +767,7 @@ static void wait_skb_queue_empty(struct sk_buff_head *q)
|
|
||||||
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 --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c
|
|
||||||
index adb3d58..de73e78 100644
|
|
||||||
--- a/drivers/scsi/fnic/fnic_scsi.c
|
|
||||||
+++ b/drivers/scsi/fnic/fnic_scsi.c
|
|
||||||
@@ -217,7 +217,7 @@ int fnic_fw_reset_handler(struct fnic *fnic)
|
|
||||||
|
|
||||||
/* 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);
|
|
||||||
|
|
||||||
@@ -2201,7 +2201,7 @@ static int fnic_clean_pending_aborts(struct fnic *fnic,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- 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 --git a/drivers/scsi/snic/snic_scsi.c b/drivers/scsi/snic/snic_scsi.c
|
|
||||||
index abada16..0bf30dc 100644
|
|
||||||
--- a/drivers/scsi/snic/snic_scsi.c
|
|
||||||
+++ b/drivers/scsi/snic/snic_scsi.c
|
|
||||||
@@ -2356,7 +2356,7 @@ snic_reset(struct Scsi_Host *shost, struct scsi_cmnd *sc)
|
|
||||||
|
|
||||||
/* 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 --git a/drivers/staging/lustre/lnet/lnet/lib-eq.c b/drivers/staging/lustre/lnet/lnet/lib-eq.c
|
|
||||||
index d05c6cc..3f62b6f 100644
|
|
||||||
--- a/drivers/staging/lustre/lnet/lnet/lib-eq.c
|
|
||||||
+++ b/drivers/staging/lustre/lnet/lnet/lib-eq.c
|
|
||||||
@@ -328,7 +328,7 @@ __must_hold(&the_lnet.ln_eq_wait_lock)
|
|
||||||
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 --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging/rts5208/rtsx.c
|
|
||||||
index 68d75d0..aef88c4 100644
|
|
||||||
--- a/drivers/staging/rts5208/rtsx.c
|
|
||||||
+++ b/drivers/staging/rts5208/rtsx.c
|
|
||||||
@@ -537,7 +537,7 @@ static int rtsx_polling_thread(void *__dev)
|
|
||||||
|
|
||||||
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 --git a/drivers/staging/speakup/speakup_acntpc.c b/drivers/staging/speakup/speakup_acntpc.c
|
|
||||||
index efb791b..fd02fb2 100644
|
|
||||||
--- a/drivers/staging/speakup/speakup_acntpc.c
|
|
||||||
+++ b/drivers/staging/speakup/speakup_acntpc.c
|
|
||||||
@@ -204,7 +204,7 @@ static void do_catch_up(struct spk_synth *synth)
|
|
||||||
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);
|
|
||||||
@@ -232,7 +232,7 @@ static void do_catch_up(struct spk_synth *synth)
|
|
||||||
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 --git a/drivers/staging/speakup/speakup_apollo.c b/drivers/staging/speakup/speakup_apollo.c
|
|
||||||
index 3cbc8a7..3c17854 100644
|
|
||||||
--- a/drivers/staging/speakup/speakup_apollo.c
|
|
||||||
+++ b/drivers/staging/speakup/speakup_apollo.c
|
|
||||||
@@ -172,7 +172,7 @@ static void do_catch_up(struct spk_synth *synth)
|
|
||||||
outb(UART_MCR_DTR, speakup_info.port_tts + UART_MCR);
|
|
||||||
outb(UART_MCR_DTR | UART_MCR_RTS,
|
|
||||||
speakup_info.port_tts + UART_MCR);
|
|
||||||
- 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 --git a/drivers/staging/speakup/speakup_decext.c b/drivers/staging/speakup/speakup_decext.c
|
|
||||||
index 1a5cf3d..fa2b4e1 100644
|
|
||||||
--- a/drivers/staging/speakup/speakup_decext.c
|
|
||||||
+++ b/drivers/staging/speakup/speakup_decext.c
|
|
||||||
@@ -186,7 +186,7 @@ static void do_catch_up(struct spk_synth *synth)
|
|
||||||
if (ch == '\n')
|
|
||||||
ch = 0x0D;
|
|
||||||
if (synth_full() || !spk_serial_out(ch)) {
|
|
||||||
- schedule_timeout(msecs_to_jiffies(delay_time_val));
|
|
||||||
+ schedule_msec_hrtimeout((delay_time_val));
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
set_current_state(TASK_RUNNING);
|
|
||||||
diff --git a/drivers/staging/speakup/speakup_decpc.c b/drivers/staging/speakup/speakup_decpc.c
|
|
||||||
index d6479bd..f7554bf 100644
|
|
||||||
--- a/drivers/staging/speakup/speakup_decpc.c
|
|
||||||
+++ b/drivers/staging/speakup/speakup_decpc.c
|
|
||||||
@@ -403,7 +403,7 @@ static void do_catch_up(struct spk_synth *synth)
|
|
||||||
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 --git a/drivers/staging/speakup/speakup_dectlk.c b/drivers/staging/speakup/speakup_dectlk.c
|
|
||||||
index 7646567..639192e 100644
|
|
||||||
--- a/drivers/staging/speakup/speakup_dectlk.c
|
|
||||||
+++ b/drivers/staging/speakup/speakup_dectlk.c
|
|
||||||
@@ -251,7 +251,7 @@ static void do_catch_up(struct spk_synth *synth)
|
|
||||||
if (ch == '\n')
|
|
||||||
ch = 0x0D;
|
|
||||||
if (synth_full_val || !spk_serial_out(ch)) {
|
|
||||||
- schedule_timeout(msecs_to_jiffies(delay_time_val));
|
|
||||||
+ schedule_msec_hrtimeout((delay_time_val));
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
set_current_state(TASK_RUNNING);
|
|
||||||
diff --git a/drivers/staging/speakup/speakup_dtlk.c b/drivers/staging/speakup/speakup_dtlk.c
|
|
||||||
index 38aa401..1640519 100644
|
|
||||||
--- a/drivers/staging/speakup/speakup_dtlk.c
|
|
||||||
+++ b/drivers/staging/speakup/speakup_dtlk.c
|
|
||||||
@@ -217,7 +217,7 @@ static void do_catch_up(struct spk_synth *synth)
|
|
||||||
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);
|
|
||||||
@@ -233,7 +233,7 @@ static void do_catch_up(struct spk_synth *synth)
|
|
||||||
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 --git a/drivers/staging/speakup/speakup_keypc.c b/drivers/staging/speakup/speakup_keypc.c
|
|
||||||
index 5e2170b..30b5df7 100644
|
|
||||||
--- a/drivers/staging/speakup/speakup_keypc.c
|
|
||||||
+++ b/drivers/staging/speakup/speakup_keypc.c
|
|
||||||
@@ -206,7 +206,7 @@ spin_lock_irqsave(&speakup_info.spinlock, flags);
|
|
||||||
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);
|
|
||||||
@@ -239,7 +239,7 @@ spin_lock_irqsave(&speakup_info.spinlock, flags);
|
|
||||||
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 --git a/drivers/staging/speakup/synth.c b/drivers/staging/speakup/synth.c
|
|
||||||
index a61c02b..14299e5 100644
|
|
||||||
--- a/drivers/staging/speakup/synth.c
|
|
||||||
+++ b/drivers/staging/speakup/synth.c
|
|
||||||
@@ -120,7 +120,7 @@ void spk_do_catch_up(struct spk_synth *synth)
|
|
||||||
if (ch == '\n')
|
|
||||||
ch = synth->procspeech;
|
|
||||||
if (!spk_serial_out(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 --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c
|
|
||||||
index c1f674f..4f30a7a 100644
|
|
||||||
--- a/drivers/staging/unisys/visornic/visornic_main.c
|
|
||||||
+++ b/drivers/staging/unisys/visornic/visornic_main.c
|
|
||||||
@@ -468,7 +468,7 @@ visornic_disable_with_timeout(struct net_device *netdev, const int timeout)
|
|
||||||
}
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -479,7 +479,7 @@ visornic_disable_with_timeout(struct net_device *netdev, const int timeout)
|
|
||||||
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;
|
|
||||||
@@ -611,7 +611,7 @@ visornic_enable_with_timeout(struct net_device *netdev, const int timeout)
|
|
||||||
}
|
|
||||||
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 --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c
|
|
||||||
index 8041710..f907a81 100644
|
|
||||||
--- a/drivers/target/target_core_user.c
|
|
||||||
+++ b/drivers/target/target_core_user.c
|
|
||||||
@@ -451,7 +451,7 @@ tcmu_queue_cmd_ring(struct tcmu_cmd *tcmu_cmd)
|
|
||||||
|
|
||||||
pr_debug("sleeping for ring space\n");
|
|
||||||
spin_unlock_irq(&udev->cmdr_lock);
|
|
||||||
- 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 --git a/drivers/video/fbdev/omap/hwa742.c b/drivers/video/fbdev/omap/hwa742.c
|
|
||||||
index a4ee65b..cf38bcb 100644
|
|
||||||
--- a/drivers/video/fbdev/omap/hwa742.c
|
|
||||||
+++ b/drivers/video/fbdev/omap/hwa742.c
|
|
||||||
@@ -926,7 +926,7 @@ static void hwa742_resume(void)
|
|
||||||
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 --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c
|
|
||||||
index ef73f14..7b5483b 100644
|
|
||||||
--- a/drivers/video/fbdev/pxafb.c
|
|
||||||
+++ b/drivers/video/fbdev/pxafb.c
|
|
||||||
@@ -1287,7 +1287,7 @@ static int pxafb_smart_thread(void *arg)
|
|
||||||
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__);
|
|
||||||
--
|
|
||||||
2.9.3
|
|
||||||
|
|
|
@ -1,325 +0,0 @@
|
||||||
From af94b59651831b7e176ce8cb98441bdccb87eac0 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Con Kolivas <kernel@kolivas.org>
|
|
||||||
Date: Mon, 20 Feb 2017 13:30:07 +1100
|
|
||||||
Subject: [PATCH 14/25] Replace all calls to schedule_timeout_interruptible of
|
|
||||||
potentially under 50ms to use schedule_msec_hrtimeout_interruptible.
|
|
||||||
|
|
||||||
---
|
|
||||||
drivers/hwmon/fam15h_power.c | 2 +-
|
|
||||||
drivers/iio/light/tsl2563.c | 6 +-----
|
|
||||||
drivers/media/i2c/msp3400-driver.c | 4 ++--
|
|
||||||
drivers/media/pci/ivtv/ivtv-gpio.c | 6 +++---
|
|
||||||
drivers/media/radio/radio-mr800.c | 2 +-
|
|
||||||
drivers/media/radio/radio-tea5777.c | 2 +-
|
|
||||||
drivers/media/radio/tea575x.c | 2 +-
|
|
||||||
drivers/misc/panel.c | 2 +-
|
|
||||||
drivers/parport/ieee1284.c | 2 +-
|
|
||||||
drivers/parport/ieee1284_ops.c | 2 +-
|
|
||||||
drivers/platform/x86/intel_ips.c | 8 ++++----
|
|
||||||
net/core/pktgen.c | 2 +-
|
|
||||||
sound/soc/codecs/wm8350.c | 12 ++++++------
|
|
||||||
sound/soc/codecs/wm8900.c | 2 +-
|
|
||||||
sound/soc/codecs/wm9713.c | 4 ++--
|
|
||||||
15 files changed, 27 insertions(+), 31 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/drivers/hwmon/fam15h_power.c b/drivers/hwmon/fam15h_power.c
|
|
||||||
index 15aa49d..991e8a7 100644
|
|
||||||
--- a/drivers/hwmon/fam15h_power.c
|
|
||||||
+++ b/drivers/hwmon/fam15h_power.c
|
|
||||||
@@ -238,7 +238,7 @@ static ssize_t acc_show_power(struct device *dev,
|
|
||||||
prev_ptsc[cu] = data->cpu_sw_pwr_ptsc[cu];
|
|
||||||
}
|
|
||||||
|
|
||||||
- leftover = schedule_timeout_interruptible(msecs_to_jiffies(data->power_period));
|
|
||||||
+ leftover = schedule_msec_hrtimeout_interruptible((data->power_period));
|
|
||||||
if (leftover)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
diff --git a/drivers/iio/light/tsl2563.c b/drivers/iio/light/tsl2563.c
|
|
||||||
index 04598ae..a8c095d 100644
|
|
||||||
--- a/drivers/iio/light/tsl2563.c
|
|
||||||
+++ b/drivers/iio/light/tsl2563.c
|
|
||||||
@@ -282,11 +282,7 @@ static void tsl2563_wait_adc(struct tsl2563_chip *chip)
|
|
||||||
default:
|
|
||||||
delay = 402;
|
|
||||||
}
|
|
||||||
- /*
|
|
||||||
- * TODO: Make sure that we wait at least required delay but why we
|
|
||||||
- * have to extend it one tick more?
|
|
||||||
- */
|
|
||||||
- schedule_timeout_interruptible(msecs_to_jiffies(delay) + 2);
|
|
||||||
+ schedule_msec_hrtimeout_interruptible(delay + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int tsl2563_adjust_gainlevel(struct tsl2563_chip *chip, u16 adc)
|
|
||||||
diff --git a/drivers/media/i2c/msp3400-driver.c b/drivers/media/i2c/msp3400-driver.c
|
|
||||||
index 201a9800..5cebabc 100644
|
|
||||||
--- a/drivers/media/i2c/msp3400-driver.c
|
|
||||||
+++ b/drivers/media/i2c/msp3400-driver.c
|
|
||||||
@@ -184,7 +184,7 @@ static int msp_read(struct i2c_client *client, int dev, int addr)
|
|
||||||
break;
|
|
||||||
dev_warn(&client->dev, "I/O error #%d (read 0x%02x/0x%02x)\n", err,
|
|
||||||
dev, addr);
|
|
||||||
- schedule_timeout_interruptible(msecs_to_jiffies(10));
|
|
||||||
+ schedule_msec_hrtimeout_interruptible((10));
|
|
||||||
}
|
|
||||||
if (err == 3) {
|
|
||||||
dev_warn(&client->dev, "resetting chip, sound will go off.\n");
|
|
||||||
@@ -225,7 +225,7 @@ static int msp_write(struct i2c_client *client, int dev, int addr, int val)
|
|
||||||
break;
|
|
||||||
dev_warn(&client->dev, "I/O error #%d (write 0x%02x/0x%02x)\n", err,
|
|
||||||
dev, addr);
|
|
||||||
- schedule_timeout_interruptible(msecs_to_jiffies(10));
|
|
||||||
+ schedule_msec_hrtimeout_interruptible((10));
|
|
||||||
}
|
|
||||||
if (err == 3) {
|
|
||||||
dev_warn(&client->dev, "resetting chip, sound will go off.\n");
|
|
||||||
diff --git a/drivers/media/pci/ivtv/ivtv-gpio.c b/drivers/media/pci/ivtv/ivtv-gpio.c
|
|
||||||
index f752f39..23372af6 100644
|
|
||||||
--- a/drivers/media/pci/ivtv/ivtv-gpio.c
|
|
||||||
+++ b/drivers/media/pci/ivtv/ivtv-gpio.c
|
|
||||||
@@ -117,7 +117,7 @@ void ivtv_reset_ir_gpio(struct ivtv *itv)
|
|
||||||
curout = (curout & ~0xF) | 1;
|
|
||||||
write_reg(curout, IVTV_REG_GPIO_OUT);
|
|
||||||
/* We could use something else for smaller time */
|
|
||||||
- schedule_timeout_interruptible(msecs_to_jiffies(1));
|
|
||||||
+ schedule_msec_hrtimeout_interruptible((1));
|
|
||||||
curout |= 2;
|
|
||||||
write_reg(curout, IVTV_REG_GPIO_OUT);
|
|
||||||
curdir &= ~0x80;
|
|
||||||
@@ -137,11 +137,11 @@ int ivtv_reset_tuner_gpio(void *dev, int component, int cmd, int value)
|
|
||||||
curout = read_reg(IVTV_REG_GPIO_OUT);
|
|
||||||
curout &= ~(1 << itv->card->xceive_pin);
|
|
||||||
write_reg(curout, IVTV_REG_GPIO_OUT);
|
|
||||||
- schedule_timeout_interruptible(msecs_to_jiffies(1));
|
|
||||||
+ schedule_msec_hrtimeout_interruptible((1));
|
|
||||||
|
|
||||||
curout |= 1 << itv->card->xceive_pin;
|
|
||||||
write_reg(curout, IVTV_REG_GPIO_OUT);
|
|
||||||
- schedule_timeout_interruptible(msecs_to_jiffies(1));
|
|
||||||
+ schedule_msec_hrtimeout_interruptible((1));
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/drivers/media/radio/radio-mr800.c b/drivers/media/radio/radio-mr800.c
|
|
||||||
index c2927fd..bdee269 100644
|
|
||||||
--- a/drivers/media/radio/radio-mr800.c
|
|
||||||
+++ b/drivers/media/radio/radio-mr800.c
|
|
||||||
@@ -382,7 +382,7 @@ static int vidioc_s_hw_freq_seek(struct file *file, void *priv,
|
|
||||||
retval = -ENODATA;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
- if (schedule_timeout_interruptible(msecs_to_jiffies(10))) {
|
|
||||||
+ if (schedule_msec_hrtimeout_interruptible((10))) {
|
|
||||||
retval = -ERESTARTSYS;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
diff --git a/drivers/media/radio/radio-tea5777.c b/drivers/media/radio/radio-tea5777.c
|
|
||||||
index 83fe7ab..aaae5fa 100644
|
|
||||||
--- a/drivers/media/radio/radio-tea5777.c
|
|
||||||
+++ b/drivers/media/radio/radio-tea5777.c
|
|
||||||
@@ -249,7 +249,7 @@ static int radio_tea5777_update_read_reg(struct radio_tea5777 *tea, int wait)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (wait) {
|
|
||||||
- if (schedule_timeout_interruptible(msecs_to_jiffies(wait)))
|
|
||||||
+ if (schedule_msec_hrtimeout_interruptible((wait)))
|
|
||||||
return -ERESTARTSYS;
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/drivers/media/radio/tea575x.c b/drivers/media/radio/tea575x.c
|
|
||||||
index 4dc2067..29f4416 100644
|
|
||||||
--- a/drivers/media/radio/tea575x.c
|
|
||||||
+++ b/drivers/media/radio/tea575x.c
|
|
||||||
@@ -416,7 +416,7 @@ int snd_tea575x_s_hw_freq_seek(struct file *file, struct snd_tea575x *tea,
|
|
||||||
for (;;) {
|
|
||||||
if (time_after(jiffies, timeout))
|
|
||||||
break;
|
|
||||||
- if (schedule_timeout_interruptible(msecs_to_jiffies(10))) {
|
|
||||||
+ if (schedule_msec_hrtimeout_interruptible((10))) {
|
|
||||||
/* some signal arrived, stop search */
|
|
||||||
tea->val &= ~TEA575X_BIT_SEARCH;
|
|
||||||
snd_tea575x_set_freq(tea);
|
|
||||||
diff --git a/drivers/misc/panel.c b/drivers/misc/panel.c
|
|
||||||
index 6030ac5..f0c1a101 100644
|
|
||||||
--- a/drivers/misc/panel.c
|
|
||||||
+++ b/drivers/misc/panel.c
|
|
||||||
@@ -760,7 +760,7 @@ static void long_sleep(int ms)
|
|
||||||
if (in_interrupt())
|
|
||||||
mdelay(ms);
|
|
||||||
else
|
|
||||||
- schedule_timeout_interruptible(msecs_to_jiffies(ms));
|
|
||||||
+ schedule_msec_hrtimeout_interruptible((ms));
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
diff --git a/drivers/parport/ieee1284.c b/drivers/parport/ieee1284.c
|
|
||||||
index f9fd4b3..00ad2f3 100644
|
|
||||||
--- a/drivers/parport/ieee1284.c
|
|
||||||
+++ b/drivers/parport/ieee1284.c
|
|
||||||
@@ -215,7 +215,7 @@ int parport_wait_peripheral(struct parport *port,
|
|
||||||
/* parport_wait_event didn't time out, but the
|
|
||||||
* peripheral wasn't actually ready either.
|
|
||||||
* Wait for another 10ms. */
|
|
||||||
- schedule_timeout_interruptible(msecs_to_jiffies(10));
|
|
||||||
+ schedule_msec_hrtimeout_interruptible((10));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/drivers/parport/ieee1284_ops.c b/drivers/parport/ieee1284_ops.c
|
|
||||||
index c0e7d21..e1b4fd4 100644
|
|
||||||
--- a/drivers/parport/ieee1284_ops.c
|
|
||||||
+++ b/drivers/parport/ieee1284_ops.c
|
|
||||||
@@ -536,7 +536,7 @@ size_t parport_ieee1284_ecp_read_data (struct parport *port,
|
|
||||||
/* Yield the port for a while. */
|
|
||||||
if (count && dev->port->irq != PARPORT_IRQ_NONE) {
|
|
||||||
parport_release (dev);
|
|
||||||
- schedule_timeout_interruptible(msecs_to_jiffies(40));
|
|
||||||
+ schedule_msec_hrtimeout_interruptible((40));
|
|
||||||
parport_claim_or_block (dev);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
diff --git a/drivers/platform/x86/intel_ips.c b/drivers/platform/x86/intel_ips.c
|
|
||||||
index 55663b3..0363fed 100644
|
|
||||||
--- a/drivers/platform/x86/intel_ips.c
|
|
||||||
+++ b/drivers/platform/x86/intel_ips.c
|
|
||||||
@@ -812,7 +812,7 @@ static int ips_adjust(void *data)
|
|
||||||
ips_gpu_lower(ips);
|
|
||||||
|
|
||||||
sleep:
|
|
||||||
- schedule_timeout_interruptible(msecs_to_jiffies(IPS_ADJUST_PERIOD));
|
|
||||||
+ schedule_msec_hrtimeout_interruptible((IPS_ADJUST_PERIOD));
|
|
||||||
} while (!kthread_should_stop());
|
|
||||||
|
|
||||||
dev_dbg(&ips->dev->dev, "ips-adjust thread stopped\n");
|
|
||||||
@@ -991,7 +991,7 @@ static int ips_monitor(void *data)
|
|
||||||
seqno_timestamp = get_jiffies_64();
|
|
||||||
|
|
||||||
old_cpu_power = thm_readl(THM_CEC);
|
|
||||||
- schedule_timeout_interruptible(msecs_to_jiffies(IPS_SAMPLE_PERIOD));
|
|
||||||
+ schedule_msec_hrtimeout_interruptible((IPS_SAMPLE_PERIOD));
|
|
||||||
|
|
||||||
/* Collect an initial average */
|
|
||||||
for (i = 0; i < IPS_SAMPLE_COUNT; i++) {
|
|
||||||
@@ -1018,7 +1018,7 @@ static int ips_monitor(void *data)
|
|
||||||
mchp_samples[i] = mchp;
|
|
||||||
}
|
|
||||||
|
|
||||||
- schedule_timeout_interruptible(msecs_to_jiffies(IPS_SAMPLE_PERIOD));
|
|
||||||
+ schedule_msec_hrtimeout_interruptible((IPS_SAMPLE_PERIOD));
|
|
||||||
if (kthread_should_stop())
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
@@ -1045,7 +1045,7 @@ static int ips_monitor(void *data)
|
|
||||||
* us to reduce the sample frequency if the CPU and GPU are idle.
|
|
||||||
*/
|
|
||||||
old_cpu_power = thm_readl(THM_CEC);
|
|
||||||
- schedule_timeout_interruptible(msecs_to_jiffies(IPS_SAMPLE_PERIOD));
|
|
||||||
+ schedule_msec_hrtimeout_interruptible((IPS_SAMPLE_PERIOD));
|
|
||||||
last_sample_period = IPS_SAMPLE_PERIOD;
|
|
||||||
|
|
||||||
setup_deferrable_timer_on_stack(&timer, monitor_timeout,
|
|
||||||
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
|
|
||||||
index 8e69ce4..0227415 100644
|
|
||||||
--- a/net/core/pktgen.c
|
|
||||||
+++ b/net/core/pktgen.c
|
|
||||||
@@ -1992,7 +1992,7 @@ static void pktgen_mark_device(const struct pktgen_net *pn, const char *ifname)
|
|
||||||
mutex_unlock(&pktgen_thread_lock);
|
|
||||||
pr_debug("%s: waiting for %s to disappear....\n",
|
|
||||||
__func__, ifname);
|
|
||||||
- schedule_timeout_interruptible(msecs_to_jiffies(msec_per_try));
|
|
||||||
+ schedule_msec_hrtimeout_interruptible((msec_per_try));
|
|
||||||
mutex_lock(&pktgen_thread_lock);
|
|
||||||
|
|
||||||
if (++i >= max_tries) {
|
|
||||||
diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c
|
|
||||||
index 2efc5b4..3e3248c 100644
|
|
||||||
--- a/sound/soc/codecs/wm8350.c
|
|
||||||
+++ b/sound/soc/codecs/wm8350.c
|
|
||||||
@@ -236,10 +236,10 @@ static void wm8350_pga_work(struct work_struct *work)
|
|
||||||
out2->ramp == WM8350_RAMP_UP) {
|
|
||||||
/* delay is longer over 0dB as increases are larger */
|
|
||||||
if (i >= WM8350_OUTn_0dB)
|
|
||||||
- schedule_timeout_interruptible(msecs_to_jiffies
|
|
||||||
+ schedule_msec_hrtimeout_interruptible(
|
|
||||||
(2));
|
|
||||||
else
|
|
||||||
- schedule_timeout_interruptible(msecs_to_jiffies
|
|
||||||
+ schedule_msec_hrtimeout_interruptible(
|
|
||||||
(1));
|
|
||||||
} else
|
|
||||||
udelay(50); /* doesn't matter if we delay longer */
|
|
||||||
@@ -1123,7 +1123,7 @@ static int wm8350_set_bias_level(struct snd_soc_codec *codec,
|
|
||||||
(platform->dis_out4 << 6));
|
|
||||||
|
|
||||||
/* wait for discharge */
|
|
||||||
- schedule_timeout_interruptible(msecs_to_jiffies
|
|
||||||
+ schedule_msec_hrtimeout_interruptible(
|
|
||||||
(platform->
|
|
||||||
cap_discharge_msecs));
|
|
||||||
|
|
||||||
@@ -1139,7 +1139,7 @@ static int wm8350_set_bias_level(struct snd_soc_codec *codec,
|
|
||||||
WM8350_VBUFEN);
|
|
||||||
|
|
||||||
/* wait for vmid */
|
|
||||||
- schedule_timeout_interruptible(msecs_to_jiffies
|
|
||||||
+ schedule_msec_hrtimeout_interruptible(
|
|
||||||
(platform->
|
|
||||||
vmid_charge_msecs));
|
|
||||||
|
|
||||||
@@ -1190,7 +1190,7 @@ static int wm8350_set_bias_level(struct snd_soc_codec *codec,
|
|
||||||
wm8350_reg_write(wm8350, WM8350_POWER_MGMT_1, pm1);
|
|
||||||
|
|
||||||
/* wait */
|
|
||||||
- schedule_timeout_interruptible(msecs_to_jiffies
|
|
||||||
+ schedule_msec_hrtimeout_interruptible(
|
|
||||||
(platform->
|
|
||||||
vmid_discharge_msecs));
|
|
||||||
|
|
||||||
@@ -1208,7 +1208,7 @@ static int wm8350_set_bias_level(struct snd_soc_codec *codec,
|
|
||||||
pm1 | WM8350_OUTPUT_DRAIN_EN);
|
|
||||||
|
|
||||||
/* wait */
|
|
||||||
- schedule_timeout_interruptible(msecs_to_jiffies
|
|
||||||
+ schedule_msec_hrtimeout_interruptible(
|
|
||||||
(platform->drain_msecs));
|
|
||||||
|
|
||||||
pm1 &= ~WM8350_BIASEN;
|
|
||||||
diff --git a/sound/soc/codecs/wm8900.c b/sound/soc/codecs/wm8900.c
|
|
||||||
index c77b49a..fc50456 100644
|
|
||||||
--- a/sound/soc/codecs/wm8900.c
|
|
||||||
+++ b/sound/soc/codecs/wm8900.c
|
|
||||||
@@ -1112,7 +1112,7 @@ static int wm8900_set_bias_level(struct snd_soc_codec *codec,
|
|
||||||
/* Need to let things settle before stopping the clock
|
|
||||||
* to ensure that restart works, see "Stopping the
|
|
||||||
* master clock" in the datasheet. */
|
|
||||||
- schedule_timeout_interruptible(msecs_to_jiffies(1));
|
|
||||||
+ schedule_msec_hrtimeout_interruptible((1));
|
|
||||||
snd_soc_write(codec, WM8900_REG_POWER2,
|
|
||||||
WM8900_REG_POWER2_SYSCLK_ENA);
|
|
||||||
break;
|
|
||||||
diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c
|
|
||||||
index 7e48221..0c85a20 100644
|
|
||||||
--- a/sound/soc/codecs/wm9713.c
|
|
||||||
+++ b/sound/soc/codecs/wm9713.c
|
|
||||||
@@ -199,7 +199,7 @@ static int wm9713_voice_shutdown(struct snd_soc_dapm_widget *w,
|
|
||||||
|
|
||||||
/* Gracefully shut down the voice interface. */
|
|
||||||
snd_soc_update_bits(codec, AC97_HANDSET_RATE, 0x0f00, 0x0200);
|
|
||||||
- schedule_timeout_interruptible(msecs_to_jiffies(1));
|
|
||||||
+ schedule_msec_hrtimeout_interruptible((1));
|
|
||||||
snd_soc_update_bits(codec, AC97_HANDSET_RATE, 0x0f00, 0x0f00);
|
|
||||||
snd_soc_update_bits(codec, AC97_EXTENDED_MID, 0x1000, 0x1000);
|
|
||||||
|
|
||||||
@@ -868,7 +868,7 @@ static int wm9713_set_pll(struct snd_soc_codec *codec,
|
|
||||||
wm9713->pll_in = freq_in;
|
|
||||||
|
|
||||||
/* wait 10ms AC97 link frames for the link to stabilise */
|
|
||||||
- schedule_timeout_interruptible(msecs_to_jiffies(10));
|
|
||||||
+ schedule_msec_hrtimeout_interruptible((10));
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.9.3
|
|
||||||
|
|
|
@ -1,160 +0,0 @@
|
||||||
From 1137ff2bfa5eb63b53747fe303fdb3937c5e1077 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Con Kolivas <kernel@kolivas.org>
|
|
||||||
Date: Mon, 20 Feb 2017 13:30:32 +1100
|
|
||||||
Subject: [PATCH 15/25] 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(-)
|
|
||||||
|
|
||||||
diff --git a/drivers/media/pci/cx18/cx18-gpio.c b/drivers/media/pci/cx18/cx18-gpio.c
|
|
||||||
index 38dc6b8..3cd3098 100644
|
|
||||||
--- a/drivers/media/pci/cx18/cx18-gpio.c
|
|
||||||
+++ b/drivers/media/pci/cx18/cx18-gpio.c
|
|
||||||
@@ -95,11 +95,11 @@ static void gpio_reset_seq(struct cx18 *cx, u32 active_lo, u32 active_hi,
|
|
||||||
|
|
||||||
/* 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));
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2100.c b/drivers/net/wireless/intel/ipw2x00/ipw2100.c
|
|
||||||
index 356aba9..d2cc761 100644
|
|
||||||
--- a/drivers/net/wireless/intel/ipw2x00/ipw2100.c
|
|
||||||
+++ b/drivers/net/wireless/intel/ipw2x00/ipw2100.c
|
|
||||||
@@ -830,7 +830,7 @@ static int ipw2100_hw_send_command(struct ipw2100_priv *priv,
|
|
||||||
* 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 ipw2100_priv *priv)
|
|
||||||
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);
|
|
||||||
diff --git a/drivers/rtc/rtc-wm8350.c b/drivers/rtc/rtc-wm8350.c
|
|
||||||
index fa247de..f1a28d8 100644
|
|
||||||
--- a/drivers/rtc/rtc-wm8350.c
|
|
||||||
+++ b/drivers/rtc/rtc-wm8350.c
|
|
||||||
@@ -121,7 +121,7 @@ static int wm8350_rtc_settime(struct device *dev, struct rtc_time *tm)
|
|
||||||
/* 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 wm8350 *wm8350)
|
|
||||||
/* 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 wm8350 *wm8350)
|
|
||||||
/* 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)
|
|
||||||
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
|
|
||||||
index ad350d9..69a58a8 100644
|
|
||||||
--- a/drivers/scsi/lpfc/lpfc_scsi.c
|
|
||||||
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
|
|
||||||
@@ -5109,7 +5109,7 @@ lpfc_reset_flush_io_context(struct lpfc_vport *vport, uint16_t tgt_id,
|
|
||||||
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) {
|
|
||||||
diff --git a/sound/pci/maestro3.c b/sound/pci/maestro3.c
|
|
||||||
index cafea6d..d374514 100644
|
|
||||||
--- a/sound/pci/maestro3.c
|
|
||||||
+++ b/sound/pci/maestro3.c
|
|
||||||
@@ -2016,7 +2016,7 @@ static void snd_m3_ac97_reset(struct snd_m3 *chip)
|
|
||||||
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_m3 *chip)
|
|
||||||
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;
|
|
||||||
diff --git a/sound/soc/codecs/rt5631.c b/sound/soc/codecs/rt5631.c
|
|
||||||
index 0e41808..611cb9f 100644
|
|
||||||
--- a/sound/soc/codecs/rt5631.c
|
|
||||||
+++ b/sound/soc/codecs/rt5631.c
|
|
||||||
@@ -419,7 +419,7 @@ static void onebit_depop_mute_stage(struct snd_soc_codec *codec, int enable)
|
|
||||||
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 snd_soc_codec *codec, int enable)
|
|
||||||
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);
|
|
||||||
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
|
|
||||||
index 27dd02e..7ba49f4 100644
|
|
||||||
--- a/sound/soc/soc-dapm.c
|
|
||||||
+++ b/sound/soc/soc-dapm.c
|
|
||||||
@@ -134,7 +134,7 @@ static void dapm_assert_locked(struct snd_soc_dapm_context *dapm)
|
|
||||||
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, ...)
|
|
||||||
--
|
|
||||||
2.9.3
|
|
||||||
|
|
|
@ -1,84 +0,0 @@
|
||||||
From 37496baeea800e745a77620e90660496135f7fa5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Con Kolivas <kernel@kolivas.org>
|
|
||||||
Date: Mon, 20 Feb 2017 13:31:42 +1100
|
|
||||||
Subject: [PATCH 16/25] Fix build for disabled highres timers with hrtimeout
|
|
||||||
code.
|
|
||||||
|
|
||||||
---
|
|
||||||
include/linux/freezer.h | 1 +
|
|
||||||
include/linux/sched.h | 22 ++++++++++++++++++++++
|
|
||||||
kernel/time/timer.c | 2 ++
|
|
||||||
3 files changed, 25 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/include/linux/freezer.h b/include/linux/freezer.h
|
|
||||||
index dd03e83..2fda682 100644
|
|
||||||
--- a/include/linux/freezer.h
|
|
||||||
+++ b/include/linux/freezer.h
|
|
||||||
@@ -296,6 +296,7 @@ static inline void set_freezable(void) {}
|
|
||||||
#define wait_event_freezekillable_unsafe(wq, condition) \
|
|
||||||
wait_event_killable(wq, condition)
|
|
||||||
|
|
||||||
+#define pm_freezing (false)
|
|
||||||
#endif /* !CONFIG_FREEZER */
|
|
||||||
|
|
||||||
#endif /* FREEZER_H_INCLUDED */
|
|
||||||
diff --git a/include/linux/sched.h b/include/linux/sched.h
|
|
||||||
index 46544f4..680494d 100644
|
|
||||||
--- a/include/linux/sched.h
|
|
||||||
+++ b/include/linux/sched.h
|
|
||||||
@@ -458,10 +458,32 @@ extern signed long schedule_timeout_killable(signed long timeout);
|
|
||||||
extern signed long schedule_timeout_uninterruptible(signed long timeout);
|
|
||||||
extern signed long schedule_timeout_idle(signed long timeout);
|
|
||||||
|
|
||||||
+#ifdef CONFIG_HIGH_RES_TIMERS
|
|
||||||
extern signed long schedule_msec_hrtimeout(signed long timeout);
|
|
||||||
extern signed long schedule_min_hrtimeout(void);
|
|
||||||
extern signed long schedule_msec_hrtimeout_interruptible(signed long timeout);
|
|
||||||
extern signed long schedule_msec_hrtimeout_uninterruptible(signed long timeout);
|
|
||||||
+#else
|
|
||||||
+static inline signed long schedule_msec_hrtimeout(signed long timeout)
|
|
||||||
+{
|
|
||||||
+ return schedule_timeout(msecs_to_jiffies(timeout));
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static inline signed long schedule_min_hrtimeout(void)
|
|
||||||
+{
|
|
||||||
+ return schedule_timeout(1);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static inline signed long schedule_msec_hrtimeout_interruptible(signed long timeout)
|
|
||||||
+{
|
|
||||||
+ return schedule_timeout_interruptible(msecs_to_jiffies(timeout));
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static inline signed long schedule_msec_hrtimeout_uninterruptible(signed long timeout)
|
|
||||||
+{
|
|
||||||
+ return schedule_timeout_uninterruptible(msecs_to_jiffies(timeout));
|
|
||||||
+}
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
asmlinkage void schedule(void);
|
|
||||||
extern void schedule_preempt_disabled(void);
|
|
||||||
diff --git a/kernel/time/timer.c b/kernel/time/timer.c
|
|
||||||
index bc53598..0e22641 100644
|
|
||||||
--- a/kernel/time/timer.c
|
|
||||||
+++ b/kernel/time/timer.c
|
|
||||||
@@ -1750,6 +1750,7 @@ signed long __sched schedule_timeout(signed long timeout)
|
|
||||||
|
|
||||||
expire = timeout + jiffies;
|
|
||||||
|
|
||||||
+#ifdef CONFIG_HIGH_RES_TIMERS
|
|
||||||
if (timeout == 1 && hrtimer_resolution < NSEC_PER_SEC / HZ) {
|
|
||||||
/*
|
|
||||||
* Special case 1 as being a request for the minimum timeout
|
|
||||||
@@ -1760,6 +1761,7 @@ signed long __sched schedule_timeout(signed long timeout)
|
|
||||||
return 0;
|
|
||||||
goto out_timeout;
|
|
||||||
}
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
setup_timer_on_stack(&timer, process_timeout, (unsigned long)current);
|
|
||||||
__mod_timer(&timer, expire, false);
|
|
||||||
--
|
|
||||||
2.9.3
|
|
||||||
|
|
|
@ -1,61 +0,0 @@
|
||||||
From a0d29f014dbcb29649dff1a9b8df58bad7be3926 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Con Kolivas <kernel@kolivas.org>
|
|
||||||
Date: Wed, 7 Dec 2016 21:13:16 +1100
|
|
||||||
Subject: [PATCH 18/25] Make threaded IRQs optionally the default which can be
|
|
||||||
disabled.
|
|
||||||
|
|
||||||
---
|
|
||||||
kernel/irq/Kconfig | 14 ++++++++++++++
|
|
||||||
kernel/irq/manage.c | 10 ++++++++++
|
|
||||||
2 files changed, 24 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/kernel/irq/Kconfig b/kernel/irq/Kconfig
|
|
||||||
index 3bbfd6a..351bf16 100644
|
|
||||||
--- a/kernel/irq/Kconfig
|
|
||||||
+++ b/kernel/irq/Kconfig
|
|
||||||
@@ -95,6 +95,20 @@ config IRQ_DOMAIN_DEBUG
|
|
||||||
config IRQ_FORCED_THREADING
|
|
||||||
bool
|
|
||||||
|
|
||||||
+config FORCE_IRQ_THREADING
|
|
||||||
+ bool "Make IRQ threading compulsory"
|
|
||||||
+ depends on IRQ_FORCED_THREADING
|
|
||||||
+ default y
|
|
||||||
+ ---help---
|
|
||||||
+
|
|
||||||
+ Make IRQ threading mandatory for any IRQ handlers that support it
|
|
||||||
+ instead of being optional and requiring the threadirqs kernel
|
|
||||||
+ parameter. Instead they can be optionally disabled with the
|
|
||||||
+ nothreadirqs kernel parameter.
|
|
||||||
+
|
|
||||||
+ Enable if you are building for a desktop or low latency system,
|
|
||||||
+ otherwise say N.
|
|
||||||
+
|
|
||||||
config SPARSE_IRQ
|
|
||||||
bool "Support sparse irq numbering" if MAY_HAVE_SPARSE_IRQ
|
|
||||||
---help---
|
|
||||||
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
|
|
||||||
index 6b66959..6b3fb17 100644
|
|
||||||
--- a/kernel/irq/manage.c
|
|
||||||
+++ b/kernel/irq/manage.c
|
|
||||||
@@ -22,7 +22,17 @@
|
|
||||||
#include "internals.h"
|
|
||||||
|
|
||||||
#ifdef CONFIG_IRQ_FORCED_THREADING
|
|
||||||
+#ifdef CONFIG_FORCE_IRQ_THREADING
|
|
||||||
+__read_mostly bool force_irqthreads = true;
|
|
||||||
+#else
|
|
||||||
__read_mostly bool force_irqthreads;
|
|
||||||
+#endif
|
|
||||||
+static int __init setup_noforced_irqthreads(char *arg)
|
|
||||||
+{
|
|
||||||
+ force_irqthreads = false;
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+early_param("nothreadirqs", setup_noforced_irqthreads);
|
|
||||||
|
|
||||||
static int __init setup_forced_irqthreads(char *arg)
|
|
||||||
{
|
|
||||||
--
|
|
||||||
2.9.3
|
|
||||||
|
|
|
@ -1,69 +0,0 @@
|
||||||
From a278cad439033005610ddda23882f2c681c669d1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Con Kolivas <kernel@kolivas.org>
|
|
||||||
Date: Mon, 20 Feb 2017 13:32:58 +1100
|
|
||||||
Subject: [PATCH 20/25] Don't use hrtimer overlay when pm_freezing since some
|
|
||||||
drivers still don't correctly use freezable timeouts.
|
|
||||||
|
|
||||||
---
|
|
||||||
kernel/time/hrtimer.c | 2 +-
|
|
||||||
kernel/time/timer.c | 9 +++++----
|
|
||||||
2 files changed, 6 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
|
|
||||||
index 26ac1f8..25e1555 100644
|
|
||||||
--- a/kernel/time/hrtimer.c
|
|
||||||
+++ b/kernel/time/hrtimer.c
|
|
||||||
@@ -1818,7 +1818,7 @@ signed long __sched schedule_msec_hrtimeout(signed long timeout)
|
|
||||||
* (yet) better than Hz, as would occur during startup, use regular
|
|
||||||
* timers.
|
|
||||||
*/
|
|
||||||
- if (jiffs > 4 || hrtimer_resolution >= NSEC_PER_SEC / HZ)
|
|
||||||
+ if (jiffs > 4 || hrtimer_resolution >= NSEC_PER_SEC / HZ || pm_freezing)
|
|
||||||
return schedule_timeout(jiffs);
|
|
||||||
|
|
||||||
delta = (timeout % 1000) * NSEC_PER_MSEC;
|
|
||||||
diff --git a/kernel/time/timer.c b/kernel/time/timer.c
|
|
||||||
index 0e22641..45a6e1f 100644
|
|
||||||
--- a/kernel/time/timer.c
|
|
||||||
+++ b/kernel/time/timer.c
|
|
||||||
@@ -42,6 +42,7 @@
|
|
||||||
#include <linux/sched/sysctl.h>
|
|
||||||
#include <linux/slab.h>
|
|
||||||
#include <linux/compat.h>
|
|
||||||
+#include <linux/freezer.h>
|
|
||||||
|
|
||||||
#include <linux/uaccess.h>
|
|
||||||
#include <asm/unistd.h>
|
|
||||||
@@ -1901,12 +1902,12 @@ void msleep(unsigned int msecs)
|
|
||||||
* Use high resolution timers where the resolution of tick based
|
|
||||||
* timers is inadequate.
|
|
||||||
*/
|
|
||||||
- if (jiffs < 5 && hrtimer_resolution < NSEC_PER_SEC / HZ) {
|
|
||||||
+ if (jiffs < 5 && hrtimer_resolution < NSEC_PER_SEC / HZ && !pm_freezing) {
|
|
||||||
while (msecs)
|
|
||||||
msecs = schedule_msec_hrtimeout_uninterruptible(msecs);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
- timeout = msecs_to_jiffies(msecs) + 1;
|
|
||||||
+ timeout = jiffs + 1;
|
|
||||||
|
|
||||||
while (timeout)
|
|
||||||
timeout = schedule_timeout_uninterruptible(timeout);
|
|
||||||
@@ -1923,12 +1924,12 @@ unsigned long msleep_interruptible(unsigned int msecs)
|
|
||||||
int jiffs = msecs_to_jiffies(msecs);
|
|
||||||
unsigned long timeout;
|
|
||||||
|
|
||||||
- if (jiffs < 5 && hrtimer_resolution < NSEC_PER_SEC / HZ) {
|
|
||||||
+ if (jiffs < 5 && hrtimer_resolution < NSEC_PER_SEC / HZ && !pm_freezing) {
|
|
||||||
while (msecs && !signal_pending(current))
|
|
||||||
msecs = schedule_msec_hrtimeout_interruptible(msecs);
|
|
||||||
return msecs;
|
|
||||||
}
|
|
||||||
- timeout = msecs_to_jiffies(msecs) + 1;
|
|
||||||
+ timeout = jiffs + 1;
|
|
||||||
|
|
||||||
while (timeout && !signal_pending(current))
|
|
||||||
timeout = schedule_timeout_interruptible(timeout);
|
|
||||||
--
|
|
||||||
2.9.3
|
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
From da915e0f3abeb61f6a132bb77b7d0a9bf0573233 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Con Kolivas <kernel@kolivas.org>
|
|
||||||
Date: Mon, 20 Feb 2017 13:38:23 +1100
|
|
||||||
Subject: [PATCH 21/25] Make writeback throttling default enabled.
|
|
||||||
|
|
||||||
---
|
|
||||||
block/Kconfig | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/block/Kconfig b/block/Kconfig
|
|
||||||
index 8bf114a..83e6f9d 100644
|
|
||||||
--- a/block/Kconfig
|
|
||||||
+++ b/block/Kconfig
|
|
||||||
@@ -123,7 +123,7 @@ config BLK_CMDLINE_PARSER
|
|
||||||
|
|
||||||
config BLK_WBT
|
|
||||||
bool "Enable support for block device writeback throttling"
|
|
||||||
- default n
|
|
||||||
+ default y
|
|
||||||
---help---
|
|
||||||
Enabling this option enables the block layer to throttle buffered
|
|
||||||
background writeback from the VM, making it more smooth and having
|
|
||||||
@@ -133,7 +133,7 @@ config BLK_WBT
|
|
||||||
|
|
||||||
config BLK_WBT_SQ
|
|
||||||
bool "Single queue writeback throttling"
|
|
||||||
- default n
|
|
||||||
+ default y
|
|
||||||
depends on BLK_WBT
|
|
||||||
---help---
|
|
||||||
Enable writeback throttling by default on legacy single queue devices
|
|
||||||
--
|
|
||||||
2.9.3
|
|
||||||
|
|
|
@ -1,43 +0,0 @@
|
||||||
From 2f96168f72bbd431c0e6d28b44393e98b49ca787 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Con Kolivas <kernel@kolivas.org>
|
|
||||||
Date: Mon, 20 Feb 2017 13:48:54 +1100
|
|
||||||
Subject: [PATCH 22/25] Swap sucks.
|
|
||||||
|
|
||||||
---
|
|
||||||
include/linux/swap.h | 6 +-----
|
|
||||||
mm/vmscan.c | 2 +-
|
|
||||||
2 files changed, 2 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/include/linux/swap.h b/include/linux/swap.h
|
|
||||||
index 7f47b70..1c2ed28 100644
|
|
||||||
--- a/include/linux/swap.h
|
|
||||||
+++ b/include/linux/swap.h
|
|
||||||
@@ -361,11 +361,7 @@ extern struct page *swapin_readahead(swp_entry_t, gfp_t,
|
|
||||||
extern atomic_long_t nr_swap_pages;
|
|
||||||
extern long total_swap_pages;
|
|
||||||
|
|
||||||
-/* Swap 50% full? Release swapcache more aggressively.. */
|
|
||||||
-static inline bool vm_swap_full(void)
|
|
||||||
-{
|
|
||||||
- return atomic_long_read(&nr_swap_pages) * 2 < total_swap_pages;
|
|
||||||
-}
|
|
||||||
+#define vm_swap_full() 1
|
|
||||||
|
|
||||||
static inline long get_nr_swap_pages(void)
|
|
||||||
{
|
|
||||||
diff --git a/mm/vmscan.c b/mm/vmscan.c
|
|
||||||
index 532a2a7..15e4260 100644
|
|
||||||
--- a/mm/vmscan.c
|
|
||||||
+++ b/mm/vmscan.c
|
|
||||||
@@ -141,7 +141,7 @@ struct scan_control {
|
|
||||||
/*
|
|
||||||
* From 0 .. 100. Higher means more swappy.
|
|
||||||
*/
|
|
||||||
-int vm_swappiness = 60;
|
|
||||||
+int vm_swappiness = 33;
|
|
||||||
/*
|
|
||||||
* The total number of pages which are beyond the high watermark within all
|
|
||||||
* zones.
|
|
||||||
--
|
|
||||||
2.9.3
|
|
||||||
|
|
|
@ -0,0 +1,43 @@
|
||||||
|
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
|
||||||
|
index 00ef432..0c2bf77 100644
|
||||||
|
--- a/arch/x86/kernel/cpu/mcheck/mce.c
|
||||||
|
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
|
||||||
|
@@ -1157,6 +1157,23 @@ void do_machine_check(struct pt_regs *regs, long error_code)
|
||||||
|
|
||||||
|
mce_gather_info(&m, regs);
|
||||||
|
|
||||||
|
+ /*
|
||||||
|
+ * Check if this MCE is signaled to only this logical processor,
|
||||||
|
+ * on Intel only.
|
||||||
|
+ */
|
||||||
|
+ if (m.cpuvendor == X86_VENDOR_INTEL)
|
||||||
|
+ lmce = m.mcgstatus & MCG_STATUS_LMCES;
|
||||||
|
+
|
||||||
|
+ /*
|
||||||
|
+ * Special treatment for Intel broadcasted machine check:
|
||||||
|
+ * To avoid panic due to MCE synchronization in case of kdump,
|
||||||
|
+ * after system panic, clear global status and bail out.
|
||||||
|
+ */
|
||||||
|
+ if (!lmce && atomic_read(&panic_cpu) != PANIC_CPU_INVALID) {
|
||||||
|
+ wrmsrl(MSR_IA32_MCG_STATUS, 0);
|
||||||
|
+ goto out;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
final = this_cpu_ptr(&mces_seen);
|
||||||
|
*final = m;
|
||||||
|
|
||||||
|
@@ -1174,13 +1191,6 @@ void do_machine_check(struct pt_regs *regs, long error_code)
|
||||||
|
kill_it = 1;
|
||||||
|
|
||||||
|
/*
|
||||||
|
- * Check if this MCE is signaled to only this logical processor,
|
||||||
|
- * on Intel only.
|
||||||
|
- */
|
||||||
|
- if (m.cpuvendor == X86_VENDOR_INTEL)
|
||||||
|
- lmce = m.mcgstatus & MCG_STATUS_LMCES;
|
||||||
|
-
|
||||||
|
- /*
|
||||||
|
* Go through all banks in exclusion of the other CPUs. This way we
|
||||||
|
* don't report duplicated events on shared banks because the first one
|
||||||
|
* to see it will clear it. If this is a Local MCE, then no need to
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue