[rt] Update to 4.19.1-rt3
This commit is contained in:
parent
998b27af2f
commit
b12aada85c
|
@ -49,7 +49,7 @@ linux (4.19.1-1~exp1) UNRELEASED; urgency=medium
|
|||
* [cloud-amd64] Enable Amazon ENA ethernet driver (Closes: #910049)
|
||||
|
||||
[ Romain Perier ]
|
||||
* [rt] Update to 4.19-rt1
|
||||
* [rt] Update to 4.19.1-rt3
|
||||
* [amd64] Enable AMD pinctrl driver (Closes: #908954)
|
||||
* Enable Diffie-Hellman operations on retained keys (Closes: #911998)
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
|
||||
Date: Wed, 18 Apr 2018 12:51:38 +0200
|
||||
Subject: [PATCH 1/6] ARM: at91: add TCB registers definitions
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Date: Thu, 13 Sep 2018 13:30:18 +0200
|
||||
Subject: [PATCH 1/7] ARM: at91: add TCB registers definitions
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
Add registers and bits definitions for the timer counter blocks found on
|
||||
Atmel ARM SoCs.
|
||||
|
@ -11,14 +11,14 @@ Tested-by: Andras Szemzo <szemzo.andras@gmail.com>
|
|||
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
|
||||
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
---
|
||||
include/soc/at91/atmel_tcb.h | 216 +++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 216 insertions(+)
|
||||
include/soc/at91/atmel_tcb.h | 183 +++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 183 insertions(+)
|
||||
create mode 100644 include/soc/at91/atmel_tcb.h
|
||||
|
||||
--- /dev/null
|
||||
+++ b/include/soc/at91/atmel_tcb.h
|
||||
@@ -0,0 +1,216 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
@@ -0,0 +1,183 @@
|
||||
+//SPDX-License-Identifier: GPL-2.0
|
||||
+/* Copyright (C) 2018 Microchip */
|
||||
+
|
||||
+#ifndef __SOC_ATMEL_TCB_H
|
||||
|
@ -186,48 +186,15 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|||
+#define ATMEL_TC_WPMR_WPKEY (0x54494d << 8)
|
||||
+#define ATMEL_TC_WPMR_WPEN BIT(0)
|
||||
+
|
||||
+static inline struct clk *tcb_clk_get(struct device_node *node, int channel)
|
||||
+{
|
||||
+ struct clk *clk;
|
||||
+ char clk_name[] = "t0_clk";
|
||||
+
|
||||
+ clk_name[1] += channel;
|
||||
+ clk = of_clk_get_by_name(node->parent, clk_name);
|
||||
+ if (!IS_ERR(clk))
|
||||
+ return clk;
|
||||
+
|
||||
+ return of_clk_get_by_name(node->parent, "t0_clk");
|
||||
+}
|
||||
+
|
||||
+static inline int tcb_irq_get(struct device_node *node, int channel)
|
||||
+{
|
||||
+ int irq;
|
||||
+
|
||||
+ irq = of_irq_get(node->parent, channel);
|
||||
+ if (irq > 0)
|
||||
+ return irq;
|
||||
+
|
||||
+ return of_irq_get(node->parent, 0);
|
||||
+}
|
||||
+
|
||||
+static const u8 atmel_tc_divisors[5] = { 2, 8, 32, 128, 0, };
|
||||
+
|
||||
+struct atmel_tcb_info {
|
||||
+ int bits;
|
||||
+};
|
||||
+
|
||||
+static const struct atmel_tcb_info atmel_tcb_infos[] = {
|
||||
+ { .bits = 16 },
|
||||
+ { .bits = 32 },
|
||||
+};
|
||||
+
|
||||
+static const struct of_device_id atmel_tcb_dt_ids[] = {
|
||||
+ {
|
||||
+ .compatible = "atmel,at91rm9200-tcb",
|
||||
+ .data = &atmel_tcb_infos[0],
|
||||
+ .data = (void *)16,
|
||||
+ }, {
|
||||
+ .compatible = "atmel,at91sam9x5-tcb",
|
||||
+ .data = &atmel_tcb_infos[1],
|
||||
+ .data = (void *)32,
|
||||
+ }, {
|
||||
+ /* sentinel */
|
||||
+ }
|
||||
|
|
|
@ -2,7 +2,7 @@ From: Peter Zijlstra <peterz@infradead.org>
|
|||
Date: Mon, 28 May 2018 15:24:20 +0200
|
||||
Subject: [PATCH 1/4] Split IRQ-off and zone->lock while freeing pages from PCP
|
||||
list #1
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
Split the IRQ-off section while accessing the PCP list from zone->lock
|
||||
while freeing pages.
|
||||
|
|
|
@ -2,7 +2,7 @@ From: Peter Zijlstra <peterz@infradead.org>
|
|||
Date: Mon, 28 May 2018 15:24:21 +0200
|
||||
Subject: [PATCH 2/4] Split IRQ-off and zone->lock while freeing pages from PCP
|
||||
list #2
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
Split the IRQ-off section while accessing the PCP list from zone->lock
|
||||
while freeing pages.
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
|
||||
Date: Wed, 18 Apr 2018 12:51:39 +0200
|
||||
Subject: [PATCH 2/6] clocksource/drivers: Add a new driver for the Atmel ARM
|
||||
Date: Thu, 13 Sep 2018 13:30:19 +0200
|
||||
Subject: [PATCH 2/7] clocksource/drivers: Add a new driver for the Atmel ARM
|
||||
TC blocks
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
Add a driver for the Atmel Timer Counter Blocks. This driver provides a
|
||||
clocksource and two clockevent devices.
|
||||
|
@ -26,8 +26,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|||
---
|
||||
drivers/clocksource/Kconfig | 8
|
||||
drivers/clocksource/Makefile | 3
|
||||
drivers/clocksource/timer-atmel-tcb.c | 608 ++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 618 insertions(+), 1 deletion(-)
|
||||
drivers/clocksource/timer-atmel-tcb.c | 410 ++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 420 insertions(+), 1 deletion(-)
|
||||
create mode 100644 drivers/clocksource/timer-atmel-tcb.c
|
||||
|
||||
--- a/drivers/clocksource/Kconfig
|
||||
|
@ -61,7 +61,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|||
obj-$(CONFIG_CS5535_CLOCK_EVENT_SRC) += cs5535-clockevt.o
|
||||
--- /dev/null
|
||||
+++ b/drivers/clocksource/timer-atmel-tcb.c
|
||||
@@ -0,0 +1,608 @@
|
||||
@@ -0,0 +1,410 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+#include <linux/clk.h>
|
||||
+#include <linux/clockchips.h>
|
||||
|
@ -75,7 +75,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|||
+#include <linux/sched_clock.h>
|
||||
+#include <soc/at91/atmel_tcb.h>
|
||||
+
|
||||
+static struct atmel_tcb_clksrc {
|
||||
+struct atmel_tcb_clksrc {
|
||||
+ struct clocksource clksrc;
|
||||
+ struct clock_event_device clkevt;
|
||||
+ struct regmap *regmap;
|
||||
|
@ -93,216 +93,22 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|||
+ } cache[2];
|
||||
+ u32 bmr_cache;
|
||||
+ bool registered;
|
||||
+} tc = {
|
||||
+ .clksrc = {
|
||||
+ .rating = 200,
|
||||
+ .mask = CLOCKSOURCE_MASK(32),
|
||||
+ .flags = CLOCK_SOURCE_IS_CONTINUOUS,
|
||||
+ },
|
||||
+ .clkevt = {
|
||||
+ .features = CLOCK_EVT_FEAT_ONESHOT,
|
||||
+ /* Should be lower than at91rm9200's system timer */
|
||||
+ .rating = 125,
|
||||
+ },
|
||||
+ bool clk_enabled;
|
||||
+};
|
||||
+
|
||||
+static struct tc_clkevt_device {
|
||||
+ struct clock_event_device clkevt;
|
||||
+ struct regmap *regmap;
|
||||
+ void __iomem *base;
|
||||
+ struct clk *slow_clk;
|
||||
+static struct atmel_tcb_clksrc tc;
|
||||
+
|
||||
+static struct clk *tcb_clk_get(struct device_node *node, int channel)
|
||||
+{
|
||||
+ struct clk *clk;
|
||||
+ char name[20];
|
||||
+ int channel;
|
||||
+ int irq;
|
||||
+ struct {
|
||||
+ u32 cmr;
|
||||
+ u32 imr;
|
||||
+ u32 rc;
|
||||
+ bool clken;
|
||||
+ } cache;
|
||||
+ bool registered;
|
||||
+} tce = {
|
||||
+ .clkevt = {
|
||||
+ .features = CLOCK_EVT_FEAT_PERIODIC |
|
||||
+ CLOCK_EVT_FEAT_ONESHOT,
|
||||
+ /*
|
||||
+ * Should be lower than at91rm9200's system timer
|
||||
+ * but higher than tc.clkevt.rating
|
||||
+ */
|
||||
+ .rating = 140,
|
||||
+ },
|
||||
+};
|
||||
+ char clk_name[] = "t0_clk";
|
||||
+
|
||||
+/*
|
||||
+ * Clockevent device using its own channel
|
||||
+ */
|
||||
+static int tc_clkevt2_shutdown(struct clock_event_device *d)
|
||||
+{
|
||||
+ writel(0xff, tce.base + ATMEL_TC_IDR(tce.channel));
|
||||
+ writel(ATMEL_TC_CCR_CLKDIS, tce.base + ATMEL_TC_CCR(tce.channel));
|
||||
+ if (!clockevent_state_detached(d))
|
||||
+ clk_disable(tce.clk);
|
||||
+ clk_name[1] += channel;
|
||||
+ clk = of_clk_get_by_name(node->parent, clk_name);
|
||||
+ if (!IS_ERR(clk))
|
||||
+ return clk;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+/* For now, we always use the 32K clock ... this optimizes for NO_HZ,
|
||||
+ * because using one of the divided clocks would usually mean the
|
||||
+ * tick rate can never be less than several dozen Hz (vs 0.5 Hz).
|
||||
+ *
|
||||
+ * A divided clock could be good for high resolution timers, since
|
||||
+ * 30.5 usec resolution can seem "low".
|
||||
+ */
|
||||
+static int tc_clkevt2_set_oneshot(struct clock_event_device *d)
|
||||
+{
|
||||
+ if (clockevent_state_oneshot(d) || clockevent_state_periodic(d))
|
||||
+ tc_clkevt2_shutdown(d);
|
||||
+
|
||||
+ clk_enable(tce.clk);
|
||||
+
|
||||
+ /* slow clock, count up to RC, then irq and stop */
|
||||
+ writel(ATMEL_TC_CMR_TCLK(4) | ATMEL_TC_CMR_CPCSTOP |
|
||||
+ ATMEL_TC_CMR_WAVE | ATMEL_TC_CMR_WAVESEL_UPRC,
|
||||
+ tce.base + ATMEL_TC_CMR(tce.channel));
|
||||
+ writel(ATMEL_TC_CPCS, tce.base + ATMEL_TC_IER(tce.channel));
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int tc_clkevt2_set_periodic(struct clock_event_device *d)
|
||||
+{
|
||||
+ if (clockevent_state_oneshot(d) || clockevent_state_periodic(d))
|
||||
+ tc_clkevt2_shutdown(d);
|
||||
+
|
||||
+ /* By not making the gentime core emulate periodic mode on top
|
||||
+ * of oneshot, we get lower overhead and improved accuracy.
|
||||
+ */
|
||||
+ clk_enable(tce.clk);
|
||||
+
|
||||
+ /* slow clock, count up to RC, then irq and restart */
|
||||
+ writel(ATMEL_TC_CMR_TCLK(4) | ATMEL_TC_CMR_WAVE |
|
||||
+ ATMEL_TC_CMR_WAVESEL_UPRC,
|
||||
+ tce.base + ATMEL_TC_CMR(tce.channel));
|
||||
+ writel((32768 + HZ / 2) / HZ, tce.base + ATMEL_TC_RC(tce.channel));
|
||||
+
|
||||
+ /* Enable clock and interrupts on RC compare */
|
||||
+ writel(ATMEL_TC_CPCS, tce.base + ATMEL_TC_IER(tce.channel));
|
||||
+ writel(ATMEL_TC_CCR_CLKEN | ATMEL_TC_CCR_SWTRG,
|
||||
+ tce.base + ATMEL_TC_CCR(tce.channel));
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int tc_clkevt2_next_event(unsigned long delta,
|
||||
+ struct clock_event_device *d)
|
||||
+{
|
||||
+ writel(delta, tce.base + ATMEL_TC_RC(tce.channel));
|
||||
+ writel(ATMEL_TC_CCR_CLKEN | ATMEL_TC_CCR_SWTRG,
|
||||
+ tce.base + ATMEL_TC_CCR(tce.channel));
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static irqreturn_t tc_clkevt2_irq(int irq, void *handle)
|
||||
+{
|
||||
+ unsigned int sr;
|
||||
+
|
||||
+ sr = readl(tce.base + ATMEL_TC_SR(tce.channel));
|
||||
+ if (sr & ATMEL_TC_CPCS) {
|
||||
+ tce.clkevt.event_handler(&tce.clkevt);
|
||||
+ return IRQ_HANDLED;
|
||||
+ }
|
||||
+
|
||||
+ return IRQ_NONE;
|
||||
+}
|
||||
+
|
||||
+static void tc_clkevt2_suspend(struct clock_event_device *d)
|
||||
+{
|
||||
+ tce.cache.cmr = readl(tce.base + ATMEL_TC_CMR(tce.channel));
|
||||
+ tce.cache.imr = readl(tce.base + ATMEL_TC_IMR(tce.channel));
|
||||
+ tce.cache.rc = readl(tce.base + ATMEL_TC_RC(tce.channel));
|
||||
+ tce.cache.clken = !!(readl(tce.base + ATMEL_TC_SR(tce.channel)) &
|
||||
+ ATMEL_TC_CLKSTA);
|
||||
+}
|
||||
+
|
||||
+static void tc_clkevt2_resume(struct clock_event_device *d)
|
||||
+{
|
||||
+ /* Restore registers for the channel, RA and RB are not used */
|
||||
+ writel(tce.cache.cmr, tc.base + ATMEL_TC_CMR(tce.channel));
|
||||
+ writel(tce.cache.rc, tc.base + ATMEL_TC_RC(tce.channel));
|
||||
+ writel(0, tc.base + ATMEL_TC_RA(tce.channel));
|
||||
+ writel(0, tc.base + ATMEL_TC_RB(tce.channel));
|
||||
+ /* Disable all the interrupts */
|
||||
+ writel(0xff, tc.base + ATMEL_TC_IDR(tce.channel));
|
||||
+ /* Reenable interrupts that were enabled before suspending */
|
||||
+ writel(tce.cache.imr, tc.base + ATMEL_TC_IER(tce.channel));
|
||||
+
|
||||
+ /* Start the clock if it was used */
|
||||
+ if (tce.cache.clken)
|
||||
+ writel(ATMEL_TC_CCR_CLKEN | ATMEL_TC_CCR_SWTRG,
|
||||
+ tc.base + ATMEL_TC_CCR(tce.channel));
|
||||
+}
|
||||
+
|
||||
+static int __init tc_clkevt_register(struct device_node *node,
|
||||
+ struct regmap *regmap, void __iomem *base,
|
||||
+ int channel, int irq, int bits)
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+ tce.regmap = regmap;
|
||||
+ tce.base = base;
|
||||
+ tce.channel = channel;
|
||||
+ tce.irq = irq;
|
||||
+
|
||||
+ tce.slow_clk = of_clk_get_by_name(node->parent, "slow_clk");
|
||||
+ if (IS_ERR(tce.slow_clk))
|
||||
+ return PTR_ERR(tce.slow_clk);
|
||||
+
|
||||
+ ret = clk_prepare_enable(tce.slow_clk);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ tce.clk = tcb_clk_get(node, tce.channel);
|
||||
+ if (IS_ERR(tce.clk)) {
|
||||
+ ret = PTR_ERR(tce.clk);
|
||||
+ goto err_slow;
|
||||
+ }
|
||||
+
|
||||
+ snprintf(tce.name, sizeof(tce.name), "%s:%d",
|
||||
+ kbasename(node->parent->full_name), channel);
|
||||
+ tce.clkevt.cpumask = cpumask_of(0);
|
||||
+ tce.clkevt.name = tce.name;
|
||||
+ tce.clkevt.set_next_event = tc_clkevt2_next_event,
|
||||
+ tce.clkevt.set_state_shutdown = tc_clkevt2_shutdown,
|
||||
+ tce.clkevt.set_state_periodic = tc_clkevt2_set_periodic,
|
||||
+ tce.clkevt.set_state_oneshot = tc_clkevt2_set_oneshot,
|
||||
+ tce.clkevt.suspend = tc_clkevt2_suspend,
|
||||
+ tce.clkevt.resume = tc_clkevt2_resume,
|
||||
+
|
||||
+ /* try to enable clk to avoid future errors in mode change */
|
||||
+ ret = clk_prepare_enable(tce.clk);
|
||||
+ if (ret)
|
||||
+ goto err_slow;
|
||||
+ clk_disable(tce.clk);
|
||||
+
|
||||
+ clockevents_config_and_register(&tce.clkevt, 32768, 1, BIT(bits) - 1);
|
||||
+
|
||||
+ ret = request_irq(tce.irq, tc_clkevt2_irq, IRQF_TIMER | IRQF_SHARED,
|
||||
+ tce.clkevt.name, &tce);
|
||||
+ if (ret)
|
||||
+ goto err_clk;
|
||||
+
|
||||
+ tce.registered = true;
|
||||
+
|
||||
+ return 0;
|
||||
+
|
||||
+err_clk:
|
||||
+ clk_unprepare(tce.clk);
|
||||
+err_slow:
|
||||
+ clk_disable_unprepare(tce.slow_clk);
|
||||
+
|
||||
+ return ret;
|
||||
+ return of_clk_get_by_name(node->parent, "t0_clk");
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
|
@ -340,7 +146,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|||
+{
|
||||
+ u32 old, next, cur;
|
||||
+
|
||||
+
|
||||
+ old = readl(tc.base + ATMEL_TC_CV(tc.channels[0]));
|
||||
+ next = old + delta;
|
||||
+ writel(next, tc.base + ATMEL_TC_RC(tc.channels[0]));
|
||||
|
@ -567,6 +372,9 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|||
+ tc.clksrc.name = tc.name;
|
||||
+ tc.clksrc.suspend = tc_clksrc_suspend;
|
||||
+ tc.clksrc.resume = tc_clksrc_resume;
|
||||
+ tc.clksrc.rating = 200;
|
||||
+ tc.clksrc.mask = CLOCKSOURCE_MASK(32);
|
||||
+ tc.clksrc.flags = CLOCK_SOURCE_IS_CONTINUOUS;
|
||||
+
|
||||
+ err = clocksource_register_hz(&tc.clksrc, divided_rate);
|
||||
+ if (err)
|
||||
|
@ -582,6 +390,9 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|||
+ tc.clkevt.set_next_event = tcb_clkevt_next_event;
|
||||
+ tc.clkevt.set_state_oneshot = tcb_clkevt_oneshot;
|
||||
+ tc.clkevt.set_state_shutdown = tcb_clkevt_shutdown;
|
||||
+ tc.clkevt.features = CLOCK_EVT_FEAT_ONESHOT;
|
||||
+ tc.clkevt.rating = 125;
|
||||
+
|
||||
+ clockevents_config_and_register(&tc.clkevt, divided_rate, 1,
|
||||
+ BIT(tc.bits) - 1);
|
||||
+
|
||||
|
@ -610,13 +421,13 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|||
+static int __init tcb_clksrc_init(struct device_node *node)
|
||||
+{
|
||||
+ const struct of_device_id *match;
|
||||
+ const struct atmel_tcb_info *tcb_info;
|
||||
+ struct regmap *regmap;
|
||||
+ void __iomem *tcb_base;
|
||||
+ u32 channel;
|
||||
+ int bits, irq, err, chan1 = -1;
|
||||
+ int irq, err, chan1 = -1;
|
||||
+ unsigned bits;
|
||||
+
|
||||
+ if (tc.registered && tce.registered)
|
||||
+ if (tc.registered)
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+ /*
|
||||
|
@ -635,38 +446,29 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|||
+ }
|
||||
+
|
||||
+ match = of_match_node(atmel_tcb_dt_ids, node->parent);
|
||||
+ tcb_info = match->data;
|
||||
+ bits = tcb_info->bits;
|
||||
+ bits = (uintptr_t)match->data;
|
||||
+
|
||||
+ err = of_property_read_u32_index(node, "reg", 0, &channel);
|
||||
+ if (err)
|
||||
+ return err;
|
||||
+
|
||||
+ irq = tcb_irq_get(node, channel);
|
||||
+ if (irq < 0)
|
||||
+ return irq;
|
||||
+
|
||||
+ if (tc.registered)
|
||||
+ return tc_clkevt_register(node, regmap, tcb_base, channel, irq,
|
||||
+ bits);
|
||||
+ irq = of_irq_get(node->parent, channel);
|
||||
+ if (irq < 0) {
|
||||
+ irq = of_irq_get(node->parent, 0);
|
||||
+ if (irq < 0)
|
||||
+ return irq;
|
||||
+ }
|
||||
+
|
||||
+ if (bits == 16) {
|
||||
+ of_property_read_u32_index(node, "reg", 1, &chan1);
|
||||
+ if (chan1 == -1) {
|
||||
+ if (tce.registered) {
|
||||
+ pr_err("%s: clocksource needs two channels\n",
|
||||
+ node->parent->full_name);
|
||||
+ return -EINVAL;
|
||||
+ } else {
|
||||
+ return tc_clkevt_register(node, regmap,
|
||||
+ tcb_base, channel,
|
||||
+ irq, bits);
|
||||
+ }
|
||||
+ pr_err("%s: clocksource needs two channels\n",
|
||||
+ node->parent->full_name);
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return tcb_clksrc_register(node, regmap, tcb_base, channel, chan1, irq,
|
||||
+ bits);
|
||||
+}
|
||||
+CLOCKSOURCE_OF_DECLARE(atmel_tcb_clksrc, "atmel,tcb-timer",
|
||||
+ tcb_clksrc_init);
|
||||
+TIMER_OF_DECLARE(atmel_tcb_clksrc, "atmel,tcb-timer", tcb_clksrc_init);
|
||||
|
|
265
debian/patches-rt/0003-clocksource-drivers-timer-atmel-tcb-add-clockevent-d.patch
vendored
Normal file
265
debian/patches-rt/0003-clocksource-drivers-timer-atmel-tcb-add-clockevent-d.patch
vendored
Normal file
|
@ -0,0 +1,265 @@
|
|||
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
|
||||
Date: Thu, 13 Sep 2018 13:30:20 +0200
|
||||
Subject: [PATCH 3/7] clocksource/drivers: timer-atmel-tcb: add clockevent
|
||||
device on separate channel
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
Add an other clockevent device that uses a separate TCB channel when
|
||||
available.
|
||||
|
||||
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
|
||||
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
---
|
||||
drivers/clocksource/timer-atmel-tcb.c | 217 +++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 212 insertions(+), 5 deletions(-)
|
||||
|
||||
--- a/drivers/clocksource/timer-atmel-tcb.c
|
||||
+++ b/drivers/clocksource/timer-atmel-tcb.c
|
||||
@@ -32,7 +32,7 @@ struct atmel_tcb_clksrc {
|
||||
bool clk_enabled;
|
||||
};
|
||||
|
||||
-static struct atmel_tcb_clksrc tc;
|
||||
+static struct atmel_tcb_clksrc tc, tce;
|
||||
|
||||
static struct clk *tcb_clk_get(struct device_node *node, int channel)
|
||||
{
|
||||
@@ -48,6 +48,203 @@ static struct clk *tcb_clk_get(struct de
|
||||
}
|
||||
|
||||
/*
|
||||
+ * Clockevent device using its own channel
|
||||
+ */
|
||||
+
|
||||
+static void tc_clkevt2_clk_disable(struct clock_event_device *d)
|
||||
+{
|
||||
+ clk_disable(tce.clk[0]);
|
||||
+ tce.clk_enabled = false;
|
||||
+}
|
||||
+
|
||||
+static void tc_clkevt2_clk_enable(struct clock_event_device *d)
|
||||
+{
|
||||
+ if (tce.clk_enabled)
|
||||
+ return;
|
||||
+ clk_enable(tce.clk[0]);
|
||||
+ tce.clk_enabled = true;
|
||||
+}
|
||||
+
|
||||
+static int tc_clkevt2_stop(struct clock_event_device *d)
|
||||
+{
|
||||
+ writel(0xff, tce.base + ATMEL_TC_IDR(tce.channels[0]));
|
||||
+ writel(ATMEL_TC_CCR_CLKDIS, tce.base + ATMEL_TC_CCR(tce.channels[0]));
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int tc_clkevt2_shutdown(struct clock_event_device *d)
|
||||
+{
|
||||
+ tc_clkevt2_stop(d);
|
||||
+ if (!clockevent_state_detached(d))
|
||||
+ tc_clkevt2_clk_disable(d);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+/* For now, we always use the 32K clock ... this optimizes for NO_HZ,
|
||||
+ * because using one of the divided clocks would usually mean the
|
||||
+ * tick rate can never be less than several dozen Hz (vs 0.5 Hz).
|
||||
+ *
|
||||
+ * A divided clock could be good for high resolution timers, since
|
||||
+ * 30.5 usec resolution can seem "low".
|
||||
+ */
|
||||
+static int tc_clkevt2_set_oneshot(struct clock_event_device *d)
|
||||
+{
|
||||
+ if (clockevent_state_oneshot(d) || clockevent_state_periodic(d))
|
||||
+ tc_clkevt2_stop(d);
|
||||
+
|
||||
+ tc_clkevt2_clk_enable(d);
|
||||
+
|
||||
+ /* slow clock, count up to RC, then irq and stop */
|
||||
+ writel(ATMEL_TC_CMR_TCLK(4) | ATMEL_TC_CMR_CPCSTOP |
|
||||
+ ATMEL_TC_CMR_WAVE | ATMEL_TC_CMR_WAVESEL_UPRC,
|
||||
+ tce.base + ATMEL_TC_CMR(tce.channels[0]));
|
||||
+ writel(ATMEL_TC_CPCS, tce.base + ATMEL_TC_IER(tce.channels[0]));
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int tc_clkevt2_set_periodic(struct clock_event_device *d)
|
||||
+{
|
||||
+ if (clockevent_state_oneshot(d) || clockevent_state_periodic(d))
|
||||
+ tc_clkevt2_stop(d);
|
||||
+
|
||||
+ /* By not making the gentime core emulate periodic mode on top
|
||||
+ * of oneshot, we get lower overhead and improved accuracy.
|
||||
+ */
|
||||
+ tc_clkevt2_clk_enable(d);
|
||||
+
|
||||
+ /* slow clock, count up to RC, then irq and restart */
|
||||
+ writel(ATMEL_TC_CMR_TCLK(4) | ATMEL_TC_CMR_WAVE |
|
||||
+ ATMEL_TC_CMR_WAVESEL_UPRC,
|
||||
+ tce.base + ATMEL_TC_CMR(tce.channels[0]));
|
||||
+ writel((32768 + HZ / 2) / HZ, tce.base + ATMEL_TC_RC(tce.channels[0]));
|
||||
+
|
||||
+ /* Enable clock and interrupts on RC compare */
|
||||
+ writel(ATMEL_TC_CPCS, tce.base + ATMEL_TC_IER(tce.channels[0]));
|
||||
+ writel(ATMEL_TC_CCR_CLKEN | ATMEL_TC_CCR_SWTRG,
|
||||
+ tce.base + ATMEL_TC_CCR(tce.channels[0]));
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int tc_clkevt2_next_event(unsigned long delta,
|
||||
+ struct clock_event_device *d)
|
||||
+{
|
||||
+ writel(delta, tce.base + ATMEL_TC_RC(tce.channels[0]));
|
||||
+ writel(ATMEL_TC_CCR_CLKEN | ATMEL_TC_CCR_SWTRG,
|
||||
+ tce.base + ATMEL_TC_CCR(tce.channels[0]));
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static irqreturn_t tc_clkevt2_irq(int irq, void *handle)
|
||||
+{
|
||||
+ unsigned int sr;
|
||||
+
|
||||
+ sr = readl(tce.base + ATMEL_TC_SR(tce.channels[0]));
|
||||
+ if (sr & ATMEL_TC_CPCS) {
|
||||
+ tce.clkevt.event_handler(&tce.clkevt);
|
||||
+ return IRQ_HANDLED;
|
||||
+ }
|
||||
+
|
||||
+ return IRQ_NONE;
|
||||
+}
|
||||
+
|
||||
+static void tc_clkevt2_suspend(struct clock_event_device *d)
|
||||
+{
|
||||
+ tce.cache[0].cmr = readl(tce.base + ATMEL_TC_CMR(tce.channels[0]));
|
||||
+ tce.cache[0].imr = readl(tce.base + ATMEL_TC_IMR(tce.channels[0]));
|
||||
+ tce.cache[0].rc = readl(tce.base + ATMEL_TC_RC(tce.channels[0]));
|
||||
+ tce.cache[0].clken = !!(readl(tce.base + ATMEL_TC_SR(tce.channels[0])) &
|
||||
+ ATMEL_TC_CLKSTA);
|
||||
+}
|
||||
+
|
||||
+static void tc_clkevt2_resume(struct clock_event_device *d)
|
||||
+{
|
||||
+ /* Restore registers for the channel, RA and RB are not used */
|
||||
+ writel(tce.cache[0].cmr, tc.base + ATMEL_TC_CMR(tce.channels[0]));
|
||||
+ writel(tce.cache[0].rc, tc.base + ATMEL_TC_RC(tce.channels[0]));
|
||||
+ writel(0, tc.base + ATMEL_TC_RA(tce.channels[0]));
|
||||
+ writel(0, tc.base + ATMEL_TC_RB(tce.channels[0]));
|
||||
+ /* Disable all the interrupts */
|
||||
+ writel(0xff, tc.base + ATMEL_TC_IDR(tce.channels[0]));
|
||||
+ /* Reenable interrupts that were enabled before suspending */
|
||||
+ writel(tce.cache[0].imr, tc.base + ATMEL_TC_IER(tce.channels[0]));
|
||||
+
|
||||
+ /* Start the clock if it was used */
|
||||
+ if (tce.cache[0].clken)
|
||||
+ writel(ATMEL_TC_CCR_CLKEN | ATMEL_TC_CCR_SWTRG,
|
||||
+ tc.base + ATMEL_TC_CCR(tce.channels[0]));
|
||||
+}
|
||||
+
|
||||
+static int __init tc_clkevt_register(struct device_node *node,
|
||||
+ struct regmap *regmap, void __iomem *base,
|
||||
+ int channel, int irq, int bits)
|
||||
+{
|
||||
+ int ret;
|
||||
+ struct clk *slow_clk;
|
||||
+
|
||||
+ tce.regmap = regmap;
|
||||
+ tce.base = base;
|
||||
+ tce.channels[0] = channel;
|
||||
+ tce.irq = irq;
|
||||
+
|
||||
+ slow_clk = of_clk_get_by_name(node->parent, "slow_clk");
|
||||
+ if (IS_ERR(slow_clk))
|
||||
+ return PTR_ERR(slow_clk);
|
||||
+
|
||||
+ ret = clk_prepare_enable(slow_clk);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ tce.clk[0] = tcb_clk_get(node, tce.channels[0]);
|
||||
+ if (IS_ERR(tce.clk[0])) {
|
||||
+ ret = PTR_ERR(tce.clk[0]);
|
||||
+ goto err_slow;
|
||||
+ }
|
||||
+
|
||||
+ snprintf(tce.name, sizeof(tce.name), "%s:%d",
|
||||
+ kbasename(node->parent->full_name), channel);
|
||||
+ tce.clkevt.cpumask = cpumask_of(0);
|
||||
+ tce.clkevt.name = tce.name;
|
||||
+ tce.clkevt.set_next_event = tc_clkevt2_next_event,
|
||||
+ tce.clkevt.set_state_shutdown = tc_clkevt2_shutdown,
|
||||
+ tce.clkevt.set_state_periodic = tc_clkevt2_set_periodic,
|
||||
+ tce.clkevt.set_state_oneshot = tc_clkevt2_set_oneshot,
|
||||
+ tce.clkevt.suspend = tc_clkevt2_suspend,
|
||||
+ tce.clkevt.resume = tc_clkevt2_resume,
|
||||
+ tce.clkevt.features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT;
|
||||
+ tce.clkevt.rating = 140;
|
||||
+
|
||||
+ /* try to enable clk to avoid future errors in mode change */
|
||||
+ ret = clk_prepare_enable(tce.clk[0]);
|
||||
+ if (ret)
|
||||
+ goto err_slow;
|
||||
+ clk_disable(tce.clk[0]);
|
||||
+
|
||||
+ clockevents_config_and_register(&tce.clkevt, 32768, 1,
|
||||
+ CLOCKSOURCE_MASK(bits));
|
||||
+
|
||||
+ ret = request_irq(tce.irq, tc_clkevt2_irq, IRQF_TIMER | IRQF_SHARED,
|
||||
+ tce.clkevt.name, &tce);
|
||||
+ if (ret)
|
||||
+ goto err_clk;
|
||||
+
|
||||
+ tce.registered = true;
|
||||
+
|
||||
+ return 0;
|
||||
+
|
||||
+err_clk:
|
||||
+ clk_unprepare(tce.clk[0]);
|
||||
+err_slow:
|
||||
+ clk_disable_unprepare(slow_clk);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
* Clocksource and clockevent using the same channel(s)
|
||||
*/
|
||||
static u64 tc_get_cycles(struct clocksource *cs)
|
||||
@@ -363,7 +560,7 @@ static int __init tcb_clksrc_init(struct
|
||||
int irq, err, chan1 = -1;
|
||||
unsigned bits;
|
||||
|
||||
- if (tc.registered)
|
||||
+ if (tc.registered && tce.registered)
|
||||
return -ENODEV;
|
||||
|
||||
/*
|
||||
@@ -395,12 +592,22 @@ static int __init tcb_clksrc_init(struct
|
||||
return irq;
|
||||
}
|
||||
|
||||
+ if (tc.registered)
|
||||
+ return tc_clkevt_register(node, regmap, tcb_base, channel, irq,
|
||||
+ bits);
|
||||
+
|
||||
if (bits == 16) {
|
||||
of_property_read_u32_index(node, "reg", 1, &chan1);
|
||||
if (chan1 == -1) {
|
||||
- pr_err("%s: clocksource needs two channels\n",
|
||||
- node->parent->full_name);
|
||||
- return -EINVAL;
|
||||
+ if (tce.registered) {
|
||||
+ pr_err("%s: clocksource needs two channels\n",
|
||||
+ node->parent->full_name);
|
||||
+ return -EINVAL;
|
||||
+ } else {
|
||||
+ return tc_clkevt_register(node, regmap,
|
||||
+ tcb_base, channel,
|
||||
+ irq, bits);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Mon, 28 May 2018 15:24:22 +0200
|
||||
Subject: [PATCH 3/4] mm/SLxB: change list_lock to raw_spinlock_t
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
The list_lock is used with used with IRQs off on RT. Make it a raw_spinlock_t
|
||||
otherwise the interrupts won't be disabled on -RT. The locking rules remain
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
|
||||
Date: Wed, 18 Apr 2018 12:51:40 +0200
|
||||
Subject: [PATCH 3/6] clocksource/drivers: atmel-pit: make option silent
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Date: Thu, 13 Sep 2018 13:30:21 +0200
|
||||
Subject: [PATCH 4/7] clocksource/drivers: atmel-pit: make option silent
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
To conform with the other option, make the ATMEL_PIT option silent so it
|
||||
can be selected from the platform
|
|
@ -2,7 +2,7 @@ From: Thomas Gleixner <tglx@linutronix.de>
|
|||
Date: Thu, 21 Jun 2018 17:29:19 +0200
|
||||
Subject: [PATCH 4/4] mm/SLUB: delay giving back empty slubs to IRQ enabled
|
||||
regions
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
__free_slab() is invoked with disabled interrupts which increases the
|
||||
irq-off time while __free_pages() is doing the work.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
|
||||
Date: Wed, 18 Apr 2018 12:51:41 +0200
|
||||
Subject: [PATCH 4/6] ARM: at91: Implement clocksource selection
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Date: Thu, 13 Sep 2018 13:30:22 +0200
|
||||
Subject: [PATCH 5/7] ARM: at91: Implement clocksource selection
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
Allow selecting and unselecting the PIT clocksource driver so it doesn't
|
||||
have to be compile when unused.
|
|
@ -1,7 +1,7 @@
|
|||
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
|
||||
Date: Wed, 18 Apr 2018 12:51:42 +0200
|
||||
Subject: [PATCH 5/6] ARM: configs: at91: use new TCB timer driver
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Date: Thu, 13 Sep 2018 13:30:23 +0200
|
||||
Subject: [PATCH 6/7] ARM: configs: at91: use new TCB timer driver
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
Unselecting ATMEL_TCLIB switches the TCB timer driver from tcb_clksrc to
|
||||
timer-atmel-tcb.
|
|
@ -1,7 +1,7 @@
|
|||
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
|
||||
Date: Wed, 18 Apr 2018 12:51:43 +0200
|
||||
Subject: [PATCH 6/6] ARM: configs: at91: unselect PIT
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Date: Thu, 13 Sep 2018 13:30:24 +0200
|
||||
Subject: [PATCH 7/7] ARM: configs: at91: unselect PIT
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
The PIT is not required anymore to successfully boot and may actually harm
|
||||
in case preempt-rt is used because the PIT interrupt is shared.
|
|
@ -1,7 +1,7 @@
|
|||
From: "Yadi.hu" <yadi.hu@windriver.com>
|
||||
Date: Wed, 10 Dec 2014 10:32:09 +0800
|
||||
Subject: ARM: enable irq in translation/section permission fault handlers
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
Probably happens on all ARM, with
|
||||
CONFIG_PREEMPT_RT_FULL
|
||||
|
|
|
@ -4,7 +4,7 @@ Subject: [PATCH] Drivers: hv: vmbus: include header for get_irq_regs()
|
|||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
On !RT the header file get_irq_regs() gets pulled in via other header files. On
|
||||
RT it does not and the build fails:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Paul E. McKenney <paulmck@linux.ibm.com>
|
||||
Date: Mon, 29 Oct 2018 11:53:01 +0100
|
||||
Subject: [PATCH] EXP rcu: Revert expedited GP parallelization cleverness
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
(Commit 258ba8e089db23f760139266c232f01bad73f85c from linux-rcu)
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Thu, 21 Mar 2013 19:01:05 +0100
|
||||
Subject: printk: Drop the logbuf_lock more often
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
The lock is hold with irgs off. The latency drops 500us+ on my arm bugs
|
||||
with a "full" buffer after executing "dmesg" on the shell.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Josh Cartwright <joshc@ni.com>
|
||||
Date: Thu, 11 Feb 2016 11:54:01 -0600
|
||||
Subject: KVM: arm/arm64: downgrade preempt_disable()d region to migrate_disable()
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
kvm_arch_vcpu_ioctl_run() disables the use of preemption when updating
|
||||
the vgic and timer states to prevent the calling task from migrating to
|
||||
|
|
|
@ -5,7 +5,7 @@ Cc: Anna Schumaker <anna.schumaker@netapp.com>,
|
|||
linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org,
|
||||
tglx@linutronix.de
|
||||
Subject: NFSv4: replace seqcount_t with a seqlock_t
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
The raw_write_seqcount_begin() in nfs4_reclaim_open_state() bugs me
|
||||
because it maps to preempt_disable() in -RT which I can't have at this
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Sat, 27 May 2017 19:02:06 +0200
|
||||
Subject: kernel/sched/core: add migrate_disable()
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
---
|
||||
include/linux/preempt.h | 23 ++++++++
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Wed, 11 Oct 2017 17:43:49 +0200
|
||||
Subject: apparmor: use a locallock instead preempt_disable()
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
get_buffers() disables preemption which acts as a lock for the per-CPU
|
||||
variable. Since we can't disable preemption here on RT, a local_lock is
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Anders Roxell <anders.roxell@linaro.org>
|
||||
Date: Thu, 14 May 2015 17:52:17 +0200
|
||||
Subject: arch/arm64: Add lazy preempt support
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
arm64 is missing support for PREEMPT_RT. The main feature which is
|
||||
lacking is support for lazy preemption. The arch-specific entry code,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Frank Rowand <frank.rowand@am.sony.com>
|
||||
Date: Mon, 19 Sep 2011 14:51:14 -0700
|
||||
Subject: arm: Convert arm boot_lock to raw
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
The arm boot_lock is used by the secondary processor startup code. The locking
|
||||
task is the idle thread, which has idle->sched_class == &idle_sched_class.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Fri, 1 Dec 2017 10:42:03 +0100
|
||||
Subject: [PATCH] arm*: disable NEON in kernel mode
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
NEON in kernel mode is used by the crypto algorithms and raid6 code.
|
||||
While the raid6 code looks okay, the crypto algorithms do not: NEON
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: arm: Enable highmem for rt
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Wed, 13 Feb 2013 11:03:11 +0100
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
fixup highmem for ARM.
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Mon, 11 Mar 2013 21:37:27 +0100
|
||||
Subject: arm/highmem: Flush tlb on unmap
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
The tlb should be flushed on unmap and thus make the mapping entry
|
||||
invalid. This is only done in the non-debug case which does not look
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Thu, 22 Dec 2016 17:28:33 +0100
|
||||
Subject: [PATCH] arm: include definition for cpumask_t
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
This definition gets pulled in by other files. With the (later) split of
|
||||
RCU and spinlock.h it won't compile anymore.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Yang Shi <yang.shi@linaro.org>
|
||||
Date: Thu, 10 Nov 2016 16:17:55 -0800
|
||||
Subject: [PATCH] arm: kprobe: replace patch_lock to raw lock
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
When running kprobe on -rt kernel, the below bug is caught:
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: arm: Add support for lazy preemption
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Wed, 31 Oct 2012 12:04:11 +0100
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
Implement the arm pieces for lazy preempt.
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Fri, 20 Sep 2013 14:31:54 +0200
|
||||
Subject: arm/unwind: use a raw_spin_lock
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
Mostly unwind is done with irqs enabled however SLUB may call it with
|
||||
irqs disabled while creating a new SLUB cache.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Thu, 26 Jul 2018 09:13:42 +0200
|
||||
Subject: [PATCH] arm64: KVM: compute_layout before altenates are applied
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
compute_layout() is invoked as part of an alternative fixup under
|
||||
stop_machine() and needs a sleeping lock as part of get_random_long().
|
||||
|
|
|
@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|||
Date: Wed, 25 Jul 2018 14:02:38 +0200
|
||||
Subject: [PATCH] arm64: fpsimd: use preemp_disable in addition to
|
||||
local_bh_disable()
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
In v4.16-RT I noticed a number of warnings from task_fpsimd_load(). The
|
||||
code disables BH and expects that it is not preemptible. On -RT the
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Wed, 09 Mar 2016 10:51:06 +0100
|
||||
Subject: arm: at91: do not disable/enable clocks in a row
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
Currently the driver will disable the clock and enable it one line later
|
||||
if it is switching from periodic mode into one shot.
|
||||
|
|
|
@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|||
Date: Tue, 13 Mar 2018 13:49:16 +0100
|
||||
Subject: [PATCH] block: blk-mq: move blk_queue_usage_counter_release()
|
||||
into process context
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
| BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:914
|
||||
| in_atomic(): 1, irqs_disabled(): 0, pid: 255, name: kworker/u257:6
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Thu, 29 Jan 2015 15:10:08 +0100
|
||||
Subject: block/mq: don't complete requests via IPI
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
The IPI runs in hardirq context and there are sleeping locks. This patch
|
||||
moves the completion into a workqueue.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Tue, 14 Jul 2015 14:26:34 +0200
|
||||
Subject: block/mq: do not invoke preempt_disable()
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
preempt_disable() and get_cpu() don't play well together with the sleeping
|
||||
locks it tries to allocate later.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Wed, 9 Apr 2014 10:37:23 +0200
|
||||
Subject: block: mq: use cpu_light()
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
there is a might sleep splat because get_cpu() disables preemption and
|
||||
later we grab a lock. As a workaround for this we use get_cpu_light().
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: block: Use cpu_chill() for retry loops
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Thu, 20 Dec 2012 18:28:26 +0100
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
Retry loops on RT might loop forever when the modifying side was
|
||||
preempted. Steven also observed a live lock when there was a
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Tue, 3 Jul 2018 18:19:48 +0200
|
||||
Subject: [PATCH] cgroup: use irqsave in cgroup_rstat_flush_locked()
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
All callers of cgroup_rstat_flush_locked() acquire cgroup_rstat_lock
|
||||
either with spin_lock_irq() or spin_lock_irqsave().
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Fri, 13 Feb 2015 15:52:24 +0100
|
||||
Subject: cgroups: use simple wait in css_release()
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
To avoid:
|
||||
|BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:914
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Benedikt Spranger <b.spranger@linutronix.de>
|
||||
Date: Mon, 8 Mar 2010 18:57:04 +0100
|
||||
Subject: clocksource: TCLIB: Allow higher clock rates for clock events
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
As default the TCLIB uses the 32KiHz base clock rate for clock events.
|
||||
Add a compile time selection to allow higher clock resulution.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: completion: Use simple wait queues
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Fri, 11 Jan 2013 11:23:51 +0100
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
Completions have no long lasting callbacks and therefor do not need
|
||||
the complex waitqueue variant. Use simple waitqueues which reduces the
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: sched: Use the proper LOCK_OFFSET for cond_resched()
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Sun, 17 Jul 2011 22:51:33 +0200
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
RT does not increment preempt count when a 'sleeping' spinlock is
|
||||
locked. Update PREEMPT_LOCK_OFFSET for that case.
|
||||
|
|
|
@ -2,7 +2,7 @@ From: Mike Galbraith <umgwanakikbuti@gmail.com>
|
|||
Date: Sun, 16 Oct 2016 05:11:54 +0200
|
||||
Subject: [PATCH] connector/cn_proc: Protect send_msg() with a local lock
|
||||
on RT
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
|BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:931
|
||||
|in_atomic(): 1, irqs_disabled(): 0, pid: 31807, name: sleep
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
Subject: cpu/hotplug: Implement CPU pinning
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Wed, 19 Jul 2017 17:31:20 +0200
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
||||
---
|
||||
include/linux/sched.h | 1 +
|
||||
kernel/cpu.c | 40 ++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 41 insertions(+)
|
||||
kernel/cpu.c | 38 ++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 39 insertions(+)
|
||||
|
||||
--- a/include/linux/sched.h
|
||||
+++ b/include/linux/sched.h
|
||||
|
@ -33,14 +33,14 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|||
#if defined(CONFIG_LOCKDEP) && defined(CONFIG_SMP)
|
||||
static struct lockdep_map cpuhp_state_up_map =
|
||||
STATIC_LOCKDEP_MAP_INIT("cpuhp_state-up", &cpuhp_state_up_map);
|
||||
@@ -285,7 +290,30 @@ static int cpu_hotplug_disabled;
|
||||
@@ -285,7 +290,28 @@ static int cpu_hotplug_disabled;
|
||||
*/
|
||||
void pin_current_cpu(void)
|
||||
{
|
||||
+ struct rt_rw_lock *cpuhp_pin;
|
||||
+ unsigned int cpu;
|
||||
+ int ret;
|
||||
|
||||
+
|
||||
+again:
|
||||
+ cpuhp_pin = this_cpu_ptr(&cpuhp_pin_lock);
|
||||
+ ret = __read_rt_trylock(cpuhp_pin);
|
||||
|
@ -49,13 +49,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|||
+ return;
|
||||
+ }
|
||||
+ cpu = smp_processor_id();
|
||||
+ preempt_lazy_enable();
|
||||
+ preempt_enable();
|
||||
+
|
||||
+ __read_rt_lock(cpuhp_pin);
|
||||
+
|
||||
|
||||
+ preempt_disable();
|
||||
+ preempt_lazy_disable();
|
||||
+ if (cpu != smp_processor_id()) {
|
||||
+ __read_rt_unlock(cpuhp_pin);
|
||||
+ goto again;
|
||||
|
@ -64,7 +62,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|||
}
|
||||
|
||||
/**
|
||||
@@ -293,6 +321,13 @@ void pin_current_cpu(void)
|
||||
@@ -293,6 +319,13 @@ void pin_current_cpu(void)
|
||||
*/
|
||||
void unpin_current_cpu(void)
|
||||
{
|
||||
|
@ -78,7 +76,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|||
}
|
||||
|
||||
DEFINE_STATIC_PERCPU_RWSEM(cpu_hotplug_lock);
|
||||
@@ -846,6 +881,7 @@ static int take_cpu_down(void *_param)
|
||||
@@ -846,6 +879,7 @@ static int take_cpu_down(void *_param)
|
||||
|
||||
static int takedown_cpu(unsigned int cpu)
|
||||
{
|
||||
|
@ -86,7 +84,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|||
struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, cpu);
|
||||
int err;
|
||||
|
||||
@@ -858,11 +894,14 @@ static int takedown_cpu(unsigned int cpu
|
||||
@@ -858,11 +892,14 @@ static int takedown_cpu(unsigned int cpu
|
||||
*/
|
||||
irq_lock_sparse();
|
||||
|
||||
|
@ -101,7 +99,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|||
/* CPU refused to die */
|
||||
irq_unlock_sparse();
|
||||
/* Unpark the hotplug thread so we can rollback there */
|
||||
@@ -881,6 +920,7 @@ static int takedown_cpu(unsigned int cpu
|
||||
@@ -881,6 +918,7 @@ static int takedown_cpu(unsigned int cpu
|
||||
wait_for_ap_thread(st, false);
|
||||
BUG_ON(st->state != CPUHP_AP_IDLE_DEAD);
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Thu, 9 Apr 2015 15:23:01 +0200
|
||||
Subject: cpufreq: drop K8's driver from beeing selected
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
Ralf posted a picture of a backtrace from
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: cpumask: Disable CONFIG_CPUMASK_OFFSTACK for RT
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Wed, 14 Dec 2011 01:03:49 +0100
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
There are "valid" GFP_ATOMIC allocations such as
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Mike Galbraith <efault@gmx.de>
|
||||
Date: Sun, 8 Jan 2017 09:32:25 +0100
|
||||
Subject: [PATCH] cpuset: Convert callback_lock to raw_spinlock_t
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
The two commits below add up to a cpuset might_sleep() splat for RT:
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Fri, 21 Feb 2014 17:24:04 +0100
|
||||
Subject: crypto: Reduce preempt disabled regions, more algos
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
Don Estabrook reported
|
||||
| kernel: WARNING: CPU: 2 PID: 858 at kernel/sched/core.c:2428 migrate_disable+0xed/0x100()
|
||||
|
|
|
@ -0,0 +1,132 @@
|
|||
From: =?UTF-8?q?Horia=20Geant=C4=83?= <horia.geanta@nxp.com>
|
||||
Date: Mon, 8 Oct 2018 14:09:37 +0300
|
||||
Subject: [PATCH] crypto: caam/qi - simplify CGR allocation, freeing
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
[Upstream commit 29e83c757006fd751966bdc53392bb22d74179c6]
|
||||
|
||||
CGRs (Congestion Groups) have to be freed by the same CPU that
|
||||
initialized them.
|
||||
This is why currently the driver takes special measures; however, using
|
||||
set_cpus_allowed_ptr() is incorrect - as reported by Sebastian.
|
||||
|
||||
Instead of the generic solution of replacing set_cpus_allowed_ptr() with
|
||||
work_on_cpu_safe(), we use the qman_delete_cgr_safe() QBMan API instead
|
||||
of qman_delete_cgr() - which internally takes care of proper CGR
|
||||
deletion.
|
||||
|
||||
Link: https://lkml.kernel.org/r/20181005125443.dfhd2asqktm22ney@linutronix.de
|
||||
Reported-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
|
||||
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
||||
---
|
||||
drivers/crypto/caam/qi.c | 43 ++++---------------------------------------
|
||||
drivers/crypto/caam/qi.h | 2 +-
|
||||
2 files changed, 5 insertions(+), 40 deletions(-)
|
||||
|
||||
--- a/drivers/crypto/caam/qi.c
|
||||
+++ b/drivers/crypto/caam/qi.c
|
||||
@@ -84,13 +84,6 @@ static u64 times_congested;
|
||||
#endif
|
||||
|
||||
/*
|
||||
- * CPU from where the module initialised. This is required because QMan driver
|
||||
- * requires CGRs to be removed from same CPU from where they were originally
|
||||
- * allocated.
|
||||
- */
|
||||
-static int mod_init_cpu;
|
||||
-
|
||||
-/*
|
||||
* This is a a cache of buffers, from which the users of CAAM QI driver
|
||||
* can allocate short (CAAM_QI_MEMCACHE_SIZE) buffers. It's faster than
|
||||
* doing malloc on the hotpath.
|
||||
@@ -492,12 +485,11 @@ void caam_drv_ctx_rel(struct caam_drv_ct
|
||||
}
|
||||
EXPORT_SYMBOL(caam_drv_ctx_rel);
|
||||
|
||||
-int caam_qi_shutdown(struct device *qidev)
|
||||
+void caam_qi_shutdown(struct device *qidev)
|
||||
{
|
||||
- int i, ret;
|
||||
+ int i;
|
||||
struct caam_qi_priv *priv = dev_get_drvdata(qidev);
|
||||
const cpumask_t *cpus = qman_affine_cpus();
|
||||
- struct cpumask old_cpumask = current->cpus_allowed;
|
||||
|
||||
for_each_cpu(i, cpus) {
|
||||
struct napi_struct *irqtask;
|
||||
@@ -510,26 +502,12 @@ int caam_qi_shutdown(struct device *qide
|
||||
dev_err(qidev, "Rsp FQ kill failed, cpu: %d\n", i);
|
||||
}
|
||||
|
||||
- /*
|
||||
- * QMan driver requires CGRs to be deleted from same CPU from where they
|
||||
- * were instantiated. Hence we get the module removal execute from the
|
||||
- * same CPU from where it was originally inserted.
|
||||
- */
|
||||
- set_cpus_allowed_ptr(current, get_cpu_mask(mod_init_cpu));
|
||||
-
|
||||
- ret = qman_delete_cgr(&priv->cgr);
|
||||
- if (ret)
|
||||
- dev_err(qidev, "Deletion of CGR failed: %d\n", ret);
|
||||
- else
|
||||
- qman_release_cgrid(priv->cgr.cgrid);
|
||||
+ qman_delete_cgr_safe(&priv->cgr);
|
||||
+ qman_release_cgrid(priv->cgr.cgrid);
|
||||
|
||||
kmem_cache_destroy(qi_cache);
|
||||
|
||||
- /* Now that we're done with the CGRs, restore the cpus allowed mask */
|
||||
- set_cpus_allowed_ptr(current, &old_cpumask);
|
||||
-
|
||||
platform_device_unregister(priv->qi_pdev);
|
||||
- return ret;
|
||||
}
|
||||
|
||||
static void cgr_cb(struct qman_portal *qm, struct qman_cgr *cgr, int congested)
|
||||
@@ -718,22 +696,11 @@ int caam_qi_init(struct platform_device
|
||||
struct device *ctrldev = &caam_pdev->dev, *qidev;
|
||||
struct caam_drv_private *ctrlpriv;
|
||||
const cpumask_t *cpus = qman_affine_cpus();
|
||||
- struct cpumask old_cpumask = current->cpus_allowed;
|
||||
static struct platform_device_info qi_pdev_info = {
|
||||
.name = "caam_qi",
|
||||
.id = PLATFORM_DEVID_NONE
|
||||
};
|
||||
|
||||
- /*
|
||||
- * QMAN requires CGRs to be removed from same CPU+portal from where it
|
||||
- * was originally allocated. Hence we need to note down the
|
||||
- * initialisation CPU and use the same CPU for module exit.
|
||||
- * We select the first CPU to from the list of portal owning CPUs.
|
||||
- * Then we pin module init to this CPU.
|
||||
- */
|
||||
- mod_init_cpu = cpumask_first(cpus);
|
||||
- set_cpus_allowed_ptr(current, get_cpu_mask(mod_init_cpu));
|
||||
-
|
||||
qi_pdev_info.parent = ctrldev;
|
||||
qi_pdev_info.dma_mask = dma_get_mask(ctrldev);
|
||||
qi_pdev = platform_device_register_full(&qi_pdev_info);
|
||||
@@ -795,8 +762,6 @@ int caam_qi_init(struct platform_device
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
- /* Done with the CGRs; restore the cpus allowed mask */
|
||||
- set_cpus_allowed_ptr(current, &old_cpumask);
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
debugfs_create_file("qi_congested", 0444, ctrlpriv->ctl,
|
||||
×_congested, &caam_fops_u64_ro);
|
||||
--- a/drivers/crypto/caam/qi.h
|
||||
+++ b/drivers/crypto/caam/qi.h
|
||||
@@ -174,7 +174,7 @@ int caam_drv_ctx_update(struct caam_drv_
|
||||
void caam_drv_ctx_rel(struct caam_drv_ctx *drv_ctx);
|
||||
|
||||
int caam_qi_init(struct platform_device *pdev);
|
||||
-int caam_qi_shutdown(struct device *dev);
|
||||
+void caam_qi_shutdown(struct device *dev);
|
||||
|
||||
/**
|
||||
* qi_cache_alloc - Allocate buffers from CAAM-QI cache
|
|
@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|||
Date: Thu, 26 Jul 2018 18:52:00 +0200
|
||||
Subject: [PATCH] crypto: cryptd - add a lock instead
|
||||
preempt_disable/local_bh_disable
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
cryptd has a per-CPU lock which protected with local_bh_disable() and
|
||||
preempt_disable().
|
||||
|
|
|
@ -4,7 +4,7 @@ Subject: [PATCH] crypto: limit more FPU-enabled sections
|
|||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
Those crypto drivers use SSE/AVX/… for their crypto work and in order to
|
||||
do so in kernel they need to enable the "FPU" in kernel mode which
|
||||
|
|
|
@ -2,7 +2,7 @@ From: Mike Galbraith <efault@gmx.de>
|
|||
Date: Wed, 11 Jul 2018 17:14:47 +0200
|
||||
Subject: [PATCH] crypto: scompress - serialize RT percpu scratch buffer
|
||||
access with a local lock
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
| BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:974
|
||||
| in_atomic(): 1, irqs_disabled(): 0, pid: 1401, name: cryptomgr_test
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: debugobjects: Make RT aware
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Sun, 17 Jul 2011 21:41:35 +0200
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
Avoid filling the pool / allocating memory with irqs off().
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Tue, 27 Mar 2018 16:24:15 +0200
|
||||
Subject: [PATCH] dm rq: remove BUG_ON(!irqs_disabled) check
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
In commit 052189a2ec95 ("dm: remove superfluous irq disablement in
|
||||
dm_request_fn") the spin_lock_irq() was replaced with spin_lock() + a
|
||||
|
|
|
@ -2,7 +2,7 @@ From: Mike Galbraith <umgwanakikbuti@gmail.com>
|
|||
Date: Thu, 31 Mar 2016 04:08:28 +0200
|
||||
Subject: [PATCH] drivers/block/zram: Replace bit spinlocks with rtmutex
|
||||
for -rt
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
They're nondeterministic, and lead to ___might_sleep() splats in -rt.
|
||||
OTOH, they're a lot less wasteful than an rtmutex per page.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: tty/serial/omap: Make the locking RT aware
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Thu, 28 Jul 2011 13:32:57 +0200
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
The lock is a sleeping lock and local_irq_save() is not the
|
||||
optimsation we are looking for. Redo it to make it work on -RT and
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: tty/serial/pl011: Make the locking work on RT
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Tue, 08 Jan 2013 21:36:51 +0100
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
The lock is a sleeping lock and local_irq_save() is not the optimsation
|
||||
we are looking for. Redo it to make it work on -RT and non-RT.
|
||||
|
|
|
@ -2,7 +2,7 @@ From: Mike Galbraith <umgwanakikbuti@gmail.com>
|
|||
Date: Thu, 20 Oct 2016 11:15:22 +0200
|
||||
Subject: [PATCH] drivers/zram: Don't disable preemption in
|
||||
zcomp_stream_get/put()
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
In v4.7, the driver switched to percpu compression streams, disabling
|
||||
preemption via get/put_cpu_ptr(). Use a per-zcomp_strm lock here. We
|
||||
|
|
|
@ -2,7 +2,7 @@ From: Mike Galbraith <efault@gmx.de>
|
|||
Date: Wed, 23 Aug 2017 11:57:29 +0200
|
||||
Subject: [PATCH] drivers/zram: fix zcomp_stream_get() smp_processor_id() use
|
||||
in preemptible code
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
Use get_local_ptr() instead this_cpu_ptr() to avoid a warning regarding
|
||||
smp_processor_id() in preemptible code.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: drm,i915: Use local_lock/unlock_irq() in intel_pipe_update_start/end()
|
||||
From: Mike Galbraith <umgwanakikbuti@gmail.com>
|
||||
Date: Sat, 27 Feb 2016 09:01:42 +0100
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
|
||||
[ 8.014039] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:918
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: drm,radeon,i915: Use preempt_disable/enable_rt() where recommended
|
||||
From: Mike Galbraith <umgwanakikbuti@gmail.com>
|
||||
Date: Sat, 27 Feb 2016 08:09:11 +0100
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
DRM folks identified the spots, so use them.
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Thu, 26 Jul 2018 15:06:10 +0200
|
||||
Subject: [PATCH] efi: Allow efi=runtime
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
In case the option "efi=noruntime" is default at built-time, the user
|
||||
could overwrite its sate by `efi=runtime' and allow it again.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Thu, 26 Jul 2018 15:03:16 +0200
|
||||
Subject: [PATCH] efi: Disable runtime services on RT
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
Based on meassurements the EFI functions get_variable /
|
||||
get_next_variable take up to 2us which looks okay.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: fs/epoll: Do not disable preemption on RT
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Fri, 08 Jul 2011 16:35:35 +0200
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
ep_call_nested() takes a sleeping lock so we can't disable preemption.
|
||||
The light version is enough since ep_call_nested() doesn't mind beeing
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Mon, 16 Feb 2015 18:49:10 +0100
|
||||
Subject: fs/aio: simple simple work
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
|BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:768
|
||||
|in_atomic(): 1, irqs_disabled(): 0, pid: 26, name: rcuos/2
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Wed, 13 Sep 2017 12:32:34 +0200
|
||||
Subject: [PATCH] fs/dcache: bring back explicit INIT_HLIST_BL_HEAD init
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
Commit 3d375d78593c ("mm: update callers to use HASH_ZERO flag") removed
|
||||
INIT_HLIST_BL_HEAD and uses the ZERO flag instead for the init. However
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Fri, 20 Oct 2017 11:29:53 +0200
|
||||
Subject: [PATCH] fs/dcache: disable preemption on i_dir_seq's write side
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
i_dir_seq is an opencoded seqcounter. Based on the code it looks like we
|
||||
could have two writers in parallel despite the fact that the d_lock is
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: fs: dcache: Use cpu_chill() in trylock loops
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Wed, 07 Mar 2012 21:00:34 +0100
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
Retry loops on RT might loop forever when the modifying side was
|
||||
preempted. Use cpu_chill() instead of cpu_relax() to let the system
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Wed, 14 Sep 2016 14:35:49 +0200
|
||||
Subject: [PATCH] fs/dcache: use swait_queue instead of waitqueue
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
__d_lookup_done() invokes wake_up_all() while holding a hlist_bl_lock()
|
||||
which disables preemption. As a workaround convert it to swait.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Fri, 18 Mar 2011 10:11:25 +0100
|
||||
Subject: fs: jbd/jbd2: Make state lock and journal head lock rt safe
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
bit_spin_locks break under RT.
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Thu, 15 Sep 2016 10:51:27 +0200
|
||||
Subject: [PATCH] fs/nfs: turn rmdir_sem into a semaphore
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
The RW semaphore had a reader side which used the _non_owner version
|
||||
because it most likely took the reader lock in one thread and released it
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Fri, 18 Mar 2011 09:18:52 +0100
|
||||
Subject: buffer_head: Replace bh_uptodate_lock for -rt
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
Wrap the bit_spin_lock calls into a separate inline and add the RT
|
||||
replacements with a real spinlock.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Clark Williams <williams@redhat.com>
|
||||
Date: Tue, 3 Jul 2018 13:34:30 -0500
|
||||
Subject: [PATCH] fscache: initialize cookie hash table raw spinlocks
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
The fscache cookie mechanism uses a hash table of hlist_bl_head structures. The
|
||||
PREEMPT_RT patcheset adds a raw spinlock to this structure and so on PREEMPT_RT
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Mike Galbraith <umgwanakikbuti@gmail.com>
|
||||
Date: Sun, 16 Oct 2016 05:08:30 +0200
|
||||
Subject: [PATCH] ftrace: Fix trace header alignment
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
Line up helper arrows to the right column.
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Sun, 17 Jul 2011 21:56:42 +0200
|
||||
Subject: trace: Add migrate-disabled counter to tracing output
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
||||
---
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Fri, 1 Mar 2013 11:17:42 +0100
|
||||
Subject: futex: Ensure lock/unlock symetry versus pi_lock and hash bucket lock
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
In exit_pi_state_list() we have the following locking construct:
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Steven Rostedt <rostedt@goodmis.org>
|
||||
Date: Tue, 14 Jul 2015 14:26:34 +0200
|
||||
Subject: futex: Fix bug on when a requeued RT task times out
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
Requeue with timeout causes a bug with PREEMPT_RT_FULL.
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Wed, 8 Mar 2017 14:23:35 +0100
|
||||
Subject: [PATCH] futex: workaround migrate_disable/enable in different context
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
migrate_disable()/migrate_enable() takes a different path in atomic() vs
|
||||
!atomic() context. These little hacks ensure that we don't underflow / overflow
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Ingo Molnar <mingo@elte.hu>
|
||||
Date: Fri, 3 Jul 2009 08:29:57 -0500
|
||||
Subject: genirq: Disable irqpoll on -rt
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
Creates long latencies for no value
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Wed, 21 Aug 2013 17:48:46 +0200
|
||||
Subject: genirq: Do not invoke the affinity callback via a workqueue on RT
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
Joe Korty reported, that __irq_set_affinity_locked() schedules a
|
||||
workqueue while holding a rawlock which results in a might_sleep()
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: genirq: Force interrupt thread on RT
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Sun, 03 Apr 2011 11:57:29 +0200
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
Force threaded_irqs and optimize the code (force_irqthreads) in regard
|
||||
to this.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Josh Cartwright <joshc@ni.com>
|
||||
Date: Thu, 11 Feb 2016 11:54:00 -0600
|
||||
Subject: genirq: update irq_set_irqchip_state documentation
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
On -rt kernels, the use of migrate_disable()/migrate_enable() is
|
||||
sufficient to guarantee a task isn't moved to another CPU. Update the
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Fri, 4 Aug 2017 18:31:00 +0200
|
||||
Subject: [PATCH] hotplug: duct-tape RT-rwlock usage for non-RT
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
This type is only available on -RT. We need to craft something for
|
||||
non-RT. Since the only migrate_disable() user is -RT only, there is no
|
||||
|
@ -31,7 +31,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|||
struct rt_rw_lock *cpuhp_pin;
|
||||
unsigned int cpu;
|
||||
int ret;
|
||||
@@ -314,6 +315,7 @@ void pin_current_cpu(void)
|
||||
@@ -312,6 +313,7 @@ void pin_current_cpu(void)
|
||||
goto again;
|
||||
}
|
||||
current->pinned_on_cpu = cpu;
|
||||
|
@ -39,7 +39,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|||
}
|
||||
|
||||
/**
|
||||
@@ -321,6 +323,7 @@ void pin_current_cpu(void)
|
||||
@@ -319,6 +321,7 @@ void pin_current_cpu(void)
|
||||
*/
|
||||
void unpin_current_cpu(void)
|
||||
{
|
||||
|
@ -47,7 +47,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|||
struct rt_rw_lock *cpuhp_pin = this_cpu_ptr(&cpuhp_pin_lock);
|
||||
|
||||
if (WARN_ON(current->pinned_on_cpu != smp_processor_id()))
|
||||
@@ -328,6 +331,7 @@ void unpin_current_cpu(void)
|
||||
@@ -326,6 +329,7 @@ void unpin_current_cpu(void)
|
||||
|
||||
current->pinned_on_cpu = -1;
|
||||
__read_rt_unlock(cpuhp_pin);
|
||||
|
@ -55,7 +55,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|||
}
|
||||
|
||||
DEFINE_STATIC_PERCPU_RWSEM(cpu_hotplug_lock);
|
||||
@@ -881,7 +885,9 @@ static int take_cpu_down(void *_param)
|
||||
@@ -879,7 +883,9 @@ static int take_cpu_down(void *_param)
|
||||
|
||||
static int takedown_cpu(unsigned int cpu)
|
||||
{
|
||||
|
@ -65,7 +65,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|||
struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, cpu);
|
||||
int err;
|
||||
|
||||
@@ -894,14 +900,18 @@ static int takedown_cpu(unsigned int cpu
|
||||
@@ -892,14 +898,18 @@ static int takedown_cpu(unsigned int cpu
|
||||
*/
|
||||
irq_lock_sparse();
|
||||
|
||||
|
@ -84,7 +84,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|||
/* CPU refused to die */
|
||||
irq_unlock_sparse();
|
||||
/* Unpark the hotplug thread so we can rollback there */
|
||||
@@ -920,7 +930,9 @@ static int takedown_cpu(unsigned int cpu
|
||||
@@ -918,7 +928,9 @@ static int takedown_cpu(unsigned int cpu
|
||||
wait_for_ap_thread(st, false);
|
||||
BUG_ON(st->state != CPUHP_AP_IDLE_DEAD);
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: hotplug: Lightweight get online cpus
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Wed, 15 Jun 2011 12:36:06 +0200
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
get_online_cpus() is a heavy weight function which involves a global
|
||||
mutex. migrate_disable() wants a simpler construct which prevents only
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Yang Shi <yang.shi@windriver.com>
|
||||
Date: Mon, 16 Sep 2013 14:09:19 -0700
|
||||
Subject: hrtimer: Move schedule_work call to helper thread
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
When run ltp leapsec_timer test, the following call trace is caught:
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Fri, 3 Jul 2009 08:44:31 -0500
|
||||
Subject: hrtimer: by timers by default into the softirq context
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
We can't have hrtimers callbacks running in hardirq context on RT. Therefore
|
||||
the timers are deferred to the softirq context by default.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Tue, 3 Jul 2018 11:25:41 +0200
|
||||
Subject: [PATCH v2] hrtimer: consolidate hrtimer_init() + hrtimer_init_sleeper() calls
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
hrtimer_init_sleeper() calls require a prior initialisation of the
|
||||
hrtimer object with hrtimer_init(). Lets make the initialisation of
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Ingo Molnar <mingo@elte.hu>
|
||||
Date: Fri, 3 Jul 2009 08:29:34 -0500
|
||||
Subject: hrtimers: Prepare full preemption
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
Make cancellation of a running callback in softirq context safe
|
||||
against preemption.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: genirq: Allow disabling of softirq processing in irq thread context
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Tue, 31 Jan 2012 13:01:27 +0100
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
The processing of softirqs in irq thread context is a performance gain
|
||||
for the non-rt workloads of a system, but it's counterproductive for
|
||||
|
|
|
@ -2,7 +2,7 @@ From: Marc Zyngier <marc.zyngier@arm.com>
|
|||
Date: Fri, 27 Jul 2018 13:38:54 +0100
|
||||
Subject: [PATCH] irqchip/gic-v3-its: Move pending table allocation to init
|
||||
time
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
|
||||
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: irqwork: push most work into softirq context
|
||||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Tue, 23 Jun 2015 15:32:51 +0200
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
Initially we defered all irqwork into softirq because we didn't want the
|
||||
latency spikes if perf or another user was busy and delayed the RT task.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: jump-label: disable if stop_machine() is used
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Wed, 08 Jul 2015 17:14:48 +0200
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
Some architectures are using stop_machine() while switching the opcode which
|
||||
leads to latency spikes.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: kconfig: Disable config options which are not RT compatible
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Sun, 24 Jul 2011 12:11:43 +0200
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
Disable stuff which is known to have issues on RT
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Subject: kconfig: Add PREEMPT_RT_FULL
|
||||
From: Thomas Gleixner <tglx@linutronix.de>
|
||||
Date: Wed, 29 Jun 2011 14:58:57 +0200
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
Introduce the final symbol for PREEMPT_RT_FULL.
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Thu, 19 May 2016 17:45:27 +0200
|
||||
Subject: [PATCH] kernel/printk: Don't try to print from IRQ/NMI region
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
On -RT we try to acquire sleeping locks which might lead to warnings
|
||||
from lockdep or a warn_on() from spin_try_lock() (which is a rtmutex on
|
||||
|
|
|
@ -4,7 +4,7 @@ Subject: [PATCH] kernel: sched: Provide a pointer to the valid CPU mask
|
|||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
In commit 4b53a3412d66 ("sched/core: Remove the tsk_nr_cpus_allowed()
|
||||
wrapper") the tsk_nr_cpus_allowed() wrapper was removed. There was not
|
||||
|
|
|
@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|||
Date: Mon, 21 Nov 2016 19:31:08 +0100
|
||||
Subject: [PATCH] kernel/sched: move stack + kprobe clean up to
|
||||
__put_task_struct()
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
There is no need to free the stack before the task struct (except for reasons
|
||||
mentioned in commit 68f24b08ee89 ("sched/core: Free the stack early if
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Jason Wessel <jason.wessel@windriver.com>
|
||||
Date: Thu, 28 Jul 2011 12:42:23 -0500
|
||||
Subject: kgdb/serial: Short term workaround
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
On 07/27/2011 04:37 PM, Thomas Gleixner wrote:
|
||||
> - KGDB (not yet disabled) is reportedly unusable on -rt right now due
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Julia Cartwright <julia@ni.com>
|
||||
Date: Fri, 28 Sep 2018 21:03:51 +0000
|
||||
Subject: [PATCH] kthread: convert worker lock to raw spinlock
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
In order to enable the queuing of kthread work items from hardirq
|
||||
context even when PREEMPT_RT_FULL is enabled, convert the worker
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
||||
Date: Thu, 23 Jan 2014 14:45:59 +0100
|
||||
Subject: leds: trigger: disable CPU trigger on -RT
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19-rt1.tar.xz
|
||||
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.1-rt3.tar.xz
|
||||
|
||||
as it triggers:
|
||||
|CPU: 0 PID: 0 Comm: swapper Not tainted 3.12.8-rt10 #141
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue