[rt] Update to 4.19.31-rt18

This commit is contained in:
Ben Hutchings 2019-04-09 00:49:20 +01:00
parent 6fa9d66378
commit a0366b7dd1
269 changed files with 5048 additions and 2967 deletions

1
debian/changelog vendored
View File

@ -795,6 +795,7 @@ linux (4.19.34-1) UNRELEASED; urgency=medium
(Closes: #785065) (Closes: #785065)
* Bump ABI to 5 * Bump ABI to 5
* [rt] Add new signing subkey for Steven Rostedt * [rt] Add new signing subkey for Steven Rostedt
* [rt] Update to 4.19.31-rt18 (no functional change)
-- Ben Hutchings <ben@decadent.org.uk> Mon, 18 Mar 2019 22:50:08 +0000 -- Ben Hutchings <ben@decadent.org.uk> Mon, 18 Mar 2019 22:50:08 +0000

View File

@ -1,7 +1,8 @@
From a65d4f22e9030ffe94b74319c170821fb7bc2a81 Mon Sep 17 00:00:00 2001
From: Alexandre Belloni <alexandre.belloni@bootlin.com> From: Alexandre Belloni <alexandre.belloni@bootlin.com>
Date: Thu, 13 Sep 2018 13:30:18 +0200 Date: Thu, 13 Sep 2018 13:30:18 +0200
Subject: [PATCH 1/7] ARM: at91: add TCB registers definitions Subject: [PATCH 001/266] ARM: at91: add TCB registers definitions
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Add registers and bits definitions for the timer counter blocks found on Add registers and bits definitions for the timer counter blocks found on
Atmel ARM SoCs. Atmel ARM SoCs.
@ -11,10 +12,13 @@ Tested-by: Andras Szemzo <szemzo.andras@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
include/soc/at91/atmel_tcb.h | 183 +++++++++++++++++++++++++++++++++++++++++++ include/soc/at91/atmel_tcb.h | 183 +++++++++++++++++++++++++++++++++++
1 file changed, 183 insertions(+) 1 file changed, 183 insertions(+)
create mode 100644 include/soc/at91/atmel_tcb.h create mode 100644 include/soc/at91/atmel_tcb.h
diff --git a/include/soc/at91/atmel_tcb.h b/include/soc/at91/atmel_tcb.h
new file mode 100644
index 000000000000..657e234b1483
--- /dev/null --- /dev/null
+++ b/include/soc/at91/atmel_tcb.h +++ b/include/soc/at91/atmel_tcb.h
@@ -0,0 +1,183 @@ @@ -0,0 +1,183 @@
@ -201,3 +205,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+}; +};
+ +
+#endif /* __SOC_ATMEL_TCB_H */ +#endif /* __SOC_ATMEL_TCB_H */
--
2.20.1

View File

@ -1,8 +1,9 @@
From ec74d20d992913ef170482f3ad9afa7ddf59cdf4 Mon Sep 17 00:00:00 2001
From: Alexandre Belloni <alexandre.belloni@bootlin.com> From: Alexandre Belloni <alexandre.belloni@bootlin.com>
Date: Thu, 13 Sep 2018 13:30:19 +0200 Date: Thu, 13 Sep 2018 13:30:19 +0200
Subject: [PATCH 2/7] clocksource/drivers: Add a new driver for the Atmel ARM Subject: [PATCH 002/266] clocksource/drivers: Add a new driver for the Atmel
TC blocks ARM TC blocks
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Add a driver for the Atmel Timer Counter Blocks. This driver provides a Add a driver for the Atmel Timer Counter Blocks. This driver provides a
clocksource and two clockevent devices. clocksource and two clockevent devices.
@ -24,15 +25,17 @@ Tested-by: Andras Szemzo <szemzo.andras@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
drivers/clocksource/Kconfig | 8 drivers/clocksource/Kconfig | 8 +
drivers/clocksource/Makefile | 3 drivers/clocksource/Makefile | 3 +-
drivers/clocksource/timer-atmel-tcb.c | 410 ++++++++++++++++++++++++++++++++++ drivers/clocksource/timer-atmel-tcb.c | 410 ++++++++++++++++++++++++++
3 files changed, 420 insertions(+), 1 deletion(-) 3 files changed, 420 insertions(+), 1 deletion(-)
create mode 100644 drivers/clocksource/timer-atmel-tcb.c create mode 100644 drivers/clocksource/timer-atmel-tcb.c
diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index c1ddafa4c299..c5a5ad4e22e7 100644
--- a/drivers/clocksource/Kconfig --- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig +++ b/drivers/clocksource/Kconfig
@@ -404,6 +404,14 @@ config ATMEL_ST @@ -414,6 +414,14 @@ config ATMEL_ST
help help
Support for the Atmel ST timer. Support for the Atmel ST timer.
@ -47,6 +50,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
config CLKSRC_EXYNOS_MCT config CLKSRC_EXYNOS_MCT
bool "Exynos multi core timer driver" if COMPILE_TEST bool "Exynos multi core timer driver" if COMPILE_TEST
depends on ARM || ARM64 depends on ARM || ARM64
diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile
index db51b2427e8a..0df9384a1230 100644
--- a/drivers/clocksource/Makefile --- a/drivers/clocksource/Makefile
+++ b/drivers/clocksource/Makefile +++ b/drivers/clocksource/Makefile
@@ -3,7 +3,8 @@ obj-$(CONFIG_TIMER_OF) += timer-of.o @@ -3,7 +3,8 @@ obj-$(CONFIG_TIMER_OF) += timer-of.o
@ -59,6 +64,9 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
obj-$(CONFIG_X86_PM_TIMER) += acpi_pm.o obj-$(CONFIG_X86_PM_TIMER) += acpi_pm.o
obj-$(CONFIG_SCx200HR_TIMER) += scx200_hrt.o obj-$(CONFIG_SCx200HR_TIMER) += scx200_hrt.o
obj-$(CONFIG_CS5535_CLOCK_EVENT_SRC) += cs5535-clockevt.o obj-$(CONFIG_CS5535_CLOCK_EVENT_SRC) += cs5535-clockevt.o
diff --git a/drivers/clocksource/timer-atmel-tcb.c b/drivers/clocksource/timer-atmel-tcb.c
new file mode 100644
index 000000000000..21fbe430f91b
--- /dev/null --- /dev/null
+++ b/drivers/clocksource/timer-atmel-tcb.c +++ b/drivers/clocksource/timer-atmel-tcb.c
@@ -0,0 +1,410 @@ @@ -0,0 +1,410 @@
@ -472,3 +480,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+ bits); + bits);
+} +}
+TIMER_OF_DECLARE(atmel_tcb_clksrc, "atmel,tcb-timer", tcb_clksrc_init); +TIMER_OF_DECLARE(atmel_tcb_clksrc, "atmel,tcb-timer", tcb_clksrc_init);
--
2.20.1

View File

@ -1,8 +1,9 @@
From f303771b4daf883ace6cfd76268c38b280178d47 Mon Sep 17 00:00:00 2001
From: Alexandre Belloni <alexandre.belloni@bootlin.com> From: Alexandre Belloni <alexandre.belloni@bootlin.com>
Date: Thu, 13 Sep 2018 13:30:20 +0200 Date: Thu, 13 Sep 2018 13:30:20 +0200
Subject: [PATCH 3/7] clocksource/drivers: timer-atmel-tcb: add clockevent Subject: [PATCH 003/266] clocksource/drivers: timer-atmel-tcb: add clockevent
device on separate channel device on separate channel
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Add an other clockevent device that uses a separate TCB channel when Add an other clockevent device that uses a separate TCB channel when
available. available.
@ -10,9 +11,11 @@ available.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
drivers/clocksource/timer-atmel-tcb.c | 217 +++++++++++++++++++++++++++++++++- drivers/clocksource/timer-atmel-tcb.c | 217 +++++++++++++++++++++++++-
1 file changed, 212 insertions(+), 5 deletions(-) 1 file changed, 212 insertions(+), 5 deletions(-)
diff --git a/drivers/clocksource/timer-atmel-tcb.c b/drivers/clocksource/timer-atmel-tcb.c
index 21fbe430f91b..63ce3b69338a 100644
--- a/drivers/clocksource/timer-atmel-tcb.c --- a/drivers/clocksource/timer-atmel-tcb.c
+++ b/drivers/clocksource/timer-atmel-tcb.c +++ b/drivers/clocksource/timer-atmel-tcb.c
@@ -32,7 +32,7 @@ struct atmel_tcb_clksrc { @@ -32,7 +32,7 @@ struct atmel_tcb_clksrc {
@ -24,10 +27,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
static struct clk *tcb_clk_get(struct device_node *node, int channel) static struct clk *tcb_clk_get(struct device_node *node, int channel)
{ {
@@ -48,6 +48,203 @@ static struct clk *tcb_clk_get(struct de @@ -47,6 +47,203 @@ static struct clk *tcb_clk_get(struct device_node *node, int channel)
return of_clk_get_by_name(node->parent, "t0_clk");
} }
/* +/*
+ * Clockevent device using its own channel + * Clockevent device using its own channel
+ */ + */
+ +
@ -224,11 +228,10 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+ return ret; + return ret;
+} +}
+ +
+/* /*
* Clocksource and clockevent using the same channel(s) * 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 device_node *node)
@@ -363,7 +560,7 @@ static int __init tcb_clksrc_init(struct
int irq, err, chan1 = -1; int irq, err, chan1 = -1;
unsigned bits; unsigned bits;
@ -237,7 +240,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return -ENODEV; return -ENODEV;
/* /*
@@ -395,12 +592,22 @@ static int __init tcb_clksrc_init(struct @@ -395,12 +592,22 @@ static int __init tcb_clksrc_init(struct device_node *node)
return irq; return irq;
} }
@ -263,3 +266,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
} }
--
2.20.1

View File

@ -1,7 +1,8 @@
From 89b749f497d850591d338a05290961a95c9a1e9e Mon Sep 17 00:00:00 2001
From: Alexandre Belloni <alexandre.belloni@bootlin.com> From: Alexandre Belloni <alexandre.belloni@bootlin.com>
Date: Thu, 13 Sep 2018 13:30:21 +0200 Date: Thu, 13 Sep 2018 13:30:21 +0200
Subject: [PATCH 4/7] clocksource/drivers: atmel-pit: make option silent Subject: [PATCH 004/266] clocksource/drivers: atmel-pit: make option silent
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
To conform with the other option, make the ATMEL_PIT option silent so it To conform with the other option, make the ATMEL_PIT option silent so it
can be selected from the platform can be selected from the platform
@ -10,12 +11,14 @@ Tested-by: Alexander Dahl <ada@thorsis.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
drivers/clocksource/Kconfig | 5 ++++- drivers/clocksource/Kconfig | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-) 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index c5a5ad4e22e7..076aa8184961 100644
--- a/drivers/clocksource/Kconfig --- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig +++ b/drivers/clocksource/Kconfig
@@ -393,8 +393,11 @@ config ARMV7M_SYSTICK @@ -403,8 +403,11 @@ config ARMV7M_SYSTICK
This options enables support for the ARMv7M system timer unit This options enables support for the ARMv7M system timer unit
config ATMEL_PIT config ATMEL_PIT
@ -28,3 +31,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
config ATMEL_ST config ATMEL_ST
bool "Atmel ST timer support" if COMPILE_TEST bool "Atmel ST timer support" if COMPILE_TEST
--
2.20.1

View File

@ -1,7 +1,8 @@
From c508ebe2604e0acd904da4940c042924ed2f19a8 Mon Sep 17 00:00:00 2001
From: Alexandre Belloni <alexandre.belloni@bootlin.com> From: Alexandre Belloni <alexandre.belloni@bootlin.com>
Date: Thu, 13 Sep 2018 13:30:22 +0200 Date: Thu, 13 Sep 2018 13:30:22 +0200
Subject: [PATCH 5/7] ARM: at91: Implement clocksource selection Subject: [PATCH 005/266] ARM: at91: Implement clocksource selection
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Allow selecting and unselecting the PIT clocksource driver so it doesn't Allow selecting and unselecting the PIT clocksource driver so it doesn't
have to be compile when unused. have to be compile when unused.
@ -10,9 +11,11 @@ Tested-by: Alexander Dahl <ada@thorsis.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
arch/arm/mach-at91/Kconfig | 25 +++++++++++++++++++++++++ arch/arm/mach-at91/Kconfig | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+) 1 file changed, 25 insertions(+)
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index 903f23c309df..fa493a86e2bb 100644
--- a/arch/arm/mach-at91/Kconfig --- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig
@@ -107,6 +107,31 @@ config SOC_AT91SAM9 @@ -107,6 +107,31 @@ config SOC_AT91SAM9
@ -47,3 +50,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
config HAVE_AT91_UTMI config HAVE_AT91_UTMI
bool bool
--
2.20.1

View File

@ -1,7 +1,8 @@
From d8964bb5d00d91ccdd8e3cd971ccb9e13dff91b4 Mon Sep 17 00:00:00 2001
From: Alexandre Belloni <alexandre.belloni@bootlin.com> From: Alexandre Belloni <alexandre.belloni@bootlin.com>
Date: Thu, 13 Sep 2018 13:30:23 +0200 Date: Thu, 13 Sep 2018 13:30:23 +0200
Subject: [PATCH 6/7] ARM: configs: at91: use new TCB timer driver Subject: [PATCH 006/266] ARM: configs: at91: use new TCB timer driver
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Unselecting ATMEL_TCLIB switches the TCB timer driver from tcb_clksrc to Unselecting ATMEL_TCLIB switches the TCB timer driver from tcb_clksrc to
timer-atmel-tcb. timer-atmel-tcb.
@ -9,10 +10,12 @@ timer-atmel-tcb.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
arch/arm/configs/at91_dt_defconfig | 1 - arch/arm/configs/at91_dt_defconfig | 1 -
arch/arm/configs/sama5_defconfig | 1 - arch/arm/configs/sama5_defconfig | 1 -
2 files changed, 2 deletions(-) 2 files changed, 2 deletions(-)
diff --git a/arch/arm/configs/at91_dt_defconfig b/arch/arm/configs/at91_dt_defconfig
index e4b1be66b3f5..09f262e59fef 100644
--- a/arch/arm/configs/at91_dt_defconfig --- a/arch/arm/configs/at91_dt_defconfig
+++ b/arch/arm/configs/at91_dt_defconfig +++ b/arch/arm/configs/at91_dt_defconfig
@@ -64,7 +64,6 @@ CONFIG_BLK_DEV_LOOP=y @@ -64,7 +64,6 @@ CONFIG_BLK_DEV_LOOP=y
@ -23,6 +26,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
CONFIG_ATMEL_SSC=y CONFIG_ATMEL_SSC=y
CONFIG_SCSI=y CONFIG_SCSI=y
CONFIG_BLK_DEV_SD=y CONFIG_BLK_DEV_SD=y
diff --git a/arch/arm/configs/sama5_defconfig b/arch/arm/configs/sama5_defconfig
index 2080025556b5..f2bbc6339ca6 100644
--- a/arch/arm/configs/sama5_defconfig --- a/arch/arm/configs/sama5_defconfig
+++ b/arch/arm/configs/sama5_defconfig +++ b/arch/arm/configs/sama5_defconfig
@@ -75,7 +75,6 @@ CONFIG_BLK_DEV_LOOP=y @@ -75,7 +75,6 @@ CONFIG_BLK_DEV_LOOP=y
@ -33,3 +38,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
CONFIG_ATMEL_SSC=y CONFIG_ATMEL_SSC=y
CONFIG_EEPROM_AT24=y CONFIG_EEPROM_AT24=y
CONFIG_SCSI=y CONFIG_SCSI=y
--
2.20.1

View File

@ -1,7 +1,8 @@
From bc6d50051826beac487e82f8187a8ef8e43f04df Mon Sep 17 00:00:00 2001
From: Alexandre Belloni <alexandre.belloni@bootlin.com> From: Alexandre Belloni <alexandre.belloni@bootlin.com>
Date: Thu, 13 Sep 2018 13:30:24 +0200 Date: Thu, 13 Sep 2018 13:30:24 +0200
Subject: [PATCH 7/7] ARM: configs: at91: unselect PIT Subject: [PATCH 007/266] ARM: configs: at91: unselect PIT
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
The PIT is not required anymore to successfully boot and may actually harm 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. in case preempt-rt is used because the PIT interrupt is shared.
@ -10,10 +11,12 @@ Disable it so the TCB clocksource is used.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
arch/arm/configs/at91_dt_defconfig | 1 + arch/arm/configs/at91_dt_defconfig | 1 +
arch/arm/configs/sama5_defconfig | 1 + arch/arm/configs/sama5_defconfig | 1 +
2 files changed, 2 insertions(+) 2 files changed, 2 insertions(+)
diff --git a/arch/arm/configs/at91_dt_defconfig b/arch/arm/configs/at91_dt_defconfig
index 09f262e59fef..f4b253bd05ed 100644
--- a/arch/arm/configs/at91_dt_defconfig --- a/arch/arm/configs/at91_dt_defconfig
+++ b/arch/arm/configs/at91_dt_defconfig +++ b/arch/arm/configs/at91_dt_defconfig
@@ -19,6 +19,7 @@ CONFIG_ARCH_MULTI_V5=y @@ -19,6 +19,7 @@ CONFIG_ARCH_MULTI_V5=y
@ -24,6 +27,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
CONFIG_AEABI=y CONFIG_AEABI=y
CONFIG_UACCESS_WITH_MEMCPY=y CONFIG_UACCESS_WITH_MEMCPY=y
CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_TEXT=0x0
diff --git a/arch/arm/configs/sama5_defconfig b/arch/arm/configs/sama5_defconfig
index f2bbc6339ca6..be92871ab155 100644
--- a/arch/arm/configs/sama5_defconfig --- a/arch/arm/configs/sama5_defconfig
+++ b/arch/arm/configs/sama5_defconfig +++ b/arch/arm/configs/sama5_defconfig
@@ -20,6 +20,7 @@ CONFIG_ARCH_AT91=y @@ -20,6 +20,7 @@ CONFIG_ARCH_AT91=y
@ -34,3 +39,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
CONFIG_AEABI=y CONFIG_AEABI=y
CONFIG_UACCESS_WITH_MEMCPY=y CONFIG_UACCESS_WITH_MEMCPY=y
CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_TEXT=0x0
--
2.20.1

View File

@ -1,16 +1,19 @@
From 63b24725baf9adfb75e97b162a7ed52025e132bb Mon Sep 17 00:00:00 2001
From: Marc Zyngier <marc.zyngier@arm.com> From: Marc Zyngier <marc.zyngier@arm.com>
Date: Fri, 27 Jul 2018 13:38:54 +0100 Date: Fri, 27 Jul 2018 13:38:54 +0100
Subject: [PATCH] irqchip/gic-v3-its: Move pending table allocation to init Subject: [PATCH 008/266] irqchip/gic-v3-its: Move pending table allocation to
time init time
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
drivers/irqchip/irq-gic-v3-its.c | 80 ++++++++++++++++++++++++------------- drivers/irqchip/irq-gic-v3-its.c | 80 +++++++++++++++++++-----------
include/linux/irqchip/arm-gic-v3.h | 1 include/linux/irqchip/arm-gic-v3.h | 1 +
2 files changed, 53 insertions(+), 28 deletions(-) 2 files changed, 53 insertions(+), 28 deletions(-)
diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index 78970cdf2ef6..163cef00a033 100644
--- a/drivers/irqchip/irq-gic-v3-its.c --- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -179,6 +179,7 @@ static DEFINE_RAW_SPINLOCK(vmovp_lock); @@ -179,6 +179,7 @@ static DEFINE_RAW_SPINLOCK(vmovp_lock);
@ -21,7 +24,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
#define gic_data_rdist_rd_base() (gic_data_rdist()->rd_base) #define gic_data_rdist_rd_base() (gic_data_rdist()->rd_base)
#define gic_data_rdist_vlpi_base() (gic_data_rdist_rd_base() + SZ_128K) #define gic_data_rdist_vlpi_base() (gic_data_rdist_rd_base() + SZ_128K)
@@ -1628,7 +1629,7 @@ static void its_free_prop_table(struct p @@ -1631,7 +1632,7 @@ static void its_free_prop_table(struct page *prop_page)
get_order(LPI_PROPBASE_SZ)); get_order(LPI_PROPBASE_SZ));
} }
@ -30,8 +33,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
{ {
phys_addr_t paddr; phys_addr_t paddr;
@@ -1951,30 +1952,47 @@ static void its_free_pending_table(struc @@ -1979,30 +1980,47 @@ static u64 its_clear_vpend_valid(void __iomem *vlpi_base)
get_order(max_t(u32, LPI_PENDBASE_SZ, SZ_64K))); return val;
} }
-static void its_cpu_init_lpis(void) -static void its_cpu_init_lpis(void)
@ -93,7 +96,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* set PROPBASE */ /* set PROPBASE */
val = (page_to_phys(gic_rdists->prop_page) | val = (page_to_phys(gic_rdists->prop_page) |
GICR_PROPBASER_InnerShareable | GICR_PROPBASER_InnerShareable |
@@ -2026,6 +2044,10 @@ static void its_cpu_init_lpis(void) @@ -2078,6 +2096,10 @@ static void its_cpu_init_lpis(void)
/* Make sure the GIC has seen the above */ /* Make sure the GIC has seen the above */
dsb(sy); dsb(sy);
@ -104,7 +107,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
static void its_cpu_init_collection(struct its_node *its) static void its_cpu_init_collection(struct its_node *its)
@@ -3521,16 +3543,6 @@ static int redist_disable_lpis(void) @@ -3558,16 +3580,6 @@ static int redist_disable_lpis(void)
u64 timeout = USEC_PER_SEC; u64 timeout = USEC_PER_SEC;
u64 val; u64 val;
@ -121,7 +124,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (!gic_rdists_supports_plpis()) { if (!gic_rdists_supports_plpis()) {
pr_info("CPU%d: LPIs not supported\n", smp_processor_id()); pr_info("CPU%d: LPIs not supported\n", smp_processor_id());
return -ENXIO; return -ENXIO;
@@ -3540,7 +3552,18 @@ static int redist_disable_lpis(void) @@ -3577,7 +3589,18 @@ static int redist_disable_lpis(void)
if (!(val & GICR_CTLR_ENABLE_LPIS)) if (!(val & GICR_CTLR_ENABLE_LPIS))
return 0; return 0;
@ -141,7 +144,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
smp_processor_id()); smp_processor_id());
add_taint(TAINT_CRAP, LOCKDEP_STILL_OK); add_taint(TAINT_CRAP, LOCKDEP_STILL_OK);
@@ -3796,7 +3819,8 @@ int __init its_init(struct fwnode_handle @@ -3833,7 +3856,8 @@ int __init its_init(struct fwnode_handle *handle, struct rdists *rdists,
} }
gic_rdists = rdists; gic_rdists = rdists;
@ -151,6 +154,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (err) if (err)
return err; return err;
diff --git a/include/linux/irqchip/arm-gic-v3.h b/include/linux/irqchip/arm-gic-v3.h
index 3188c0bef3e7..5b57501fd2e7 100644
--- a/include/linux/irqchip/arm-gic-v3.h --- a/include/linux/irqchip/arm-gic-v3.h
+++ b/include/linux/irqchip/arm-gic-v3.h +++ b/include/linux/irqchip/arm-gic-v3.h
@@ -585,6 +585,7 @@ struct rdists { @@ -585,6 +585,7 @@ struct rdists {
@ -161,3 +166,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} __percpu *rdist; } __percpu *rdist;
struct page *prop_page; struct page *prop_page;
u64 flags; u64 flags;
--
2.20.1

View File

@ -1,7 +1,8 @@
From 67a71e8bdd5bed22f28763f05687dc8afe3d028e Mon Sep 17 00:00:00 2001
From: Julia Cartwright <julia@ni.com> From: Julia Cartwright <julia@ni.com>
Date: Fri, 28 Sep 2018 21:03:51 +0000 Date: Fri, 28 Sep 2018 21:03:51 +0000
Subject: [PATCH] kthread: convert worker lock to raw spinlock Subject: [PATCH 009/266] kthread: convert worker lock to raw spinlock
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
In order to enable the queuing of kthread work items from hardirq In order to enable the queuing of kthread work items from hardirq
context even when PREEMPT_RT_FULL is enabled, convert the worker context even when PREEMPT_RT_FULL is enabled, convert the worker
@ -17,10 +18,12 @@ Reported-by: Tim Sander <tim@krieglstein.org>
Signed-off-by: Julia Cartwright <julia@ni.com> Signed-off-by: Julia Cartwright <julia@ni.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
include/linux/kthread.h | 2 +- include/linux/kthread.h | 2 +-
kernel/kthread.c | 42 +++++++++++++++++++++--------------------- kernel/kthread.c | 42 ++++++++++++++++++++---------------------
2 files changed, 22 insertions(+), 22 deletions(-) 2 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/include/linux/kthread.h b/include/linux/kthread.h
index c1961761311d..ad292898f7f2 100644
--- a/include/linux/kthread.h --- a/include/linux/kthread.h
+++ b/include/linux/kthread.h +++ b/include/linux/kthread.h
@@ -85,7 +85,7 @@ enum { @@ -85,7 +85,7 @@ enum {
@ -32,9 +35,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
struct list_head work_list; struct list_head work_list;
struct list_head delayed_work_list; struct list_head delayed_work_list;
struct task_struct *task; struct task_struct *task;
diff --git a/kernel/kthread.c b/kernel/kthread.c
index 087d18d771b5..5641b55783a6 100644
--- a/kernel/kthread.c --- a/kernel/kthread.c
+++ b/kernel/kthread.c +++ b/kernel/kthread.c
@@ -599,7 +599,7 @@ void __kthread_init_worker(struct kthrea @@ -599,7 +599,7 @@ void __kthread_init_worker(struct kthread_worker *worker,
struct lock_class_key *key) struct lock_class_key *key)
{ {
memset(worker, 0, sizeof(struct kthread_worker)); memset(worker, 0, sizeof(struct kthread_worker));
@ -69,7 +74,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (work) { if (work) {
__set_current_state(TASK_RUNNING); __set_current_state(TASK_RUNNING);
@@ -812,12 +812,12 @@ bool kthread_queue_work(struct kthread_w @@ -812,12 +812,12 @@ bool kthread_queue_work(struct kthread_worker *worker,
bool ret = false; bool ret = false;
unsigned long flags; unsigned long flags;
@ -84,7 +89,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return ret; return ret;
} }
EXPORT_SYMBOL_GPL(kthread_queue_work); EXPORT_SYMBOL_GPL(kthread_queue_work);
@@ -843,7 +843,7 @@ void kthread_delayed_work_timer_fn(struc @@ -843,7 +843,7 @@ void kthread_delayed_work_timer_fn(struct timer_list *t)
if (WARN_ON_ONCE(!worker)) if (WARN_ON_ONCE(!worker))
return; return;
@ -93,7 +98,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* Work must not be used with >1 worker, see kthread_queue_work(). */ /* Work must not be used with >1 worker, see kthread_queue_work(). */
WARN_ON_ONCE(work->worker != worker); WARN_ON_ONCE(work->worker != worker);
@@ -852,7 +852,7 @@ void kthread_delayed_work_timer_fn(struc @@ -852,7 +852,7 @@ void kthread_delayed_work_timer_fn(struct timer_list *t)
list_del_init(&work->node); list_del_init(&work->node);
kthread_insert_work(worker, work, &worker->work_list); kthread_insert_work(worker, work, &worker->work_list);
@ -102,7 +107,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
EXPORT_SYMBOL(kthread_delayed_work_timer_fn); EXPORT_SYMBOL(kthread_delayed_work_timer_fn);
@@ -908,14 +908,14 @@ bool kthread_queue_delayed_work(struct k @@ -908,14 +908,14 @@ bool kthread_queue_delayed_work(struct kthread_worker *worker,
unsigned long flags; unsigned long flags;
bool ret = false; bool ret = false;
@ -119,7 +124,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return ret; return ret;
} }
EXPORT_SYMBOL_GPL(kthread_queue_delayed_work); EXPORT_SYMBOL_GPL(kthread_queue_delayed_work);
@@ -951,7 +951,7 @@ void kthread_flush_work(struct kthread_w @@ -951,7 +951,7 @@ void kthread_flush_work(struct kthread_work *work)
if (!worker) if (!worker)
return; return;
@ -128,7 +133,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* Work must not be used with >1 worker, see kthread_queue_work(). */ /* Work must not be used with >1 worker, see kthread_queue_work(). */
WARN_ON_ONCE(work->worker != worker); WARN_ON_ONCE(work->worker != worker);
@@ -963,7 +963,7 @@ void kthread_flush_work(struct kthread_w @@ -963,7 +963,7 @@ void kthread_flush_work(struct kthread_work *work)
else else
noop = true; noop = true;
@ -137,7 +142,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (!noop) if (!noop)
wait_for_completion(&fwork.done); wait_for_completion(&fwork.done);
@@ -996,9 +996,9 @@ static bool __kthread_cancel_work(struct @@ -996,9 +996,9 @@ static bool __kthread_cancel_work(struct kthread_work *work, bool is_dwork,
* any queuing is blocked by setting the canceling counter. * any queuing is blocked by setting the canceling counter.
*/ */
work->canceling++; work->canceling++;
@ -149,7 +154,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
work->canceling--; work->canceling--;
} }
@@ -1045,7 +1045,7 @@ bool kthread_mod_delayed_work(struct kth @@ -1045,7 +1045,7 @@ bool kthread_mod_delayed_work(struct kthread_worker *worker,
unsigned long flags; unsigned long flags;
int ret = false; int ret = false;
@ -158,7 +163,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* Do not bother with canceling when never queued. */ /* Do not bother with canceling when never queued. */
if (!work->worker) if (!work->worker)
@@ -1062,7 +1062,7 @@ bool kthread_mod_delayed_work(struct kth @@ -1062,7 +1062,7 @@ bool kthread_mod_delayed_work(struct kthread_worker *worker,
fast_queue: fast_queue:
__kthread_queue_delayed_work(worker, dwork, delay); __kthread_queue_delayed_work(worker, dwork, delay);
out: out:
@ -167,7 +172,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return ret; return ret;
} }
EXPORT_SYMBOL_GPL(kthread_mod_delayed_work); EXPORT_SYMBOL_GPL(kthread_mod_delayed_work);
@@ -1076,7 +1076,7 @@ static bool __kthread_cancel_work_sync(s @@ -1076,7 +1076,7 @@ static bool __kthread_cancel_work_sync(struct kthread_work *work, bool is_dwork)
if (!worker) if (!worker)
goto out; goto out;
@ -176,7 +181,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* Work must not be used with >1 worker, see kthread_queue_work(). */ /* Work must not be used with >1 worker, see kthread_queue_work(). */
WARN_ON_ONCE(work->worker != worker); WARN_ON_ONCE(work->worker != worker);
@@ -1090,13 +1090,13 @@ static bool __kthread_cancel_work_sync(s @@ -1090,13 +1090,13 @@ static bool __kthread_cancel_work_sync(struct kthread_work *work, bool is_dwork)
* In the meantime, block any queuing by setting the canceling counter. * In the meantime, block any queuing by setting the canceling counter.
*/ */
work->canceling++; work->canceling++;
@ -193,3 +198,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
out: out:
return ret; return ret;
} }
--
2.20.1

View File

@ -1,10 +1,11 @@
From b4cb1ff0cceb0ca014a49e47cb93a112574e6339 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Horia=20Geant=C4=83?= <horia.geanta@nxp.com> From: =?UTF-8?q?Horia=20Geant=C4=83?= <horia.geanta@nxp.com>
Date: Mon, 8 Oct 2018 14:09:37 +0300 Date: Mon, 8 Oct 2018 14:09:37 +0300
Subject: [PATCH] crypto: caam/qi - simplify CGR allocation, freeing Subject: [PATCH 010/266] crypto: caam/qi - simplify CGR allocation, freeing
MIME-Version: 1.0 MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit Content-Transfer-Encoding: 8bit
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
[Upstream commit 29e83c757006fd751966bdc53392bb22d74179c6] [Upstream commit 29e83c757006fd751966bdc53392bb22d74179c6]
@ -23,27 +24,29 @@ Reported-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Horia Geantă <horia.geanta@nxp.com> Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
--- ---
drivers/crypto/caam/qi.c | 43 ++++--------------------------------------- drivers/crypto/caam/qi.c | 43 ++++------------------------------------
drivers/crypto/caam/qi.h | 2 +- drivers/crypto/caam/qi.h | 2 +-
2 files changed, 5 insertions(+), 40 deletions(-) 2 files changed, 5 insertions(+), 40 deletions(-)
diff --git a/drivers/crypto/caam/qi.c b/drivers/crypto/caam/qi.c
index 67f7f8c42c93..b84e6c8b1e13 100644
--- a/drivers/crypto/caam/qi.c --- a/drivers/crypto/caam/qi.c
+++ b/drivers/crypto/caam/qi.c +++ b/drivers/crypto/caam/qi.c
@@ -84,13 +84,6 @@ static u64 times_congested; @@ -83,13 +83,6 @@ EXPORT_SYMBOL(caam_congested);
static u64 times_congested;
#endif #endif
/* -/*
- * CPU from where the module initialised. This is required because QMan driver - * 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 - * requires CGRs to be removed from same CPU from where they were originally
- * allocated. - * allocated.
- */ - */
-static int mod_init_cpu; -static int mod_init_cpu;
- -
-/* /*
* This is a a cache of buffers, from which the users of CAAM QI driver * 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 * 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_ctx *drv_ctx)
@@ -492,12 +485,11 @@ void caam_drv_ctx_rel(struct caam_drv_ct
} }
EXPORT_SYMBOL(caam_drv_ctx_rel); EXPORT_SYMBOL(caam_drv_ctx_rel);
@ -58,7 +61,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
for_each_cpu(i, cpus) { for_each_cpu(i, cpus) {
struct napi_struct *irqtask; struct napi_struct *irqtask;
@@ -510,26 +502,12 @@ int caam_qi_shutdown(struct device *qide @@ -510,26 +502,12 @@ int caam_qi_shutdown(struct device *qidev)
dev_err(qidev, "Rsp FQ kill failed, cpu: %d\n", i); dev_err(qidev, "Rsp FQ kill failed, cpu: %d\n", i);
} }
@ -87,7 +90,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
} }
static void cgr_cb(struct qman_portal *qm, struct qman_cgr *cgr, int congested) 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 @@ -718,22 +696,11 @@ int caam_qi_init(struct platform_device *caam_pdev)
struct device *ctrldev = &caam_pdev->dev, *qidev; struct device *ctrldev = &caam_pdev->dev, *qidev;
struct caam_drv_private *ctrlpriv; struct caam_drv_private *ctrlpriv;
const cpumask_t *cpus = qman_affine_cpus(); const cpumask_t *cpus = qman_affine_cpus();
@ -110,7 +113,7 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
qi_pdev_info.parent = ctrldev; qi_pdev_info.parent = ctrldev;
qi_pdev_info.dma_mask = dma_get_mask(ctrldev); qi_pdev_info.dma_mask = dma_get_mask(ctrldev);
qi_pdev = platform_device_register_full(&qi_pdev_info); qi_pdev = platform_device_register_full(&qi_pdev_info);
@@ -795,8 +762,6 @@ int caam_qi_init(struct platform_device @@ -795,8 +762,6 @@ int caam_qi_init(struct platform_device *caam_pdev)
return -ENOMEM; return -ENOMEM;
} }
@ -119,9 +122,11 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
#ifdef CONFIG_DEBUG_FS #ifdef CONFIG_DEBUG_FS
debugfs_create_file("qi_congested", 0444, ctrlpriv->ctl, debugfs_create_file("qi_congested", 0444, ctrlpriv->ctl,
&times_congested, &caam_fops_u64_ro); &times_congested, &caam_fops_u64_ro);
diff --git a/drivers/crypto/caam/qi.h b/drivers/crypto/caam/qi.h
index 357b69f57072..b6c8acc30853 100644
--- a/drivers/crypto/caam/qi.h --- a/drivers/crypto/caam/qi.h
+++ b/drivers/crypto/caam/qi.h +++ b/drivers/crypto/caam/qi.h
@@ -174,7 +174,7 @@ int caam_drv_ctx_update(struct caam_drv_ @@ -174,7 +174,7 @@ int caam_drv_ctx_update(struct caam_drv_ctx *drv_ctx, u32 *sh_desc);
void caam_drv_ctx_rel(struct caam_drv_ctx *drv_ctx); void caam_drv_ctx_rel(struct caam_drv_ctx *drv_ctx);
int caam_qi_init(struct platform_device *pdev); int caam_qi_init(struct platform_device *pdev);
@ -130,3 +135,6 @@ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
/** /**
* qi_cache_alloc - Allocate buffers from CAAM-QI cache * qi_cache_alloc - Allocate buffers from CAAM-QI cache
--
2.20.1

View File

@ -1,7 +1,8 @@
From a4524b7d31b9a9d9a25b35af08ee65b73d214893 Mon Sep 17 00:00:00 2001
From: Peter Zijlstra <peterz@infradead.org> From: Peter Zijlstra <peterz@infradead.org>
Date: Mon, 7 Jan 2019 13:52:31 +0100 Date: Mon, 7 Jan 2019 13:52:31 +0100
Subject: [PATCH] sched/fair: Robustify CFS-bandwidth timer locking Subject: [PATCH 011/266] sched/fair: Robustify CFS-bandwidth timer locking
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Traditionally hrtimer callbacks were run with IRQs disabled, but with Traditionally hrtimer callbacks were run with IRQs disabled, but with
the introduction of HRTIMER_MODE_SOFT it is possible they run from the introduction of HRTIMER_MODE_SOFT it is possible they run from
@ -25,12 +26,14 @@ Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20190107125231.GE14122@hirez.programming.kicks-ass.net Link: https://lkml.kernel.org/r/20190107125231.GE14122@hirez.programming.kicks-ass.net
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
kernel/sched/fair.c | 30 ++++++++++++++++-------------- kernel/sched/fair.c | 30 ++++++++++++++++--------------
1 file changed, 16 insertions(+), 14 deletions(-) 1 file changed, 16 insertions(+), 14 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index f7c375d1e601..6afda059e882 100644
--- a/kernel/sched/fair.c --- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c +++ b/kernel/sched/fair.c
@@ -4553,7 +4553,7 @@ static u64 distribute_cfs_runtime(struct @@ -4553,7 +4553,7 @@ static u64 distribute_cfs_runtime(struct cfs_bandwidth *cfs_b,
struct rq *rq = rq_of(cfs_rq); struct rq *rq = rq_of(cfs_rq);
struct rq_flags rf; struct rq_flags rf;
@ -39,7 +42,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (!cfs_rq_throttled(cfs_rq)) if (!cfs_rq_throttled(cfs_rq))
goto next; goto next;
@@ -4570,7 +4570,7 @@ static u64 distribute_cfs_runtime(struct @@ -4570,7 +4570,7 @@ static u64 distribute_cfs_runtime(struct cfs_bandwidth *cfs_b,
unthrottle_cfs_rq(cfs_rq); unthrottle_cfs_rq(cfs_rq);
next: next:
@ -48,7 +51,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (!remaining) if (!remaining)
break; break;
@@ -4586,7 +4586,7 @@ static u64 distribute_cfs_runtime(struct @@ -4586,7 +4586,7 @@ static u64 distribute_cfs_runtime(struct cfs_bandwidth *cfs_b,
* period the timer is deactivated until scheduling resumes; cfs_b->idle is * period the timer is deactivated until scheduling resumes; cfs_b->idle is
* used to track this state. * used to track this state.
*/ */
@ -57,7 +60,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
{ {
u64 runtime, runtime_expires; u64 runtime, runtime_expires;
int throttled; int throttled;
@@ -4628,11 +4628,11 @@ static int do_sched_cfs_period_timer(str @@ -4628,11 +4628,11 @@ static int do_sched_cfs_period_timer(struct cfs_bandwidth *cfs_b, int overrun)
while (throttled && cfs_b->runtime > 0 && !cfs_b->distribute_running) { while (throttled && cfs_b->runtime > 0 && !cfs_b->distribute_running) {
runtime = cfs_b->runtime; runtime = cfs_b->runtime;
cfs_b->distribute_running = 1; cfs_b->distribute_running = 1;
@ -71,7 +74,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
cfs_b->distribute_running = 0; cfs_b->distribute_running = 0;
throttled = !list_empty(&cfs_b->throttled_cfs_rq); throttled = !list_empty(&cfs_b->throttled_cfs_rq);
@@ -4741,17 +4741,18 @@ static __always_inline void return_cfs_r @@ -4741,17 +4741,18 @@ static __always_inline void return_cfs_rq_runtime(struct cfs_rq *cfs_rq)
static void do_sched_cfs_slack_timer(struct cfs_bandwidth *cfs_b) static void do_sched_cfs_slack_timer(struct cfs_bandwidth *cfs_b)
{ {
u64 runtime = 0, slice = sched_cfs_bandwidth_slice(); u64 runtime = 0, slice = sched_cfs_bandwidth_slice();
@ -93,7 +96,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return; return;
} }
@@ -4762,18 +4763,18 @@ static void do_sched_cfs_slack_timer(str @@ -4762,18 +4763,18 @@ static void do_sched_cfs_slack_timer(struct cfs_bandwidth *cfs_b)
if (runtime) if (runtime)
cfs_b->distribute_running = 1; cfs_b->distribute_running = 1;
@ -115,7 +118,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
/* /*
@@ -4851,20 +4852,21 @@ static enum hrtimer_restart sched_cfs_pe @@ -4851,20 +4852,21 @@ static enum hrtimer_restart sched_cfs_period_timer(struct hrtimer *timer)
{ {
struct cfs_bandwidth *cfs_b = struct cfs_bandwidth *cfs_b =
container_of(timer, struct cfs_bandwidth, period_timer); container_of(timer, struct cfs_bandwidth, period_timer);
@ -140,3 +143,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return idle ? HRTIMER_NORESTART : HRTIMER_RESTART; return idle ? HRTIMER_NORESTART : HRTIMER_RESTART;
} }
--
2.20.1

View File

@ -1,7 +1,8 @@
From 37261737c2ad09732c9131095b574191058afc92 Mon Sep 17 00:00:00 2001
From: Frank Rowand <frank.rowand@am.sony.com> From: Frank Rowand <frank.rowand@am.sony.com>
Date: Mon, 19 Sep 2011 14:51:14 -0700 Date: Mon, 19 Sep 2011 14:51:14 -0700
Subject: arm: Convert arm boot_lock to raw Subject: [PATCH 012/266] arm: Convert arm boot_lock to raw
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
The arm boot_lock is used by the secondary processor startup code. The locking 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. task is the idle thread, which has idle->sched_class == &idle_sched_class.
@ -24,16 +25,18 @@ Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Tested-by: Krzysztof Kozlowski <krzk@kernel.org> [Exynos5422 Linaro PM-QA] Tested-by: Krzysztof Kozlowski <krzk@kernel.org> [Exynos5422 Linaro PM-QA]
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
arch/arm/mach-exynos/platsmp.c | 12 ++++++------ arch/arm/mach-exynos/platsmp.c | 12 ++++++------
arch/arm/mach-hisi/platmcpm.c | 22 +++++++++++----------- arch/arm/mach-hisi/platmcpm.c | 22 +++++++++++-----------
arch/arm/mach-omap2/omap-smp.c | 10 +++++----- arch/arm/mach-omap2/omap-smp.c | 10 +++++-----
arch/arm/mach-prima2/platsmp.c | 10 +++++----- arch/arm/mach-prima2/platsmp.c | 10 +++++-----
arch/arm/mach-qcom/platsmp.c | 10 +++++----- arch/arm/mach-qcom/platsmp.c | 10 +++++-----
arch/arm/mach-spear/platsmp.c | 10 +++++----- arch/arm/mach-spear/platsmp.c | 10 +++++-----
arch/arm/mach-sti/platsmp.c | 10 +++++----- arch/arm/mach-sti/platsmp.c | 10 +++++-----
arch/arm/plat-versatile/platsmp.c | 10 +++++----- arch/arm/plat-versatile/platsmp.c | 10 +++++-----
8 files changed, 47 insertions(+), 47 deletions(-) 8 files changed, 47 insertions(+), 47 deletions(-)
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c
index 6a1e682371b3..17dca0ff336e 100644
--- a/arch/arm/mach-exynos/platsmp.c --- a/arch/arm/mach-exynos/platsmp.c
+++ b/arch/arm/mach-exynos/platsmp.c +++ b/arch/arm/mach-exynos/platsmp.c
@@ -239,7 +239,7 @@ static void write_pen_release(int val) @@ -239,7 +239,7 @@ static void write_pen_release(int val)
@ -45,7 +48,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
static void exynos_secondary_init(unsigned int cpu) static void exynos_secondary_init(unsigned int cpu)
{ {
@@ -252,8 +252,8 @@ static void exynos_secondary_init(unsign @@ -252,8 +252,8 @@ static void exynos_secondary_init(unsigned int cpu)
/* /*
* Synchronise with the boot thread. * Synchronise with the boot thread.
*/ */
@ -56,7 +59,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
int exynos_set_boot_addr(u32 core_id, unsigned long boot_addr) int exynos_set_boot_addr(u32 core_id, unsigned long boot_addr)
@@ -317,7 +317,7 @@ static int exynos_boot_secondary(unsigne @@ -317,7 +317,7 @@ static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle)
* Set synchronisation state between this boot processor * Set synchronisation state between this boot processor
* and the secondary one * and the secondary one
*/ */
@ -65,7 +68,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* /*
* The secondary processor is waiting to be released from * The secondary processor is waiting to be released from
@@ -344,7 +344,7 @@ static int exynos_boot_secondary(unsigne @@ -344,7 +344,7 @@ static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle)
if (timeout == 0) { if (timeout == 0) {
printk(KERN_ERR "cpu1 power enable failed"); printk(KERN_ERR "cpu1 power enable failed");
@ -74,7 +77,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return -ETIMEDOUT; return -ETIMEDOUT;
} }
} }
@@ -390,7 +390,7 @@ static int exynos_boot_secondary(unsigne @@ -390,7 +390,7 @@ static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle)
* calibrations, then wait for it to finish * calibrations, then wait for it to finish
*/ */
fail: fail:
@ -83,6 +86,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return pen_release != -1 ? ret : 0; return pen_release != -1 ? ret : 0;
} }
diff --git a/arch/arm/mach-hisi/platmcpm.c b/arch/arm/mach-hisi/platmcpm.c
index f66815c3dd07..00524abd963f 100644
--- a/arch/arm/mach-hisi/platmcpm.c --- a/arch/arm/mach-hisi/platmcpm.c
+++ b/arch/arm/mach-hisi/platmcpm.c +++ b/arch/arm/mach-hisi/platmcpm.c
@@ -61,7 +61,7 @@ @@ -61,7 +61,7 @@
@ -94,7 +99,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
static u32 fabric_phys_addr; static u32 fabric_phys_addr;
/* /*
* [0]: bootwrapper physical address * [0]: bootwrapper physical address
@@ -113,7 +113,7 @@ static int hip04_boot_secondary(unsigned @@ -113,7 +113,7 @@ static int hip04_boot_secondary(unsigned int l_cpu, struct task_struct *idle)
if (cluster >= HIP04_MAX_CLUSTERS || cpu >= HIP04_MAX_CPUS_PER_CLUSTER) if (cluster >= HIP04_MAX_CLUSTERS || cpu >= HIP04_MAX_CPUS_PER_CLUSTER)
return -EINVAL; return -EINVAL;
@ -103,7 +108,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (hip04_cpu_table[cluster][cpu]) if (hip04_cpu_table[cluster][cpu])
goto out; goto out;
@@ -147,7 +147,7 @@ static int hip04_boot_secondary(unsigned @@ -147,7 +147,7 @@ static int hip04_boot_secondary(unsigned int l_cpu, struct task_struct *idle)
out: out:
hip04_cpu_table[cluster][cpu]++; hip04_cpu_table[cluster][cpu]++;
@ -112,7 +117,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return 0; return 0;
} }
@@ -162,11 +162,11 @@ static void hip04_cpu_die(unsigned int l @@ -162,11 +162,11 @@ static void hip04_cpu_die(unsigned int l_cpu)
cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0); cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0);
cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1);
@ -126,7 +131,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return; return;
} else if (hip04_cpu_table[cluster][cpu] > 1) { } else if (hip04_cpu_table[cluster][cpu] > 1) {
pr_err("Cluster %d CPU%d boots multiple times\n", cluster, cpu); pr_err("Cluster %d CPU%d boots multiple times\n", cluster, cpu);
@@ -174,7 +174,7 @@ static void hip04_cpu_die(unsigned int l @@ -174,7 +174,7 @@ static void hip04_cpu_die(unsigned int l_cpu)
} }
last_man = hip04_cluster_is_down(cluster); last_man = hip04_cluster_is_down(cluster);
@ -135,7 +140,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (last_man) { if (last_man) {
/* Since it's Cortex A15, disable L2 prefetching. */ /* Since it's Cortex A15, disable L2 prefetching. */
asm volatile( asm volatile(
@@ -203,7 +203,7 @@ static int hip04_cpu_kill(unsigned int l @@ -203,7 +203,7 @@ static int hip04_cpu_kill(unsigned int l_cpu)
cpu >= HIP04_MAX_CPUS_PER_CLUSTER); cpu >= HIP04_MAX_CPUS_PER_CLUSTER);
count = TIMEOUT_MSEC / POLL_MSEC; count = TIMEOUT_MSEC / POLL_MSEC;
@ -144,7 +149,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
for (tries = 0; tries < count; tries++) { for (tries = 0; tries < count; tries++) {
if (hip04_cpu_table[cluster][cpu]) if (hip04_cpu_table[cluster][cpu])
goto err; goto err;
@@ -211,10 +211,10 @@ static int hip04_cpu_kill(unsigned int l @@ -211,10 +211,10 @@ static int hip04_cpu_kill(unsigned int l_cpu)
data = readl_relaxed(sysctrl + SC_CPU_RESET_STATUS(cluster)); data = readl_relaxed(sysctrl + SC_CPU_RESET_STATUS(cluster));
if (data & CORE_WFI_STATUS(cpu)) if (data & CORE_WFI_STATUS(cpu))
break; break;
@ -157,7 +162,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
if (tries >= count) if (tries >= count)
goto err; goto err;
@@ -231,10 +231,10 @@ static int hip04_cpu_kill(unsigned int l @@ -231,10 +231,10 @@ static int hip04_cpu_kill(unsigned int l_cpu)
goto err; goto err;
if (hip04_cluster_is_down(cluster)) if (hip04_cluster_is_down(cluster))
hip04_set_snoop_filter(cluster, 0); hip04_set_snoop_filter(cluster, 0);
@ -170,9 +175,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return 0; return 0;
} }
#endif #endif
diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c
index 1c73694c871a..ac4d2f030b87 100644
--- a/arch/arm/mach-omap2/omap-smp.c --- a/arch/arm/mach-omap2/omap-smp.c
+++ b/arch/arm/mach-omap2/omap-smp.c +++ b/arch/arm/mach-omap2/omap-smp.c
@@ -69,7 +69,7 @@ static const struct omap_smp_config omap @@ -69,7 +69,7 @@ static const struct omap_smp_config omap5_cfg __initconst = {
.startup_addr = omap5_secondary_startup, .startup_addr = omap5_secondary_startup,
}; };
@ -181,7 +188,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
void __iomem *omap4_get_scu_base(void) void __iomem *omap4_get_scu_base(void)
{ {
@@ -177,8 +177,8 @@ static void omap4_secondary_init(unsigne @@ -177,8 +177,8 @@ static void omap4_secondary_init(unsigned int cpu)
/* /*
* Synchronise with the boot thread. * Synchronise with the boot thread.
*/ */
@ -192,7 +199,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
static int omap4_boot_secondary(unsigned int cpu, struct task_struct *idle) static int omap4_boot_secondary(unsigned int cpu, struct task_struct *idle)
@@ -191,7 +191,7 @@ static int omap4_boot_secondary(unsigned @@ -191,7 +191,7 @@ static int omap4_boot_secondary(unsigned int cpu, struct task_struct *idle)
* Set synchronisation state between this boot processor * Set synchronisation state between this boot processor
* and the secondary one * and the secondary one
*/ */
@ -201,7 +208,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* /*
* Update the AuxCoreBoot0 with boot state for secondary core. * Update the AuxCoreBoot0 with boot state for secondary core.
@@ -270,7 +270,7 @@ static int omap4_boot_secondary(unsigned @@ -270,7 +270,7 @@ static int omap4_boot_secondary(unsigned int cpu, struct task_struct *idle)
* Now the secondary core is starting up let it run its * Now the secondary core is starting up let it run its
* calibrations, then wait for it to finish * calibrations, then wait for it to finish
*/ */
@ -210,6 +217,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return 0; return 0;
} }
diff --git a/arch/arm/mach-prima2/platsmp.c b/arch/arm/mach-prima2/platsmp.c
index 75ef5d4be554..c17c86e5d860 100644
--- a/arch/arm/mach-prima2/platsmp.c --- a/arch/arm/mach-prima2/platsmp.c
+++ b/arch/arm/mach-prima2/platsmp.c +++ b/arch/arm/mach-prima2/platsmp.c
@@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
@ -221,7 +230,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
static void sirfsoc_secondary_init(unsigned int cpu) static void sirfsoc_secondary_init(unsigned int cpu)
{ {
@@ -36,8 +36,8 @@ static void sirfsoc_secondary_init(unsig @@ -36,8 +36,8 @@ static void sirfsoc_secondary_init(unsigned int cpu)
/* /*
* Synchronise with the boot thread. * Synchronise with the boot thread.
*/ */
@ -232,7 +241,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
static const struct of_device_id clk_ids[] = { static const struct of_device_id clk_ids[] = {
@@ -75,7 +75,7 @@ static int sirfsoc_boot_secondary(unsign @@ -75,7 +75,7 @@ static int sirfsoc_boot_secondary(unsigned int cpu, struct task_struct *idle)
/* make sure write buffer is drained */ /* make sure write buffer is drained */
mb(); mb();
@ -241,7 +250,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* /*
* The secondary processor is waiting to be released from * The secondary processor is waiting to be released from
@@ -107,7 +107,7 @@ static int sirfsoc_boot_secondary(unsign @@ -107,7 +107,7 @@ static int sirfsoc_boot_secondary(unsigned int cpu, struct task_struct *idle)
* now the secondary core is starting up let it run its * now the secondary core is starting up let it run its
* calibrations, then wait for it to finish * calibrations, then wait for it to finish
*/ */
@ -250,6 +259,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return pen_release != -1 ? -ENOSYS : 0; return pen_release != -1 ? -ENOSYS : 0;
} }
diff --git a/arch/arm/mach-qcom/platsmp.c b/arch/arm/mach-qcom/platsmp.c
index 5494c9e0c909..e8ce157d3548 100644
--- a/arch/arm/mach-qcom/platsmp.c --- a/arch/arm/mach-qcom/platsmp.c
+++ b/arch/arm/mach-qcom/platsmp.c +++ b/arch/arm/mach-qcom/platsmp.c
@@ -46,7 +46,7 @@ @@ -46,7 +46,7 @@
@ -261,7 +272,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
#ifdef CONFIG_HOTPLUG_CPU #ifdef CONFIG_HOTPLUG_CPU
static void qcom_cpu_die(unsigned int cpu) static void qcom_cpu_die(unsigned int cpu)
@@ -60,8 +60,8 @@ static void qcom_secondary_init(unsigned @@ -60,8 +60,8 @@ static void qcom_secondary_init(unsigned int cpu)
/* /*
* Synchronise with the boot thread. * Synchronise with the boot thread.
*/ */
@ -272,7 +283,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
static int scss_release_secondary(unsigned int cpu) static int scss_release_secondary(unsigned int cpu)
@@ -284,7 +284,7 @@ static int qcom_boot_secondary(unsigned @@ -284,7 +284,7 @@ static int qcom_boot_secondary(unsigned int cpu, int (*func)(unsigned int))
* set synchronisation state between this boot processor * set synchronisation state between this boot processor
* and the secondary one * and the secondary one
*/ */
@ -281,7 +292,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* /*
* Send the secondary CPU a soft interrupt, thereby causing * Send the secondary CPU a soft interrupt, thereby causing
@@ -297,7 +297,7 @@ static int qcom_boot_secondary(unsigned @@ -297,7 +297,7 @@ static int qcom_boot_secondary(unsigned int cpu, int (*func)(unsigned int))
* now the secondary core is starting up let it run its * now the secondary core is starting up let it run its
* calibrations, then wait for it to finish * calibrations, then wait for it to finish
*/ */
@ -290,6 +301,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return ret; return ret;
} }
diff --git a/arch/arm/mach-spear/platsmp.c b/arch/arm/mach-spear/platsmp.c
index 39038a03836a..6da5c93872bf 100644
--- a/arch/arm/mach-spear/platsmp.c --- a/arch/arm/mach-spear/platsmp.c
+++ b/arch/arm/mach-spear/platsmp.c +++ b/arch/arm/mach-spear/platsmp.c
@@ -32,7 +32,7 @@ static void write_pen_release(int val) @@ -32,7 +32,7 @@ static void write_pen_release(int val)
@ -301,7 +314,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
static void __iomem *scu_base = IOMEM(VA_SCU_BASE); static void __iomem *scu_base = IOMEM(VA_SCU_BASE);
@@ -47,8 +47,8 @@ static void spear13xx_secondary_init(uns @@ -47,8 +47,8 @@ static void spear13xx_secondary_init(unsigned int cpu)
/* /*
* Synchronise with the boot thread. * Synchronise with the boot thread.
*/ */
@ -312,7 +325,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
static int spear13xx_boot_secondary(unsigned int cpu, struct task_struct *idle) static int spear13xx_boot_secondary(unsigned int cpu, struct task_struct *idle)
@@ -59,7 +59,7 @@ static int spear13xx_boot_secondary(unsi @@ -59,7 +59,7 @@ static int spear13xx_boot_secondary(unsigned int cpu, struct task_struct *idle)
* set synchronisation state between this boot processor * set synchronisation state between this boot processor
* and the secondary one * and the secondary one
*/ */
@ -321,7 +334,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* /*
* The secondary processor is waiting to be released from * The secondary processor is waiting to be released from
@@ -84,7 +84,7 @@ static int spear13xx_boot_secondary(unsi @@ -84,7 +84,7 @@ static int spear13xx_boot_secondary(unsigned int cpu, struct task_struct *idle)
* now the secondary core is starting up let it run its * now the secondary core is starting up let it run its
* calibrations, then wait for it to finish * calibrations, then wait for it to finish
*/ */
@ -330,6 +343,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return pen_release != -1 ? -ENOSYS : 0; return pen_release != -1 ? -ENOSYS : 0;
} }
diff --git a/arch/arm/mach-sti/platsmp.c b/arch/arm/mach-sti/platsmp.c
index 231f19e17436..a3419b7003e6 100644
--- a/arch/arm/mach-sti/platsmp.c --- a/arch/arm/mach-sti/platsmp.c
+++ b/arch/arm/mach-sti/platsmp.c +++ b/arch/arm/mach-sti/platsmp.c
@@ -35,7 +35,7 @@ static void write_pen_release(int val) @@ -35,7 +35,7 @@ static void write_pen_release(int val)
@ -341,7 +356,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
static void sti_secondary_init(unsigned int cpu) static void sti_secondary_init(unsigned int cpu)
{ {
@@ -48,8 +48,8 @@ static void sti_secondary_init(unsigned @@ -48,8 +48,8 @@ static void sti_secondary_init(unsigned int cpu)
/* /*
* Synchronise with the boot thread. * Synchronise with the boot thread.
*/ */
@ -352,7 +367,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
static int sti_boot_secondary(unsigned int cpu, struct task_struct *idle) static int sti_boot_secondary(unsigned int cpu, struct task_struct *idle)
@@ -60,7 +60,7 @@ static int sti_boot_secondary(unsigned i @@ -60,7 +60,7 @@ static int sti_boot_secondary(unsigned int cpu, struct task_struct *idle)
* set synchronisation state between this boot processor * set synchronisation state between this boot processor
* and the secondary one * and the secondary one
*/ */
@ -361,7 +376,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* /*
* The secondary processor is waiting to be released from * The secondary processor is waiting to be released from
@@ -91,7 +91,7 @@ static int sti_boot_secondary(unsigned i @@ -91,7 +91,7 @@ static int sti_boot_secondary(unsigned int cpu, struct task_struct *idle)
* now the secondary core is starting up let it run its * now the secondary core is starting up let it run its
* calibrations, then wait for it to finish * calibrations, then wait for it to finish
*/ */
@ -370,6 +385,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return pen_release != -1 ? -ENOSYS : 0; return pen_release != -1 ? -ENOSYS : 0;
} }
diff --git a/arch/arm/plat-versatile/platsmp.c b/arch/arm/plat-versatile/platsmp.c
index c2366510187a..6b60f582b738 100644
--- a/arch/arm/plat-versatile/platsmp.c --- a/arch/arm/plat-versatile/platsmp.c
+++ b/arch/arm/plat-versatile/platsmp.c +++ b/arch/arm/plat-versatile/platsmp.c
@@ -32,7 +32,7 @@ static void write_pen_release(int val) @@ -32,7 +32,7 @@ static void write_pen_release(int val)
@ -381,7 +398,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
void versatile_secondary_init(unsigned int cpu) void versatile_secondary_init(unsigned int cpu)
{ {
@@ -45,8 +45,8 @@ void versatile_secondary_init(unsigned i @@ -45,8 +45,8 @@ void versatile_secondary_init(unsigned int cpu)
/* /*
* Synchronise with the boot thread. * Synchronise with the boot thread.
*/ */
@ -392,7 +409,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
int versatile_boot_secondary(unsigned int cpu, struct task_struct *idle) int versatile_boot_secondary(unsigned int cpu, struct task_struct *idle)
@@ -57,7 +57,7 @@ int versatile_boot_secondary(unsigned in @@ -57,7 +57,7 @@ int versatile_boot_secondary(unsigned int cpu, struct task_struct *idle)
* Set synchronisation state between this boot processor * Set synchronisation state between this boot processor
* and the secondary one * and the secondary one
*/ */
@ -401,7 +418,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* /*
* This is really belt and braces; we hold unintended secondary * This is really belt and braces; we hold unintended secondary
@@ -87,7 +87,7 @@ int versatile_boot_secondary(unsigned in @@ -87,7 +87,7 @@ int versatile_boot_secondary(unsigned int cpu, struct task_struct *idle)
* now the secondary core is starting up let it run its * now the secondary core is starting up let it run its
* calibrations, then wait for it to finish * calibrations, then wait for it to finish
*/ */
@ -410,3 +427,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return pen_release != -1 ? -ENOSYS : 0; return pen_release != -1 ? -ENOSYS : 0;
} }
--
2.20.1

View File

@ -1,8 +1,9 @@
From b7623467c5f4754d6461928696e789b3fa834b7a Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de> From: Thomas Gleixner <tglx@linutronix.de>
Date: Tue, 17 Jul 2018 18:25:31 +0200 Date: Tue, 17 Jul 2018 18:25:31 +0200
Subject: [PATCH] x86/ioapic: Don't let setaffinity unmask threaded EOI Subject: [PATCH 013/266] x86/ioapic: Don't let setaffinity unmask threaded EOI
interrupt too early interrupt too early
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
There is an issue with threaded interrupts which are marked ONESHOT There is an issue with threaded interrupts which are marked ONESHOT
and using the fasteoi handler. and using the fasteoi handler.
@ -30,12 +31,14 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
ifdef paths (spotted by Andy Shevchenko)] ifdef paths (spotted by Andy Shevchenko)]
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
arch/x86/kernel/apic/io_apic.c | 23 +++++++++++++---------- arch/x86/kernel/apic/io_apic.c | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-) 1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index ff0d14cd9e82..c2bd6e0433f8 100644
--- a/arch/x86/kernel/apic/io_apic.c --- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c
@@ -1722,19 +1722,20 @@ static bool io_apic_level_ack_pending(st @@ -1722,19 +1722,20 @@ static bool io_apic_level_ack_pending(struct mp_chip_data *data)
return false; return false;
} }
@ -60,7 +63,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* Only migrate the irq if the ack has been received. /* Only migrate the irq if the ack has been received.
* *
* On rare occasions the broadcast level triggered ack gets * On rare occasions the broadcast level triggered ack gets
@@ -1763,15 +1764,17 @@ static inline void ioapic_irqd_unmask(st @@ -1763,15 +1764,17 @@ static inline void ioapic_irqd_unmask(struct irq_data *data, bool masked)
*/ */
if (!io_apic_level_ack_pending(data->chip_data)) if (!io_apic_level_ack_pending(data->chip_data))
irq_move_masked_irq(data); irq_move_masked_irq(data);
@ -81,7 +84,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
{ {
} }
#endif #endif
@@ -1780,11 +1783,11 @@ static void ioapic_ack_level(struct irq_ @@ -1780,11 +1783,11 @@ static void ioapic_ack_level(struct irq_data *irq_data)
{ {
struct irq_cfg *cfg = irqd_cfg(irq_data); struct irq_cfg *cfg = irqd_cfg(irq_data);
unsigned long v; unsigned long v;
@ -95,7 +98,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* /*
* It appears there is an erratum which affects at least version 0x11 * It appears there is an erratum which affects at least version 0x11
@@ -1839,7 +1842,7 @@ static void ioapic_ack_level(struct irq_ @@ -1839,7 +1842,7 @@ static void ioapic_ack_level(struct irq_data *irq_data)
eoi_ioapic_pin(cfg->vector, irq_data->chip_data); eoi_ioapic_pin(cfg->vector, irq_data->chip_data);
} }
@ -104,3 +107,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
static void ioapic_ir_ack_level(struct irq_data *irq_data) static void ioapic_ir_ack_level(struct irq_data *irq_data)
--
2.20.1

View File

@ -1,7 +1,8 @@
From c04aa401b3b76817b02a653adeeb221b31c0769b Mon Sep 17 00:00:00 2001
From: Yang Shi <yang.shi@linaro.org> From: Yang Shi <yang.shi@linaro.org>
Date: Thu, 10 Nov 2016 16:17:55 -0800 Date: Thu, 10 Nov 2016 16:17:55 -0800
Subject: [PATCH] arm: kprobe: replace patch_lock to raw lock Subject: [PATCH 014/266] arm: kprobe: replace patch_lock to raw lock
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
When running kprobe on -rt kernel, the below bug is caught: When running kprobe on -rt kernel, the below bug is caught:
@ -36,9 +37,11 @@ to raw lock.
Signed-off-by: Yang Shi <yang.shi@linaro.org> Signed-off-by: Yang Shi <yang.shi@linaro.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
arch/arm/kernel/patch.c | 6 +++--- arch/arm/kernel/patch.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-) 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm/kernel/patch.c b/arch/arm/kernel/patch.c
index a50dc00d79a2..d0a05a3bdb96 100644
--- a/arch/arm/kernel/patch.c --- a/arch/arm/kernel/patch.c
+++ b/arch/arm/kernel/patch.c +++ b/arch/arm/kernel/patch.c
@@ -16,7 +16,7 @@ struct patch { @@ -16,7 +16,7 @@ struct patch {
@ -50,7 +53,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
static void __kprobes *patch_map(void *addr, int fixmap, unsigned long *flags) static void __kprobes *patch_map(void *addr, int fixmap, unsigned long *flags)
__acquires(&patch_lock) __acquires(&patch_lock)
@@ -33,7 +33,7 @@ static void __kprobes *patch_map(void *a @@ -33,7 +33,7 @@ static void __kprobes *patch_map(void *addr, int fixmap, unsigned long *flags)
return addr; return addr;
if (flags) if (flags)
@ -59,7 +62,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
else else
__acquire(&patch_lock); __acquire(&patch_lock);
@@ -48,7 +48,7 @@ static void __kprobes patch_unmap(int fi @@ -48,7 +48,7 @@ static void __kprobes patch_unmap(int fixmap, unsigned long *flags)
clear_fixmap(fixmap); clear_fixmap(fixmap);
if (flags) if (flags)
@ -68,3 +71,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
else else
__release(&patch_lock); __release(&patch_lock);
} }
--
2.20.1

View File

@ -1,7 +1,8 @@
From 8802563fe8efa798671fe55ab1417f3665f63cc7 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Tue, 3 Jul 2018 18:19:48 +0200 Date: Tue, 3 Jul 2018 18:19:48 +0200
Subject: [PATCH] cgroup: use irqsave in cgroup_rstat_flush_locked() Subject: [PATCH 016/266] cgroup: use irqsave in cgroup_rstat_flush_locked()
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
All callers of cgroup_rstat_flush_locked() acquire cgroup_rstat_lock All callers of cgroup_rstat_flush_locked() acquire cgroup_rstat_lock
either with spin_lock_irq() or spin_lock_irqsave(). either with spin_lock_irq() or spin_lock_irqsave().
@ -17,12 +18,14 @@ Acquire the raw_spin_lock_t with disabled interrupts.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
kernel/cgroup/rstat.c | 5 +++-- kernel/cgroup/rstat.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-) 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/kernel/cgroup/rstat.c b/kernel/cgroup/rstat.c
index d503d1a9007c..63fc5e472c82 100644
--- a/kernel/cgroup/rstat.c --- a/kernel/cgroup/rstat.c
+++ b/kernel/cgroup/rstat.c +++ b/kernel/cgroup/rstat.c
@@ -157,8 +157,9 @@ static void cgroup_rstat_flush_locked(st @@ -157,8 +157,9 @@ static void cgroup_rstat_flush_locked(struct cgroup *cgrp, bool may_sleep)
raw_spinlock_t *cpu_lock = per_cpu_ptr(&cgroup_rstat_cpu_lock, raw_spinlock_t *cpu_lock = per_cpu_ptr(&cgroup_rstat_cpu_lock,
cpu); cpu);
struct cgroup *pos = NULL; struct cgroup *pos = NULL;
@ -33,7 +36,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
while ((pos = cgroup_rstat_cpu_pop_updated(pos, cgrp, cpu))) { while ((pos = cgroup_rstat_cpu_pop_updated(pos, cgrp, cpu))) {
struct cgroup_subsys_state *css; struct cgroup_subsys_state *css;
@@ -170,7 +171,7 @@ static void cgroup_rstat_flush_locked(st @@ -170,7 +171,7 @@ static void cgroup_rstat_flush_locked(struct cgroup *cgrp, bool may_sleep)
css->ss->css_rstat_flush(css, cpu); css->ss->css_rstat_flush(css, cpu);
rcu_read_unlock(); rcu_read_unlock();
} }
@ -42,3 +45,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* if @may_sleep, play nice and yield if necessary */ /* if @may_sleep, play nice and yield if necessary */
if (may_sleep && (need_resched() || if (may_sleep && (need_resched() ||
--
2.20.1

View File

@ -1,7 +1,8 @@
From e9ac49cf76873f8ca7a6868b1a467d3e4a126834 Mon Sep 17 00:00:00 2001
From: Clark Williams <williams@redhat.com> From: Clark Williams <williams@redhat.com>
Date: Tue, 3 Jul 2018 13:34:30 -0500 Date: Tue, 3 Jul 2018 13:34:30 -0500
Subject: [PATCH] fscache: initialize cookie hash table raw spinlocks Subject: [PATCH 017/266] fscache: initialize cookie hash table raw spinlocks
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
The fscache cookie mechanism uses a hash table of hlist_bl_head structures. The 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 PREEMPT_RT patcheset adds a raw spinlock to this structure and so on PREEMPT_RT
@ -13,14 +14,16 @@ Use the init function for fscache cookies.
Signed-off-by: Clark Williams <williams@redhat.com> Signed-off-by: Clark Williams <williams@redhat.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
fs/fscache/cookie.c | 8 ++++++++ fs/fscache/cookie.c | 8 ++++++++
fs/fscache/main.c | 1 + fs/fscache/main.c | 1 +
include/linux/fscache.h | 1 + include/linux/fscache.h | 1 +
3 files changed, 10 insertions(+) 3 files changed, 10 insertions(+)
diff --git a/fs/fscache/cookie.c b/fs/fscache/cookie.c
index c550512ce335..d5d57da32ffa 100644
--- a/fs/fscache/cookie.c --- a/fs/fscache/cookie.c
+++ b/fs/fscache/cookie.c +++ b/fs/fscache/cookie.c
@@ -962,3 +962,11 @@ int __fscache_check_consistency(struct f @@ -962,3 +962,11 @@ int __fscache_check_consistency(struct fscache_cookie *cookie,
return -ESTALE; return -ESTALE;
} }
EXPORT_SYMBOL(__fscache_check_consistency); EXPORT_SYMBOL(__fscache_check_consistency);
@ -32,6 +35,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+ for (i = 0; i < (1 << fscache_cookie_hash_shift) - 1; i++) + for (i = 0; i < (1 << fscache_cookie_hash_shift) - 1; i++)
+ INIT_HLIST_BL_HEAD(&fscache_cookie_hash[i]); + INIT_HLIST_BL_HEAD(&fscache_cookie_hash[i]);
+} +}
diff --git a/fs/fscache/main.c b/fs/fscache/main.c
index 30ad89db1efc..1d5f1d679ffa 100644
--- a/fs/fscache/main.c --- a/fs/fscache/main.c
+++ b/fs/fscache/main.c +++ b/fs/fscache/main.c
@@ -149,6 +149,7 @@ static int __init fscache_init(void) @@ -149,6 +149,7 @@ static int __init fscache_init(void)
@ -42,9 +47,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
fscache_root = kobject_create_and_add("fscache", kernel_kobj); fscache_root = kobject_create_and_add("fscache", kernel_kobj);
if (!fscache_root) if (!fscache_root)
diff --git a/include/linux/fscache.h b/include/linux/fscache.h
index 84b90a79d75a..87a9330eafa2 100644
--- a/include/linux/fscache.h --- a/include/linux/fscache.h
+++ b/include/linux/fscache.h +++ b/include/linux/fscache.h
@@ -230,6 +230,7 @@ extern void __fscache_readpages_cancel(s @@ -230,6 +230,7 @@ extern void __fscache_readpages_cancel(struct fscache_cookie *cookie,
extern void __fscache_disable_cookie(struct fscache_cookie *, const void *, bool); extern void __fscache_disable_cookie(struct fscache_cookie *, const void *, bool);
extern void __fscache_enable_cookie(struct fscache_cookie *, const void *, loff_t, extern void __fscache_enable_cookie(struct fscache_cookie *, const void *, loff_t,
bool (*)(void *), void *); bool (*)(void *), void *);
@ -52,3 +59,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/** /**
* fscache_register_netfs - Register a filesystem as desiring caching services * fscache_register_netfs - Register a filesystem as desiring caching services
--
2.20.1

View File

@ -1,10 +1,11 @@
From 26295661cf99f6bcac999f0c1001001ae6ece3b1 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Wed, 29 Aug 2018 21:59:04 +0200 Date: Wed, 29 Aug 2018 21:59:04 +0200
Subject: [PATCH] Drivers: hv: vmbus: include header for get_irq_regs() Subject: [PATCH 018/266] Drivers: hv: vmbus: include header for get_irq_regs()
MIME-Version: 1.0 MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit Content-Transfer-Encoding: 8bit
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
On !RT the header file get_irq_regs() gets pulled in via other header files. On On !RT the header file get_irq_regs() gets pulled in via other header files. On
RT it does not and the build fails: RT it does not and the build fails:
@ -19,9 +20,11 @@ Reported-by: Bernhard Landauer <oberon@manjaro.org>
Reported-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de> Reported-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
drivers/hv/hyperv_vmbus.h | 1 + drivers/hv/hyperv_vmbus.h | 1 +
1 file changed, 1 insertion(+) 1 file changed, 1 insertion(+)
diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h
index 87d3d7da78f8..1d2d8a4b837d 100644
--- a/drivers/hv/hyperv_vmbus.h --- a/drivers/hv/hyperv_vmbus.h
+++ b/drivers/hv/hyperv_vmbus.h +++ b/drivers/hv/hyperv_vmbus.h
@@ -31,6 +31,7 @@ @@ -31,6 +31,7 @@
@ -32,3 +35,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
#include "hv_trace.h" #include "hv_trace.h"
--
2.20.1

View File

@ -1,7 +1,8 @@
From 359af9f6304a32c08a0983076d636a524e1e8697 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Thu, 11 Oct 2018 16:39:59 +0200 Date: Thu, 11 Oct 2018 16:39:59 +0200
Subject: [PATCH] percpu: include irqflags.h for raw_local_irq_save() Subject: [PATCH 019/266] percpu: include irqflags.h for raw_local_irq_save()
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
The header percpu.h header file is using raw_local_irq_save() but does The header percpu.h header file is using raw_local_irq_save() but does
not include irqflags.h for its definition. It compiles because the not include irqflags.h for its definition. It compiles because the
@ -12,9 +13,11 @@ Include irqflags.h in percpu.h.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
include/asm-generic/percpu.h | 1 + include/asm-generic/percpu.h | 1 +
1 file changed, 1 insertion(+) 1 file changed, 1 insertion(+)
diff --git a/include/asm-generic/percpu.h b/include/asm-generic/percpu.h
index 1817a8415a5e..942d64c0476e 100644
--- a/include/asm-generic/percpu.h --- a/include/asm-generic/percpu.h
+++ b/include/asm-generic/percpu.h +++ b/include/asm-generic/percpu.h
@@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
@ -25,3 +28,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
--
2.20.1

View File

@ -1,7 +1,8 @@
From b83100f22895ed8f43d7f1ddc629ac5f378364cb Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Thu, 26 Jul 2018 15:06:10 +0200 Date: Thu, 26 Jul 2018 15:06:10 +0200
Subject: [PATCH] efi: Allow efi=runtime Subject: [PATCH 020/266] efi: Allow efi=runtime
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
In case the option "efi=noruntime" is default at built-time, the user In case the option "efi=noruntime" is default at built-time, the user
could overwrite its sate by `efi=runtime' and allow it again. could overwrite its sate by `efi=runtime' and allow it again.
@ -9,12 +10,14 @@ could overwrite its sate by `efi=runtime' and allow it again.
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
drivers/firmware/efi/efi.c | 3 +++ drivers/firmware/efi/efi.c | 3 +++
1 file changed, 3 insertions(+) 1 file changed, 3 insertions(+)
diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
index 2a29dd9c986d..ab668e17fd05 100644
--- a/drivers/firmware/efi/efi.c --- a/drivers/firmware/efi/efi.c
+++ b/drivers/firmware/efi/efi.c +++ b/drivers/firmware/efi/efi.c
@@ -113,6 +113,9 @@ static int __init parse_efi_cmdline(char @@ -113,6 +113,9 @@ static int __init parse_efi_cmdline(char *str)
if (parse_option_str(str, "noruntime")) if (parse_option_str(str, "noruntime"))
disable_runtime = true; disable_runtime = true;
@ -24,3 +27,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return 0; return 0;
} }
early_param("efi", parse_efi_cmdline); early_param("efi", parse_efi_cmdline);
--
2.20.1

View File

@ -1,7 +1,8 @@
From a70a1ff87b4876681228007d218d34d59473ea36 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Tue, 24 Jul 2018 14:48:55 +0200 Date: Tue, 24 Jul 2018 14:48:55 +0200
Subject: [PATCH] x86/efi: drop task_lock() from efi_switch_mm() Subject: [PATCH 021/266] x86/efi: drop task_lock() from efi_switch_mm()
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
efi_switch_mm() is a wrapper around switch_mm() which saves current's efi_switch_mm() is a wrapper around switch_mm() which saves current's
->active_mm, sets the requests mm as ->active_mm and invokes ->active_mm, sets the requests mm as ->active_mm and invokes
@ -19,9 +20,11 @@ Remove task_lock() and also update the comment to reflect it.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
arch/x86/platform/efi/efi_64.c | 10 ++++------ arch/x86/platform/efi/efi_64.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-) 1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/arch/x86/platform/efi/efi_64.c b/arch/x86/platform/efi/efi_64.c
index ee5d08f25ce4..e8da7f492970 100644
--- a/arch/x86/platform/efi/efi_64.c --- a/arch/x86/platform/efi/efi_64.c
+++ b/arch/x86/platform/efi/efi_64.c +++ b/arch/x86/platform/efi/efi_64.c
@@ -619,18 +619,16 @@ void __init efi_dump_pagetable(void) @@ -619,18 +619,16 @@ void __init efi_dump_pagetable(void)
@ -47,3 +50,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
#ifdef CONFIG_EFI_MIXED #ifdef CONFIG_EFI_MIXED
--
2.20.1

View File

@ -1,7 +1,9 @@
From 9af14e5327e358a220624588caf607074b903d2e Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Thu, 26 Jul 2018 09:13:42 +0200 Date: Thu, 26 Jul 2018 09:13:42 +0200
Subject: [PATCH] arm64: KVM: compute_layout before altenates are applied Subject: [PATCH 022/266] arm64: KVM: compute_layout before altenates are
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz applied
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
compute_layout() is invoked as part of an alternative fixup under compute_layout() is invoked as part of an alternative fixup under
stop_machine() and needs a sleeping lock as part of get_random_long(). stop_machine() and needs a sleeping lock as part of get_random_long().
@ -10,14 +12,16 @@ Invoke compute_layout() before the alternatives are applied.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
arch/arm64/include/asm/alternative.h | 6 ++++++ arch/arm64/include/asm/alternative.h | 6 ++++++
arch/arm64/kernel/alternative.c | 1 + arch/arm64/kernel/alternative.c | 1 +
arch/arm64/kvm/va_layout.c | 7 +------ arch/arm64/kvm/va_layout.c | 7 +------
3 files changed, 8 insertions(+), 6 deletions(-) 3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/arch/arm64/include/asm/alternative.h b/arch/arm64/include/asm/alternative.h
index 4b650ec1d7dd..f561ea0ac645 100644
--- a/arch/arm64/include/asm/alternative.h --- a/arch/arm64/include/asm/alternative.h
+++ b/arch/arm64/include/asm/alternative.h +++ b/arch/arm64/include/asm/alternative.h
@@ -35,6 +35,12 @@ void apply_alternatives_module(void *sta @@ -35,6 +35,12 @@ void apply_alternatives_module(void *start, size_t length);
static inline void apply_alternatives_module(void *start, size_t length) { } static inline void apply_alternatives_module(void *start, size_t length) { }
#endif #endif
@ -30,9 +34,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
#define ALTINSTR_ENTRY(feature,cb) \ #define ALTINSTR_ENTRY(feature,cb) \
" .word 661b - .\n" /* label */ \ " .word 661b - .\n" /* label */ \
" .if " __stringify(cb) " == 0\n" \ " .if " __stringify(cb) " == 0\n" \
diff --git a/arch/arm64/kernel/alternative.c b/arch/arm64/kernel/alternative.c
index b5d603992d40..f92815d56d17 100644
--- a/arch/arm64/kernel/alternative.c --- a/arch/arm64/kernel/alternative.c
+++ b/arch/arm64/kernel/alternative.c +++ b/arch/arm64/kernel/alternative.c
@@ -224,6 +224,7 @@ static int __apply_alternatives_multi_st @@ -224,6 +224,7 @@ static int __apply_alternatives_multi_stop(void *unused)
void __init apply_alternatives_all(void) void __init apply_alternatives_all(void)
{ {
/* better not try code patching on a live SMP system */ /* better not try code patching on a live SMP system */
@ -40,6 +46,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
stop_machine(__apply_alternatives_multi_stop, NULL, cpu_online_mask); stop_machine(__apply_alternatives_multi_stop, NULL, cpu_online_mask);
} }
diff --git a/arch/arm64/kvm/va_layout.c b/arch/arm64/kvm/va_layout.c
index c712a7376bc1..792da0e125de 100644
--- a/arch/arm64/kvm/va_layout.c --- a/arch/arm64/kvm/va_layout.c
+++ b/arch/arm64/kvm/va_layout.c +++ b/arch/arm64/kvm/va_layout.c
@@ -33,7 +33,7 @@ static u8 tag_lsb; @@ -33,7 +33,7 @@ static u8 tag_lsb;
@ -51,7 +59,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
{ {
phys_addr_t idmap_addr = __pa_symbol(__hyp_idmap_text_start); phys_addr_t idmap_addr = __pa_symbol(__hyp_idmap_text_start);
u64 hyp_va_msb; u64 hyp_va_msb;
@@ -121,8 +121,6 @@ void __init kvm_update_va_mask(struct al @@ -121,8 +121,6 @@ void __init kvm_update_va_mask(struct alt_instr *alt,
BUG_ON(nr_inst != 5); BUG_ON(nr_inst != 5);
@ -60,7 +68,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
for (i = 0; i < nr_inst; i++) { for (i = 0; i < nr_inst; i++) {
u32 rd, rn, insn, oinsn; u32 rd, rn, insn, oinsn;
@@ -167,9 +165,6 @@ void kvm_patch_vector_branch(struct alt_ @@ -167,9 +165,6 @@ void kvm_patch_vector_branch(struct alt_instr *alt,
return; return;
} }
@ -70,3 +78,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* /*
* Compute HYP VA by using the same computation as kern_hyp_va() * Compute HYP VA by using the same computation as kern_hyp_va()
*/ */
--
2.20.1

View File

@ -1,7 +1,9 @@
From 620c41f6fc3705fe88d4ede270d434f2e8494e41 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Fri, 31 Aug 2018 14:16:30 +0200 Date: Fri, 31 Aug 2018 14:16:30 +0200
Subject: [PATCH] of: allocate / free phandle cache outside of the devtree_lock Subject: [PATCH 023/266] of: allocate / free phandle cache outside of the
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz devtree_lock
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
The phandle cache code allocates memory while holding devtree_lock which The phandle cache code allocates memory while holding devtree_lock which
is a raw_spinlock_t. Memory allocation (and free()) is not possible on is a raw_spinlock_t. Memory allocation (and free()) is not possible on
@ -13,9 +15,11 @@ Cc: Frank Rowand <frowand.list@gmail.com>
Cc: devicetree@vger.kernel.org Cc: devicetree@vger.kernel.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
drivers/of/base.c | 19 +++++++++++++------ drivers/of/base.c | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-) 1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 3f21ea6a90dc..2c7cf83b200c 100644
--- a/drivers/of/base.c --- a/drivers/of/base.c
+++ b/drivers/of/base.c +++ b/drivers/of/base.c
@@ -130,31 +130,34 @@ static u32 phandle_cache_mask; @@ -130,31 +130,34 @@ static u32 phandle_cache_mask;
@ -94,3 +98,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
void __init of_core_init(void) void __init of_core_init(void)
--
2.20.1

View File

@ -1,7 +1,8 @@
From 8a311199e1b8b0034e48f571a77dc0dba92493fc Mon Sep 17 00:00:00 2001
From: Clark Williams <williams@redhat.com> From: Clark Williams <williams@redhat.com>
Date: Tue, 18 Sep 2018 10:29:31 -0500 Date: Tue, 18 Sep 2018 10:29:31 -0500
Subject: [PATCH] mm/kasan: make quarantine_lock a raw_spinlock_t Subject: [PATCH 024/266] mm/kasan: make quarantine_lock a raw_spinlock_t
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
The static lock quarantine_lock is used in quarantine.c to protect the The static lock quarantine_lock is used in quarantine.c to protect the
quarantine queue datastructures. It is taken inside quarantine queue quarantine queue datastructures. It is taken inside quarantine queue
@ -18,9 +19,11 @@ the lock is held is limited.
Signed-off-by: Clark Williams <williams@redhat.com> Signed-off-by: Clark Williams <williams@redhat.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
mm/kasan/quarantine.c | 18 +++++++++--------- mm/kasan/quarantine.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-) 1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/mm/kasan/quarantine.c b/mm/kasan/quarantine.c
index 3a8ddf8baf7d..b209dbaefde8 100644
--- a/mm/kasan/quarantine.c --- a/mm/kasan/quarantine.c
+++ b/mm/kasan/quarantine.c +++ b/mm/kasan/quarantine.c
@@ -103,7 +103,7 @@ static int quarantine_head; @@ -103,7 +103,7 @@ static int quarantine_head;
@ -32,7 +35,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
DEFINE_STATIC_SRCU(remove_cache_srcu); DEFINE_STATIC_SRCU(remove_cache_srcu);
/* Maximum size of the global queue. */ /* Maximum size of the global queue. */
@@ -190,7 +190,7 @@ void quarantine_put(struct kasan_free_me @@ -190,7 +190,7 @@ void quarantine_put(struct kasan_free_meta *info, struct kmem_cache *cache)
if (unlikely(q->bytes > QUARANTINE_PERCPU_SIZE)) { if (unlikely(q->bytes > QUARANTINE_PERCPU_SIZE)) {
qlist_move_all(q, &temp); qlist_move_all(q, &temp);
@ -41,7 +44,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
WRITE_ONCE(quarantine_size, quarantine_size + temp.bytes); WRITE_ONCE(quarantine_size, quarantine_size + temp.bytes);
qlist_move_all(&temp, &global_quarantine[quarantine_tail]); qlist_move_all(&temp, &global_quarantine[quarantine_tail]);
if (global_quarantine[quarantine_tail].bytes >= if (global_quarantine[quarantine_tail].bytes >=
@@ -203,7 +203,7 @@ void quarantine_put(struct kasan_free_me @@ -203,7 +203,7 @@ void quarantine_put(struct kasan_free_meta *info, struct kmem_cache *cache)
if (new_tail != quarantine_head) if (new_tail != quarantine_head)
quarantine_tail = new_tail; quarantine_tail = new_tail;
} }
@ -68,7 +71,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
qlist_free_all(&to_free, NULL); qlist_free_all(&to_free, NULL);
srcu_read_unlock(&remove_cache_srcu, srcu_idx); srcu_read_unlock(&remove_cache_srcu, srcu_idx);
@@ -310,17 +310,17 @@ void quarantine_remove_cache(struct kmem @@ -310,17 +310,17 @@ void quarantine_remove_cache(struct kmem_cache *cache)
*/ */
on_each_cpu(per_cpu_remove_cache, cache, 1); on_each_cpu(per_cpu_remove_cache, cache, 1);
@ -90,3 +93,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
qlist_free_all(&to_free, cache); qlist_free_all(&to_free, cache);
--
2.20.1

View File

@ -1,7 +1,9 @@
From: Paul E. McKenney <paulmck@linux.ibm.com> From 383db1cd23d5f1b7583f5723fc8460c51ee469a8 Mon Sep 17 00:00:00 2001
From: "Paul E. McKenney" <paulmck@linux.ibm.com>
Date: Mon, 29 Oct 2018 11:53:01 +0100 Date: Mon, 29 Oct 2018 11:53:01 +0100
Subject: [PATCH] EXP rcu: Revert expedited GP parallelization cleverness Subject: [PATCH 025/266] EXP rcu: Revert expedited GP parallelization
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz cleverness
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
(Commit 258ba8e089db23f760139266c232f01bad73f85c from linux-rcu) (Commit 258ba8e089db23f760139266c232f01bad73f85c from linux-rcu)
@ -14,12 +16,14 @@ Suggested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com> Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
kernel/rcu/tree_exp.h | 9 +-------- kernel/rcu/tree_exp.h | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-) 1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/kernel/rcu/tree_exp.h b/kernel/rcu/tree_exp.h
index 0b2c2ad69629..a0486414edb4 100644
--- a/kernel/rcu/tree_exp.h --- a/kernel/rcu/tree_exp.h
+++ b/kernel/rcu/tree_exp.h +++ b/kernel/rcu/tree_exp.h
@@ -472,7 +472,6 @@ static void sync_rcu_exp_select_node_cpu @@ -472,7 +472,6 @@ static void sync_rcu_exp_select_node_cpus(struct work_struct *wp)
static void sync_rcu_exp_select_cpus(struct rcu_state *rsp, static void sync_rcu_exp_select_cpus(struct rcu_state *rsp,
smp_call_func_t func) smp_call_func_t func)
{ {
@ -27,7 +31,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
struct rcu_node *rnp; struct rcu_node *rnp;
trace_rcu_exp_grace_period(rsp->name, rcu_exp_gp_seq_endval(rsp), TPS("reset")); trace_rcu_exp_grace_period(rsp->name, rcu_exp_gp_seq_endval(rsp), TPS("reset"));
@@ -494,13 +493,7 @@ static void sync_rcu_exp_select_cpus(str @@ -494,13 +493,7 @@ static void sync_rcu_exp_select_cpus(struct rcu_state *rsp,
continue; continue;
} }
INIT_WORK(&rnp->rew.rew_work, sync_rcu_exp_select_node_cpus); INIT_WORK(&rnp->rew.rew_work, sync_rcu_exp_select_node_cpus);
@ -42,3 +46,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
rnp->exp_need_flush = true; rnp->exp_need_flush = true;
} }
--
2.20.1

View File

@ -1,7 +1,11 @@
From dcf4a87ee4351ab504708b78c95b72551e34f774 Mon Sep 17 00:00:00 2001
From: He Zhe <zhe.he@windriver.com> From: He Zhe <zhe.he@windriver.com>
Date: Wed, 19 Dec 2018 16:30:57 +0100 Date: Wed, 19 Dec 2018 16:30:57 +0100
Subject: [PATCH] kmemleak: Turn kmemleak_lock to raw spinlock on RT Subject: [PATCH 026/266] kmemleak: Turn kmemleak_lock to raw spinlock on RT
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz 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.31-rt18.tar.xz
kmemleak_lock, as a rwlock on RT, can possibly be held in atomic context and kmemleak_lock, as a rwlock on RT, can possibly be held in atomic context and
causes the follow BUG. causes the follow BUG.
@ -71,9 +75,11 @@ Link: https://lkml.kernel.org/r/1542877459-144382-1-git-send-email-zhe.he@windri
Link: https://lkml.kernel.org/r/20181218150744.GB20197@arrakis.emea.arm.com Link: https://lkml.kernel.org/r/20181218150744.GB20197@arrakis.emea.arm.com
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
mm/kmemleak.c | 20 ++++++++++---------- mm/kmemleak.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-) 1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/mm/kmemleak.c b/mm/kmemleak.c
index 17dd883198ae..b68a3d0d075f 100644
--- a/mm/kmemleak.c --- a/mm/kmemleak.c
+++ b/mm/kmemleak.c +++ b/mm/kmemleak.c
@@ -26,7 +26,7 @@ @@ -26,7 +26,7 @@
@ -94,7 +100,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* allocation caches for kmemleak internal data */ /* allocation caches for kmemleak internal data */
static struct kmem_cache *object_cache; static struct kmem_cache *object_cache;
@@ -491,9 +491,9 @@ static struct kmemleak_object *find_and_ @@ -491,9 +491,9 @@ static struct kmemleak_object *find_and_get_object(unsigned long ptr, int alias)
struct kmemleak_object *object; struct kmemleak_object *object;
rcu_read_lock(); rcu_read_lock();
@ -106,7 +112,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* check whether the object is still available */ /* check whether the object is still available */
if (object && !get_object(object)) if (object && !get_object(object))
@@ -513,13 +513,13 @@ static struct kmemleak_object *find_and_ @@ -513,13 +513,13 @@ static struct kmemleak_object *find_and_remove_object(unsigned long ptr, int ali
unsigned long flags; unsigned long flags;
struct kmemleak_object *object; struct kmemleak_object *object;
@ -122,7 +128,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return object; return object;
} }
@@ -593,7 +593,7 @@ static struct kmemleak_object *create_ob @@ -593,7 +593,7 @@ static struct kmemleak_object *create_object(unsigned long ptr, size_t size,
/* kernel backtrace */ /* kernel backtrace */
object->trace_len = __save_stack_trace(object->trace); object->trace_len = __save_stack_trace(object->trace);
@ -131,7 +137,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
min_addr = min(min_addr, ptr); min_addr = min(min_addr, ptr);
max_addr = max(max_addr, ptr + size); max_addr = max(max_addr, ptr + size);
@@ -624,7 +624,7 @@ static struct kmemleak_object *create_ob @@ -624,7 +624,7 @@ static struct kmemleak_object *create_object(unsigned long ptr, size_t size,
list_add_tail_rcu(&object->object_list, &object_list); list_add_tail_rcu(&object->object_list, &object_list);
out: out:
@ -140,7 +146,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return object; return object;
} }
@@ -1310,7 +1310,7 @@ static void scan_block(void *_start, voi @@ -1310,7 +1310,7 @@ static void scan_block(void *_start, void *_end,
unsigned long *end = _end - (BYTES_PER_POINTER - 1); unsigned long *end = _end - (BYTES_PER_POINTER - 1);
unsigned long flags; unsigned long flags;
@ -149,7 +155,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
for (ptr = start; ptr < end; ptr++) { for (ptr = start; ptr < end; ptr++) {
struct kmemleak_object *object; struct kmemleak_object *object;
unsigned long pointer; unsigned long pointer;
@@ -1367,7 +1367,7 @@ static void scan_block(void *_start, voi @@ -1367,7 +1367,7 @@ static void scan_block(void *_start, void *_end,
spin_unlock(&object->lock); spin_unlock(&object->lock);
} }
} }
@ -158,3 +164,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
/* /*
--
2.20.1

View File

@ -1,11 +1,8 @@
Date: Fri, 28 Oct 2016 23:05:11 +0200 From 2392a2ef206d32260f9bf32e3f5041bb86920b15 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Trond Myklebust <trond.myklebust@primarydata.com> Date: Fri, 28 Oct 2016 23:05:11 +0200
Cc: Anna Schumaker <anna.schumaker@netapp.com>, Subject: [PATCH 027/266] NFSv4: replace seqcount_t with a seqlock_t
linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
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.25-rt16.tar.xz
The raw_write_seqcount_begin() in nfs4_reclaim_open_state() bugs me 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 because it maps to preempt_disable() in -RT which I can't have at this
@ -23,15 +20,17 @@ block readers).
Reported-by: kernel test robot <xiaolong.ye@intel.com> Reported-by: kernel test robot <xiaolong.ye@intel.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
fs/nfs/delegation.c | 4 ++-- fs/nfs/delegation.c | 4 ++--
fs/nfs/nfs4_fs.h | 2 +- fs/nfs/nfs4_fs.h | 2 +-
fs/nfs/nfs4proc.c | 4 ++-- fs/nfs/nfs4proc.c | 4 ++--
fs/nfs/nfs4state.c | 22 ++++++++++++++++------ fs/nfs/nfs4state.c | 22 ++++++++++++++++------
4 files changed, 21 insertions(+), 11 deletions(-) 4 files changed, 21 insertions(+), 11 deletions(-)
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c
index 75fe92eaa681..e8d05393443f 100644
--- a/fs/nfs/delegation.c --- a/fs/nfs/delegation.c
+++ b/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c
@@ -152,11 +152,11 @@ static int nfs_delegation_claim_opens(st @@ -152,11 +152,11 @@ static int nfs_delegation_claim_opens(struct inode *inode,
sp = state->owner; sp = state->owner;
/* Block nfs4_proc_unlck */ /* Block nfs4_proc_unlck */
mutex_lock(&sp->so_delegreturn_mutex); mutex_lock(&sp->so_delegreturn_mutex);
@ -45,6 +44,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
err = -EAGAIN; err = -EAGAIN;
mutex_unlock(&sp->so_delegreturn_mutex); mutex_unlock(&sp->so_delegreturn_mutex);
put_nfs_open_context(ctx); put_nfs_open_context(ctx);
diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h
index 63287d911c08..2ae55eaa4a1e 100644
--- a/fs/nfs/nfs4_fs.h --- a/fs/nfs/nfs4_fs.h
+++ b/fs/nfs/nfs4_fs.h +++ b/fs/nfs/nfs4_fs.h
@@ -114,7 +114,7 @@ struct nfs4_state_owner { @@ -114,7 +114,7 @@ struct nfs4_state_owner {
@ -56,9 +57,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
struct mutex so_delegreturn_mutex; struct mutex so_delegreturn_mutex;
}; };
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index e7abcf7629b3..d95afb31b918 100644
--- a/fs/nfs/nfs4proc.c --- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c
@@ -2859,7 +2859,7 @@ static int _nfs4_open_and_get_state(stru @@ -2863,7 +2863,7 @@ static int _nfs4_open_and_get_state(struct nfs4_opendata *opendata,
unsigned int seq; unsigned int seq;
int ret; int ret;
@ -67,7 +70,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
ret = _nfs4_proc_open(opendata, ctx); ret = _nfs4_proc_open(opendata, ctx);
if (ret != 0) if (ret != 0)
@@ -2900,7 +2900,7 @@ static int _nfs4_open_and_get_state(stru @@ -2904,7 +2904,7 @@ static int _nfs4_open_and_get_state(struct nfs4_opendata *opendata,
if (d_inode(dentry) == state->inode) { if (d_inode(dentry) == state->inode) {
nfs_inode_attach_open_context(ctx); nfs_inode_attach_open_context(ctx);
@ -76,9 +79,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
nfs4_schedule_stateid_recovery(server, state); nfs4_schedule_stateid_recovery(server, state);
} }
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index d2f645d34eb1..1698dd2ca20b 100644
--- a/fs/nfs/nfs4state.c --- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c
@@ -511,7 +511,7 @@ nfs4_alloc_state_owner(struct nfs_server @@ -511,7 +511,7 @@ nfs4_alloc_state_owner(struct nfs_server *server,
nfs4_init_seqid_counter(&sp->so_seqid); nfs4_init_seqid_counter(&sp->so_seqid);
atomic_set(&sp->so_count, 1); atomic_set(&sp->so_count, 1);
INIT_LIST_HEAD(&sp->so_lru); INIT_LIST_HEAD(&sp->so_lru);
@ -87,7 +92,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
mutex_init(&sp->so_delegreturn_mutex); mutex_init(&sp->so_delegreturn_mutex);
return sp; return sp;
} }
@@ -1564,8 +1564,12 @@ static int nfs4_reclaim_open_state(struc @@ -1564,8 +1564,12 @@ static int nfs4_reclaim_open_state(struct nfs4_state_owner *sp, const struct nfs
* recovering after a network partition or a reboot from a * recovering after a network partition or a reboot from a
* server that doesn't support a grace period. * server that doesn't support a grace period.
*/ */
@ -101,7 +106,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
restart: restart:
list_for_each_entry(state, &sp->so_states, open_states) { list_for_each_entry(state, &sp->so_states, open_states) {
if (!test_and_clear_bit(ops->state_flag_bit, &state->flags)) if (!test_and_clear_bit(ops->state_flag_bit, &state->flags))
@@ -1652,14 +1656,20 @@ static int nfs4_reclaim_open_state(struc @@ -1652,14 +1656,20 @@ static int nfs4_reclaim_open_state(struct nfs4_state_owner *sp, const struct nfs
spin_lock(&sp->so_lock); spin_lock(&sp->so_lock);
goto restart; goto restart;
} }
@ -126,3 +131,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return status; return status;
} }
--
2.20.1

View File

@ -1,10 +1,12 @@
From 3550c358113e3e973671b39bbf26eacab512ef1c Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Tue, 4 Apr 2017 12:50:16 +0200 Date: Tue, 4 Apr 2017 12:50:16 +0200
Subject: [PATCH] kernel: sched: Provide a pointer to the valid CPU mask Subject: [PATCH 028/266] kernel: sched: Provide a pointer to the valid CPU
mask
MIME-Version: 1.0 MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit Content-Transfer-Encoding: 8bit
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
In commit 4b53a3412d66 ("sched/core: Remove the tsk_nr_cpus_allowed() In commit 4b53a3412d66 ("sched/core: Remove the tsk_nr_cpus_allowed()
wrapper") the tsk_nr_cpus_allowed() wrapper was removed. There was not wrapper") the tsk_nr_cpus_allowed() wrapper was removed. There was not
@ -57,34 +59,36 @@ Cc: Ingo Molnar <mingo@elte.hu>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net> Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
arch/ia64/kernel/mca.c | 2 - arch/ia64/kernel/mca.c | 2 +-
arch/mips/include/asm/switch_to.h | 4 +- arch/mips/include/asm/switch_to.h | 4 +--
arch/mips/kernel/mips-mt-fpaff.c | 2 - arch/mips/kernel/mips-mt-fpaff.c | 2 +-
arch/mips/kernel/traps.c | 6 ++-- arch/mips/kernel/traps.c | 6 ++--
arch/powerpc/platforms/cell/spufs/sched.c | 2 - arch/powerpc/platforms/cell/spufs/sched.c | 2 +-
arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c | 2 - arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c | 2 +-
drivers/infiniband/hw/hfi1/affinity.c | 6 ++-- drivers/infiniband/hw/hfi1/affinity.c | 6 ++--
drivers/infiniband/hw/hfi1/sdma.c | 3 -- drivers/infiniband/hw/hfi1/sdma.c | 3 +-
drivers/infiniband/hw/qib/qib_file_ops.c | 7 ++-- drivers/infiniband/hw/qib/qib_file_ops.c | 7 ++--
fs/proc/array.c | 4 +- fs/proc/array.c | 4 +--
include/linux/sched.h | 5 ++- include/linux/sched.h | 5 +--
init/init_task.c | 3 +- init/init_task.c | 3 +-
kernel/cgroup/cpuset.c | 2 - kernel/cgroup/cpuset.c | 2 +-
kernel/fork.c | 2 + kernel/fork.c | 2 ++
kernel/sched/core.c | 40 ++++++++++++++-------------- kernel/sched/core.c | 40 ++++++++++-----------
kernel/sched/cpudeadline.c | 4 +- kernel/sched/cpudeadline.c | 4 +--
kernel/sched/cpupri.c | 4 +- kernel/sched/cpupri.c | 4 +--
kernel/sched/deadline.c | 6 ++-- kernel/sched/deadline.c | 6 ++--
kernel/sched/fair.c | 32 +++++++++++----------- kernel/sched/fair.c | 32 ++++++++---------
kernel/sched/rt.c | 4 +- kernel/sched/rt.c | 4 +--
kernel/trace/trace_hwlat.c | 2 - kernel/trace/trace_hwlat.c | 2 +-
lib/smp_processor_id.c | 2 - lib/smp_processor_id.c | 2 +-
samples/trace_events/trace-events-sample.c | 2 - samples/trace_events/trace-events-sample.c | 2 +-
23 files changed, 74 insertions(+), 72 deletions(-) 23 files changed, 74 insertions(+), 72 deletions(-)
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c
index 6115464d5f03..f09e34c8409c 100644
--- a/arch/ia64/kernel/mca.c --- a/arch/ia64/kernel/mca.c
+++ b/arch/ia64/kernel/mca.c +++ b/arch/ia64/kernel/mca.c
@@ -1824,7 +1824,7 @@ format_mca_init_stack(void *mca_data, un @@ -1824,7 +1824,7 @@ format_mca_init_stack(void *mca_data, unsigned long offset,
ti->cpu = cpu; ti->cpu = cpu;
p->stack = ti; p->stack = ti;
p->state = TASK_UNINTERRUPTIBLE; p->state = TASK_UNINTERRUPTIBLE;
@ -93,6 +97,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
INIT_LIST_HEAD(&p->tasks); INIT_LIST_HEAD(&p->tasks);
p->parent = p->real_parent = p->group_leader = p; p->parent = p->real_parent = p->group_leader = p;
INIT_LIST_HEAD(&p->children); INIT_LIST_HEAD(&p->children);
diff --git a/arch/mips/include/asm/switch_to.h b/arch/mips/include/asm/switch_to.h
index e610473d61b8..1428b4febbc9 100644
--- a/arch/mips/include/asm/switch_to.h --- a/arch/mips/include/asm/switch_to.h
+++ b/arch/mips/include/asm/switch_to.h +++ b/arch/mips/include/asm/switch_to.h
@@ -42,7 +42,7 @@ extern struct task_struct *ll_task; @@ -42,7 +42,7 @@ extern struct task_struct *ll_task;
@ -113,9 +119,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} \ } \
next->thread.emulated_fp = 0; \ next->thread.emulated_fp = 0; \
} while(0) } while(0)
diff --git a/arch/mips/kernel/mips-mt-fpaff.c b/arch/mips/kernel/mips-mt-fpaff.c
index a7c0f97e4b0d..1a08428eedcf 100644
--- a/arch/mips/kernel/mips-mt-fpaff.c --- a/arch/mips/kernel/mips-mt-fpaff.c
+++ b/arch/mips/kernel/mips-mt-fpaff.c +++ b/arch/mips/kernel/mips-mt-fpaff.c
@@ -177,7 +177,7 @@ asmlinkage long mipsmt_sys_sched_getaffi @@ -177,7 +177,7 @@ asmlinkage long mipsmt_sys_sched_getaffinity(pid_t pid, unsigned int len,
if (retval) if (retval)
goto out_unlock; goto out_unlock;
@ -124,6 +132,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
cpumask_and(&mask, &allowed, cpu_active_mask); cpumask_and(&mask, &allowed, cpu_active_mask);
out_unlock: out_unlock:
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 9dab0ed1b227..3623cf32f5f4 100644
--- a/arch/mips/kernel/traps.c --- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c
@@ -1174,12 +1174,12 @@ static void mt_ase_fp_affinity(void) @@ -1174,12 +1174,12 @@ static void mt_ase_fp_affinity(void)
@ -142,9 +152,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
&mt_fpu_cpumask); &mt_fpu_cpumask);
set_cpus_allowed_ptr(current, &tmask); set_cpus_allowed_ptr(current, &tmask);
set_thread_flag(TIF_FPUBOUND); set_thread_flag(TIF_FPUBOUND);
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
index c9ef3c532169..cb10249b1125 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c --- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c +++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -141,7 +141,7 @@ void __spu_update_sched_info(struct spu_ @@ -141,7 +141,7 @@ void __spu_update_sched_info(struct spu_context *ctx)
* runqueue. The context will be rescheduled on the proper node * runqueue. The context will be rescheduled on the proper node
* if it is timesliced or preempted. * if it is timesliced or preempted.
*/ */
@ -153,9 +165,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* Save the current cpu id for spu interrupt routing. */ /* Save the current cpu id for spu interrupt routing. */
ctx->last_ran = raw_smp_processor_id(); ctx->last_ran = raw_smp_processor_id();
diff --git a/arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c b/arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c
index f8c260d522ca..befeec6414b0 100644
--- a/arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c --- a/arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c
+++ b/arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c +++ b/arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c
@@ -1435,7 +1435,7 @@ static int pseudo_lock_dev_mmap(struct f @@ -1435,7 +1435,7 @@ static int pseudo_lock_dev_mmap(struct file *filp, struct vm_area_struct *vma)
* may be scheduled elsewhere and invalidate entries in the * may be scheduled elsewhere and invalidate entries in the
* pseudo-locked region. * pseudo-locked region.
*/ */
@ -164,6 +178,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
mutex_unlock(&rdtgroup_mutex); mutex_unlock(&rdtgroup_mutex);
return -EINVAL; return -EINVAL;
} }
diff --git a/drivers/infiniband/hw/hfi1/affinity.c b/drivers/infiniband/hw/hfi1/affinity.c
index bedd5fba33b0..3f4259f11a35 100644
--- a/drivers/infiniband/hw/hfi1/affinity.c --- a/drivers/infiniband/hw/hfi1/affinity.c
+++ b/drivers/infiniband/hw/hfi1/affinity.c +++ b/drivers/infiniband/hw/hfi1/affinity.c
@@ -1037,7 +1037,7 @@ int hfi1_get_proc_affinity(int node) @@ -1037,7 +1037,7 @@ int hfi1_get_proc_affinity(int node)
@ -193,9 +209,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
hfi1_cdbg(PROC, "PID %u %s affinity set to CPU set(s) %*pbl", hfi1_cdbg(PROC, "PID %u %s affinity set to CPU set(s) %*pbl",
current->pid, current->comm, current->pid, current->comm,
cpumask_pr_args(proc_mask)); cpumask_pr_args(proc_mask));
diff --git a/drivers/infiniband/hw/hfi1/sdma.c b/drivers/infiniband/hw/hfi1/sdma.c
index 88e326d6cc49..b0d01ace6611 100644
--- a/drivers/infiniband/hw/hfi1/sdma.c --- a/drivers/infiniband/hw/hfi1/sdma.c
+++ b/drivers/infiniband/hw/hfi1/sdma.c +++ b/drivers/infiniband/hw/hfi1/sdma.c
@@ -855,14 +855,13 @@ struct sdma_engine *sdma_select_user_eng @@ -855,14 +855,13 @@ struct sdma_engine *sdma_select_user_engine(struct hfi1_devdata *dd,
{ {
struct sdma_rht_node *rht_node; struct sdma_rht_node *rht_node;
struct sdma_engine *sde = NULL; struct sdma_engine *sde = NULL;
@ -211,9 +229,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
goto out; goto out;
cpu_id = smp_processor_id(); cpu_id = smp_processor_id();
diff --git a/drivers/infiniband/hw/qib/qib_file_ops.c b/drivers/infiniband/hw/qib/qib_file_ops.c
index 98e1ce14fa2a..5d3828625017 100644
--- a/drivers/infiniband/hw/qib/qib_file_ops.c --- a/drivers/infiniband/hw/qib/qib_file_ops.c
+++ b/drivers/infiniband/hw/qib/qib_file_ops.c +++ b/drivers/infiniband/hw/qib/qib_file_ops.c
@@ -1142,7 +1142,7 @@ static __poll_t qib_poll(struct file *fp @@ -1142,7 +1142,7 @@ static __poll_t qib_poll(struct file *fp, struct poll_table_struct *pt)
static void assign_ctxt_affinity(struct file *fp, struct qib_devdata *dd) static void assign_ctxt_affinity(struct file *fp, struct qib_devdata *dd)
{ {
struct qib_filedata *fd = fp->private_data; struct qib_filedata *fd = fp->private_data;
@ -222,7 +242,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
const struct cpumask *local_mask = cpumask_of_pcibus(dd->pcidev->bus); const struct cpumask *local_mask = cpumask_of_pcibus(dd->pcidev->bus);
int local_cpu; int local_cpu;
@@ -1623,9 +1623,8 @@ static int qib_assign_ctxt(struct file * @@ -1623,9 +1623,8 @@ static int qib_assign_ctxt(struct file *fp, const struct qib_user_info *uinfo)
ret = find_free_ctxt(i_minor - 1, fp, uinfo); ret = find_free_ctxt(i_minor - 1, fp, uinfo);
else { else {
int unit; int unit;
@ -234,9 +254,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (weight == 1 && !test_bit(cpu, qib_cpulist)) if (weight == 1 && !test_bit(cpu, qib_cpulist))
if (!find_hca(cpu, &unit) && unit >= 0) if (!find_hca(cpu, &unit) && unit >= 0)
diff --git a/fs/proc/array.c b/fs/proc/array.c
index 0ceb3b6b37e7..ccfef702c771 100644
--- a/fs/proc/array.c --- a/fs/proc/array.c
+++ b/fs/proc/array.c +++ b/fs/proc/array.c
@@ -381,9 +381,9 @@ static inline void task_context_switch_c @@ -381,9 +381,9 @@ static inline void task_context_switch_counts(struct seq_file *m,
static void task_cpus_allowed(struct seq_file *m, struct task_struct *task) static void task_cpus_allowed(struct seq_file *m, struct task_struct *task)
{ {
seq_printf(m, "Cpus_allowed:\t%*pb\n", seq_printf(m, "Cpus_allowed:\t%*pb\n",
@ -248,6 +270,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
static inline void task_core_dumping(struct seq_file *m, struct mm_struct *mm) static inline void task_core_dumping(struct seq_file *m, struct mm_struct *mm)
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 4abb5bd74b04..b347614b42f4 100644
--- a/include/linux/sched.h --- a/include/linux/sched.h
+++ b/include/linux/sched.h +++ b/include/linux/sched.h
@@ -660,7 +660,8 @@ struct task_struct { @@ -660,7 +660,8 @@ struct task_struct {
@ -269,6 +293,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
#define PF_MCE_EARLY 0x08000000 /* Early kill for mce process policy */ #define PF_MCE_EARLY 0x08000000 /* Early kill for mce process policy */
#define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */ #define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */
#define PF_FREEZER_SKIP 0x40000000 /* Freezer should not count it as freezable */ #define PF_FREEZER_SKIP 0x40000000 /* Freezer should not count it as freezable */
diff --git a/init/init_task.c b/init/init_task.c
index 5aebe3be4d7c..0b49b9cf5571 100644
--- a/init/init_task.c --- a/init/init_task.c
+++ b/init/init_task.c +++ b/init/init_task.c
@@ -71,7 +71,8 @@ struct task_struct init_task @@ -71,7 +71,8 @@ struct task_struct init_task
@ -281,9 +307,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
.nr_cpus_allowed= NR_CPUS, .nr_cpus_allowed= NR_CPUS,
.mm = NULL, .mm = NULL,
.active_mm = &init_mm, .active_mm = &init_mm,
diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
index 266f10cb7222..ef085d84a940 100644
--- a/kernel/cgroup/cpuset.c --- a/kernel/cgroup/cpuset.c
+++ b/kernel/cgroup/cpuset.c +++ b/kernel/cgroup/cpuset.c
@@ -2090,7 +2090,7 @@ static void cpuset_fork(struct task_stru @@ -2090,7 +2090,7 @@ static void cpuset_fork(struct task_struct *task)
if (task_css_is_root(task, cpuset_cgrp_id)) if (task_css_is_root(task, cpuset_cgrp_id))
return; return;
@ -292,9 +320,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
task->mems_allowed = current->mems_allowed; task->mems_allowed = current->mems_allowed;
} }
diff --git a/kernel/fork.c b/kernel/fork.c
index 64ef113e387e..bfe9c5c3eb88 100644
--- a/kernel/fork.c --- a/kernel/fork.c
+++ b/kernel/fork.c +++ b/kernel/fork.c
@@ -845,6 +845,8 @@ static struct task_struct *dup_task_stru @@ -845,6 +845,8 @@ static struct task_struct *dup_task_struct(struct task_struct *orig, int node)
#ifdef CONFIG_STACKPROTECTOR #ifdef CONFIG_STACKPROTECTOR
tsk->stack_canary = get_random_canary(); tsk->stack_canary = get_random_canary();
#endif #endif
@ -303,9 +333,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* /*
* One for us, one for whoever does the "release_task()" (usually * One for us, one for whoever does the "release_task()" (usually
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 152a0b0c91bb..c7377dcaf718 100644
--- a/kernel/sched/core.c --- a/kernel/sched/core.c
+++ b/kernel/sched/core.c +++ b/kernel/sched/core.c
@@ -876,7 +876,7 @@ static inline bool is_per_cpu_kthread(st @@ -877,7 +877,7 @@ static inline bool is_per_cpu_kthread(struct task_struct *p)
*/ */
static inline bool is_cpu_allowed(struct task_struct *p, int cpu) static inline bool is_cpu_allowed(struct task_struct *p, int cpu)
{ {
@ -314,7 +346,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return false; return false;
if (is_per_cpu_kthread(p)) if (is_per_cpu_kthread(p))
@@ -971,7 +971,7 @@ static int migration_cpu_stop(void *data @@ -972,7 +972,7 @@ static int migration_cpu_stop(void *data)
local_irq_disable(); local_irq_disable();
/* /*
* We need to explicitly wake pending tasks before running * We need to explicitly wake pending tasks before running
@ -323,7 +355,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
* during wakeups, see set_cpus_allowed_ptr()'s TASK_WAKING test. * during wakeups, see set_cpus_allowed_ptr()'s TASK_WAKING test.
*/ */
sched_ttwu_pending(); sched_ttwu_pending();
@@ -1002,7 +1002,7 @@ static int migration_cpu_stop(void *data @@ -1003,7 +1003,7 @@ static int migration_cpu_stop(void *data)
*/ */
void set_cpus_allowed_common(struct task_struct *p, const struct cpumask *new_mask) void set_cpus_allowed_common(struct task_struct *p, const struct cpumask *new_mask)
{ {
@ -332,7 +364,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
p->nr_cpus_allowed = cpumask_weight(new_mask); p->nr_cpus_allowed = cpumask_weight(new_mask);
} }
@@ -1072,7 +1072,7 @@ static int __set_cpus_allowed_ptr(struct @@ -1073,7 +1073,7 @@ static int __set_cpus_allowed_ptr(struct task_struct *p,
goto out; goto out;
} }
@ -341,7 +373,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
goto out; goto out;
if (!cpumask_intersects(new_mask, cpu_valid_mask)) { if (!cpumask_intersects(new_mask, cpu_valid_mask)) {
@@ -1235,10 +1235,10 @@ static int migrate_swap_stop(void *data) @@ -1236,10 +1236,10 @@ static int migrate_swap_stop(void *data)
if (task_cpu(arg->src_task) != arg->src_cpu) if (task_cpu(arg->src_task) != arg->src_cpu)
goto unlock; goto unlock;
@ -354,7 +386,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
goto unlock; goto unlock;
__migrate_swap_task(arg->src_task, arg->dst_cpu); __migrate_swap_task(arg->src_task, arg->dst_cpu);
@@ -1280,10 +1280,10 @@ int migrate_swap(struct task_struct *cur @@ -1281,10 +1281,10 @@ int migrate_swap(struct task_struct *cur, struct task_struct *p,
if (!cpu_active(arg.src_cpu) || !cpu_active(arg.dst_cpu)) if (!cpu_active(arg.src_cpu) || !cpu_active(arg.dst_cpu))
goto out; goto out;
@ -367,7 +399,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
goto out; goto out;
trace_sched_swap_numa(cur, arg.src_cpu, p, arg.dst_cpu); trace_sched_swap_numa(cur, arg.src_cpu, p, arg.dst_cpu);
@@ -1428,7 +1428,7 @@ void kick_process(struct task_struct *p) @@ -1429,7 +1429,7 @@ void kick_process(struct task_struct *p)
EXPORT_SYMBOL_GPL(kick_process); EXPORT_SYMBOL_GPL(kick_process);
/* /*
@ -376,7 +408,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
* *
* A few notes on cpu_active vs cpu_online: * A few notes on cpu_active vs cpu_online:
* *
@@ -1468,14 +1468,14 @@ static int select_fallback_rq(int cpu, s @@ -1469,14 +1469,14 @@ static int select_fallback_rq(int cpu, struct task_struct *p)
for_each_cpu(dest_cpu, nodemask) { for_each_cpu(dest_cpu, nodemask) {
if (!cpu_active(dest_cpu)) if (!cpu_active(dest_cpu))
continue; continue;
@ -393,7 +425,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (!is_cpu_allowed(p, dest_cpu)) if (!is_cpu_allowed(p, dest_cpu))
continue; continue;
@@ -1519,7 +1519,7 @@ static int select_fallback_rq(int cpu, s @@ -1520,7 +1520,7 @@ static int select_fallback_rq(int cpu, struct task_struct *p)
} }
/* /*
@ -402,7 +434,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
*/ */
static inline static inline
int select_task_rq(struct task_struct *p, int cpu, int sd_flags, int wake_flags) int select_task_rq(struct task_struct *p, int cpu, int sd_flags, int wake_flags)
@@ -1529,11 +1529,11 @@ int select_task_rq(struct task_struct *p @@ -1530,11 +1530,11 @@ int select_task_rq(struct task_struct *p, int cpu, int sd_flags, int wake_flags)
if (p->nr_cpus_allowed > 1) if (p->nr_cpus_allowed > 1)
cpu = p->sched_class->select_task_rq(p, cpu, sd_flags, wake_flags); cpu = p->sched_class->select_task_rq(p, cpu, sd_flags, wake_flags);
else else
@ -416,7 +448,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
* CPU. * CPU.
* *
* Since this is common to all placement strategies, this lives here. * Since this is common to all placement strategies, this lives here.
@@ -2400,7 +2400,7 @@ void wake_up_new_task(struct task_struct @@ -2401,7 +2401,7 @@ void wake_up_new_task(struct task_struct *p)
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
/* /*
* Fork balancing, do it here and not earlier because: * Fork balancing, do it here and not earlier because:
@ -425,7 +457,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
* - any previously selected CPU might disappear through hotplug * - any previously selected CPU might disappear through hotplug
* *
* Use __set_task_cpu() to avoid calling sched_class::migrate_task_rq, * Use __set_task_cpu() to avoid calling sched_class::migrate_task_rq,
@@ -4273,7 +4273,7 @@ static int __sched_setscheduler(struct t @@ -4274,7 +4274,7 @@ static int __sched_setscheduler(struct task_struct *p,
* the entire root_domain to become SCHED_DEADLINE. We * the entire root_domain to become SCHED_DEADLINE. We
* will also fail if there's no bandwidth available. * will also fail if there's no bandwidth available.
*/ */
@ -434,7 +466,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
rq->rd->dl_bw.bw == 0) { rq->rd->dl_bw.bw == 0) {
task_rq_unlock(rq, p, &rf); task_rq_unlock(rq, p, &rf);
return -EPERM; return -EPERM;
@@ -4872,7 +4872,7 @@ long sched_getaffinity(pid_t pid, struct @@ -4873,7 +4873,7 @@ long sched_getaffinity(pid_t pid, struct cpumask *mask)
goto out_unlock; goto out_unlock;
raw_spin_lock_irqsave(&p->pi_lock, flags); raw_spin_lock_irqsave(&p->pi_lock, flags);
@ -443,7 +475,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
raw_spin_unlock_irqrestore(&p->pi_lock, flags); raw_spin_unlock_irqrestore(&p->pi_lock, flags);
out_unlock: out_unlock:
@@ -5452,7 +5452,7 @@ int task_can_attach(struct task_struct * @@ -5453,7 +5453,7 @@ int task_can_attach(struct task_struct *p,
* allowed nodes is unnecessary. Thus, cpusets are not * allowed nodes is unnecessary. Thus, cpusets are not
* applicable for such threads. This prevents checking for * applicable for such threads. This prevents checking for
* success of set_cpus_allowed_ptr() on all attached tasks * success of set_cpus_allowed_ptr() on all attached tasks
@ -452,7 +484,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
*/ */
if (p->flags & PF_NO_SETAFFINITY) { if (p->flags & PF_NO_SETAFFINITY) {
ret = -EINVAL; ret = -EINVAL;
@@ -5479,7 +5479,7 @@ int migrate_task_to(struct task_struct * @@ -5480,7 +5480,7 @@ int migrate_task_to(struct task_struct *p, int target_cpu)
if (curr_cpu == target_cpu) if (curr_cpu == target_cpu)
return 0; return 0;
@ -461,7 +493,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return -EINVAL; return -EINVAL;
/* TODO: This is not properly updating schedstats */ /* TODO: This is not properly updating schedstats */
@@ -5617,7 +5617,7 @@ static void migrate_tasks(struct rq *dea @@ -5618,7 +5618,7 @@ static void migrate_tasks(struct rq *dead_rq, struct rq_flags *rf)
put_prev_task(rq, next); put_prev_task(rq, next);
/* /*
@ -470,9 +502,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
* both pi_lock and rq->lock, such that holding either * both pi_lock and rq->lock, such that holding either
* stabilizes the mask. * stabilizes the mask.
* *
diff --git a/kernel/sched/cpudeadline.c b/kernel/sched/cpudeadline.c
index 50316455ea66..d57fb2f8ae67 100644
--- a/kernel/sched/cpudeadline.c --- a/kernel/sched/cpudeadline.c
+++ b/kernel/sched/cpudeadline.c +++ b/kernel/sched/cpudeadline.c
@@ -124,14 +124,14 @@ int cpudl_find(struct cpudl *cp, struct @@ -124,14 +124,14 @@ int cpudl_find(struct cpudl *cp, struct task_struct *p,
const struct sched_dl_entity *dl_se = &p->dl; const struct sched_dl_entity *dl_se = &p->dl;
if (later_mask && if (later_mask &&
@ -489,9 +523,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
dl_time_before(dl_se->deadline, cp->elements[0].dl)) { dl_time_before(dl_se->deadline, cp->elements[0].dl)) {
if (later_mask) if (later_mask)
cpumask_set_cpu(best_cpu, later_mask); cpumask_set_cpu(best_cpu, later_mask);
diff --git a/kernel/sched/cpupri.c b/kernel/sched/cpupri.c
index daaadf939ccb..f7d2c10b4c92 100644
--- a/kernel/sched/cpupri.c --- a/kernel/sched/cpupri.c
+++ b/kernel/sched/cpupri.c +++ b/kernel/sched/cpupri.c
@@ -98,11 +98,11 @@ int cpupri_find(struct cpupri *cp, struc @@ -98,11 +98,11 @@ int cpupri_find(struct cpupri *cp, struct task_struct *p,
if (skip) if (skip)
continue; continue;
@ -505,9 +541,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* /*
* We have to ensure that we have at least one bit * We have to ensure that we have at least one bit
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index 91e4202b0634..f927b1f45474 100644
--- a/kernel/sched/deadline.c --- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c +++ b/kernel/sched/deadline.c
@@ -539,7 +539,7 @@ static struct rq *dl_task_offline_migrat @@ -539,7 +539,7 @@ static struct rq *dl_task_offline_migration(struct rq *rq, struct task_struct *p
* If we cannot preempt any rq, fall back to pick any * If we cannot preempt any rq, fall back to pick any
* online CPU: * online CPU:
*/ */
@ -516,7 +554,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (cpu >= nr_cpu_ids) { if (cpu >= nr_cpu_ids) {
/* /*
* Failed to find any suitable CPU. * Failed to find any suitable CPU.
@@ -1824,7 +1824,7 @@ static void set_curr_task_dl(struct rq * @@ -1824,7 +1824,7 @@ static void set_curr_task_dl(struct rq *rq)
static int pick_dl_task(struct rq *rq, struct task_struct *p, int cpu) static int pick_dl_task(struct rq *rq, struct task_struct *p, int cpu)
{ {
if (!task_running(rq, p) && if (!task_running(rq, p) &&
@ -525,7 +563,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return 1; return 1;
return 0; return 0;
} }
@@ -1974,7 +1974,7 @@ static struct rq *find_lock_later_rq(str @@ -1974,7 +1974,7 @@ static struct rq *find_lock_later_rq(struct task_struct *task, struct rq *rq)
/* Retry if something changed. */ /* Retry if something changed. */
if (double_lock_balance(rq, later_rq)) { if (double_lock_balance(rq, later_rq)) {
if (unlikely(task_rq(task) != rq || if (unlikely(task_rq(task) != rq ||
@ -534,9 +572,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
task_running(rq, task) || task_running(rq, task) ||
!dl_task(task) || !dl_task(task) ||
!task_on_rq_queued(task))) { !task_on_rq_queued(task))) {
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 6afda059e882..09a1e32c366f 100644
--- a/kernel/sched/fair.c --- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c +++ b/kernel/sched/fair.c
@@ -1630,7 +1630,7 @@ static void task_numa_compare(struct tas @@ -1630,7 +1630,7 @@ static void task_numa_compare(struct task_numa_env *env,
* be incurred if the tasks were swapped. * be incurred if the tasks were swapped.
*/ */
/* Skip this swap candidate if cannot move to the source cpu */ /* Skip this swap candidate if cannot move to the source cpu */
@ -545,7 +585,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
goto unlock; goto unlock;
/* /*
@@ -1727,7 +1727,7 @@ static void task_numa_find_cpu(struct ta @@ -1727,7 +1727,7 @@ static void task_numa_find_cpu(struct task_numa_env *env,
for_each_cpu(cpu, cpumask_of_node(env->dst_nid)) { for_each_cpu(cpu, cpumask_of_node(env->dst_nid)) {
/* Skip this CPU if the source task cannot migrate */ /* Skip this CPU if the source task cannot migrate */
@ -554,7 +594,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
continue; continue;
env->dst_cpu = cpu; env->dst_cpu = cpu;
@@ -5712,7 +5712,7 @@ find_idlest_group(struct sched_domain *s @@ -5712,7 +5712,7 @@ find_idlest_group(struct sched_domain *sd, struct task_struct *p,
/* Skip over this group if it has no CPUs allowed */ /* Skip over this group if it has no CPUs allowed */
if (!cpumask_intersects(sched_group_span(group), if (!cpumask_intersects(sched_group_span(group),
@ -563,7 +603,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
continue; continue;
local_group = cpumask_test_cpu(this_cpu, local_group = cpumask_test_cpu(this_cpu,
@@ -5844,7 +5844,7 @@ find_idlest_group_cpu(struct sched_group @@ -5844,7 +5844,7 @@ find_idlest_group_cpu(struct sched_group *group, struct task_struct *p, int this
return cpumask_first(sched_group_span(group)); return cpumask_first(sched_group_span(group));
/* Traverse only the allowed CPUs */ /* Traverse only the allowed CPUs */
@ -572,7 +612,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (available_idle_cpu(i)) { if (available_idle_cpu(i)) {
struct rq *rq = cpu_rq(i); struct rq *rq = cpu_rq(i);
struct cpuidle_state *idle = idle_get_state(rq); struct cpuidle_state *idle = idle_get_state(rq);
@@ -5884,7 +5884,7 @@ static inline int find_idlest_cpu(struct @@ -5884,7 +5884,7 @@ static inline int find_idlest_cpu(struct sched_domain *sd, struct task_struct *p
{ {
int new_cpu = cpu; int new_cpu = cpu;
@ -581,7 +621,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return prev_cpu; return prev_cpu;
/* /*
@@ -6001,7 +6001,7 @@ static int select_idle_core(struct task_ @@ -6001,7 +6001,7 @@ static int select_idle_core(struct task_struct *p, struct sched_domain *sd, int
if (!test_idle_cores(target, false)) if (!test_idle_cores(target, false))
return -1; return -1;
@ -590,7 +630,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
for_each_cpu_wrap(core, cpus, target) { for_each_cpu_wrap(core, cpus, target) {
bool idle = true; bool idle = true;
@@ -6035,7 +6035,7 @@ static int select_idle_smt(struct task_s @@ -6035,7 +6035,7 @@ static int select_idle_smt(struct task_struct *p, struct sched_domain *sd, int t
return -1; return -1;
for_each_cpu(cpu, cpu_smt_mask(target)) { for_each_cpu(cpu, cpu_smt_mask(target)) {
@ -599,7 +639,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
continue; continue;
if (available_idle_cpu(cpu)) if (available_idle_cpu(cpu))
return cpu; return cpu;
@@ -6098,7 +6098,7 @@ static int select_idle_cpu(struct task_s @@ -6098,7 +6098,7 @@ static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, int t
for_each_cpu_wrap(cpu, sched_domain_span(sd), target) { for_each_cpu_wrap(cpu, sched_domain_span(sd), target) {
if (!--nr) if (!--nr)
return -1; return -1;
@ -608,7 +648,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
continue; continue;
if (available_idle_cpu(cpu)) if (available_idle_cpu(cpu))
break; break;
@@ -6135,7 +6135,7 @@ static int select_idle_sibling(struct ta @@ -6135,7 +6135,7 @@ static int select_idle_sibling(struct task_struct *p, int prev, int target)
recent_used_cpu != target && recent_used_cpu != target &&
cpus_share_cache(recent_used_cpu, target) && cpus_share_cache(recent_used_cpu, target) &&
available_idle_cpu(recent_used_cpu) && available_idle_cpu(recent_used_cpu) &&
@ -617,7 +657,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* /*
* Replace recent_used_cpu with prev as it is a potential * Replace recent_used_cpu with prev as it is a potential
* candidate for the next wake: * candidate for the next wake:
@@ -6353,7 +6353,7 @@ select_task_rq_fair(struct task_struct * @@ -6353,7 +6353,7 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int wake_f
if (sd_flag & SD_BALANCE_WAKE) { if (sd_flag & SD_BALANCE_WAKE) {
record_wakee(p); record_wakee(p);
want_affine = !wake_wide(p) && !wake_cap(p, cpu, prev_cpu) want_affine = !wake_wide(p) && !wake_cap(p, cpu, prev_cpu)
@ -626,7 +666,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
rcu_read_lock(); rcu_read_lock();
@@ -7092,14 +7092,14 @@ int can_migrate_task(struct task_struct @@ -7092,14 +7092,14 @@ int can_migrate_task(struct task_struct *p, struct lb_env *env)
/* /*
* We do not migrate tasks that are: * We do not migrate tasks that are:
* 1) throttled_lb_pair, or * 1) throttled_lb_pair, or
@ -643,7 +683,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
int cpu; int cpu;
schedstat_inc(p->se.statistics.nr_failed_migrations_affine); schedstat_inc(p->se.statistics.nr_failed_migrations_affine);
@@ -7119,7 +7119,7 @@ int can_migrate_task(struct task_struct @@ -7119,7 +7119,7 @@ int can_migrate_task(struct task_struct *p, struct lb_env *env)
/* Prevent to re-select dst_cpu via env's CPUs: */ /* Prevent to re-select dst_cpu via env's CPUs: */
for_each_cpu_and(cpu, env->dst_grpmask, env->cpus) { for_each_cpu_and(cpu, env->dst_grpmask, env->cpus) {
@ -652,7 +692,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
env->flags |= LBF_DST_PINNED; env->flags |= LBF_DST_PINNED;
env->new_dst_cpu = cpu; env->new_dst_cpu = cpu;
break; break;
@@ -7716,7 +7716,7 @@ check_cpu_capacity(struct rq *rq, struct @@ -7716,7 +7716,7 @@ check_cpu_capacity(struct rq *rq, struct sched_domain *sd)
/* /*
* Group imbalance indicates (and tries to solve) the problem where balancing * Group imbalance indicates (and tries to solve) the problem where balancing
@ -661,7 +701,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
* *
* Imagine a situation of two groups of 4 CPUs each and 4 tasks each with a * Imagine a situation of two groups of 4 CPUs each and 4 tasks each with a
* cpumask covering 1 CPU of the first group and 3 CPUs of the second group. * cpumask covering 1 CPU of the first group and 3 CPUs of the second group.
@@ -8331,7 +8331,7 @@ static struct sched_group *find_busiest_ @@ -8331,7 +8331,7 @@ static struct sched_group *find_busiest_group(struct lb_env *env)
/* /*
* If the busiest group is imbalanced the below checks don't * If the busiest group is imbalanced the below checks don't
* work because they assume all things are equal, which typically * work because they assume all things are equal, which typically
@ -670,7 +710,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
*/ */
if (busiest->group_type == group_imbalanced) if (busiest->group_type == group_imbalanced)
goto force_balance; goto force_balance;
@@ -8727,7 +8727,7 @@ static int load_balance(int this_cpu, st @@ -8727,7 +8727,7 @@ static int load_balance(int this_cpu, struct rq *this_rq,
* if the curr task on busiest CPU can't be * if the curr task on busiest CPU can't be
* moved to this_cpu: * moved to this_cpu:
*/ */
@ -679,9 +719,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
raw_spin_unlock_irqrestore(&busiest->lock, raw_spin_unlock_irqrestore(&busiest->lock,
flags); flags);
env.flags |= LBF_ALL_PINNED; env.flags |= LBF_ALL_PINNED;
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 2e2955a8cf8f..4857ca145119 100644
--- a/kernel/sched/rt.c --- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c +++ b/kernel/sched/rt.c
@@ -1611,7 +1611,7 @@ static void put_prev_task_rt(struct rq * @@ -1611,7 +1611,7 @@ static void put_prev_task_rt(struct rq *rq, struct task_struct *p)
static int pick_rt_task(struct rq *rq, struct task_struct *p, int cpu) static int pick_rt_task(struct rq *rq, struct task_struct *p, int cpu)
{ {
if (!task_running(rq, p) && if (!task_running(rq, p) &&
@ -690,7 +732,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return 1; return 1;
return 0; return 0;
@@ -1748,7 +1748,7 @@ static struct rq *find_lock_lowest_rq(st @@ -1748,7 +1748,7 @@ static struct rq *find_lock_lowest_rq(struct task_struct *task, struct rq *rq)
* Also make sure that it wasn't scheduled on its rq. * Also make sure that it wasn't scheduled on its rq.
*/ */
if (unlikely(task_rq(task) != rq || if (unlikely(task_rq(task) != rq ||
@ -699,6 +741,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
task_running(rq, task) || task_running(rq, task) ||
!rt_task(task) || !rt_task(task) ||
!task_on_rq_queued(task))) { !task_on_rq_queued(task))) {
diff --git a/kernel/trace/trace_hwlat.c b/kernel/trace/trace_hwlat.c
index 1e6db9cbe4dc..fa95139445b2 100644
--- a/kernel/trace/trace_hwlat.c --- a/kernel/trace/trace_hwlat.c
+++ b/kernel/trace/trace_hwlat.c +++ b/kernel/trace/trace_hwlat.c
@@ -277,7 +277,7 @@ static void move_to_next_cpu(void) @@ -277,7 +277,7 @@ static void move_to_next_cpu(void)
@ -710,9 +754,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
goto disable; goto disable;
get_online_cpus(); get_online_cpus();
diff --git a/lib/smp_processor_id.c b/lib/smp_processor_id.c
index 85925aaa4fff..fb35c45b9421 100644
--- a/lib/smp_processor_id.c --- a/lib/smp_processor_id.c
+++ b/lib/smp_processor_id.c +++ b/lib/smp_processor_id.c
@@ -22,7 +22,7 @@ notrace static unsigned int check_preemp @@ -22,7 +22,7 @@ notrace static unsigned int check_preemption_disabled(const char *what1,
* Kernel threads bound to a single CPU can safely use * Kernel threads bound to a single CPU can safely use
* smp_processor_id(): * smp_processor_id():
*/ */
@ -721,6 +767,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
goto out; goto out;
/* /*
diff --git a/samples/trace_events/trace-events-sample.c b/samples/trace_events/trace-events-sample.c
index 5522692100ba..8b4be8e1802a 100644
--- a/samples/trace_events/trace-events-sample.c --- a/samples/trace_events/trace-events-sample.c
+++ b/samples/trace_events/trace-events-sample.c +++ b/samples/trace_events/trace-events-sample.c
@@ -33,7 +33,7 @@ static void simple_thread_func(int cnt) @@ -33,7 +33,7 @@ static void simple_thread_func(int cnt)
@ -732,3 +780,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
trace_foo_with_template_simple("HELLO", cnt); trace_foo_with_template_simple("HELLO", cnt);
--
2.20.1

View File

@ -1,16 +1,19 @@
From 6a012b467f25731ba6206a66f07c024a3b88a964 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Sat, 27 May 2017 19:02:06 +0200 Date: Sat, 27 May 2017 19:02:06 +0200
Subject: kernel/sched/core: add migrate_disable() Subject: [PATCH 029/266] kernel/sched/core: add migrate_disable()
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
--- ---
include/linux/preempt.h | 23 ++++++++ include/linux/preempt.h | 23 +++++++
include/linux/sched.h | 7 ++ include/linux/sched.h | 7 +++
include/linux/smp.h | 3 + include/linux/smp.h | 3 +
kernel/sched/core.c | 130 +++++++++++++++++++++++++++++++++++++++++++++++- kernel/sched/core.c | 130 +++++++++++++++++++++++++++++++++++++++-
kernel/sched/debug.c | 4 + kernel/sched/debug.c | 4 ++
5 files changed, 165 insertions(+), 2 deletions(-) 5 files changed, 165 insertions(+), 2 deletions(-)
diff --git a/include/linux/preempt.h b/include/linux/preempt.h
index c01813c3fbe9..3196d0e76719 100644
--- a/include/linux/preempt.h --- a/include/linux/preempt.h
+++ b/include/linux/preempt.h +++ b/include/linux/preempt.h
@@ -185,6 +185,22 @@ do { \ @@ -185,6 +185,22 @@ do { \
@ -50,6 +53,8 @@ Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4
#endif /* CONFIG_PREEMPT_COUNT */ #endif /* CONFIG_PREEMPT_COUNT */
#ifdef MODULE #ifdef MODULE
diff --git a/include/linux/sched.h b/include/linux/sched.h
index b347614b42f4..fad3583f0933 100644
--- a/include/linux/sched.h --- a/include/linux/sched.h
+++ b/include/linux/sched.h +++ b/include/linux/sched.h
@@ -662,6 +662,13 @@ struct task_struct { @@ -662,6 +662,13 @@ struct task_struct {
@ -66,6 +71,8 @@ Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4
#ifdef CONFIG_PREEMPT_RCU #ifdef CONFIG_PREEMPT_RCU
int rcu_read_lock_nesting; int rcu_read_lock_nesting;
diff --git a/include/linux/smp.h b/include/linux/smp.h
index 9fb239e12b82..5801e516ba63 100644
--- a/include/linux/smp.h --- a/include/linux/smp.h
+++ b/include/linux/smp.h +++ b/include/linux/smp.h
@@ -202,6 +202,9 @@ static inline int get_boot_cpu_id(void) @@ -202,6 +202,9 @@ static inline int get_boot_cpu_id(void)
@ -78,9 +85,11 @@ Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4
/* /*
* Callback to arch code if there's nosmp or maxcpus=0 on the * Callback to arch code if there's nosmp or maxcpus=0 on the
* boot command line: * boot command line:
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index c7377dcaf718..77f3c4771a2b 100644
--- a/kernel/sched/core.c --- a/kernel/sched/core.c
+++ b/kernel/sched/core.c +++ b/kernel/sched/core.c
@@ -1006,7 +1006,15 @@ void set_cpus_allowed_common(struct task @@ -1007,7 +1007,15 @@ void set_cpus_allowed_common(struct task_struct *p, const struct cpumask *new_ma
p->nr_cpus_allowed = cpumask_weight(new_mask); p->nr_cpus_allowed = cpumask_weight(new_mask);
} }
@ -97,7 +106,7 @@ Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4
{ {
struct rq *rq = task_rq(p); struct rq *rq = task_rq(p);
bool queued, running; bool queued, running;
@@ -1035,6 +1043,20 @@ void do_set_cpus_allowed(struct task_str @@ -1036,6 +1044,20 @@ void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask)
set_curr_task(rq, p); set_curr_task(rq, p);
} }
@ -118,7 +127,7 @@ Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4
/* /*
* Change a given task's CPU affinity. Migrate the thread to a * Change a given task's CPU affinity. Migrate the thread to a
* proper CPU and schedule it away if the CPU it's executing on * proper CPU and schedule it away if the CPU it's executing on
@@ -1093,9 +1115,16 @@ static int __set_cpus_allowed_ptr(struct @@ -1094,9 +1116,16 @@ static int __set_cpus_allowed_ptr(struct task_struct *p,
} }
/* Can the task run on the task's current CPU? If so, we're done */ /* Can the task run on the task's current CPU? If so, we're done */
@ -136,7 +145,7 @@ Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4
dest_cpu = cpumask_any_and(cpu_valid_mask, new_mask); dest_cpu = cpumask_any_and(cpu_valid_mask, new_mask);
if (task_running(rq, p) || p->state == TASK_WAKING) { if (task_running(rq, p) || p->state == TASK_WAKING) {
struct migration_arg arg = { p, dest_cpu }; struct migration_arg arg = { p, dest_cpu };
@@ -7058,3 +7087,100 @@ const u32 sched_prio_to_wmult[40] = { @@ -7059,3 +7088,100 @@ const u32 sched_prio_to_wmult[40] = {
}; };
#undef CREATE_TRACE_POINTS #undef CREATE_TRACE_POINTS
@ -237,9 +246,11 @@ Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4
+} +}
+EXPORT_SYMBOL(migrate_enable); +EXPORT_SYMBOL(migrate_enable);
+#endif +#endif
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
index 6383aa6a60ca..a719e44debdf 100644
--- a/kernel/sched/debug.c --- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c +++ b/kernel/sched/debug.c
@@ -978,6 +978,10 @@ void proc_sched_show_task(struct task_st @@ -978,6 +978,10 @@ void proc_sched_show_task(struct task_struct *p, struct pid_namespace *ns,
P(dl.runtime); P(dl.runtime);
P(dl.deadline); P(dl.deadline);
} }
@ -250,3 +261,6 @@ Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4
#undef PN_SCHEDSTAT #undef PN_SCHEDSTAT
#undef PN #undef PN
#undef __PN #undef __PN
--
2.20.1

View File

@ -1,8 +1,9 @@
From 44ee5f4d373ec3180cec3b68f606a77be0ac2dfb Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Tue, 9 Oct 2018 17:34:50 +0200 Date: Tue, 9 Oct 2018 17:34:50 +0200
Subject: [PATCH] sched/migrate_disable: Add export_symbol_gpl for Subject: [PATCH 030/266] sched/migrate_disable: Add export_symbol_gpl for
__migrate_disabled __migrate_disabled
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Jonathan reported that lttng/modules can't use __migrate_disabled(). Jonathan reported that lttng/modules can't use __migrate_disabled().
This function is only used by sched/core itself and the tracing This function is only used by sched/core itself and the tracing
@ -17,12 +18,14 @@ EXPORT_SYMBOL_GPL to allow the module/LTTNG usage.
Reported-by: Jonathan Rajott <jonathan.rajotte-julien@efficios.com> Reported-by: Jonathan Rajott <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
kernel/sched/core.c | 1 + kernel/sched/core.c | 1 +
1 file changed, 1 insertion(+) 1 file changed, 1 insertion(+)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 77f3c4771a2b..f027ac73f1df 100644
--- a/kernel/sched/core.c --- a/kernel/sched/core.c
+++ b/kernel/sched/core.c +++ b/kernel/sched/core.c
@@ -1011,6 +1011,7 @@ int __migrate_disabled(struct task_struc @@ -1012,6 +1012,7 @@ int __migrate_disabled(struct task_struct *p)
{ {
return p->migrate_disable; return p->migrate_disable;
} }
@ -30,3 +33,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
#endif #endif
static void __do_set_cpus_allowed_tail(struct task_struct *p, static void __do_set_cpus_allowed_tail(struct task_struct *p,
--
2.20.1

View File

@ -1,7 +1,8 @@
From 884ce05ebcdf5862f6b5a568ab9635db6bd7618b Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Wed, 09 Mar 2016 10:51:06 +0100 Date: Wed, 9 Mar 2016 10:51:06 +0100
Subject: arm: at91: do not disable/enable clocks in a row Subject: [PATCH 031/266] 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.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Currently the driver will disable the clock and enable it one line later Currently the driver will disable the clock and enable it one line later
if it is switching from periodic mode into one shot. if it is switching from periodic mode into one shot.
@ -9,9 +10,11 @@ This can be avoided and causes a needless warning on -RT.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
drivers/clocksource/tcb_clksrc.c | 33 +++++++++++++++++++++++++++++---- drivers/clocksource/tcb_clksrc.c | 33 ++++++++++++++++++++++++++++----
1 file changed, 29 insertions(+), 4 deletions(-) 1 file changed, 29 insertions(+), 4 deletions(-)
diff --git a/drivers/clocksource/tcb_clksrc.c b/drivers/clocksource/tcb_clksrc.c
index 43f4d5c4d6fa..de6baf564dfe 100644
--- a/drivers/clocksource/tcb_clksrc.c --- a/drivers/clocksource/tcb_clksrc.c
+++ b/drivers/clocksource/tcb_clksrc.c +++ b/drivers/clocksource/tcb_clksrc.c
@@ -126,6 +126,7 @@ static struct clocksource clksrc = { @@ -126,6 +126,7 @@ static struct clocksource clksrc = {
@ -22,7 +25,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
void __iomem *regs; void __iomem *regs;
}; };
@@ -143,6 +144,24 @@ static struct tc_clkevt_device *to_tc_cl @@ -143,6 +144,24 @@ static struct tc_clkevt_device *to_tc_clkevt(struct clock_event_device *clkevt)
*/ */
static u32 timer_clock; static u32 timer_clock;
@ -47,7 +50,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
static int tc_shutdown(struct clock_event_device *d) static int tc_shutdown(struct clock_event_device *d)
{ {
struct tc_clkevt_device *tcd = to_tc_clkevt(d); struct tc_clkevt_device *tcd = to_tc_clkevt(d);
@@ -150,8 +169,14 @@ static int tc_shutdown(struct clock_even @@ -150,8 +169,14 @@ static int tc_shutdown(struct clock_event_device *d)
writel(0xff, regs + ATMEL_TC_REG(2, IDR)); writel(0xff, regs + ATMEL_TC_REG(2, IDR));
writel(ATMEL_TC_CLKDIS, regs + ATMEL_TC_REG(2, CCR)); writel(ATMEL_TC_CLKDIS, regs + ATMEL_TC_REG(2, CCR));
@ -63,7 +66,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return 0; return 0;
} }
@@ -164,7 +189,7 @@ static int tc_set_oneshot(struct clock_e @@ -164,7 +189,7 @@ static int tc_set_oneshot(struct clock_event_device *d)
if (clockevent_state_oneshot(d) || clockevent_state_periodic(d)) if (clockevent_state_oneshot(d) || clockevent_state_periodic(d))
tc_shutdown(d); tc_shutdown(d);
@ -72,7 +75,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* slow clock, count up to RC, then irq and stop */ /* slow clock, count up to RC, then irq and stop */
writel(timer_clock | ATMEL_TC_CPCSTOP | ATMEL_TC_WAVE | writel(timer_clock | ATMEL_TC_CPCSTOP | ATMEL_TC_WAVE |
@@ -186,7 +211,7 @@ static int tc_set_periodic(struct clock_ @@ -186,7 +211,7 @@ static int tc_set_periodic(struct clock_event_device *d)
/* By not making the gentime core emulate periodic mode on top /* By not making the gentime core emulate periodic mode on top
* of oneshot, we get lower overhead and improved accuracy. * of oneshot, we get lower overhead and improved accuracy.
*/ */
@ -81,7 +84,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* slow clock, count up to RC, then irq and restart */ /* slow clock, count up to RC, then irq and restart */
writel(timer_clock | ATMEL_TC_WAVE | ATMEL_TC_WAVESEL_UP_AUTO, writel(timer_clock | ATMEL_TC_WAVE | ATMEL_TC_WAVESEL_UP_AUTO,
@@ -220,7 +245,7 @@ static struct tc_clkevt_device clkevt = @@ -220,7 +245,7 @@ static struct tc_clkevt_device clkevt = {
/* Should be lower than at91rm9200's system timer */ /* Should be lower than at91rm9200's system timer */
.rating = 125, .rating = 125,
.set_next_event = tc_next_event, .set_next_event = tc_next_event,
@ -90,3 +93,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
.set_state_periodic = tc_set_periodic, .set_state_periodic = tc_set_periodic,
.set_state_oneshot = tc_set_oneshot, .set_state_oneshot = tc_set_oneshot,
}, },
--
2.20.1

View File

@ -1,7 +1,12 @@
From 49d48ae23e845a4b2daeb6bfae37d5c8f5e3acbf Mon Sep 17 00:00:00 2001
From: Benedikt Spranger <b.spranger@linutronix.de> From: Benedikt Spranger <b.spranger@linutronix.de>
Date: Mon, 8 Mar 2010 18:57:04 +0100 Date: Mon, 8 Mar 2010 18:57:04 +0100
Subject: clocksource: TCLIB: Allow higher clock rates for clock events Subject: [PATCH 032/266] clocksource: TCLIB: Allow higher clock rates for
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz clock events
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.31-rt18.tar.xz
As default the TCLIB uses the 32KiHz base clock rate for clock events. As default the TCLIB uses the 32KiHz base clock rate for clock events.
Add a compile time selection to allow higher clock resulution. Add a compile time selection to allow higher clock resulution.
@ -11,10 +16,12 @@ Add a compile time selection to allow higher clock resulution.
Signed-off-by: Benedikt Spranger <b.spranger@linutronix.de> Signed-off-by: Benedikt Spranger <b.spranger@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
--- ---
drivers/clocksource/tcb_clksrc.c | 36 +++++++++++++++++++++--------------- drivers/clocksource/tcb_clksrc.c | 36 +++++++++++++++++++-------------
drivers/misc/Kconfig | 12 ++++++++++-- drivers/misc/Kconfig | 12 +++++++++--
2 files changed, 31 insertions(+), 17 deletions(-) 2 files changed, 31 insertions(+), 17 deletions(-)
diff --git a/drivers/clocksource/tcb_clksrc.c b/drivers/clocksource/tcb_clksrc.c
index de6baf564dfe..ba15242a6066 100644
--- a/drivers/clocksource/tcb_clksrc.c --- a/drivers/clocksource/tcb_clksrc.c
+++ b/drivers/clocksource/tcb_clksrc.c +++ b/drivers/clocksource/tcb_clksrc.c
@@ -25,8 +25,7 @@ @@ -25,8 +25,7 @@
@ -35,7 +42,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
void __iomem *regs; void __iomem *regs;
}; };
@@ -135,13 +135,6 @@ static struct tc_clkevt_device *to_tc_cl @@ -135,13 +135,6 @@ static struct tc_clkevt_device *to_tc_clkevt(struct clock_event_device *clkevt)
return container_of(clkevt, struct tc_clkevt_device, clkevt); return container_of(clkevt, struct tc_clkevt_device, clkevt);
} }
@ -49,7 +56,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
static u32 timer_clock; static u32 timer_clock;
static void tc_clk_disable(struct clock_event_device *d) static void tc_clk_disable(struct clock_event_device *d)
@@ -191,7 +184,7 @@ static int tc_set_oneshot(struct clock_e @@ -191,7 +184,7 @@ static int tc_set_oneshot(struct clock_event_device *d)
tc_clk_enable(d); tc_clk_enable(d);
@ -58,7 +65,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
writel(timer_clock | ATMEL_TC_CPCSTOP | ATMEL_TC_WAVE | writel(timer_clock | ATMEL_TC_CPCSTOP | ATMEL_TC_WAVE |
ATMEL_TC_WAVESEL_UP_AUTO, regs + ATMEL_TC_REG(2, CMR)); ATMEL_TC_WAVESEL_UP_AUTO, regs + ATMEL_TC_REG(2, CMR));
writel(ATMEL_TC_CPCS, regs + ATMEL_TC_REG(2, IER)); writel(ATMEL_TC_CPCS, regs + ATMEL_TC_REG(2, IER));
@@ -213,10 +206,10 @@ static int tc_set_periodic(struct clock_ @@ -213,10 +206,10 @@ static int tc_set_periodic(struct clock_event_device *d)
*/ */
tc_clk_enable(d); tc_clk_enable(d);
@ -71,7 +78,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
/* Enable clock and interrupts on RC compare */ /* Enable clock and interrupts on RC compare */
writel(ATMEL_TC_CPCS, regs + ATMEL_TC_REG(2, IER)); writel(ATMEL_TC_CPCS, regs + ATMEL_TC_REG(2, IER));
@@ -243,7 +236,11 @@ static struct tc_clkevt_device clkevt = @@ -243,7 +236,11 @@ static struct tc_clkevt_device clkevt = {
.features = CLOCK_EVT_FEAT_PERIODIC | .features = CLOCK_EVT_FEAT_PERIODIC |
CLOCK_EVT_FEAT_ONESHOT, CLOCK_EVT_FEAT_ONESHOT,
/* Should be lower than at91rm9200's system timer */ /* Should be lower than at91rm9200's system timer */
@ -83,7 +90,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
.set_next_event = tc_next_event, .set_next_event = tc_next_event,
.set_state_shutdown = tc_shutdown_clk_off, .set_state_shutdown = tc_shutdown_clk_off,
.set_state_periodic = tc_set_periodic, .set_state_periodic = tc_set_periodic,
@@ -265,8 +262,9 @@ static irqreturn_t ch2_irq(int irq, void @@ -265,8 +262,9 @@ static irqreturn_t ch2_irq(int irq, void *handle)
return IRQ_NONE; return IRQ_NONE;
} }
@ -94,7 +101,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
int ret; int ret;
struct clk *t2_clk = tc->clk[2]; struct clk *t2_clk = tc->clk[2];
int irq = tc->irq[2]; int irq = tc->irq[2];
@@ -287,7 +285,11 @@ static int __init setup_clkevents(struct @@ -287,7 +285,11 @@ static int __init setup_clkevents(struct atmel_tc *tc, int clk32k_divisor_idx)
clkevt.regs = tc->regs; clkevt.regs = tc->regs;
clkevt.clk = t2_clk; clkevt.clk = t2_clk;
@ -107,7 +114,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
clkevt.clkevt.cpumask = cpumask_of(0); clkevt.clkevt.cpumask = cpumask_of(0);
@@ -298,7 +300,7 @@ static int __init setup_clkevents(struct @@ -298,7 +300,7 @@ static int __init setup_clkevents(struct atmel_tc *tc, int clk32k_divisor_idx)
return ret; return ret;
} }
@ -128,6 +135,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
if (ret) if (ret)
goto err_unregister_clksrc; goto err_unregister_clksrc;
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index 3726eacdf65d..0900dec7ec04 100644
--- a/drivers/misc/Kconfig --- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig
@@ -69,8 +69,7 @@ config ATMEL_TCB_CLKSRC @@ -69,8 +69,7 @@ config ATMEL_TCB_CLKSRC
@ -156,3 +165,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
config DUMMY_IRQ config DUMMY_IRQ
tristate "Dummy IRQ handler" tristate "Dummy IRQ handler"
default n default n
--
2.20.1

View File

@ -1,23 +1,26 @@
Subject: timekeeping: Split jiffies seqlock From 3ae267e2e8aab45de92b1aa5900c038e4dc41f50 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de> From: Thomas Gleixner <tglx@linutronix.de>
Date: Thu, 14 Feb 2013 22:36:59 +0100 Date: Thu, 14 Feb 2013 22:36:59 +0100
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Subject: [PATCH 033/266] timekeeping: Split jiffies seqlock
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Replace jiffies_lock seqlock with a simple seqcounter and a rawlock so Replace jiffies_lock seqlock with a simple seqcounter and a rawlock so
it can be taken in atomic context on RT. it can be taken in atomic context on RT.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
--- ---
kernel/time/jiffies.c | 7 ++++--- kernel/time/jiffies.c | 7 ++++---
kernel/time/tick-common.c | 10 ++++++---- kernel/time/tick-common.c | 10 ++++++----
kernel/time/tick-sched.c | 19 ++++++++++++------- kernel/time/tick-sched.c | 19 ++++++++++++-------
kernel/time/timekeeping.c | 6 ++++-- kernel/time/timekeeping.c | 6 ++++--
kernel/time/timekeeping.h | 3 ++- kernel/time/timekeeping.h | 3 ++-
5 files changed, 28 insertions(+), 17 deletions(-) 5 files changed, 28 insertions(+), 17 deletions(-)
diff --git a/kernel/time/jiffies.c b/kernel/time/jiffies.c
index 497719127bf9..62acb8914c9e 100644
--- a/kernel/time/jiffies.c --- a/kernel/time/jiffies.c
+++ b/kernel/time/jiffies.c +++ b/kernel/time/jiffies.c
@@ -74,7 +74,8 @@ static struct clocksource clocksource_ji @@ -74,7 +74,8 @@ static struct clocksource clocksource_jiffies = {
.max_cycles = 10, .max_cycles = 10,
}; };
@ -39,6 +42,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
return ret; return ret;
} }
EXPORT_SYMBOL(get_jiffies_64); EXPORT_SYMBOL(get_jiffies_64);
diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c
index 14de3727b18e..7a87a4488a5e 100644
--- a/kernel/time/tick-common.c --- a/kernel/time/tick-common.c
+++ b/kernel/time/tick-common.c +++ b/kernel/time/tick-common.c
@@ -79,13 +79,15 @@ int tick_is_oneshot_available(void) @@ -79,13 +79,15 @@ int tick_is_oneshot_available(void)
@ -59,7 +64,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
update_wall_time(); update_wall_time();
} }
@@ -157,9 +159,9 @@ void tick_setup_periodic(struct clock_ev @@ -157,9 +159,9 @@ void tick_setup_periodic(struct clock_event_device *dev, int broadcast)
ktime_t next; ktime_t next;
do { do {
@ -71,9 +76,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
clockevents_switch_state(dev, CLOCK_EVT_STATE_ONESHOT); clockevents_switch_state(dev, CLOCK_EVT_STATE_ONESHOT);
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 5b33e2f5c0ed..54fd344ef973 100644
--- a/kernel/time/tick-sched.c --- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c
@@ -67,7 +67,8 @@ static void tick_do_update_jiffies64(kti @@ -67,7 +67,8 @@ static void tick_do_update_jiffies64(ktime_t now)
return; return;
/* Reevaluate with jiffies_lock held */ /* Reevaluate with jiffies_lock held */
@ -83,7 +90,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
delta = ktime_sub(now, last_jiffies_update); delta = ktime_sub(now, last_jiffies_update);
if (delta >= tick_period) { if (delta >= tick_period) {
@@ -90,10 +91,12 @@ static void tick_do_update_jiffies64(kti @@ -90,10 +91,12 @@ static void tick_do_update_jiffies64(ktime_t now)
/* Keep the tick_next_period variable up to date */ /* Keep the tick_next_period variable up to date */
tick_next_period = ktime_add(last_jiffies_update, tick_period); tick_next_period = ktime_add(last_jiffies_update, tick_period);
} else { } else {
@ -98,7 +105,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
update_wall_time(); update_wall_time();
} }
@@ -104,12 +107,14 @@ static ktime_t tick_init_jiffy_update(vo @@ -104,12 +107,14 @@ static ktime_t tick_init_jiffy_update(void)
{ {
ktime_t period; ktime_t period;
@ -115,7 +122,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
return period; return period;
} }
@@ -652,10 +657,10 @@ static ktime_t tick_nohz_next_event(stru @@ -652,10 +657,10 @@ static ktime_t tick_nohz_next_event(struct tick_sched *ts, int cpu)
/* Read jiffies and the time when jiffies were updated last */ /* Read jiffies and the time when jiffies were updated last */
do { do {
@ -128,6 +135,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
ts->last_jiffies = basejiff; ts->last_jiffies = basejiff;
ts->timer_expires_base = basemono; ts->timer_expires_base = basemono;
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index 7846ce24ecc0..68cf97548cba 100644
--- a/kernel/time/timekeeping.c --- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c
@@ -2417,8 +2417,10 @@ EXPORT_SYMBOL(hardpps); @@ -2417,8 +2417,10 @@ EXPORT_SYMBOL(hardpps);
@ -143,6 +152,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+ raw_spin_unlock(&jiffies_lock); + raw_spin_unlock(&jiffies_lock);
update_wall_time(); update_wall_time();
} }
diff --git a/kernel/time/timekeeping.h b/kernel/time/timekeeping.h
index 7a9b4eb7a1d5..acdcf97c99b6 100644
--- a/kernel/time/timekeeping.h --- a/kernel/time/timekeeping.h
+++ b/kernel/time/timekeeping.h +++ b/kernel/time/timekeeping.h
@@ -18,7 +18,8 @@ extern void timekeeping_resume(void); @@ -18,7 +18,8 @@ extern void timekeeping_resume(void);
@ -155,3 +166,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#define CS_NAME_LEN 32 #define CS_NAME_LEN 32
--
2.20.1

View File

@ -1,7 +1,8 @@
Subject: signal: Revert ptrace preempt magic From 2175ca2814836e7e7d495cf207d249a002d49ee0 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de> From: Thomas Gleixner <tglx@linutronix.de>
Date: Wed, 21 Sep 2011 19:57:12 +0200 Date: Wed, 21 Sep 2011 19:57:12 +0200
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Subject: [PATCH 034/266] signal: Revert ptrace preempt magic
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Upstream commit '53da1d9456fe7f8 fix ptrace slowness' is nothing more Upstream commit '53da1d9456fe7f8 fix ptrace slowness' is nothing more
than a bandaid around the ptrace design trainwreck. It's not a than a bandaid around the ptrace design trainwreck. It's not a
@ -9,12 +10,14 @@ correctness issue, it's merily a cosmetic bandaid.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
--- ---
kernel/signal.c | 8 -------- kernel/signal.c | 8 --------
1 file changed, 8 deletions(-) 1 file changed, 8 deletions(-)
diff --git a/kernel/signal.c b/kernel/signal.c
index 9102d60fc5c6..f29def2be652 100644
--- a/kernel/signal.c --- a/kernel/signal.c
+++ b/kernel/signal.c +++ b/kernel/signal.c
@@ -2094,15 +2094,7 @@ static void ptrace_stop(int exit_code, i @@ -2094,15 +2094,7 @@ static void ptrace_stop(int exit_code, int why, int clear_code, siginfo_t *info)
if (gstop_done && ptrace_reparented(current)) if (gstop_done && ptrace_reparented(current))
do_notify_parent_cldstop(current, false, why); do_notify_parent_cldstop(current, false, why);
@ -30,3 +33,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
freezable_schedule(); freezable_schedule();
} else { } else {
/* /*
--
2.20.1

View File

@ -1,7 +1,8 @@
From df35af291276401c47cf6afbd0bc820042b377f6 Mon Sep 17 00:00:00 2001
From: Marc Kleine-Budde <mkl@pengutronix.de> From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: Wed, 5 Mar 2014 00:49:47 +0100 Date: Wed, 5 Mar 2014 00:49:47 +0100
Subject: net: sched: Use msleep() instead of yield() Subject: [PATCH 035/266] net: sched: Use msleep() instead of yield()
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
On PREEMPT_RT enabled systems the interrupt handler run as threads at prio 50 On PREEMPT_RT enabled systems the interrupt handler run as threads at prio 50
(by default). If a high priority userspace process tries to shut down a busy (by default). If a high priority userspace process tries to shut down a busy
@ -42,12 +43,14 @@ solution.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
net/sched/sch_generic.c | 2 +- net/sched/sch_generic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index 77b289da7763..31b9c2b415b4 100644
--- a/net/sched/sch_generic.c --- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c
@@ -1184,7 +1184,7 @@ void dev_deactivate_many(struct list_hea @@ -1183,7 +1183,7 @@ void dev_deactivate_many(struct list_head *head)
/* Wait for outstanding qdisc_run calls. */ /* Wait for outstanding qdisc_run calls. */
list_for_each_entry(dev, head, close_list) { list_for_each_entry(dev, head, close_list) {
while (some_qdisc_is_busy(dev)) while (some_qdisc_is_busy(dev))
@ -56,3 +59,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* The new qdisc is assigned at this point so we can safely /* The new qdisc is assigned at this point so we can safely
* unwind stale skb lists and qdisc statistics * unwind stale skb lists and qdisc statistics
*/ */
--
2.20.1

View File

@ -1,7 +1,8 @@
From 8af534638743235393fc2e64e1c5733004109d9f Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Tue, 27 Mar 2018 16:24:15 +0200 Date: Tue, 27 Mar 2018 16:24:15 +0200
Subject: [PATCH] dm rq: remove BUG_ON(!irqs_disabled) check Subject: [PATCH 036/266] dm rq: remove BUG_ON(!irqs_disabled) check
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
In commit 052189a2ec95 ("dm: remove superfluous irq disablement in In commit 052189a2ec95 ("dm: remove superfluous irq disablement in
dm_request_fn") the spin_lock_irq() was replaced with spin_lock() + a dm_request_fn") the spin_lock_irq() was replaced with spin_lock() + a
@ -16,12 +17,14 @@ Cc: Keith Busch <keith.busch@intel.com>
Cc: Mike Snitzer <snitzer@redhat.com> Cc: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
drivers/md/dm-rq.c | 1 - drivers/md/dm-rq.c | 1 -
1 file changed, 1 deletion(-) 1 file changed, 1 deletion(-)
diff --git a/drivers/md/dm-rq.c b/drivers/md/dm-rq.c
index 6e547b8dd298..29736c7e5f1f 100644
--- a/drivers/md/dm-rq.c --- a/drivers/md/dm-rq.c
+++ b/drivers/md/dm-rq.c +++ b/drivers/md/dm-rq.c
@@ -688,7 +688,6 @@ static void dm_old_request_fn(struct req @@ -688,7 +688,6 @@ static void dm_old_request_fn(struct request_queue *q)
/* Establish tio->ti before queuing work (map_tio_request) */ /* Establish tio->ti before queuing work (map_tio_request) */
tio->ti = ti; tio->ti = ti;
kthread_queue_work(&md->kworker, &tio->work); kthread_queue_work(&md->kworker, &tio->work);
@ -29,3 +32,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
} }
--
2.20.1

View File

@ -1,7 +1,8 @@
From c2f85857815236fb7367336e1a6f1edcc87b137b Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Fri, 8 Nov 2013 17:34:54 +0100 Date: Fri, 8 Nov 2013 17:34:54 +0100
Subject: usb: do no disable interrupts in giveback Subject: [PATCH 037/266] usb: do no disable interrupts in giveback
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Since commit 94dfd7ed ("USB: HCD: support giveback of URB in tasklet Since commit 94dfd7ed ("USB: HCD: support giveback of URB in tasklet
context") the USB code disables interrupts before invoking the complete context") the USB code disables interrupts before invoking the complete
@ -15,12 +16,14 @@ Longeterm we should force all HCDs to complete in the same context.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
drivers/usb/core/hcd.c | 3 --- drivers/usb/core/hcd.c | 3 ---
1 file changed, 3 deletions(-) 1 file changed, 3 deletions(-)
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index 1c21955fe7c0..7863dec34f0b 100644
--- a/drivers/usb/core/hcd.c --- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c
@@ -1738,7 +1738,6 @@ static void __usb_hcd_giveback_urb(struc @@ -1738,7 +1738,6 @@ static void __usb_hcd_giveback_urb(struct urb *urb)
struct usb_hcd *hcd = bus_to_hcd(urb->dev->bus); struct usb_hcd *hcd = bus_to_hcd(urb->dev->bus);
struct usb_anchor *anchor = urb->anchor; struct usb_anchor *anchor = urb->anchor;
int status = urb->unlinked; int status = urb->unlinked;
@ -28,7 +31,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
urb->hcpriv = NULL; urb->hcpriv = NULL;
if (unlikely((urb->transfer_flags & URB_SHORT_NOT_OK) && if (unlikely((urb->transfer_flags & URB_SHORT_NOT_OK) &&
@@ -1766,9 +1765,7 @@ static void __usb_hcd_giveback_urb(struc @@ -1766,9 +1765,7 @@ static void __usb_hcd_giveback_urb(struct urb *urb)
* and no one may trigger the above deadlock situation when * and no one may trigger the above deadlock situation when
* running complete() in tasklet. * running complete() in tasklet.
*/ */
@ -38,3 +41,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
usb_anchor_resume_wakeups(anchor); usb_anchor_resume_wakeups(anchor);
atomic_dec(&urb->use_count); atomic_dec(&urb->use_count);
--
2.20.1

View File

@ -1,7 +1,8 @@
Subject: rt: Provide PREEMPT_RT_BASE config switch From 667e1ce22caf422d9c7b4b05bdde2c47a2e74756 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de> From: Thomas Gleixner <tglx@linutronix.de>
Date: Fri, 17 Jun 2011 12:39:57 +0200 Date: Fri, 17 Jun 2011 12:39:57 +0200
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Subject: [PATCH 038/266] rt: Provide PREEMPT_RT_BASE config switch
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Introduce PREEMPT_RT_BASE which enables parts of Introduce PREEMPT_RT_BASE which enables parts of
PREEMPT_RT_FULL. Forces interrupt threading and enables some of the RT PREEMPT_RT_FULL. Forces interrupt threading and enables some of the RT
@ -9,9 +10,11 @@ substitutions for testing.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
--- ---
kernel/Kconfig.preempt | 21 ++++++++++++++++++--- kernel/Kconfig.preempt | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-) 1 file changed, 18 insertions(+), 3 deletions(-)
diff --git a/kernel/Kconfig.preempt b/kernel/Kconfig.preempt
index cd1655122ec0..027db5976c2f 100644
--- a/kernel/Kconfig.preempt --- a/kernel/Kconfig.preempt
+++ b/kernel/Kconfig.preempt +++ b/kernel/Kconfig.preempt
@@ -1,3 +1,10 @@ @@ -1,3 +1,10 @@
@ -56,3 +59,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
- bool - bool
\ No newline at end of file \ No newline at end of file
+ bool + bool
--
2.20.1

View File

@ -1,7 +1,8 @@
Subject: cpumask: Disable CONFIG_CPUMASK_OFFSTACK for RT From 18f9f1c6657f01598563025bf4d8c56bee127c3e Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de> From: Thomas Gleixner <tglx@linutronix.de>
Date: Wed, 14 Dec 2011 01:03:49 +0100 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.25-rt16.tar.xz Subject: [PATCH 039/266] cpumask: Disable CONFIG_CPUMASK_OFFSTACK for RT
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
There are "valid" GFP_ATOMIC allocations such as There are "valid" GFP_ATOMIC allocations such as
@ -41,10 +42,12 @@ which forbid allocations at run-time.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
--- ---
arch/x86/Kconfig | 2 +- arch/x86/Kconfig | 2 +-
lib/Kconfig | 1 + lib/Kconfig | 1 +
2 files changed, 2 insertions(+), 1 deletion(-) 2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 44c6a82b7ce5..06c3ec0c9c12 100644
--- a/arch/x86/Kconfig --- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig +++ b/arch/x86/Kconfig
@@ -934,7 +934,7 @@ config CALGARY_IOMMU_ENABLED_BY_DEFAULT @@ -934,7 +934,7 @@ config CALGARY_IOMMU_ENABLED_BY_DEFAULT
@ -56,6 +59,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---help--- ---help---
Enable maximum number of CPUS and NUMA Nodes for this architecture. Enable maximum number of CPUS and NUMA Nodes for this architecture.
If unsure, say N. If unsure, say N.
diff --git a/lib/Kconfig b/lib/Kconfig
index a3928d4438b5..a50b2158f7cd 100644
--- a/lib/Kconfig --- a/lib/Kconfig
+++ b/lib/Kconfig +++ b/lib/Kconfig
@@ -441,6 +441,7 @@ config CHECK_SIGNATURE @@ -441,6 +441,7 @@ config CHECK_SIGNATURE
@ -66,3 +71,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
help help
Use dynamic allocation for cpumask_var_t, instead of putting Use dynamic allocation for cpumask_var_t, instead of putting
them on the stack. This is a bit more expensive, but avoids them on the stack. This is a bit more expensive, but avoids
--
2.20.1

View File

@ -1,7 +1,8 @@
Subject: jump-label: disable if stop_machine() is used From 285155bfdfd713f7a20b7b2607bebaa3b6e226d6 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de> From: Thomas Gleixner <tglx@linutronix.de>
Date: Wed, 08 Jul 2015 17:14:48 +0200 Date: Wed, 8 Jul 2015 17:14:48 +0200
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Subject: [PATCH 040/266] jump-label: disable if stop_machine() is used
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Some architectures are using stop_machine() while switching the opcode which Some architectures are using stop_machine() while switching the opcode which
leads to latency spikes. leads to latency spikes.
@ -20,9 +21,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[bigeasy: only ARM for now] [bigeasy: only ARM for now]
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
arch/arm/Kconfig | 2 +- arch/arm/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index cd4c74daf71e..27a5f0b9ddc7 100644
--- a/arch/arm/Kconfig --- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig +++ b/arch/arm/Kconfig
@@ -51,7 +51,7 @@ config ARM @@ -51,7 +51,7 @@ config ARM
@ -34,3 +37,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
select HAVE_ARCH_KGDB if !CPU_ENDIAN_BE32 && MMU select HAVE_ARCH_KGDB if !CPU_ENDIAN_BE32 && MMU
select HAVE_ARCH_MMAP_RND_BITS if MMU select HAVE_ARCH_MMAP_RND_BITS if MMU
select HAVE_ARCH_SECCOMP_FILTER if (AEABI && !OABI_COMPAT) select HAVE_ARCH_SECCOMP_FILTER if (AEABI && !OABI_COMPAT)
--
2.20.1

View File

@ -1,16 +1,20 @@
Subject: kconfig: Disable config options which are not RT compatible From d751d981bb0b049a6d70770a570d844cc6d7d69f Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de> From: Thomas Gleixner <tglx@linutronix.de>
Date: Sun, 24 Jul 2011 12:11:43 +0200 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.25-rt16.tar.xz Subject: [PATCH 041/266] kconfig: Disable config options which are not RT
compatible
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Disable stuff which is known to have issues on RT Disable stuff which is known to have issues on RT
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
--- ---
arch/Kconfig | 1 + arch/Kconfig | 1 +
mm/Kconfig | 2 +- mm/Kconfig | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-) 2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/Kconfig b/arch/Kconfig
index 6801123932a5..42b9062b9dbf 100644
--- a/arch/Kconfig --- a/arch/Kconfig
+++ b/arch/Kconfig +++ b/arch/Kconfig
@@ -28,6 +28,7 @@ config OPROFILE @@ -28,6 +28,7 @@ config OPROFILE
@ -21,6 +25,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
select RING_BUFFER select RING_BUFFER
select RING_BUFFER_ALLOW_SWAP select RING_BUFFER_ALLOW_SWAP
help help
diff --git a/mm/Kconfig b/mm/Kconfig
index de64ea658716..438460486a5b 100644
--- a/mm/Kconfig --- a/mm/Kconfig
+++ b/mm/Kconfig +++ b/mm/Kconfig
@@ -377,7 +377,7 @@ config NOMMU_INITIAL_TRIM_EXCESS @@ -377,7 +377,7 @@ config NOMMU_INITIAL_TRIM_EXCESS
@ -32,3 +38,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
select COMPACTION select COMPACTION
select RADIX_TREE_MULTIORDER select RADIX_TREE_MULTIORDER
help help
--
2.20.1

View File

@ -1,10 +1,11 @@
From c0eb3a8fa85bf6f84e02e76fcb71c49ed95e08c3 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Tue, 17 Oct 2017 16:36:18 +0200 Date: Tue, 17 Oct 2017 16:36:18 +0200
Subject: [PATCH] lockdep: disable self-test Subject: [PATCH 042/266] lockdep: disable self-test
MIME-Version: 1.0 MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit Content-Transfer-Encoding: 8bit
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
The self-test wasn't always 100% accurate for RT. We disabled a few The self-test wasn't always 100% accurate for RT. We disabled a few
tests which failed because they had a different semantic for RT. Some tests which failed because they had a different semantic for RT. Some
@ -13,9 +14,11 @@ during boot and it needs to be investigated…
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
lib/Kconfig.debug | 2 +- lib/Kconfig.debug | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 4966c4fbe7f7..92e7d88946f7 100644
--- a/lib/Kconfig.debug --- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug +++ b/lib/Kconfig.debug
@@ -1207,7 +1207,7 @@ config DEBUG_ATOMIC_SLEEP @@ -1207,7 +1207,7 @@ config DEBUG_ATOMIC_SLEEP
@ -27,3 +30,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
help help
Say Y here if you want the kernel to run a short self-test during Say Y here if you want the kernel to run a short self-test during
bootup. The self-test checks whether common types of locking bugs bootup. The self-test checks whether common types of locking bugs
--
2.20.1

View File

@ -1,17 +1,19 @@
From 3c67357f9ddd2cd3edc9e9703489fe065841c745 Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo@elte.hu> From: Ingo Molnar <mingo@elte.hu>
Date: Fri, 3 Jul 2009 08:44:03 -0500 Date: Fri, 3 Jul 2009 08:44:03 -0500
Subject: mm: Allow only slub on RT Subject: [PATCH 043/266] mm: Allow only slub on RT
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Disable SLAB and SLOB on -RT. Only SLUB is adopted to -RT needs. Disable SLAB and SLOB on -RT. Only SLUB is adopted to -RT needs.
Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
--- ---
init/Kconfig | 2 ++ init/Kconfig | 2 ++
1 file changed, 2 insertions(+) 1 file changed, 2 insertions(+)
diff --git a/init/Kconfig b/init/Kconfig
index 864af10bb1b9..f3f073942c30 100644
--- a/init/Kconfig --- a/init/Kconfig
+++ b/init/Kconfig +++ b/init/Kconfig
@@ -1634,6 +1634,7 @@ choice @@ -1634,6 +1634,7 @@ choice
@ -30,3 +32,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
help help
SLOB replaces the stock allocator with a drastically simpler SLOB replaces the stock allocator with a drastically simpler
allocator. SLOB is generally more space efficient but allocator. SLOB is generally more space efficient but
--
2.20.1

View File

@ -1,16 +1,22 @@
From da969770d426e1540fefe9ce5babeb38ed79736e Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de> From: Thomas Gleixner <tglx@linutronix.de>
Date: Sun, 17 Jul 2011 21:51:45 +0200 Date: Sun, 17 Jul 2011 21:51:45 +0200
Subject: locking: Disable spin on owner for RT Subject: [PATCH 044/266] locking: Disable spin on owner for RT
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz 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.31-rt18.tar.xz
Drop spin on owner for mutex / rwsem. We are most likely not using it Drop spin on owner for mutex / rwsem. We are most likely not using it
but… but…
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
--- ---
kernel/Kconfig.locks | 4 ++-- kernel/Kconfig.locks | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-) 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/Kconfig.locks b/kernel/Kconfig.locks
index 84d882f3e299..af27c4000812 100644
--- a/kernel/Kconfig.locks --- a/kernel/Kconfig.locks
+++ b/kernel/Kconfig.locks +++ b/kernel/Kconfig.locks
@@ -225,11 +225,11 @@ config ARCH_SUPPORTS_ATOMIC_RMW @@ -225,11 +225,11 @@ config ARCH_SUPPORTS_ATOMIC_RMW
@ -27,3 +33,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
config LOCK_SPIN_ON_OWNER config LOCK_SPIN_ON_OWNER
def_bool y def_bool y
--
2.20.1

View File

@ -1,17 +1,19 @@
Subject: rcu: Disable RCU_FAST_NO_HZ on RT From 7693a7d0ace9236acfc968d46960678bf81951a2 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de> From: Thomas Gleixner <tglx@linutronix.de>
Date: Sun, 28 Oct 2012 13:26:09 +0000 Date: Sun, 28 Oct 2012 13:26:09 +0000
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Subject: [PATCH 045/266] rcu: Disable RCU_FAST_NO_HZ on RT
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
This uses a timer_list timer from the irq disabled guts of the idle This uses a timer_list timer from the irq disabled guts of the idle
code. Disable it for now to prevent wreckage. code. Disable it for now to prevent wreckage.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
--- ---
kernel/rcu/Kconfig | 2 +- kernel/rcu/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/rcu/Kconfig b/kernel/rcu/Kconfig
index 9210379c0353..644264be90f0 100644
--- a/kernel/rcu/Kconfig --- a/kernel/rcu/Kconfig
+++ b/kernel/rcu/Kconfig +++ b/kernel/rcu/Kconfig
@@ -172,7 +172,7 @@ config RCU_FANOUT_LEAF @@ -172,7 +172,7 @@ config RCU_FANOUT_LEAF
@ -23,3 +25,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
default n default n
help help
This option permits CPUs to enter dynticks-idle state even if This option permits CPUs to enter dynticks-idle state even if
--
2.20.1

View File

@ -1,7 +1,8 @@
From 9663e4eb2ef8749e6888e179b36148a33b0903b6 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Fri, 21 Mar 2014 20:19:05 +0100 Date: Fri, 21 Mar 2014 20:19:05 +0100
Subject: rcu: make RCU_BOOST default on RT Subject: [PATCH 046/266] rcu: make RCU_BOOST default on RT
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Since it is no longer invoked from the softirq people run into OOM more Since it is no longer invoked from the softirq people run into OOM more
often if the priority of the RCU thread is too low. Making boosting often if the priority of the RCU thread is too low. Making boosting
@ -10,9 +11,11 @@ someone knows better.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
kernel/rcu/Kconfig | 4 ++-- kernel/rcu/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-) 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/rcu/Kconfig b/kernel/rcu/Kconfig
index 644264be90f0..a243a78ff38c 100644
--- a/kernel/rcu/Kconfig --- a/kernel/rcu/Kconfig
+++ b/kernel/rcu/Kconfig +++ b/kernel/rcu/Kconfig
@@ -190,8 +190,8 @@ config RCU_FAST_NO_HZ @@ -190,8 +190,8 @@ config RCU_FAST_NO_HZ
@ -26,3 +29,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
help help
This option boosts the priority of preempted RCU readers that This option boosts the priority of preempted RCU readers that
block the current preemptible RCU grace period for too long. block the current preemptible RCU grace period for too long.
--
2.20.1

View File

@ -1,7 +1,8 @@
Subject: sched: Disable CONFIG_RT_GROUP_SCHED on RT From 066901c0a5deb8707fb2288c085499a4c497b029 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de> From: Thomas Gleixner <tglx@linutronix.de>
Date: Mon, 18 Jul 2011 17:03:52 +0200 Date: Mon, 18 Jul 2011 17:03:52 +0200
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Subject: [PATCH 047/266] sched: Disable CONFIG_RT_GROUP_SCHED on RT
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Carsten reported problems when running: Carsten reported problems when running:
@ -14,9 +15,11 @@ shell. Disabling CONFIG_RT_GROUP_SCHED solves that as well.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
--- ---
init/Kconfig | 1 + init/Kconfig | 1 +
1 file changed, 1 insertion(+) 1 file changed, 1 insertion(+)
diff --git a/init/Kconfig b/init/Kconfig
index f3f073942c30..707ca4d49944 100644
--- a/init/Kconfig --- a/init/Kconfig
+++ b/init/Kconfig +++ b/init/Kconfig
@@ -781,6 +781,7 @@ config CFS_BANDWIDTH @@ -781,6 +781,7 @@ config CFS_BANDWIDTH
@ -27,3 +30,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
default n default n
help help
This feature lets you explicitly allocate real CPU bandwidth This feature lets you explicitly allocate real CPU bandwidth
--
2.20.1

View File

@ -1,7 +1,11 @@
From 41d940e10ea6260a89e82f3bc62428bca1a8373a Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Sat, 27 May 2017 19:02:06 +0200 Date: Sat, 27 May 2017 19:02:06 +0200
Subject: net/core: disable NET_RX_BUSY_POLL Subject: [PATCH 048/266] net/core: disable NET_RX_BUSY_POLL
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz 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.31-rt18.tar.xz
sk_busy_loop() does preempt_disable() followed by a few operations which can sk_busy_loop() does preempt_disable() followed by a few operations which can
take sleeping locks and may get long. take sleeping locks and may get long.
@ -13,9 +17,11 @@ could be invoked again.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
net/Kconfig | 2 +- net/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/Kconfig b/net/Kconfig
index 228dfa382eec..bc8d01996f22 100644
--- a/net/Kconfig --- a/net/Kconfig
+++ b/net/Kconfig +++ b/net/Kconfig
@@ -275,7 +275,7 @@ config CGROUP_NET_CLASSID @@ -275,7 +275,7 @@ config CGROUP_NET_CLASSID
@ -27,3 +33,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
config BQL config BQL
bool bool
--
2.20.1

View File

@ -1,7 +1,8 @@
From 971f370fb7433d4b34102c32dea2095776b569b1 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Fri, 1 Dec 2017 10:42:03 +0100 Date: Fri, 1 Dec 2017 10:42:03 +0100
Subject: [PATCH] arm*: disable NEON in kernel mode Subject: [PATCH 049/266] arm*: disable NEON in kernel mode
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
NEON in kernel mode is used by the crypto algorithms and raid6 code. 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 While the raid6 code looks okay, the crypto algorithms do not: NEON
@ -14,14 +15,16 @@ stay on due to possible EFI callbacks so here I disable each algorithm.
Cc: stable-rt@vger.kernel.org Cc: stable-rt@vger.kernel.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
arch/arm/Kconfig | 2 +- arch/arm/Kconfig | 2 +-
arch/arm64/crypto/Kconfig | 28 ++++++++++++++-------------- arch/arm64/crypto/Kconfig | 28 ++++++++++++++--------------
arch/arm64/crypto/crc32-ce-glue.c | 3 ++- arch/arm64/crypto/crc32-ce-glue.c | 3 ++-
3 files changed, 17 insertions(+), 16 deletions(-) 3 files changed, 17 insertions(+), 16 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 27a5f0b9ddc7..91f4f80a6f24 100644
--- a/arch/arm/Kconfig --- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig +++ b/arch/arm/Kconfig
@@ -2160,7 +2160,7 @@ config NEON @@ -2161,7 +2161,7 @@ config NEON
config KERNEL_MODE_NEON config KERNEL_MODE_NEON
bool "Support for NEON in kernel mode" bool "Support for NEON in kernel mode"
@ -30,6 +33,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
help help
Say Y to include support for NEON in kernel mode. Say Y to include support for NEON in kernel mode.
diff --git a/arch/arm64/crypto/Kconfig b/arch/arm64/crypto/Kconfig
index d51944ff9f91..0d4b3f0cfba6 100644
--- a/arch/arm64/crypto/Kconfig --- a/arch/arm64/crypto/Kconfig
+++ b/arch/arm64/crypto/Kconfig +++ b/arch/arm64/crypto/Kconfig
@@ -19,43 +19,43 @@ config CRYPTO_SHA512_ARM64 @@ -19,43 +19,43 @@ config CRYPTO_SHA512_ARM64
@ -142,9 +147,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
select CRYPTO_BLKCIPHER select CRYPTO_BLKCIPHER
select CRYPTO_AES_ARM64_NEON_BLK select CRYPTO_AES_ARM64_NEON_BLK
select CRYPTO_AES_ARM64 select CRYPTO_AES_ARM64
diff --git a/arch/arm64/crypto/crc32-ce-glue.c b/arch/arm64/crypto/crc32-ce-glue.c
index 34b4e3d46aab..ae055cdad8cf 100644
--- a/arch/arm64/crypto/crc32-ce-glue.c --- a/arch/arm64/crypto/crc32-ce-glue.c
+++ b/arch/arm64/crypto/crc32-ce-glue.c +++ b/arch/arm64/crypto/crc32-ce-glue.c
@@ -208,7 +208,8 @@ static struct shash_alg crc32_pmull_algs @@ -208,7 +208,8 @@ static struct shash_alg crc32_pmull_algs[] = { {
static int __init crc32_pmull_mod_init(void) static int __init crc32_pmull_mod_init(void)
{ {
@ -154,3 +161,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
crc32_pmull_algs[0].update = crc32_pmull_update; crc32_pmull_algs[0].update = crc32_pmull_update;
crc32_pmull_algs[1].update = crc32c_pmull_update; crc32_pmull_algs[1].update = crc32c_pmull_update;
--
2.20.1

View File

@ -1,15 +1,18 @@
From 50ff216c2966385635b18c93bcbd6fc09bb6a942 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de> From: Thomas Gleixner <tglx@linutronix.de>
Date: Tue, 14 Jul 2015 14:26:34 +0200 Date: Tue, 14 Jul 2015 14:26:34 +0200
Subject: powerpc: Use generic rwsem on RT Subject: [PATCH 050/266] powerpc: Use generic rwsem on RT
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Use generic code which uses rtmutex Use generic code which uses rtmutex
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
--- ---
arch/powerpc/Kconfig | 3 ++- arch/powerpc/Kconfig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-) 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index a80669209155..9952764db9c5 100644
--- a/arch/powerpc/Kconfig --- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig
@@ -105,10 +105,11 @@ config LOCKDEP_SUPPORT @@ -105,10 +105,11 @@ config LOCKDEP_SUPPORT
@ -25,3 +28,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
config GENERIC_LOCKBREAK config GENERIC_LOCKBREAK
bool bool
--
2.20.1

View File

@ -1,7 +1,9 @@
From a87ef1b342f7eccaee4350f3b40f04cb8146563f Mon Sep 17 00:00:00 2001
From: Bogdan Purcareata <bogdan.purcareata@freescale.com> From: Bogdan Purcareata <bogdan.purcareata@freescale.com>
Date: Fri, 24 Apr 2015 15:53:13 +0000 Date: Fri, 24 Apr 2015 15:53:13 +0000
Subject: powerpc/kvm: Disable in-kernel MPIC emulation for PREEMPT_RT_FULL Subject: [PATCH 051/266] powerpc/kvm: Disable in-kernel MPIC emulation for
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz PREEMPT_RT_FULL
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
While converting the openpic emulation code to use a raw_spinlock_t enables While converting the openpic emulation code to use a raw_spinlock_t enables
guests to run on RT, there's still a performance issue. For interrupts sent in guests to run on RT, there's still a performance issue. For interrupts sent in
@ -23,9 +25,11 @@ Acked-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Bogdan Purcareata <bogdan.purcareata@freescale.com> Signed-off-by: Bogdan Purcareata <bogdan.purcareata@freescale.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
arch/powerpc/kvm/Kconfig | 1 + arch/powerpc/kvm/Kconfig | 1 +
1 file changed, 1 insertion(+) 1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/kvm/Kconfig b/arch/powerpc/kvm/Kconfig
index 68a0e9d5b440..6f4d5d7615af 100644
--- a/arch/powerpc/kvm/Kconfig --- a/arch/powerpc/kvm/Kconfig
+++ b/arch/powerpc/kvm/Kconfig +++ b/arch/powerpc/kvm/Kconfig
@@ -178,6 +178,7 @@ config KVM_E500MC @@ -178,6 +178,7 @@ config KVM_E500MC
@ -36,3 +40,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
select HAVE_KVM_IRQCHIP select HAVE_KVM_IRQCHIP
select HAVE_KVM_IRQFD select HAVE_KVM_IRQFD
select HAVE_KVM_IRQ_ROUTING select HAVE_KVM_IRQ_ROUTING
--
2.20.1

View File

@ -1,15 +1,18 @@
Subject: powerpc: Disable highmem on RT From 82b9e441c6737a2e2b23018ef6ee5e8ea70bea92 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de> From: Thomas Gleixner <tglx@linutronix.de>
Date: Mon, 18 Jul 2011 17:08:34 +0200 Date: Mon, 18 Jul 2011 17:08:34 +0200
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Subject: [PATCH 052/266] powerpc: Disable highmem on RT
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
The current highmem handling on -RT is not compatible and needs fixups. The current highmem handling on -RT is not compatible and needs fixups.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
--- ---
arch/powerpc/Kconfig | 2 +- arch/powerpc/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 9952764db9c5..1563820a37e8 100644
--- a/arch/powerpc/Kconfig --- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig
@@ -398,7 +398,7 @@ menu "Kernel options" @@ -398,7 +398,7 @@ menu "Kernel options"
@ -21,3 +24,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
source kernel/Kconfig.hz source kernel/Kconfig.hz
--
2.20.1

View File

@ -1,15 +1,18 @@
Subject: mips: Disable highmem on RT From 1f9a74c4a2b97a80e19078334933194464eea4e4 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de> From: Thomas Gleixner <tglx@linutronix.de>
Date: Mon, 18 Jul 2011 17:10:12 +0200 Date: Mon, 18 Jul 2011 17:10:12 +0200
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Subject: [PATCH 053/266] mips: Disable highmem on RT
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
The current highmem handling on -RT is not compatible and needs fixups. The current highmem handling on -RT is not compatible and needs fixups.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
--- ---
arch/mips/Kconfig | 2 +- arch/mips/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 201caf226b47..bd268302efa4 100644
--- a/arch/mips/Kconfig --- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig +++ b/arch/mips/Kconfig
@@ -2517,7 +2517,7 @@ config MIPS_CRC_SUPPORT @@ -2517,7 +2517,7 @@ config MIPS_CRC_SUPPORT
@ -21,3 +24,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
config CPU_SUPPORTS_HIGHMEM config CPU_SUPPORTS_HIGHMEM
bool bool
--
2.20.1

View File

@ -1,17 +1,19 @@
From 9090d6e680a6bc0177bc228d335f7185ae51a20b Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de> From: Thomas Gleixner <tglx@linutronix.de>
Date: Sun, 26 Jul 2009 02:21:32 +0200 Date: Sun, 26 Jul 2009 02:21:32 +0200
Subject: x86: Use generic rwsem_spinlocks on -rt Subject: [PATCH 054/266] x86: Use generic rwsem_spinlocks on -rt
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Simplifies the separation of anon_rw_semaphores and rw_semaphores for Simplifies the separation of anon_rw_semaphores and rw_semaphores for
-rt. -rt.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
--- ---
arch/x86/Kconfig | 5 ++++- arch/x86/Kconfig | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-) 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 06c3ec0c9c12..8c56260bdf84 100644
--- a/arch/x86/Kconfig --- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig +++ b/arch/x86/Kconfig
@@ -264,8 +264,11 @@ config ARCH_MAY_HAVE_PC_FDC @@ -264,8 +264,11 @@ config ARCH_MAY_HAVE_PC_FDC
@ -27,3 +29,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
config GENERIC_CALIBRATE_DELAY config GENERIC_CALIBRATE_DELAY
def_bool y def_bool y
--
2.20.1

View File

@ -1,7 +1,8 @@
From 6735813a67410ba9afbfa1a69797e4b21b41e5d6 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Thu, 23 Jan 2014 14:45:59 +0100 Date: Thu, 23 Jan 2014 14:45:59 +0100
Subject: leds: trigger: disable CPU trigger on -RT Subject: [PATCH 055/266] leds: trigger: disable CPU trigger on -RT
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
as it triggers: as it triggers:
|CPU: 0 PID: 0 Comm: swapper Not tainted 3.12.8-rt10 #141 |CPU: 0 PID: 0 Comm: swapper Not tainted 3.12.8-rt10 #141
@ -20,9 +21,11 @@ as it triggers:
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
drivers/leds/trigger/Kconfig | 1 + drivers/leds/trigger/Kconfig | 1 +
1 file changed, 1 insertion(+) 1 file changed, 1 insertion(+)
diff --git a/drivers/leds/trigger/Kconfig b/drivers/leds/trigger/Kconfig
index 4018af769969..b4ce8c115949 100644
--- a/drivers/leds/trigger/Kconfig --- a/drivers/leds/trigger/Kconfig
+++ b/drivers/leds/trigger/Kconfig +++ b/drivers/leds/trigger/Kconfig
@@ -63,6 +63,7 @@ config LEDS_TRIGGER_BACKLIGHT @@ -63,6 +63,7 @@ config LEDS_TRIGGER_BACKLIGHT
@ -33,3 +36,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
help help
This allows LEDs to be controlled by active CPUs. This shows This allows LEDs to be controlled by active CPUs. This shows
the active CPUs across an array of LEDs so you can see which the active CPUs across an array of LEDs so you can see which
--
2.20.1

View File

@ -1,7 +1,8 @@
From 5c0e9974fc9f622e71e435b87ffad62998c6ab07 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Thu, 9 Apr 2015 15:23:01 +0200 Date: Thu, 9 Apr 2015 15:23:01 +0200
Subject: cpufreq: drop K8's driver from beeing selected Subject: [PATCH 056/266] cpufreq: drop K8's driver from beeing selected
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Ralf posted a picture of a backtrace from Ralf posted a picture of a backtrace from
@ -17,9 +18,11 @@ I have no machine with this, I simply switch it off.
Reported-by: Ralf Mardorf <ralf.mardorf@alice-dsl.net> Reported-by: Ralf Mardorf <ralf.mardorf@alice-dsl.net>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
drivers/cpufreq/Kconfig.x86 | 2 +- drivers/cpufreq/Kconfig.x86 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/cpufreq/Kconfig.x86 b/drivers/cpufreq/Kconfig.x86
index 35f71825b7f3..bb4a6160d0f7 100644
--- a/drivers/cpufreq/Kconfig.x86 --- a/drivers/cpufreq/Kconfig.x86
+++ b/drivers/cpufreq/Kconfig.x86 +++ b/drivers/cpufreq/Kconfig.x86
@@ -125,7 +125,7 @@ config X86_POWERNOW_K7_ACPI @@ -125,7 +125,7 @@ config X86_POWERNOW_K7_ACPI
@ -31,3 +34,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
help help
This adds the CPUFreq driver for K8/early Opteron/Athlon64 processors. This adds the CPUFreq driver for K8/early Opteron/Athlon64 processors.
Support for K10 and newer processors is now in acpi-cpufreq. Support for K10 and newer processors is now in acpi-cpufreq.
--
2.20.1

View File

@ -1,7 +1,11 @@
From affa4221731e24ded417ce3ae0d456609f586437 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Thu, 29 Aug 2013 11:48:57 +0200 Date: Thu, 29 Aug 2013 11:48:57 +0200
Subject: md: disable bcache Subject: [PATCH 057/266] md: disable bcache
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz 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.31-rt18.tar.xz
It uses anon semaphores It uses anon semaphores
|drivers/md/bcache/request.c: In function cached_dev_write_complete: |drivers/md/bcache/request.c: In function cached_dev_write_complete:
@ -17,9 +21,11 @@ either we get rid of those or we have to introduce them…
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
drivers/md/bcache/Kconfig | 1 + drivers/md/bcache/Kconfig | 1 +
1 file changed, 1 insertion(+) 1 file changed, 1 insertion(+)
diff --git a/drivers/md/bcache/Kconfig b/drivers/md/bcache/Kconfig
index f6e0a8b3a61e..18c03d79a442 100644
--- a/drivers/md/bcache/Kconfig --- a/drivers/md/bcache/Kconfig
+++ b/drivers/md/bcache/Kconfig +++ b/drivers/md/bcache/Kconfig
@@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
@ -30,3 +36,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
select CRC64 select CRC64
help help
Allows a block device to be used as cache for other devices; uses Allows a block device to be used as cache for other devices; uses
--
2.20.1

View File

@ -1,7 +1,8 @@
From f6bac5f902f6e18278e4e5882195b993725d520b Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Thu, 26 Jul 2018 15:03:16 +0200 Date: Thu, 26 Jul 2018 15:03:16 +0200
Subject: [PATCH] efi: Disable runtime services on RT Subject: [PATCH 058/266] efi: Disable runtime services on RT
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Based on meassurements the EFI functions get_variable / Based on meassurements the EFI functions get_variable /
get_next_variable take up to 2us which looks okay. get_next_variable take up to 2us which looks okay.
@ -24,9 +25,11 @@ This was observed on "EFI v2.60 by SoftIron Overdrive 1000".
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
drivers/firmware/efi/efi.c | 2 +- drivers/firmware/efi/efi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
index ab668e17fd05..f58ab9ed4ade 100644
--- a/drivers/firmware/efi/efi.c --- a/drivers/firmware/efi/efi.c
+++ b/drivers/firmware/efi/efi.c +++ b/drivers/firmware/efi/efi.c
@@ -87,7 +87,7 @@ struct mm_struct efi_mm = { @@ -87,7 +87,7 @@ struct mm_struct efi_mm = {
@ -38,3 +41,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
static int __init setup_noefi(char *arg) static int __init setup_noefi(char *arg)
{ {
disable_runtime = true; disable_runtime = true;
--
2.20.1

View File

@ -1,18 +1,21 @@
Subject: printk: Add a printk kill switch From db94b434e576549c696fa88efa6da37686c3105e Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo@elte.hu> From: Ingo Molnar <mingo@elte.hu>
Date: Fri, 22 Jul 2011 17:58:40 +0200 Date: Fri, 22 Jul 2011 17:58:40 +0200
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Subject: [PATCH 059/266] printk: Add a printk kill switch
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Add a prinkt-kill-switch. This is used from (NMI) watchdog to ensure that Add a prinkt-kill-switch. This is used from (NMI) watchdog to ensure that
it does not dead-lock with the early printk code. it does not dead-lock with the early printk code.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
--- ---
include/linux/printk.h | 2 + include/linux/printk.h | 2 ++
kernel/printk/printk.c | 79 ++++++++++++++++++++++++++++++++++++------------- kernel/printk/printk.c | 79 +++++++++++++++++++++++++++++++-----------
kernel/watchdog_hld.c | 10 ++++++ kernel/watchdog_hld.c | 10 ++++++
3 files changed, 71 insertions(+), 20 deletions(-) 3 files changed, 71 insertions(+), 20 deletions(-)
diff --git a/include/linux/printk.h b/include/linux/printk.h
index cf3eccfe1543..30ebf5f82a7c 100644
--- a/include/linux/printk.h --- a/include/linux/printk.h
+++ b/include/linux/printk.h +++ b/include/linux/printk.h
@@ -140,9 +140,11 @@ struct va_format { @@ -140,9 +140,11 @@ struct va_format {
@ -27,6 +30,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#endif #endif
#ifdef CONFIG_PRINTK_NMI #ifdef CONFIG_PRINTK_NMI
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 06045abd1887..413160a93814 100644
--- a/kernel/printk/printk.c --- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c +++ b/kernel/printk/printk.c
@@ -405,6 +405,58 @@ DEFINE_RAW_SPINLOCK(logbuf_lock); @@ -405,6 +405,58 @@ DEFINE_RAW_SPINLOCK(logbuf_lock);
@ -88,7 +93,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#ifdef CONFIG_PRINTK #ifdef CONFIG_PRINTK
DECLARE_WAIT_QUEUE_HEAD(log_wait); DECLARE_WAIT_QUEUE_HEAD(log_wait);
/* the next printk record to read by syslog(READ) or /proc/kmsg */ /* the next printk record to read by syslog(READ) or /proc/kmsg */
@@ -1897,6 +1949,13 @@ asmlinkage int vprintk_emit(int facility @@ -1897,6 +1949,13 @@ asmlinkage int vprintk_emit(int facility, int level,
bool in_sched = false; bool in_sched = false;
unsigned long flags; unsigned long flags;
@ -102,7 +107,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
if (level == LOGLEVEL_SCHED) { if (level == LOGLEVEL_SCHED) {
level = LOGLEVEL_DEFAULT; level = LOGLEVEL_DEFAULT;
in_sched = true; in_sched = true;
@@ -2037,26 +2096,6 @@ static bool suppress_message_printing(in @@ -2037,26 +2096,6 @@ static bool suppress_message_printing(int level) { return false; }
#endif /* CONFIG_PRINTK */ #endif /* CONFIG_PRINTK */
@ -129,9 +134,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
static int __add_preferred_console(char *name, int idx, char *options, static int __add_preferred_console(char *name, int idx, char *options,
char *brl_options) char *brl_options)
{ {
diff --git a/kernel/watchdog_hld.c b/kernel/watchdog_hld.c
index 71381168dede..685443375dc0 100644
--- a/kernel/watchdog_hld.c --- a/kernel/watchdog_hld.c
+++ b/kernel/watchdog_hld.c +++ b/kernel/watchdog_hld.c
@@ -24,6 +24,8 @@ static DEFINE_PER_CPU(bool, hard_watchdo @@ -24,6 +24,8 @@ static DEFINE_PER_CPU(bool, hard_watchdog_warn);
static DEFINE_PER_CPU(bool, watchdog_nmi_touch); static DEFINE_PER_CPU(bool, watchdog_nmi_touch);
static DEFINE_PER_CPU(struct perf_event *, watchdog_ev); static DEFINE_PER_CPU(struct perf_event *, watchdog_ev);
static DEFINE_PER_CPU(struct perf_event *, dead_event); static DEFINE_PER_CPU(struct perf_event *, dead_event);
@ -140,7 +147,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
static struct cpumask dead_events_mask; static struct cpumask dead_events_mask;
static unsigned long hardlockup_allcpu_dumped; static unsigned long hardlockup_allcpu_dumped;
@@ -134,6 +136,13 @@ static void watchdog_overflow_callback(s @@ -134,6 +136,13 @@ static void watchdog_overflow_callback(struct perf_event *event,
/* only print hardlockups once */ /* only print hardlockups once */
if (__this_cpu_read(hard_watchdog_warn) == true) if (__this_cpu_read(hard_watchdog_warn) == true)
return; return;
@ -154,7 +161,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
pr_emerg("Watchdog detected hard LOCKUP on cpu %d", this_cpu); pr_emerg("Watchdog detected hard LOCKUP on cpu %d", this_cpu);
print_modules(); print_modules();
@@ -151,6 +160,7 @@ static void watchdog_overflow_callback(s @@ -151,6 +160,7 @@ static void watchdog_overflow_callback(struct perf_event *event,
!test_and_set_bit(0, &hardlockup_allcpu_dumped)) !test_and_set_bit(0, &hardlockup_allcpu_dumped))
trigger_allbutself_cpu_backtrace(); trigger_allbutself_cpu_backtrace();
@ -162,3 +169,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
if (hardlockup_panic) if (hardlockup_panic)
nmi_panic(regs, "Hard LOCKUP"); nmi_panic(regs, "Hard LOCKUP");
--
2.20.1

View File

@ -1,7 +1,9 @@
Subject: printk: Add "force_early_printk" boot param to help with debugging From d8d56f3a4ed8403b82e04725ee6de60304deb3a3 Mon Sep 17 00:00:00 2001
From: Peter Zijlstra <peterz@infradead.org> From: Peter Zijlstra <peterz@infradead.org>
Date: Fri, 02 Sep 2011 14:41:29 +0200 Date: Fri, 2 Sep 2011 14:41:29 +0200
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Subject: [PATCH 060/266] printk: Add "force_early_printk" boot param to help
with debugging
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Gives me an option to screw printk and actually see what the machine Gives me an option to screw printk and actually see what the machine
says. says.
@ -11,12 +13,14 @@ Link: http://lkml.kernel.org/r/1314967289.1301.11.camel@twins
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/n/tip-ykb97nsfmobq44xketrxs977@git.kernel.org Link: http://lkml.kernel.org/n/tip-ykb97nsfmobq44xketrxs977@git.kernel.org
--- ---
kernel/printk/printk.c | 7 +++++++ kernel/printk/printk.c | 7 +++++++
1 file changed, 7 insertions(+) 1 file changed, 7 insertions(+)
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 413160a93814..6553508ff388 100644
--- a/kernel/printk/printk.c --- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c +++ b/kernel/printk/printk.c
@@ -435,6 +435,13 @@ asmlinkage void early_printk(const char @@ -435,6 +435,13 @@ asmlinkage void early_printk(const char *fmt, ...)
*/ */
static bool __read_mostly printk_killswitch; static bool __read_mostly printk_killswitch;
@ -30,3 +34,6 @@ Link: http://lkml.kernel.org/n/tip-ykb97nsfmobq44xketrxs977@git.kernel.org
void printk_kill(void) void printk_kill(void)
{ {
printk_killswitch = true; printk_killswitch = true;
--
2.20.1

View File

@ -1,17 +1,19 @@
From 06d1d562d9934f5c0fa80e760657900af0dd35cd Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de> From: Thomas Gleixner <tglx@linutronix.de>
Date: Fri, 24 Jul 2009 12:38:56 +0200 Date: Fri, 24 Jul 2009 12:38:56 +0200
Subject: preempt: Provide preempt_*_(no)rt variants Subject: [PATCH 061/266] preempt: Provide preempt_*_(no)rt variants
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
RT needs a few preempt_disable/enable points which are not necessary RT needs a few preempt_disable/enable points which are not necessary
otherwise. Implement variants to avoid #ifdeffery. otherwise. Implement variants to avoid #ifdeffery.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
--- ---
include/linux/preempt.h | 18 +++++++++++++++++- include/linux/preempt.h | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-) 1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/include/linux/preempt.h b/include/linux/preempt.h
index 3196d0e76719..f7a17fcc3fec 100644
--- a/include/linux/preempt.h --- a/include/linux/preempt.h
+++ b/include/linux/preempt.h +++ b/include/linux/preempt.h
@@ -181,7 +181,11 @@ do { \ @@ -181,7 +181,11 @@ do { \
@ -46,3 +48,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#ifdef CONFIG_PREEMPT_NOTIFIERS #ifdef CONFIG_PREEMPT_NOTIFIERS
struct preempt_notifier; struct preempt_notifier;
--
2.20.1

View File

@ -1,7 +1,9 @@
From fcac9e8e052ad0a523a1cf3096b7e506754fa454 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de> From: Thomas Gleixner <tglx@linutronix.de>
Date: Wed, 8 Mar 2017 14:23:35 +0100 Date: Wed, 8 Mar 2017 14:23:35 +0100
Subject: [PATCH] futex: workaround migrate_disable/enable in different context Subject: [PATCH 062/266] futex: workaround migrate_disable/enable in different
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz context
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
migrate_disable()/migrate_enable() takes a different path in atomic() vs migrate_disable()/migrate_enable() takes a different path in atomic() vs
!atomic() context. These little hacks ensure that we don't underflow / overflow !atomic() context. These little hacks ensure that we don't underflow / overflow
@ -11,12 +13,14 @@ enabled and unlock it with interrupts disabled.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
kernel/futex.c | 19 +++++++++++++++++++ kernel/futex.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+) 1 file changed, 19 insertions(+)
diff --git a/kernel/futex.c b/kernel/futex.c
index c5fca746edc4..cea098efd12e 100644
--- a/kernel/futex.c --- a/kernel/futex.c
+++ b/kernel/futex.c +++ b/kernel/futex.c
@@ -2856,6 +2856,14 @@ static int futex_lock_pi(u32 __user *uad @@ -2859,6 +2859,14 @@ static int futex_lock_pi(u32 __user *uaddr, unsigned int flags,
* before __rt_mutex_start_proxy_lock() is done. * before __rt_mutex_start_proxy_lock() is done.
*/ */
raw_spin_lock_irq(&q.pi_state->pi_mutex.wait_lock); raw_spin_lock_irq(&q.pi_state->pi_mutex.wait_lock);
@ -31,7 +35,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
spin_unlock(q.lock_ptr); spin_unlock(q.lock_ptr);
/* /*
* __rt_mutex_start_proxy_lock() unconditionally enqueues the @rt_waiter * __rt_mutex_start_proxy_lock() unconditionally enqueues the @rt_waiter
@@ -2864,6 +2872,7 @@ static int futex_lock_pi(u32 __user *uad @@ -2867,6 +2875,7 @@ static int futex_lock_pi(u32 __user *uaddr, unsigned int flags,
*/ */
ret = __rt_mutex_start_proxy_lock(&q.pi_state->pi_mutex, &rt_waiter, current); ret = __rt_mutex_start_proxy_lock(&q.pi_state->pi_mutex, &rt_waiter, current);
raw_spin_unlock_irq(&q.pi_state->pi_mutex.wait_lock); raw_spin_unlock_irq(&q.pi_state->pi_mutex.wait_lock);
@ -39,7 +43,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (ret) { if (ret) {
if (ret == 1) if (ret == 1)
@@ -3012,11 +3021,21 @@ static int futex_unlock_pi(u32 __user *u @@ -3015,11 +3024,21 @@ static int futex_unlock_pi(u32 __user *uaddr, unsigned int flags)
* rt_waiter. Also see the WARN in wake_futex_pi(). * rt_waiter. Also see the WARN in wake_futex_pi().
*/ */
raw_spin_lock_irq(&pi_state->pi_mutex.wait_lock); raw_spin_lock_irq(&pi_state->pi_mutex.wait_lock);
@ -61,3 +65,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
put_pi_state(pi_state); put_pi_state(pi_state);
/* /*
--
2.20.1

View File

@ -1,7 +1,8 @@
Subject: rt: Add local irq locks From f9239dc23086d9c032d0d537c9963abb576143ee Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de> From: Thomas Gleixner <tglx@linutronix.de>
Date: Mon, 20 Jun 2011 09:03:47 +0200 Date: Mon, 20 Jun 2011 09:03:47 +0200
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Subject: [PATCH 063/266] rt: Add local irq locks
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Introduce locallock. For !RT this maps to preempt_disable()/ Introduce locallock. For !RT this maps to preempt_disable()/
local_irq_disable() so there is not much that changes. For RT this will local_irq_disable() so there is not much that changes. For RT this will
@ -13,10 +14,14 @@ is held and the owner is preempted.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
--- ---
include/linux/locallock.h | 271 ++++++++++++++++++++++++++++++++++++++++++++++ include/linux/locallock.h | 271 ++++++++++++++++++++++++++++++++++++++
include/linux/percpu.h | 29 ++++ include/linux/percpu.h | 29 ++++
2 files changed, 300 insertions(+) 2 files changed, 300 insertions(+)
create mode 100644 include/linux/locallock.h
diff --git a/include/linux/locallock.h b/include/linux/locallock.h
new file mode 100644
index 000000000000..d658c2552601
--- /dev/null --- /dev/null
+++ b/include/linux/locallock.h +++ b/include/linux/locallock.h
@@ -0,0 +1,271 @@ @@ -0,0 +1,271 @@
@ -291,6 +296,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+#endif +#endif
+ +
+#endif +#endif
diff --git a/include/linux/percpu.h b/include/linux/percpu.h
index 70b7123f38c7..24421bf8c4b3 100644
--- a/include/linux/percpu.h --- a/include/linux/percpu.h
+++ b/include/linux/percpu.h +++ b/include/linux/percpu.h
@@ -19,6 +19,35 @@ @@ -19,6 +19,35 @@
@ -329,3 +336,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
/* minimum unit size, also is the maximum supported allocation size */ /* minimum unit size, also is the maximum supported allocation size */
#define PCPU_MIN_UNIT_SIZE PFN_ALIGN(32 << 10) #define PCPU_MIN_UNIT_SIZE PFN_ALIGN(32 << 10)
--
2.20.1

View File

@ -1,7 +1,8 @@
From 9e4d01906d9d81f07d456fb83b1bdd5ff019047f Mon Sep 17 00:00:00 2001
From: Julia Cartwright <julia@ni.com> From: Julia Cartwright <julia@ni.com>
Date: Mon, 7 May 2018 08:58:56 -0500 Date: Mon, 7 May 2018 08:58:56 -0500
Subject: [PATCH] locallock: provide {get,put}_locked_ptr() variants Subject: [PATCH 064/266] locallock: provide {get,put}_locked_ptr() variants
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Provide a set of locallocked accessors for pointers to per-CPU data; Provide a set of locallocked accessors for pointers to per-CPU data;
this is useful for dynamically-allocated per-CPU regions, for example. this is useful for dynamically-allocated per-CPU regions, for example.
@ -12,12 +13,14 @@ variants.
Signed-off-by: Julia Cartwright <julia@ni.com> Signed-off-by: Julia Cartwright <julia@ni.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
include/linux/locallock.h | 10 ++++++++++ include/linux/locallock.h | 10 ++++++++++
1 file changed, 10 insertions(+) 1 file changed, 10 insertions(+)
diff --git a/include/linux/locallock.h b/include/linux/locallock.h
index d658c2552601..921eab83cd34 100644
--- a/include/linux/locallock.h --- a/include/linux/locallock.h
+++ b/include/linux/locallock.h +++ b/include/linux/locallock.h
@@ -222,6 +222,14 @@ static inline int __local_unlock_irqrest @@ -222,6 +222,14 @@ static inline int __local_unlock_irqrestore(struct local_irq_lock *lv,
#define put_locked_var(lvar, var) local_unlock(lvar); #define put_locked_var(lvar, var) local_unlock(lvar);
@ -32,7 +35,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
#define local_lock_cpu(lvar) \ #define local_lock_cpu(lvar) \
({ \ ({ \
local_lock(lvar); \ local_lock(lvar); \
@@ -262,6 +270,8 @@ static inline void local_irq_lock_init(i @@ -262,6 +270,8 @@ static inline void local_irq_lock_init(int lvar) { }
#define get_locked_var(lvar, var) get_cpu_var(var) #define get_locked_var(lvar, var) get_cpu_var(var)
#define put_locked_var(lvar, var) put_cpu_var(var) #define put_locked_var(lvar, var) put_cpu_var(var)
@ -41,3 +44,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
#define local_lock_cpu(lvar) get_cpu() #define local_lock_cpu(lvar) get_cpu()
#define local_unlock_cpu(lvar) put_cpu() #define local_unlock_cpu(lvar) put_cpu()
--
2.20.1

View File

@ -1,19 +1,22 @@
From 4fd0a81c1f1b284d3b3833169556b1476d2aa4e8 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de> From: Thomas Gleixner <tglx@linutronix.de>
Date: Fri, 3 Jul 2009 08:44:34 -0500 Date: Fri, 3 Jul 2009 08:44:34 -0500
Subject: mm/scatterlist: Do not disable irqs on RT Subject: [PATCH 065/266] mm/scatterlist: Do not disable irqs on RT
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
For -RT it is enough to keep pagefault disabled (which is currently handled by For -RT it is enough to keep pagefault disabled (which is currently handled by
kmap_atomic()). kmap_atomic()).
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
--- ---
lib/scatterlist.c | 2 +- lib/scatterlist.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/scatterlist.c b/lib/scatterlist.c
index 7c6096a71704..5c2c68962709 100644
--- a/lib/scatterlist.c --- a/lib/scatterlist.c
+++ b/lib/scatterlist.c +++ b/lib/scatterlist.c
@@ -776,7 +776,7 @@ void sg_miter_stop(struct sg_mapping_ite @@ -776,7 +776,7 @@ void sg_miter_stop(struct sg_mapping_iter *miter)
flush_kernel_dcache_page(miter->page); flush_kernel_dcache_page(miter->page);
if (miter->__flags & SG_MITER_ATOMIC) { if (miter->__flags & SG_MITER_ATOMIC) {
@ -22,3 +25,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kunmap_atomic(miter->addr); kunmap_atomic(miter->addr);
} else } else
kunmap(miter->page); kunmap(miter->page);
--
2.20.1

View File

@ -1,7 +1,8 @@
From bacf069f1145a471fbdaafd0d2e75d1ca061c4e9 Mon Sep 17 00:00:00 2001
From: Oleg Nesterov <oleg@redhat.com> From: Oleg Nesterov <oleg@redhat.com>
Date: Tue, 14 Jul 2015 14:26:34 +0200 Date: Tue, 14 Jul 2015 14:26:34 +0200
Subject: signal/x86: Delay calling signals in atomic Subject: [PATCH 066/266] signal/x86: Delay calling signals in atomic
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
On x86_64 we must disable preemption before we enable interrupts On x86_64 we must disable preemption before we enable interrupts
for stack faults, int3 and debugging, because the current task is using for stack faults, int3 and debugging, because the current task is using
@ -30,16 +31,17 @@ Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
--- ---
arch/x86/entry/common.c | 7 +++++++
arch/x86/entry/common.c | 7 +++++++ arch/x86/include/asm/signal.h | 13 ++++++++++++
arch/x86/include/asm/signal.h | 13 +++++++++++++ include/linux/sched.h | 4 ++++
include/linux/sched.h | 4 ++++ kernel/signal.c | 37 +++++++++++++++++++++++++++++++++--
kernel/signal.c | 37 +++++++++++++++++++++++++++++++++++--
4 files changed, 59 insertions(+), 2 deletions(-) 4 files changed, 59 insertions(+), 2 deletions(-)
diff --git a/arch/x86/entry/common.c b/arch/x86/entry/common.c
index 3b2490b81918..ec46ee700791 100644
--- a/arch/x86/entry/common.c --- a/arch/x86/entry/common.c
+++ b/arch/x86/entry/common.c +++ b/arch/x86/entry/common.c
@@ -151,6 +151,13 @@ static void exit_to_usermode_loop(struct @@ -151,6 +151,13 @@ static void exit_to_usermode_loop(struct pt_regs *regs, u32 cached_flags)
if (cached_flags & _TIF_NEED_RESCHED) if (cached_flags & _TIF_NEED_RESCHED)
schedule(); schedule();
@ -53,6 +55,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
if (cached_flags & _TIF_UPROBE) if (cached_flags & _TIF_UPROBE)
uprobe_notify_resume(regs); uprobe_notify_resume(regs);
diff --git a/arch/x86/include/asm/signal.h b/arch/x86/include/asm/signal.h
index 33d3c88a7225..fb0438d06ca7 100644
--- a/arch/x86/include/asm/signal.h --- a/arch/x86/include/asm/signal.h
+++ b/arch/x86/include/asm/signal.h +++ b/arch/x86/include/asm/signal.h
@@ -28,6 +28,19 @@ typedef struct { @@ -28,6 +28,19 @@ typedef struct {
@ -75,6 +79,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#ifndef CONFIG_COMPAT #ifndef CONFIG_COMPAT
typedef sigset_t compat_sigset_t; typedef sigset_t compat_sigset_t;
#endif #endif
diff --git a/include/linux/sched.h b/include/linux/sched.h
index fad3583f0933..daa99f3b7c78 100644
--- a/include/linux/sched.h --- a/include/linux/sched.h
+++ b/include/linux/sched.h +++ b/include/linux/sched.h
@@ -881,6 +881,10 @@ struct task_struct { @@ -881,6 +881,10 @@ struct task_struct {
@ -88,9 +94,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
unsigned long sas_ss_sp; unsigned long sas_ss_sp;
size_t sas_ss_size; size_t sas_ss_size;
unsigned int sas_ss_flags; unsigned int sas_ss_flags;
diff --git a/kernel/signal.c b/kernel/signal.c
index f29def2be652..57c48b3d1491 100644
--- a/kernel/signal.c --- a/kernel/signal.c
+++ b/kernel/signal.c +++ b/kernel/signal.c
@@ -1268,8 +1268,8 @@ int do_send_sig_info(int sig, struct sig @@ -1268,8 +1268,8 @@ int do_send_sig_info(int sig, struct siginfo *info, struct task_struct *p,
* We don't want to have recursive SIGSEGV's etc, for example, * We don't want to have recursive SIGSEGV's etc, for example,
* that is why we also clear SIGNAL_UNKILLABLE. * that is why we also clear SIGNAL_UNKILLABLE.
*/ */
@ -101,7 +109,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
{ {
unsigned long int flags; unsigned long int flags;
int ret, blocked, ignored; int ret, blocked, ignored;
@@ -1298,6 +1298,39 @@ force_sig_info(int sig, struct siginfo * @@ -1298,6 +1298,39 @@ force_sig_info(int sig, struct siginfo *info, struct task_struct *t)
return ret; return ret;
} }
@ -141,3 +149,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
/* /*
* Nuke all other threads in the group. * Nuke all other threads in the group.
*/ */
--
2.20.1

View File

@ -1,7 +1,8 @@
From fdbf4b87f2f3db9fbada1069ca5f38dc2384cec6 Mon Sep 17 00:00:00 2001
From: Yang Shi <yang.shi@linaro.org> From: Yang Shi <yang.shi@linaro.org>
Date: Thu, 10 Dec 2015 10:58:51 -0800 Date: Thu, 10 Dec 2015 10:58:51 -0800
Subject: x86/signal: delay calling signals on 32bit Subject: [PATCH 067/266] x86/signal: delay calling signals on 32bit
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
When running some ptrace single step tests on x86-32 machine, the below problem When running some ptrace single step tests on x86-32 machine, the below problem
is triggered: is triggered:
@ -27,9 +28,11 @@ from IST context") which was merged in v4.1-rc1.
Signed-off-by: Yang Shi <yang.shi@linaro.org> Signed-off-by: Yang Shi <yang.shi@linaro.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
arch/x86/include/asm/signal.h | 2 +- arch/x86/include/asm/signal.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/include/asm/signal.h b/arch/x86/include/asm/signal.h
index fb0438d06ca7..c00e27af2205 100644
--- a/arch/x86/include/asm/signal.h --- a/arch/x86/include/asm/signal.h
+++ b/arch/x86/include/asm/signal.h +++ b/arch/x86/include/asm/signal.h
@@ -37,7 +37,7 @@ typedef struct { @@ -37,7 +37,7 @@ typedef struct {
@ -41,3 +44,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
#define ARCH_RT_DELAYS_SIGNAL_SEND #define ARCH_RT_DELAYS_SIGNAL_SEND
#endif #endif
--
2.20.1

View File

@ -1,22 +1,25 @@
From b46962ff96a6d54dd6173294d9ae9f48286b213e Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de> From: Thomas Gleixner <tglx@linutronix.de>
Date: Fri, 18 Mar 2011 09:18:52 +0100 Date: Fri, 18 Mar 2011 09:18:52 +0100
Subject: buffer_head: Replace bh_uptodate_lock for -rt Subject: [PATCH 068/266] buffer_head: Replace bh_uptodate_lock for -rt
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Wrap the bit_spin_lock calls into a separate inline and add the RT Wrap the bit_spin_lock calls into a separate inline and add the RT
replacements with a real spinlock. replacements with a real spinlock.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
--- ---
fs/buffer.c | 21 +++++++-------------- fs/buffer.c | 21 +++++++--------------
fs/ext4/page-io.c | 6 ++---- fs/ext4/page-io.c | 6 ++----
fs/ntfs/aops.c | 10 +++------- fs/ntfs/aops.c | 10 +++-------
include/linux/buffer_head.h | 34 ++++++++++++++++++++++++++++++++++ include/linux/buffer_head.h | 34 ++++++++++++++++++++++++++++++++++
4 files changed, 46 insertions(+), 25 deletions(-) 4 files changed, 46 insertions(+), 25 deletions(-)
diff --git a/fs/buffer.c b/fs/buffer.c
index c083c4b3c1e7..b0ac4454b4a0 100644
--- a/fs/buffer.c --- a/fs/buffer.c
+++ b/fs/buffer.c +++ b/fs/buffer.c
@@ -273,8 +273,7 @@ static void end_buffer_async_read(struct @@ -274,8 +274,7 @@ static void end_buffer_async_read(struct buffer_head *bh, int uptodate)
* decide that the page is now completely done. * decide that the page is now completely done.
*/ */
first = page_buffers(page); first = page_buffers(page);
@ -26,7 +29,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
clear_buffer_async_read(bh); clear_buffer_async_read(bh);
unlock_buffer(bh); unlock_buffer(bh);
tmp = bh; tmp = bh;
@@ -287,8 +286,7 @@ static void end_buffer_async_read(struct @@ -288,8 +287,7 @@ static void end_buffer_async_read(struct buffer_head *bh, int uptodate)
} }
tmp = tmp->b_this_page; tmp = tmp->b_this_page;
} while (tmp != bh); } while (tmp != bh);
@ -36,7 +39,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
/* /*
* If none of the buffers had errors and they are all * If none of the buffers had errors and they are all
@@ -300,9 +298,7 @@ static void end_buffer_async_read(struct @@ -301,9 +299,7 @@ static void end_buffer_async_read(struct buffer_head *bh, int uptodate)
return; return;
still_busy: still_busy:
@ -47,7 +50,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
} }
/* /*
@@ -329,8 +325,7 @@ void end_buffer_async_write(struct buffe @@ -330,8 +326,7 @@ void end_buffer_async_write(struct buffer_head *bh, int uptodate)
} }
first = page_buffers(page); first = page_buffers(page);
@ -57,7 +60,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
clear_buffer_async_write(bh); clear_buffer_async_write(bh);
unlock_buffer(bh); unlock_buffer(bh);
@@ -342,15 +337,12 @@ void end_buffer_async_write(struct buffe @@ -343,15 +338,12 @@ void end_buffer_async_write(struct buffer_head *bh, int uptodate)
} }
tmp = tmp->b_this_page; tmp = tmp->b_this_page;
} }
@ -75,7 +78,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
} }
EXPORT_SYMBOL(end_buffer_async_write); EXPORT_SYMBOL(end_buffer_async_write);
@@ -3360,6 +3352,7 @@ struct buffer_head *alloc_buffer_head(gf @@ -3361,6 +3353,7 @@ struct buffer_head *alloc_buffer_head(gfp_t gfp_flags)
struct buffer_head *ret = kmem_cache_zalloc(bh_cachep, gfp_flags); struct buffer_head *ret = kmem_cache_zalloc(bh_cachep, gfp_flags);
if (ret) { if (ret) {
INIT_LIST_HEAD(&ret->b_assoc_buffers); INIT_LIST_HEAD(&ret->b_assoc_buffers);
@ -83,9 +86,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
preempt_disable(); preempt_disable();
__this_cpu_inc(bh_accounting.nr); __this_cpu_inc(bh_accounting.nr);
recalc_bh_state(); recalc_bh_state();
diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c
index db7590178dfc..d76364124443 100644
--- a/fs/ext4/page-io.c --- a/fs/ext4/page-io.c
+++ b/fs/ext4/page-io.c +++ b/fs/ext4/page-io.c
@@ -95,8 +95,7 @@ static void ext4_finish_bio(struct bio * @@ -95,8 +95,7 @@ static void ext4_finish_bio(struct bio *bio)
* We check all buffers in the page under BH_Uptodate_Lock * We check all buffers in the page under BH_Uptodate_Lock
* to avoid races with other end io clearing async_write flags * to avoid races with other end io clearing async_write flags
*/ */
@ -95,7 +100,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
do { do {
if (bh_offset(bh) < bio_start || if (bh_offset(bh) < bio_start ||
bh_offset(bh) + bh->b_size > bio_end) { bh_offset(bh) + bh->b_size > bio_end) {
@@ -108,8 +107,7 @@ static void ext4_finish_bio(struct bio * @@ -108,8 +107,7 @@ static void ext4_finish_bio(struct bio *bio)
if (bio->bi_status) if (bio->bi_status)
buffer_io_error(bh); buffer_io_error(bh);
} while ((bh = bh->b_this_page) != head); } while ((bh = bh->b_this_page) != head);
@ -105,9 +110,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
if (!under_io) { if (!under_io) {
#ifdef CONFIG_EXT4_FS_ENCRYPTION #ifdef CONFIG_EXT4_FS_ENCRYPTION
if (data_page) if (data_page)
diff --git a/fs/ntfs/aops.c b/fs/ntfs/aops.c
index 8946130c87ad..71d0b3ba70f8 100644
--- a/fs/ntfs/aops.c --- a/fs/ntfs/aops.c
+++ b/fs/ntfs/aops.c +++ b/fs/ntfs/aops.c
@@ -106,8 +106,7 @@ static void ntfs_end_buffer_async_read(s @@ -106,8 +106,7 @@ static void ntfs_end_buffer_async_read(struct buffer_head *bh, int uptodate)
"0x%llx.", (unsigned long long)bh->b_blocknr); "0x%llx.", (unsigned long long)bh->b_blocknr);
} }
first = page_buffers(page); first = page_buffers(page);
@ -117,7 +124,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
clear_buffer_async_read(bh); clear_buffer_async_read(bh);
unlock_buffer(bh); unlock_buffer(bh);
tmp = bh; tmp = bh;
@@ -122,8 +121,7 @@ static void ntfs_end_buffer_async_read(s @@ -122,8 +121,7 @@ static void ntfs_end_buffer_async_read(struct buffer_head *bh, int uptodate)
} }
tmp = tmp->b_this_page; tmp = tmp->b_this_page;
} while (tmp != bh); } while (tmp != bh);
@ -127,7 +134,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
/* /*
* If none of the buffers had errors then we can set the page uptodate, * If none of the buffers had errors then we can set the page uptodate,
* but we first have to perform the post read mst fixups, if the * but we first have to perform the post read mst fixups, if the
@@ -156,9 +154,7 @@ static void ntfs_end_buffer_async_read(s @@ -156,9 +154,7 @@ static void ntfs_end_buffer_async_read(struct buffer_head *bh, int uptodate)
unlock_page(page); unlock_page(page);
return; return;
still_busy: still_busy:
@ -138,6 +145,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
} }
/** /**
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h
index 96225a77c112..8a1bcfb145d7 100644
--- a/include/linux/buffer_head.h --- a/include/linux/buffer_head.h
+++ b/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h
@@ -76,8 +76,42 @@ struct buffer_head { @@ -76,8 +76,42 @@ struct buffer_head {
@ -183,3 +192,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
/* /*
* macro tricks to expand the set_buffer_foo(), clear_buffer_foo() * macro tricks to expand the set_buffer_foo(), clear_buffer_foo()
* and buffer_foo() functions. * and buffer_foo() functions.
--
2.20.1

View File

@ -1,7 +1,9 @@
From 3c12ff53bd33aa4b2a87422ac8ae4a39ca3fd689 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de> From: Thomas Gleixner <tglx@linutronix.de>
Date: Fri, 18 Mar 2011 10:11:25 +0100 Date: Fri, 18 Mar 2011 10:11:25 +0100
Subject: fs: jbd/jbd2: Make state lock and journal head lock rt safe Subject: [PATCH 069/266] fs: jbd/jbd2: Make state lock and journal head lock
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz rt safe
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
bit_spin_locks break under RT. bit_spin_locks break under RT.
@ -11,7 +13,13 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
include/linux/buffer_head.h | 8 ++++++++ include/linux/buffer_head.h | 8 ++++++++
include/linux/jbd2.h | 24 ++++++++++++++++++++++++ include/linux/jbd2.h | 24 ++++++++++++++++++++++++
2 files changed, 32 insertions(+) 2 files changed, 32 insertions(+)
---
include/linux/buffer_head.h | 8 ++++++++
include/linux/jbd2.h | 24 ++++++++++++++++++++++++
2 files changed, 32 insertions(+)
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h
index 8a1bcfb145d7..5869330d1f38 100644
--- a/include/linux/buffer_head.h --- a/include/linux/buffer_head.h
+++ b/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h
@@ -78,6 +78,10 @@ struct buffer_head { @@ -78,6 +78,10 @@ struct buffer_head {
@ -25,7 +33,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#endif #endif
}; };
@@ -109,6 +113,10 @@ static inline void buffer_head_init_lock @@ -109,6 +113,10 @@ static inline void buffer_head_init_locks(struct buffer_head *bh)
{ {
#ifdef CONFIG_PREEMPT_RT_BASE #ifdef CONFIG_PREEMPT_RT_BASE
spin_lock_init(&bh->b_uptodate_lock); spin_lock_init(&bh->b_uptodate_lock);
@ -36,9 +44,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#endif #endif
} }
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h
index b708e5169d1d..018665350951 100644
--- a/include/linux/jbd2.h --- a/include/linux/jbd2.h
+++ b/include/linux/jbd2.h +++ b/include/linux/jbd2.h
@@ -347,32 +347,56 @@ static inline struct journal_head *bh2jh @@ -347,32 +347,56 @@ static inline struct journal_head *bh2jh(struct buffer_head *bh)
static inline void jbd_lock_bh_state(struct buffer_head *bh) static inline void jbd_lock_bh_state(struct buffer_head *bh)
{ {
@ -95,3 +105,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
} }
#define J_ASSERT(assert) BUG_ON(!(assert)) #define J_ASSERT(assert) BUG_ON(!(assert))
--
2.20.1

View File

@ -1,7 +1,8 @@
From 49c5f6e11359ffcdc8b0c3dd8bf22a629534760e Mon Sep 17 00:00:00 2001
From: Paul Gortmaker <paul.gortmaker@windriver.com> From: Paul Gortmaker <paul.gortmaker@windriver.com>
Date: Fri, 21 Jun 2013 15:07:25 -0400 Date: Fri, 21 Jun 2013 15:07:25 -0400
Subject: list_bl: Make list head locking RT safe Subject: [PATCH 070/266] list_bl: Make list head locking RT safe
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
As per changes in include/linux/jbd_common.h for avoiding the As per changes in include/linux/jbd_common.h for avoiding the
bit_spin_locks on RT ("fs: jbd/jbd2: Make state lock and journal bit_spin_locks on RT ("fs: jbd/jbd2: Make state lock and journal
@ -48,9 +49,11 @@ concern.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
include/linux/list_bl.h | 28 ++++++++++++++++++++++++++-- include/linux/list_bl.h | 28 ++++++++++++++++++++++++++--
1 file changed, 26 insertions(+), 2 deletions(-) 1 file changed, 26 insertions(+), 2 deletions(-)
diff --git a/include/linux/list_bl.h b/include/linux/list_bl.h
index 3fc2cc57ba1b..69b659259bac 100644
--- a/include/linux/list_bl.h --- a/include/linux/list_bl.h
+++ b/include/linux/list_bl.h +++ b/include/linux/list_bl.h
@@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
@ -86,7 +89,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
static inline void INIT_HLIST_BL_NODE(struct hlist_bl_node *h) static inline void INIT_HLIST_BL_NODE(struct hlist_bl_node *h)
{ {
@@ -119,12 +129,26 @@ static inline void hlist_bl_del_init(str @@ -119,12 +129,26 @@ static inline void hlist_bl_del_init(struct hlist_bl_node *n)
static inline void hlist_bl_lock(struct hlist_bl_head *b) static inline void hlist_bl_lock(struct hlist_bl_head *b)
{ {
@ -113,3 +116,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
static inline bool hlist_bl_is_locked(struct hlist_bl_head *b) static inline bool hlist_bl_is_locked(struct hlist_bl_head *b)
--
2.20.1

View File

@ -1,7 +1,8 @@
From 18baa05e062b4a3e349cc30313d665960c98d33c Mon Sep 17 00:00:00 2001
From: Josh Cartwright <joshc@ni.com> From: Josh Cartwright <joshc@ni.com>
Date: Thu, 31 Mar 2016 00:04:25 -0500 Date: Thu, 31 Mar 2016 00:04:25 -0500
Subject: [PATCH] list_bl: fixup bogus lockdep warning Subject: [PATCH 071/266] list_bl: fixup bogus lockdep warning
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
At first glance, the use of 'static inline' seems appropriate for At first glance, the use of 'static inline' seems appropriate for
INIT_HLIST_BL_HEAD(). INIT_HLIST_BL_HEAD().
@ -70,9 +71,11 @@ Tested-by: Luis Claudio R. Goncalves <lclaudio@uudg.org>
Signed-off-by: Josh Cartwright <joshc@ni.com> Signed-off-by: Josh Cartwright <joshc@ni.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
include/linux/list_bl.h | 12 +++++++----- include/linux/list_bl.h | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-) 1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/include/linux/list_bl.h b/include/linux/list_bl.h
index 69b659259bac..0b5de7d9ffcf 100644
--- a/include/linux/list_bl.h --- a/include/linux/list_bl.h
+++ b/include/linux/list_bl.h +++ b/include/linux/list_bl.h
@@ -43,13 +43,15 @@ struct hlist_bl_node { @@ -43,13 +43,15 @@ struct hlist_bl_node {
@ -96,3 +99,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
static inline void INIT_HLIST_BL_NODE(struct hlist_bl_node *h) static inline void INIT_HLIST_BL_NODE(struct hlist_bl_node *h)
{ {
--
2.20.1

View File

@ -1,20 +1,22 @@
From 2f7ec5b079ec9ac3bff29d542d21e5ecd6f14d0f Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo@elte.hu> From: Ingo Molnar <mingo@elte.hu>
Date: Fri, 3 Jul 2009 08:29:57 -0500 Date: Fri, 3 Jul 2009 08:29:57 -0500
Subject: genirq: Disable irqpoll on -rt Subject: [PATCH 072/266] genirq: Disable irqpoll on -rt
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Creates long latencies for no value Creates long latencies for no value
Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
--- ---
kernel/irq/spurious.c | 8 ++++++++ kernel/irq/spurious.c | 8 ++++++++
1 file changed, 8 insertions(+) 1 file changed, 8 insertions(+)
diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c
index d867d6ddafdd..cd12ee86c01e 100644
--- a/kernel/irq/spurious.c --- a/kernel/irq/spurious.c
+++ b/kernel/irq/spurious.c +++ b/kernel/irq/spurious.c
@@ -442,6 +442,10 @@ MODULE_PARM_DESC(noirqdebug, "Disable ir @@ -442,6 +442,10 @@ MODULE_PARM_DESC(noirqdebug, "Disable irq lockup detection when true");
static int __init irqfixup_setup(char *str) static int __init irqfixup_setup(char *str)
{ {
@ -36,3 +38,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
irqfixup = 2; irqfixup = 2;
printk(KERN_WARNING "Misrouted IRQ fixup and polling support " printk(KERN_WARNING "Misrouted IRQ fixup and polling support "
"enabled\n"); "enabled\n");
--
2.20.1

View File

@ -1,20 +1,23 @@
Subject: genirq: Force interrupt thread on RT From a21ce2ad1b7d3e1927e69f5ff85f00035cc31e43 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de> From: Thomas Gleixner <tglx@linutronix.de>
Date: Sun, 03 Apr 2011 11:57:29 +0200 Date: Sun, 3 Apr 2011 11:57:29 +0200
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Subject: [PATCH 073/266] genirq: Force interrupt thread on RT
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Force threaded_irqs and optimize the code (force_irqthreads) in regard Force threaded_irqs and optimize the code (force_irqthreads) in regard
to this. to this.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
--- ---
include/linux/interrupt.h | 4 ++++ include/linux/interrupt.h | 4 ++++
kernel/irq/manage.c | 2 ++ kernel/irq/manage.c | 2 ++
2 files changed, 6 insertions(+) 2 files changed, 6 insertions(+)
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index eeceac3376fc..315f852b4981 100644
--- a/include/linux/interrupt.h --- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h +++ b/include/linux/interrupt.h
@@ -427,7 +427,11 @@ extern int irq_set_irqchip_state(unsigne @@ -427,7 +427,11 @@ extern int irq_set_irqchip_state(unsigned int irq, enum irqchip_irq_state which,
bool state); bool state);
#ifdef CONFIG_IRQ_FORCED_THREADING #ifdef CONFIG_IRQ_FORCED_THREADING
@ -26,6 +29,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#else #else
#define force_irqthreads (0) #define force_irqthreads (0)
#endif #endif
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 5c0ba5ca5930..94a18cf54293 100644
--- a/kernel/irq/manage.c --- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c +++ b/kernel/irq/manage.c
@@ -23,6 +23,7 @@ @@ -23,6 +23,7 @@
@ -36,7 +41,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
__read_mostly bool force_irqthreads; __read_mostly bool force_irqthreads;
EXPORT_SYMBOL_GPL(force_irqthreads); EXPORT_SYMBOL_GPL(force_irqthreads);
@@ -32,6 +33,7 @@ static int __init setup_forced_irqthread @@ -32,6 +33,7 @@ static int __init setup_forced_irqthreads(char *arg)
return 0; return 0;
} }
early_param("threadirqs", setup_forced_irqthreads); early_param("threadirqs", setup_forced_irqthreads);
@ -44,3 +49,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#endif #endif
static void __synchronize_hardirq(struct irq_desc *desc) static void __synchronize_hardirq(struct irq_desc *desc)
--
2.20.1

View File

@ -1,8 +1,9 @@
From 6993ab71f072edd10b4f3e076c474cea6290b9da Mon Sep 17 00:00:00 2001
From: Peter Zijlstra <peterz@infradead.org> From: Peter Zijlstra <peterz@infradead.org>
Date: Mon, 28 May 2018 15:24:20 +0200 Date: Mon, 28 May 2018 15:24:20 +0200
Subject: [PATCH 1/4] Split IRQ-off and zone->lock while freeing pages from PCP Subject: [PATCH 074/266] Split IRQ-off and zone->lock while freeing pages from
list #1 PCP list #1
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Split the IRQ-off section while accessing the PCP list from zone->lock Split the IRQ-off section while accessing the PCP list from zone->lock
while freeing pages. while freeing pages.
@ -13,12 +14,14 @@ free_pcppages_bulk().
Signed-off-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
mm/page_alloc.c | 82 +++++++++++++++++++++++++++++++++++--------------------- mm/page_alloc.c | 82 +++++++++++++++++++++++++++++++------------------
1 file changed, 52 insertions(+), 30 deletions(-) 1 file changed, 52 insertions(+), 30 deletions(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index ef99971c13dd..a84ac7af753d 100644
--- a/mm/page_alloc.c --- a/mm/page_alloc.c
+++ b/mm/page_alloc.c +++ b/mm/page_alloc.c
@@ -1095,7 +1095,7 @@ static inline void prefetch_buddy(struct @@ -1095,7 +1095,7 @@ static inline void prefetch_buddy(struct page *page)
} }
/* /*
@ -27,7 +30,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
* Assumes all pages on list are in same zone, and of same order. * Assumes all pages on list are in same zone, and of same order.
* count is the number of pages to free. * count is the number of pages to free.
* *
@@ -1106,14 +1106,41 @@ static inline void prefetch_buddy(struct @@ -1106,14 +1106,41 @@ static inline void prefetch_buddy(struct page *page)
* pinned" detection logic. * pinned" detection logic.
*/ */
static void free_pcppages_bulk(struct zone *zone, int count, static void free_pcppages_bulk(struct zone *zone, int count,
@ -73,7 +76,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
while (count) { while (count) {
struct list_head *list; struct list_head *list;
@@ -1145,7 +1172,7 @@ static void free_pcppages_bulk(struct zo @@ -1145,7 +1172,7 @@ static void free_pcppages_bulk(struct zone *zone, int count,
if (bulkfree_pcp_prepare(page)) if (bulkfree_pcp_prepare(page))
continue; continue;
@ -82,7 +85,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* /*
* We are going to put the page back to the global * We are going to put the page back to the global
@@ -1160,26 +1187,6 @@ static void free_pcppages_bulk(struct zo @@ -1160,26 +1187,6 @@ static void free_pcppages_bulk(struct zone *zone, int count,
prefetch_buddy(page); prefetch_buddy(page);
} while (--count && --batch_free && !list_empty(list)); } while (--count && --batch_free && !list_empty(list));
} }
@ -109,7 +112,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
static void free_one_page(struct zone *zone, static void free_one_page(struct zone *zone,
@@ -2536,13 +2543,18 @@ void drain_zone_pages(struct zone *zone, @@ -2536,13 +2543,18 @@ void drain_zone_pages(struct zone *zone, struct per_cpu_pages *pcp)
{ {
unsigned long flags; unsigned long flags;
int to_drain, batch; int to_drain, batch;
@ -129,7 +132,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
#endif #endif
@@ -2558,14 +2570,21 @@ static void drain_pages_zone(unsigned in @@ -2558,14 +2570,21 @@ static void drain_pages_zone(unsigned int cpu, struct zone *zone)
unsigned long flags; unsigned long flags;
struct per_cpu_pageset *pset; struct per_cpu_pageset *pset;
struct per_cpu_pages *pcp; struct per_cpu_pages *pcp;
@ -153,7 +156,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
/* /*
@@ -2787,7 +2806,10 @@ static void free_unref_page_commit(struc @@ -2787,7 +2806,10 @@ static void free_unref_page_commit(struct page *page, unsigned long pfn)
pcp->count++; pcp->count++;
if (pcp->count >= pcp->high) { if (pcp->count >= pcp->high) {
unsigned long batch = READ_ONCE(pcp->batch); unsigned long batch = READ_ONCE(pcp->batch);
@ -165,3 +168,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
} }
--
2.20.1

View File

@ -1,8 +1,9 @@
From 51ba31edfd57dc313746febb2897e6b0735300c6 Mon Sep 17 00:00:00 2001
From: Peter Zijlstra <peterz@infradead.org> From: Peter Zijlstra <peterz@infradead.org>
Date: Mon, 28 May 2018 15:24:21 +0200 Date: Mon, 28 May 2018 15:24:21 +0200
Subject: [PATCH 2/4] Split IRQ-off and zone->lock while freeing pages from PCP Subject: [PATCH 075/266] Split IRQ-off and zone->lock while freeing pages from
list #2 PCP list #2
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Split the IRQ-off section while accessing the PCP list from zone->lock Split the IRQ-off section while accessing the PCP list from zone->lock
while freeing pages. while freeing pages.
@ -13,12 +14,14 @@ free_pcppages_bulk().
Signed-off-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
mm/page_alloc.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++---------- mm/page_alloc.c | 60 ++++++++++++++++++++++++++++++++++++++++---------
1 file changed, 50 insertions(+), 10 deletions(-) 1 file changed, 50 insertions(+), 10 deletions(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index a84ac7af753d..8a96b1e6f4f4 100644
--- a/mm/page_alloc.c --- a/mm/page_alloc.c
+++ b/mm/page_alloc.c +++ b/mm/page_alloc.c
@@ -1105,8 +1105,8 @@ static inline void prefetch_buddy(struct @@ -1105,8 +1105,8 @@ static inline void prefetch_buddy(struct page *page)
* And clear the zone's pages_scanned counter, to hold off the "all pages are * And clear the zone's pages_scanned counter, to hold off the "all pages are
* pinned" detection logic. * pinned" detection logic.
*/ */
@ -29,7 +32,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
{ {
bool isolated_pageblocks; bool isolated_pageblocks;
struct page *page, *tmp; struct page *page, *tmp;
@@ -1121,12 +1121,27 @@ static void free_pcppages_bulk(struct zo @@ -1121,12 +1121,27 @@ static void free_pcppages_bulk(struct zone *zone, int count,
*/ */
list_for_each_entry_safe(page, tmp, head, lru) { list_for_each_entry_safe(page, tmp, head, lru) {
int mt = get_pcppage_migratetype(page); int mt = get_pcppage_migratetype(page);
@ -57,7 +60,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
__free_one_page(page, page_to_pfn(page), zone, 0, mt); __free_one_page(page, page_to_pfn(page), zone, 0, mt);
trace_mm_page_pcpu_drain(page, 0, mt); trace_mm_page_pcpu_drain(page, 0, mt);
} }
@@ -2554,7 +2569,7 @@ void drain_zone_pages(struct zone *zone, @@ -2554,7 +2569,7 @@ void drain_zone_pages(struct zone *zone, struct per_cpu_pages *pcp)
local_irq_restore(flags); local_irq_restore(flags);
if (to_drain > 0) if (to_drain > 0)
@ -66,7 +69,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
#endif #endif
@@ -2584,7 +2599,7 @@ static void drain_pages_zone(unsigned in @@ -2584,7 +2599,7 @@ static void drain_pages_zone(unsigned int cpu, struct zone *zone)
local_irq_restore(flags); local_irq_restore(flags);
if (count) if (count)
@ -75,7 +78,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
/* /*
@@ -2777,7 +2792,8 @@ static bool free_unref_page_prepare(stru @@ -2777,7 +2792,8 @@ static bool free_unref_page_prepare(struct page *page, unsigned long pfn)
return true; return true;
} }
@ -85,7 +88,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
{ {
struct zone *zone = page_zone(page); struct zone *zone = page_zone(page);
struct per_cpu_pages *pcp; struct per_cpu_pages *pcp;
@@ -2806,10 +2822,8 @@ static void free_unref_page_commit(struc @@ -2806,10 +2822,8 @@ static void free_unref_page_commit(struct page *page, unsigned long pfn)
pcp->count++; pcp->count++;
if (pcp->count >= pcp->high) { if (pcp->count >= pcp->high) {
unsigned long batch = READ_ONCE(pcp->batch); unsigned long batch = READ_ONCE(pcp->batch);
@ -116,7 +119,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
/* /*
@@ -2837,6 +2855,11 @@ void free_unref_page_list(struct list_he @@ -2837,6 +2855,11 @@ void free_unref_page_list(struct list_head *list)
struct page *page, *next; struct page *page, *next;
unsigned long flags, pfn; unsigned long flags, pfn;
int batch_count = 0; int batch_count = 0;
@ -128,7 +131,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* Prepare pages for freeing */ /* Prepare pages for freeing */
list_for_each_entry_safe(page, next, list, lru) { list_for_each_entry_safe(page, next, list, lru) {
@@ -2849,10 +2872,12 @@ void free_unref_page_list(struct list_he @@ -2849,10 +2872,12 @@ void free_unref_page_list(struct list_head *list)
local_irq_save(flags); local_irq_save(flags);
list_for_each_entry_safe(page, next, list, lru) { list_for_each_entry_safe(page, next, list, lru) {
unsigned long pfn = page_private(page); unsigned long pfn = page_private(page);
@ -142,7 +145,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* /*
* Guard against excessive IRQ disabled times when we get * Guard against excessive IRQ disabled times when we get
@@ -2865,6 +2890,21 @@ void free_unref_page_list(struct list_he @@ -2865,6 +2890,21 @@ void free_unref_page_list(struct list_head *list)
} }
} }
local_irq_restore(flags); local_irq_restore(flags);
@ -164,3 +167,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
/* /*
--
2.20.1

View File

@ -1,7 +1,8 @@
From b143284103a8a0d48389a1335bdef9311113921d Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de> From: Thomas Gleixner <tglx@linutronix.de>
Date: Mon, 28 May 2018 15:24:22 +0200 Date: Mon, 28 May 2018 15:24:22 +0200
Subject: [PATCH 3/4] mm/SLxB: change list_lock to raw_spinlock_t Subject: [PATCH 076/266] 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.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
The list_lock is used with used with IRQs off on RT. Make it a raw_spinlock_t 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 otherwise the interrupts won't be disabled on -RT. The locking rules remain
@ -12,14 +13,16 @@ file for struct kmem_cache_node defintion.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
mm/slab.c | 94 +++++++++++++++++++++++++++++++------------------------------- mm/slab.c | 94 +++++++++++++++++++++++++++----------------------------
mm/slab.h | 2 - mm/slab.h | 2 +-
mm/slub.c | 50 ++++++++++++++++---------------- mm/slub.c | 50 ++++++++++++++---------------
3 files changed, 73 insertions(+), 73 deletions(-) 3 files changed, 73 insertions(+), 73 deletions(-)
diff --git a/mm/slab.c b/mm/slab.c
index fad6839e8eab..a7ab3957282b 100644
--- a/mm/slab.c --- a/mm/slab.c
+++ b/mm/slab.c +++ b/mm/slab.c
@@ -233,7 +233,7 @@ static void kmem_cache_node_init(struct @@ -233,7 +233,7 @@ static void kmem_cache_node_init(struct kmem_cache_node *parent)
parent->shared = NULL; parent->shared = NULL;
parent->alien = NULL; parent->alien = NULL;
parent->colour_next = 0; parent->colour_next = 0;
@ -28,7 +31,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
parent->free_objects = 0; parent->free_objects = 0;
parent->free_touched = 0; parent->free_touched = 0;
} }
@@ -600,9 +600,9 @@ static noinline void cache_free_pfmemall @@ -600,9 +600,9 @@ static noinline void cache_free_pfmemalloc(struct kmem_cache *cachep,
page_node = page_to_nid(page); page_node = page_to_nid(page);
n = get_node(cachep, page_node); n = get_node(cachep, page_node);
@ -40,7 +43,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
slabs_destroy(cachep, &list); slabs_destroy(cachep, &list);
} }
@@ -730,7 +730,7 @@ static void __drain_alien_cache(struct k @@ -730,7 +730,7 @@ static void __drain_alien_cache(struct kmem_cache *cachep,
struct kmem_cache_node *n = get_node(cachep, node); struct kmem_cache_node *n = get_node(cachep, node);
if (ac->avail) { if (ac->avail) {
@ -49,7 +52,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* /*
* Stuff objects into the remote nodes shared array first. * Stuff objects into the remote nodes shared array first.
* That way we could avoid the overhead of putting the objects * That way we could avoid the overhead of putting the objects
@@ -741,7 +741,7 @@ static void __drain_alien_cache(struct k @@ -741,7 +741,7 @@ static void __drain_alien_cache(struct kmem_cache *cachep,
free_block(cachep, ac->entry, ac->avail, node, list); free_block(cachep, ac->entry, ac->avail, node, list);
ac->avail = 0; ac->avail = 0;
@ -58,7 +61,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
} }
@@ -814,9 +814,9 @@ static int __cache_free_alien(struct kme @@ -814,9 +814,9 @@ static int __cache_free_alien(struct kmem_cache *cachep, void *objp,
slabs_destroy(cachep, &list); slabs_destroy(cachep, &list);
} else { } else {
n = get_node(cachep, page_node); n = get_node(cachep, page_node);
@ -70,7 +73,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
slabs_destroy(cachep, &list); slabs_destroy(cachep, &list);
} }
return 1; return 1;
@@ -857,10 +857,10 @@ static int init_cache_node(struct kmem_c @@ -857,10 +857,10 @@ static int init_cache_node(struct kmem_cache *cachep, int node, gfp_t gfp)
*/ */
n = get_node(cachep, node); n = get_node(cachep, node);
if (n) { if (n) {
@ -83,7 +86,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return 0; return 0;
} }
@@ -939,7 +939,7 @@ static int setup_kmem_cache_node(struct @@ -939,7 +939,7 @@ static int setup_kmem_cache_node(struct kmem_cache *cachep,
goto fail; goto fail;
n = get_node(cachep, node); n = get_node(cachep, node);
@ -92,7 +95,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (n->shared && force_change) { if (n->shared && force_change) {
free_block(cachep, n->shared->entry, free_block(cachep, n->shared->entry,
n->shared->avail, node, &list); n->shared->avail, node, &list);
@@ -957,7 +957,7 @@ static int setup_kmem_cache_node(struct @@ -957,7 +957,7 @@ static int setup_kmem_cache_node(struct kmem_cache *cachep,
new_alien = NULL; new_alien = NULL;
} }
@ -128,7 +131,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
kfree(shared); kfree(shared);
if (alien) { if (alien) {
@@ -1207,7 +1207,7 @@ static void __init init_list(struct kmem @@ -1207,7 +1207,7 @@ static void __init init_list(struct kmem_cache *cachep, struct kmem_cache_node *
/* /*
* Do not assume that spinlocks can be initialized via memcpy: * Do not assume that spinlocks can be initialized via memcpy:
*/ */
@ -137,7 +140,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
MAKE_ALL_LISTS(cachep, ptr, nodeid); MAKE_ALL_LISTS(cachep, ptr, nodeid);
cachep->node[nodeid] = ptr; cachep->node[nodeid] = ptr;
@@ -1378,11 +1378,11 @@ slab_out_of_memory(struct kmem_cache *ca @@ -1378,11 +1378,11 @@ slab_out_of_memory(struct kmem_cache *cachep, gfp_t gfpflags, int nodeid)
for_each_kmem_cache_node(cachep, node, n) { for_each_kmem_cache_node(cachep, node, n) {
unsigned long total_slabs, free_slabs, free_objs; unsigned long total_slabs, free_slabs, free_objs;
@ -151,7 +154,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
pr_warn(" node %d: slabs: %ld/%ld, objs: %ld/%ld\n", pr_warn(" node %d: slabs: %ld/%ld, objs: %ld/%ld\n",
node, total_slabs - free_slabs, total_slabs, node, total_slabs - free_slabs, total_slabs,
@@ -2175,7 +2175,7 @@ static void check_spinlock_acquired(stru @@ -2175,7 +2175,7 @@ static void check_spinlock_acquired(struct kmem_cache *cachep)
{ {
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
check_irq_off(); check_irq_off();
@ -160,7 +163,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
#endif #endif
} }
@@ -2183,7 +2183,7 @@ static void check_spinlock_acquired_node @@ -2183,7 +2183,7 @@ static void check_spinlock_acquired_node(struct kmem_cache *cachep, int node)
{ {
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
check_irq_off(); check_irq_off();
@ -181,7 +184,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
slabs_destroy(cachep, &list); slabs_destroy(cachep, &list);
ac->avail = 0; ac->avail = 0;
} }
@@ -2243,9 +2243,9 @@ static void drain_cpu_caches(struct kmem @@ -2243,9 +2243,9 @@ static void drain_cpu_caches(struct kmem_cache *cachep)
drain_alien_cache(cachep, n->alien); drain_alien_cache(cachep, n->alien);
for_each_kmem_cache_node(cachep, node, n) { for_each_kmem_cache_node(cachep, node, n) {
@ -193,7 +196,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
slabs_destroy(cachep, &list); slabs_destroy(cachep, &list);
} }
@@ -2267,10 +2267,10 @@ static int drain_freelist(struct kmem_ca @@ -2267,10 +2267,10 @@ static int drain_freelist(struct kmem_cache *cache,
nr_freed = 0; nr_freed = 0;
while (nr_freed < tofree && !list_empty(&n->slabs_free)) { while (nr_freed < tofree && !list_empty(&n->slabs_free)) {
@ -206,7 +209,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
goto out; goto out;
} }
@@ -2283,7 +2283,7 @@ static int drain_freelist(struct kmem_ca @@ -2283,7 +2283,7 @@ static int drain_freelist(struct kmem_cache *cache,
* to the cache. * to the cache.
*/ */
n->free_objects -= cache->num; n->free_objects -= cache->num;
@ -215,7 +218,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
slab_destroy(cache, page); slab_destroy(cache, page);
nr_freed++; nr_freed++;
} }
@@ -2731,7 +2731,7 @@ static void cache_grow_end(struct kmem_c @@ -2731,7 +2731,7 @@ static void cache_grow_end(struct kmem_cache *cachep, struct page *page)
INIT_LIST_HEAD(&page->lru); INIT_LIST_HEAD(&page->lru);
n = get_node(cachep, page_to_nid(page)); n = get_node(cachep, page_to_nid(page));
@ -224,7 +227,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
n->total_slabs++; n->total_slabs++;
if (!page->active) { if (!page->active) {
list_add_tail(&page->lru, &(n->slabs_free)); list_add_tail(&page->lru, &(n->slabs_free));
@@ -2741,7 +2741,7 @@ static void cache_grow_end(struct kmem_c @@ -2741,7 +2741,7 @@ static void cache_grow_end(struct kmem_cache *cachep, struct page *page)
STATS_INC_GROWN(cachep); STATS_INC_GROWN(cachep);
n->free_objects += cachep->num - page->active; n->free_objects += cachep->num - page->active;
@ -233,7 +236,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
fixup_objfreelist_debug(cachep, &list); fixup_objfreelist_debug(cachep, &list);
} }
@@ -2909,7 +2909,7 @@ static struct page *get_first_slab(struc @@ -2909,7 +2909,7 @@ static struct page *get_first_slab(struct kmem_cache_node *n, bool pfmemalloc)
{ {
struct page *page; struct page *page;
@ -242,7 +245,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
page = list_first_entry_or_null(&n->slabs_partial, struct page, lru); page = list_first_entry_or_null(&n->slabs_partial, struct page, lru);
if (!page) { if (!page) {
n->free_touched = 1; n->free_touched = 1;
@@ -2935,10 +2935,10 @@ static noinline void *cache_alloc_pfmema @@ -2935,10 +2935,10 @@ static noinline void *cache_alloc_pfmemalloc(struct kmem_cache *cachep,
if (!gfp_pfmemalloc_allowed(flags)) if (!gfp_pfmemalloc_allowed(flags))
return NULL; return NULL;
@ -255,7 +258,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return NULL; return NULL;
} }
@@ -2947,7 +2947,7 @@ static noinline void *cache_alloc_pfmema @@ -2947,7 +2947,7 @@ static noinline void *cache_alloc_pfmemalloc(struct kmem_cache *cachep,
fixup_slab_list(cachep, n, page, &list); fixup_slab_list(cachep, n, page, &list);
@ -264,7 +267,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
fixup_objfreelist_debug(cachep, &list); fixup_objfreelist_debug(cachep, &list);
return obj; return obj;
@@ -3006,7 +3006,7 @@ static void *cache_alloc_refill(struct k @@ -3006,7 +3006,7 @@ static void *cache_alloc_refill(struct kmem_cache *cachep, gfp_t flags)
if (!n->free_objects && (!shared || !shared->avail)) if (!n->free_objects && (!shared || !shared->avail))
goto direct_grow; goto direct_grow;
@ -273,7 +276,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
shared = READ_ONCE(n->shared); shared = READ_ONCE(n->shared);
/* See if we can refill from the shared array */ /* See if we can refill from the shared array */
@@ -3030,7 +3030,7 @@ static void *cache_alloc_refill(struct k @@ -3030,7 +3030,7 @@ static void *cache_alloc_refill(struct kmem_cache *cachep, gfp_t flags)
must_grow: must_grow:
n->free_objects -= ac->avail; n->free_objects -= ac->avail;
alloc_done: alloc_done:
@ -282,7 +285,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
fixup_objfreelist_debug(cachep, &list); fixup_objfreelist_debug(cachep, &list);
direct_grow: direct_grow:
@@ -3255,7 +3255,7 @@ static void *____cache_alloc_node(struct @@ -3255,7 +3255,7 @@ static void *____cache_alloc_node(struct kmem_cache *cachep, gfp_t flags,
BUG_ON(!n); BUG_ON(!n);
check_irq_off(); check_irq_off();
@ -291,7 +294,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
page = get_first_slab(n, false); page = get_first_slab(n, false);
if (!page) if (!page)
goto must_grow; goto must_grow;
@@ -3273,12 +3273,12 @@ static void *____cache_alloc_node(struct @@ -3273,12 +3273,12 @@ static void *____cache_alloc_node(struct kmem_cache *cachep, gfp_t flags,
fixup_slab_list(cachep, n, page, &list); fixup_slab_list(cachep, n, page, &list);
@ -306,7 +309,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
page = cache_grow_begin(cachep, gfp_exact_node(flags), nodeid); page = cache_grow_begin(cachep, gfp_exact_node(flags), nodeid);
if (page) { if (page) {
/* This slab isn't counted yet so don't update free_objects */ /* This slab isn't counted yet so don't update free_objects */
@@ -3454,7 +3454,7 @@ static void cache_flusharray(struct kmem @@ -3454,7 +3454,7 @@ static void cache_flusharray(struct kmem_cache *cachep, struct array_cache *ac)
check_irq_off(); check_irq_off();
n = get_node(cachep, node); n = get_node(cachep, node);
@ -315,7 +318,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (n->shared) { if (n->shared) {
struct array_cache *shared_array = n->shared; struct array_cache *shared_array = n->shared;
int max = shared_array->limit - shared_array->avail; int max = shared_array->limit - shared_array->avail;
@@ -3483,7 +3483,7 @@ static void cache_flusharray(struct kmem @@ -3483,7 +3483,7 @@ static void cache_flusharray(struct kmem_cache *cachep, struct array_cache *ac)
STATS_SET_FREEABLE(cachep, i); STATS_SET_FREEABLE(cachep, i);
} }
#endif #endif
@ -324,7 +327,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
slabs_destroy(cachep, &list); slabs_destroy(cachep, &list);
ac->avail -= batchcount; ac->avail -= batchcount;
memmove(ac->entry, &(ac->entry[batchcount]), sizeof(void *)*ac->avail); memmove(ac->entry, &(ac->entry[batchcount]), sizeof(void *)*ac->avail);
@@ -3893,9 +3893,9 @@ static int __do_tune_cpucache(struct kme @@ -3893,9 +3893,9 @@ static int __do_tune_cpucache(struct kmem_cache *cachep, int limit,
node = cpu_to_mem(cpu); node = cpu_to_mem(cpu);
n = get_node(cachep, node); n = get_node(cachep, node);
@ -336,7 +339,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
slabs_destroy(cachep, &list); slabs_destroy(cachep, &list);
} }
free_percpu(prev); free_percpu(prev);
@@ -4020,9 +4020,9 @@ static void drain_array(struct kmem_cach @@ -4020,9 +4020,9 @@ static void drain_array(struct kmem_cache *cachep, struct kmem_cache_node *n,
return; return;
} }
@ -348,7 +351,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
slabs_destroy(cachep, &list); slabs_destroy(cachep, &list);
} }
@@ -4106,7 +4106,7 @@ void get_slabinfo(struct kmem_cache *cac @@ -4106,7 +4106,7 @@ void get_slabinfo(struct kmem_cache *cachep, struct slabinfo *sinfo)
for_each_kmem_cache_node(cachep, node, n) { for_each_kmem_cache_node(cachep, node, n) {
check_irq_on(); check_irq_on();
@ -357,7 +360,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
total_slabs += n->total_slabs; total_slabs += n->total_slabs;
free_slabs += n->free_slabs; free_slabs += n->free_slabs;
@@ -4115,7 +4115,7 @@ void get_slabinfo(struct kmem_cache *cac @@ -4115,7 +4115,7 @@ void get_slabinfo(struct kmem_cache *cachep, struct slabinfo *sinfo)
if (n->shared) if (n->shared)
shared_avail += n->shared->avail; shared_avail += n->shared->avail;
@ -366,7 +369,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
num_objs = total_slabs * cachep->num; num_objs = total_slabs * cachep->num;
active_slabs = total_slabs - free_slabs; active_slabs = total_slabs - free_slabs;
@@ -4330,13 +4330,13 @@ static int leaks_show(struct seq_file *m @@ -4330,13 +4330,13 @@ static int leaks_show(struct seq_file *m, void *p)
for_each_kmem_cache_node(cachep, node, n) { for_each_kmem_cache_node(cachep, node, n) {
check_irq_on(); check_irq_on();
@ -382,9 +385,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
} while (!is_store_user_clean(cachep)); } while (!is_store_user_clean(cachep));
diff --git a/mm/slab.h b/mm/slab.h
index 58c6c1c2a78e..e904021207f1 100644
--- a/mm/slab.h --- a/mm/slab.h
+++ b/mm/slab.h +++ b/mm/slab.h
@@ -453,7 +453,7 @@ static inline void slab_post_alloc_hook( @@ -453,7 +453,7 @@ static inline void slab_post_alloc_hook(struct kmem_cache *s, gfp_t flags,
* The slab lists for all objects. * The slab lists for all objects.
*/ */
struct kmem_cache_node { struct kmem_cache_node {
@ -393,9 +398,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
#ifdef CONFIG_SLAB #ifdef CONFIG_SLAB
struct list_head slabs_partial; /* partial list first, better asm code */ struct list_head slabs_partial; /* partial list first, better asm code */
diff --git a/mm/slub.c b/mm/slub.c
index 8da34a8af53d..298cd7d368de 100644
--- a/mm/slub.c --- a/mm/slub.c
+++ b/mm/slub.c +++ b/mm/slub.c
@@ -1167,7 +1167,7 @@ static noinline int free_debug_processin @@ -1167,7 +1167,7 @@ static noinline int free_debug_processing(
unsigned long uninitialized_var(flags); unsigned long uninitialized_var(flags);
int ret = 0; int ret = 0;
@ -404,7 +411,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
slab_lock(page); slab_lock(page);
if (s->flags & SLAB_CONSISTENCY_CHECKS) { if (s->flags & SLAB_CONSISTENCY_CHECKS) {
@@ -1202,7 +1202,7 @@ static noinline int free_debug_processin @@ -1202,7 +1202,7 @@ static noinline int free_debug_processing(
bulk_cnt, cnt); bulk_cnt, cnt);
slab_unlock(page); slab_unlock(page);
@ -413,7 +420,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (!ret) if (!ret)
slab_fix(s, "Object at 0x%p not freed", object); slab_fix(s, "Object at 0x%p not freed", object);
return ret; return ret;
@@ -1802,7 +1802,7 @@ static void *get_partial_node(struct kme @@ -1802,7 +1802,7 @@ static void *get_partial_node(struct kmem_cache *s, struct kmem_cache_node *n,
if (!n || !n->nr_partial) if (!n || !n->nr_partial)
return NULL; return NULL;
@ -422,7 +429,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
list_for_each_entry_safe(page, page2, &n->partial, lru) { list_for_each_entry_safe(page, page2, &n->partial, lru) {
void *t; void *t;
@@ -1827,7 +1827,7 @@ static void *get_partial_node(struct kme @@ -1827,7 +1827,7 @@ static void *get_partial_node(struct kmem_cache *s, struct kmem_cache_node *n,
break; break;
} }
@ -431,7 +438,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return object; return object;
} }
@@ -2073,7 +2073,7 @@ static void deactivate_slab(struct kmem_ @@ -2073,7 +2073,7 @@ static void deactivate_slab(struct kmem_cache *s, struct page *page,
* that acquire_slab() will see a slab page that * that acquire_slab() will see a slab page that
* is frozen * is frozen
*/ */
@ -440,7 +447,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
} else { } else {
m = M_FULL; m = M_FULL;
@@ -2084,7 +2084,7 @@ static void deactivate_slab(struct kmem_ @@ -2084,7 +2084,7 @@ static void deactivate_slab(struct kmem_cache *s, struct page *page,
* slabs from diagnostic functions will not see * slabs from diagnostic functions will not see
* any frozen slabs. * any frozen slabs.
*/ */
@ -449,7 +456,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
} }
@@ -2119,7 +2119,7 @@ static void deactivate_slab(struct kmem_ @@ -2119,7 +2119,7 @@ static void deactivate_slab(struct kmem_cache *s, struct page *page,
goto redo; goto redo;
if (lock) if (lock)
@ -458,7 +465,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (m == M_FREE) { if (m == M_FREE) {
stat(s, DEACTIVATE_EMPTY); stat(s, DEACTIVATE_EMPTY);
@@ -2154,10 +2154,10 @@ static void unfreeze_partials(struct kme @@ -2154,10 +2154,10 @@ static void unfreeze_partials(struct kmem_cache *s,
n2 = get_node(s, page_to_nid(page)); n2 = get_node(s, page_to_nid(page));
if (n != n2) { if (n != n2) {
if (n) if (n)
@ -471,7 +478,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
do { do {
@@ -2186,7 +2186,7 @@ static void unfreeze_partials(struct kme @@ -2186,7 +2186,7 @@ static void unfreeze_partials(struct kmem_cache *s,
} }
if (n) if (n)
@ -480,7 +487,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
while (discard_page) { while (discard_page) {
page = discard_page; page = discard_page;
@@ -2355,10 +2355,10 @@ static unsigned long count_partial(struc @@ -2355,10 +2355,10 @@ static unsigned long count_partial(struct kmem_cache_node *n,
unsigned long x = 0; unsigned long x = 0;
struct page *page; struct page *page;
@ -493,7 +500,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return x; return x;
} }
#endif /* CONFIG_SLUB_DEBUG || CONFIG_SYSFS */ #endif /* CONFIG_SLUB_DEBUG || CONFIG_SYSFS */
@@ -2793,7 +2793,7 @@ static void __slab_free(struct kmem_cach @@ -2793,7 +2793,7 @@ static void __slab_free(struct kmem_cache *s, struct page *page,
do { do {
if (unlikely(n)) { if (unlikely(n)) {
@ -502,7 +509,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
n = NULL; n = NULL;
} }
prior = page->freelist; prior = page->freelist;
@@ -2825,7 +2825,7 @@ static void __slab_free(struct kmem_cach @@ -2825,7 +2825,7 @@ static void __slab_free(struct kmem_cache *s, struct page *page,
* Otherwise the list_lock will synchronize with * Otherwise the list_lock will synchronize with
* other processors updating the list of slabs. * other processors updating the list of slabs.
*/ */
@ -511,7 +518,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
} }
@@ -2867,7 +2867,7 @@ static void __slab_free(struct kmem_cach @@ -2867,7 +2867,7 @@ static void __slab_free(struct kmem_cache *s, struct page *page,
add_partial(n, page, DEACTIVATE_TO_TAIL); add_partial(n, page, DEACTIVATE_TO_TAIL);
stat(s, FREE_ADD_PARTIAL); stat(s, FREE_ADD_PARTIAL);
} }
@ -520,7 +527,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return; return;
slab_empty: slab_empty:
@@ -2882,7 +2882,7 @@ static void __slab_free(struct kmem_cach @@ -2882,7 +2882,7 @@ static void __slab_free(struct kmem_cache *s, struct page *page,
remove_full(s, n, page); remove_full(s, n, page);
} }
@ -538,7 +545,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
INIT_LIST_HEAD(&n->partial); INIT_LIST_HEAD(&n->partial);
#ifdef CONFIG_SLUB_DEBUG #ifdef CONFIG_SLUB_DEBUG
atomic_long_set(&n->nr_slabs, 0); atomic_long_set(&n->nr_slabs, 0);
@@ -3653,7 +3653,7 @@ static void free_partial(struct kmem_cac @@ -3653,7 +3653,7 @@ static void free_partial(struct kmem_cache *s, struct kmem_cache_node *n)
struct page *page, *h; struct page *page, *h;
BUG_ON(irqs_disabled()); BUG_ON(irqs_disabled());
@ -547,7 +554,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
list_for_each_entry_safe(page, h, &n->partial, lru) { list_for_each_entry_safe(page, h, &n->partial, lru) {
if (!page->inuse) { if (!page->inuse) {
remove_partial(n, page); remove_partial(n, page);
@@ -3663,7 +3663,7 @@ static void free_partial(struct kmem_cac @@ -3663,7 +3663,7 @@ static void free_partial(struct kmem_cache *s, struct kmem_cache_node *n)
"Objects remaining in %s on __kmem_cache_shutdown()"); "Objects remaining in %s on __kmem_cache_shutdown()");
} }
} }
@ -556,7 +563,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
list_for_each_entry_safe(page, h, &discard, lru) list_for_each_entry_safe(page, h, &discard, lru)
discard_slab(s, page); discard_slab(s, page);
@@ -3936,7 +3936,7 @@ int __kmem_cache_shrink(struct kmem_cach @@ -3936,7 +3936,7 @@ int __kmem_cache_shrink(struct kmem_cache *s)
for (i = 0; i < SHRINK_PROMOTE_MAX; i++) for (i = 0; i < SHRINK_PROMOTE_MAX; i++)
INIT_LIST_HEAD(promote + i); INIT_LIST_HEAD(promote + i);
@ -565,7 +572,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* /*
* Build lists of slabs to discard or promote. * Build lists of slabs to discard or promote.
@@ -3967,7 +3967,7 @@ int __kmem_cache_shrink(struct kmem_cach @@ -3967,7 +3967,7 @@ int __kmem_cache_shrink(struct kmem_cache *s)
for (i = SHRINK_PROMOTE_MAX - 1; i >= 0; i--) for (i = SHRINK_PROMOTE_MAX - 1; i >= 0; i--)
list_splice(promote + i, &n->partial); list_splice(promote + i, &n->partial);
@ -574,7 +581,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* Release empty slabs */ /* Release empty slabs */
list_for_each_entry_safe(page, t, &discard, lru) list_for_each_entry_safe(page, t, &discard, lru)
@@ -4381,7 +4381,7 @@ static int validate_slab_node(struct kme @@ -4381,7 +4381,7 @@ static int validate_slab_node(struct kmem_cache *s,
struct page *page; struct page *page;
unsigned long flags; unsigned long flags;
@ -583,7 +590,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
list_for_each_entry(page, &n->partial, lru) { list_for_each_entry(page, &n->partial, lru) {
validate_slab_slab(s, page, map); validate_slab_slab(s, page, map);
@@ -4403,7 +4403,7 @@ static int validate_slab_node(struct kme @@ -4403,7 +4403,7 @@ static int validate_slab_node(struct kmem_cache *s,
s->name, count, atomic_long_read(&n->nr_slabs)); s->name, count, atomic_long_read(&n->nr_slabs));
out: out:
@ -592,7 +599,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return count; return count;
} }
@@ -4593,12 +4593,12 @@ static int list_locations(struct kmem_ca @@ -4593,12 +4593,12 @@ static int list_locations(struct kmem_cache *s, char *buf,
if (!atomic_long_read(&n->nr_slabs)) if (!atomic_long_read(&n->nr_slabs))
continue; continue;
@ -607,3 +614,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
for (i = 0; i < t.count; i++) { for (i = 0; i < t.count; i++) {
--
2.20.1

View File

@ -1,8 +1,9 @@
From 1fa02c36b05b392724988ddda8806f6cbf674446 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de> From: Thomas Gleixner <tglx@linutronix.de>
Date: Thu, 21 Jun 2018 17:29:19 +0200 Date: Thu, 21 Jun 2018 17:29:19 +0200
Subject: [PATCH 4/4] mm/SLUB: delay giving back empty slubs to IRQ enabled Subject: [PATCH 077/266] mm/SLUB: delay giving back empty slubs to IRQ enabled
regions regions
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
__free_slab() is invoked with disabled interrupts which increases the __free_slab() is invoked with disabled interrupts which increases the
irq-off time while __free_pages() is doing the work. irq-off time while __free_pages() is doing the work.
@ -13,12 +14,14 @@ so it can be processed later.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
mm/slub.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++----- mm/slub.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 69 insertions(+), 5 deletions(-) 1 file changed, 69 insertions(+), 5 deletions(-)
diff --git a/mm/slub.c b/mm/slub.c
index 298cd7d368de..224f79ee6b39 100644
--- a/mm/slub.c --- a/mm/slub.c
+++ b/mm/slub.c +++ b/mm/slub.c
@@ -1330,6 +1330,12 @@ static inline void dec_slabs_node(struct @@ -1330,6 +1330,12 @@ static inline void dec_slabs_node(struct kmem_cache *s, int node,
#endif /* CONFIG_SLUB_DEBUG */ #endif /* CONFIG_SLUB_DEBUG */
@ -31,7 +34,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* /*
* Hooks for other subsystems that check memory allocations. In a typical * Hooks for other subsystems that check memory allocations. In a typical
* production configuration these hooks all should produce no code at all. * production configuration these hooks all should produce no code at all.
@@ -1684,6 +1690,16 @@ static void __free_slab(struct kmem_cach @@ -1684,6 +1690,16 @@ static void __free_slab(struct kmem_cache *s, struct page *page)
__free_pages(page, order); __free_pages(page, order);
} }
@ -48,7 +51,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
static void rcu_free_slab(struct rcu_head *h) static void rcu_free_slab(struct rcu_head *h)
{ {
struct page *page = container_of(h, struct page, rcu_head); struct page *page = container_of(h, struct page, rcu_head);
@@ -1695,6 +1711,12 @@ static void free_slab(struct kmem_cache @@ -1695,6 +1711,12 @@ static void free_slab(struct kmem_cache *s, struct page *page)
{ {
if (unlikely(s->flags & SLAB_TYPESAFE_BY_RCU)) { if (unlikely(s->flags & SLAB_TYPESAFE_BY_RCU)) {
call_rcu(&page->rcu_head, rcu_free_slab); call_rcu(&page->rcu_head, rcu_free_slab);
@ -61,7 +64,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} else } else
__free_slab(s, page); __free_slab(s, page);
} }
@@ -2223,14 +2245,21 @@ static void put_cpu_partial(struct kmem_ @@ -2223,14 +2245,21 @@ static void put_cpu_partial(struct kmem_cache *s, struct page *page, int drain)
pobjects = oldpage->pobjects; pobjects = oldpage->pobjects;
pages = oldpage->pages; pages = oldpage->pages;
if (drain && pobjects > s->cpu_partial) { if (drain && pobjects > s->cpu_partial) {
@ -83,7 +86,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
oldpage = NULL; oldpage = NULL;
pobjects = 0; pobjects = 0;
pages = 0; pages = 0;
@@ -2300,7 +2329,22 @@ static bool has_cpu_slab(int cpu, void * @@ -2300,7 +2329,22 @@ static bool has_cpu_slab(int cpu, void *info)
static void flush_all(struct kmem_cache *s) static void flush_all(struct kmem_cache *s)
{ {
@ -106,7 +109,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
/* /*
@@ -2498,8 +2542,10 @@ static inline void *get_freelist(struct @@ -2498,8 +2542,10 @@ static inline void *get_freelist(struct kmem_cache *s, struct page *page)
* already disabled (which is the case for bulk allocation). * already disabled (which is the case for bulk allocation).
*/ */
static void *___slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node, static void *___slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node,
@ -118,7 +121,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
void *freelist; void *freelist;
struct page *page; struct page *page;
@@ -2555,6 +2601,13 @@ static void *___slab_alloc(struct kmem_c @@ -2555,6 +2601,13 @@ static void *___slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node,
VM_BUG_ON(!c->page->frozen); VM_BUG_ON(!c->page->frozen);
c->freelist = get_freepointer(s, freelist); c->freelist = get_freepointer(s, freelist);
c->tid = next_tid(c->tid); c->tid = next_tid(c->tid);
@ -132,7 +135,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return freelist; return freelist;
new_slab: new_slab:
@@ -2570,7 +2623,7 @@ static void *___slab_alloc(struct kmem_c @@ -2570,7 +2623,7 @@ static void *___slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node,
if (unlikely(!freelist)) { if (unlikely(!freelist)) {
slab_out_of_memory(s, gfpflags, node); slab_out_of_memory(s, gfpflags, node);
@ -141,7 +144,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
page = c->page; page = c->page;
@@ -2583,7 +2636,7 @@ static void *___slab_alloc(struct kmem_c @@ -2583,7 +2636,7 @@ static void *___slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node,
goto new_slab; /* Slab failed checks. Next slab needed */ goto new_slab; /* Slab failed checks. Next slab needed */
deactivate_slab(s, page, get_freepointer(s, freelist), c); deactivate_slab(s, page, get_freepointer(s, freelist), c);
@ -150,7 +153,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
/* /*
@@ -2595,6 +2648,7 @@ static void *__slab_alloc(struct kmem_ca @@ -2595,6 +2648,7 @@ static void *__slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node,
{ {
void *p; void *p;
unsigned long flags; unsigned long flags;
@ -158,7 +161,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
local_irq_save(flags); local_irq_save(flags);
#ifdef CONFIG_PREEMPT #ifdef CONFIG_PREEMPT
@@ -2606,8 +2660,9 @@ static void *__slab_alloc(struct kmem_ca @@ -2606,8 +2660,9 @@ static void *__slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node,
c = this_cpu_ptr(s->cpu_slab); c = this_cpu_ptr(s->cpu_slab);
#endif #endif
@ -169,7 +172,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return p; return p;
} }
@@ -3085,6 +3140,7 @@ int kmem_cache_alloc_bulk(struct kmem_ca @@ -3085,6 +3140,7 @@ int kmem_cache_alloc_bulk(struct kmem_cache *s, gfp_t flags, size_t size,
void **p) void **p)
{ {
struct kmem_cache_cpu *c; struct kmem_cache_cpu *c;
@ -177,7 +180,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
int i; int i;
/* memcg and kmem_cache debug support */ /* memcg and kmem_cache debug support */
@@ -3108,7 +3164,7 @@ int kmem_cache_alloc_bulk(struct kmem_ca @@ -3108,7 +3164,7 @@ int kmem_cache_alloc_bulk(struct kmem_cache *s, gfp_t flags, size_t size,
* of re-populating per CPU c->freelist * of re-populating per CPU c->freelist
*/ */
p[i] = ___slab_alloc(s, flags, NUMA_NO_NODE, p[i] = ___slab_alloc(s, flags, NUMA_NO_NODE,
@ -186,7 +189,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (unlikely(!p[i])) if (unlikely(!p[i]))
goto error; goto error;
@@ -3120,6 +3176,7 @@ int kmem_cache_alloc_bulk(struct kmem_ca @@ -3120,6 +3176,7 @@ int kmem_cache_alloc_bulk(struct kmem_cache *s, gfp_t flags, size_t size,
} }
c->tid = next_tid(c->tid); c->tid = next_tid(c->tid);
local_irq_enable(); local_irq_enable();
@ -194,7 +197,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* Clear memory outside IRQ disabled fastpath loop */ /* Clear memory outside IRQ disabled fastpath loop */
if (unlikely(flags & __GFP_ZERO)) { if (unlikely(flags & __GFP_ZERO)) {
@@ -3134,6 +3191,7 @@ int kmem_cache_alloc_bulk(struct kmem_ca @@ -3134,6 +3191,7 @@ int kmem_cache_alloc_bulk(struct kmem_cache *s, gfp_t flags, size_t size,
return i; return i;
error: error:
local_irq_enable(); local_irq_enable();
@ -215,3 +218,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (debug_guardpage_minorder()) if (debug_guardpage_minorder())
slub_max_order = 0; slub_max_order = 0;
--
2.20.1

View File

@ -1,7 +1,8 @@
From 8cf680defa2721e8a3636f0d81f0ae698b532200 Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo@elte.hu> From: Ingo Molnar <mingo@elte.hu>
Date: Fri, 3 Jul 2009 08:29:37 -0500 Date: Fri, 3 Jul 2009 08:29:37 -0500
Subject: mm: page_alloc: rt-friendly per-cpu pages Subject: [PATCH 078/266] mm: page_alloc: rt-friendly per-cpu pages
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
rt-friendly per-cpu pages: convert the irqs-off per-cpu locking rt-friendly per-cpu pages: convert the irqs-off per-cpu locking
method into a preemptible, explicit-per-cpu-locks method. method into a preemptible, explicit-per-cpu-locks method.
@ -13,9 +14,11 @@ Contains fixes from:
Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
--- ---
mm/page_alloc.c | 63 ++++++++++++++++++++++++++++++++++++++------------------ mm/page_alloc.c | 63 +++++++++++++++++++++++++++++++++----------------
1 file changed, 43 insertions(+), 20 deletions(-) 1 file changed, 43 insertions(+), 20 deletions(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 8a96b1e6f4f4..bfbd1d6abb54 100644
--- a/mm/page_alloc.c --- a/mm/page_alloc.c
+++ b/mm/page_alloc.c +++ b/mm/page_alloc.c
@@ -60,6 +60,7 @@ @@ -60,6 +60,7 @@
@ -45,7 +48,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
int page_group_by_mobility_disabled __read_mostly; int page_group_by_mobility_disabled __read_mostly;
#ifdef CONFIG_DEFERRED_STRUCT_PAGE_INIT #ifdef CONFIG_DEFERRED_STRUCT_PAGE_INIT
@@ -1296,10 +1309,10 @@ static void __free_pages_ok(struct page @@ -1296,10 +1309,10 @@ static void __free_pages_ok(struct page *page, unsigned int order)
return; return;
migratetype = get_pfnblock_migratetype(page, pfn); migratetype = get_pfnblock_migratetype(page, pfn);
@ -58,7 +61,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
} }
static void __init __free_pages_boot_core(struct page *page, unsigned int order) static void __init __free_pages_boot_core(struct page *page, unsigned int order)
@@ -2560,13 +2573,13 @@ void drain_zone_pages(struct zone *zone, @@ -2560,13 +2573,13 @@ void drain_zone_pages(struct zone *zone, struct per_cpu_pages *pcp)
int to_drain, batch; int to_drain, batch;
LIST_HEAD(dst); LIST_HEAD(dst);
@ -74,7 +77,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
if (to_drain > 0) if (to_drain > 0)
free_pcppages_bulk(zone, &dst, false); free_pcppages_bulk(zone, &dst, false);
@@ -2588,7 +2601,7 @@ static void drain_pages_zone(unsigned in @@ -2588,7 +2601,7 @@ static void drain_pages_zone(unsigned int cpu, struct zone *zone)
LIST_HEAD(dst); LIST_HEAD(dst);
int count; int count;
@ -83,7 +86,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
pset = per_cpu_ptr(zone->pageset, cpu); pset = per_cpu_ptr(zone->pageset, cpu);
pcp = &pset->pcp; pcp = &pset->pcp;
@@ -2596,7 +2609,7 @@ static void drain_pages_zone(unsigned in @@ -2596,7 +2609,7 @@ static void drain_pages_zone(unsigned int cpu, struct zone *zone)
if (count) if (count)
isolate_pcp_pages(count, pcp, &dst); isolate_pcp_pages(count, pcp, &dst);
@ -92,7 +95,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
if (count) if (count)
free_pcppages_bulk(zone, &dst, false); free_pcppages_bulk(zone, &dst, false);
@@ -2634,6 +2647,7 @@ void drain_local_pages(struct zone *zone @@ -2634,6 +2647,7 @@ void drain_local_pages(struct zone *zone)
drain_pages(cpu); drain_pages(cpu);
} }
@ -100,7 +103,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
static void drain_local_pages_wq(struct work_struct *work) static void drain_local_pages_wq(struct work_struct *work)
{ {
/* /*
@@ -2647,6 +2661,7 @@ static void drain_local_pages_wq(struct @@ -2647,6 +2661,7 @@ static void drain_local_pages_wq(struct work_struct *work)
drain_local_pages(NULL); drain_local_pages(NULL);
preempt_enable(); preempt_enable();
} }
@ -144,7 +147,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
if (!list_empty(&dst)) if (!list_empty(&dst))
free_pcppages_bulk(zone, &dst, false); free_pcppages_bulk(zone, &dst, false);
} }
@@ -2869,7 +2892,7 @@ void free_unref_page_list(struct list_he @@ -2869,7 +2892,7 @@ void free_unref_page_list(struct list_head *list)
set_page_private(page, pfn); set_page_private(page, pfn);
} }
@ -153,7 +156,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
list_for_each_entry_safe(page, next, list, lru) { list_for_each_entry_safe(page, next, list, lru) {
unsigned long pfn = page_private(page); unsigned long pfn = page_private(page);
enum zone_type type; enum zone_type type;
@@ -2884,12 +2907,12 @@ void free_unref_page_list(struct list_he @@ -2884,12 +2907,12 @@ void free_unref_page_list(struct list_head *list)
* a large list of pages to free. * a large list of pages to free.
*/ */
if (++batch_count == SWAP_CLUSTER_MAX) { if (++batch_count == SWAP_CLUSTER_MAX) {
@ -169,7 +172,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
for (i = 0; i < __MAX_NR_ZONES; ) { for (i = 0; i < __MAX_NR_ZONES; ) {
struct page *page; struct page *page;
@@ -3038,7 +3061,7 @@ static struct page *rmqueue_pcplist(stru @@ -3038,7 +3061,7 @@ static struct page *rmqueue_pcplist(struct zone *preferred_zone,
struct page *page; struct page *page;
unsigned long flags; unsigned long flags;
@ -178,7 +181,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
pcp = &this_cpu_ptr(zone->pageset)->pcp; pcp = &this_cpu_ptr(zone->pageset)->pcp;
list = &pcp->lists[migratetype]; list = &pcp->lists[migratetype];
page = __rmqueue_pcplist(zone, migratetype, pcp, list); page = __rmqueue_pcplist(zone, migratetype, pcp, list);
@@ -3046,7 +3069,7 @@ static struct page *rmqueue_pcplist(stru @@ -3046,7 +3069,7 @@ static struct page *rmqueue_pcplist(struct zone *preferred_zone,
__count_zid_vm_events(PGALLOC, page_zonenum(page), 1 << order); __count_zid_vm_events(PGALLOC, page_zonenum(page), 1 << order);
zone_statistics(preferred_zone, zone); zone_statistics(preferred_zone, zone);
} }
@ -187,7 +190,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
return page; return page;
} }
@@ -3073,7 +3096,7 @@ struct page *rmqueue(struct zone *prefer @@ -3073,7 +3096,7 @@ struct page *rmqueue(struct zone *preferred_zone,
* allocate greater than order-1 page units with __GFP_NOFAIL. * allocate greater than order-1 page units with __GFP_NOFAIL.
*/ */
WARN_ON_ONCE((gfp_flags & __GFP_NOFAIL) && (order > 1)); WARN_ON_ONCE((gfp_flags & __GFP_NOFAIL) && (order > 1));
@ -196,7 +199,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
do { do {
page = NULL; page = NULL;
@@ -3093,14 +3116,14 @@ struct page *rmqueue(struct zone *prefer @@ -3093,14 +3116,14 @@ struct page *rmqueue(struct zone *preferred_zone,
__count_zid_vm_events(PGALLOC, page_zonenum(page), 1 << order); __count_zid_vm_events(PGALLOC, page_zonenum(page), 1 << order);
zone_statistics(preferred_zone, zone); zone_statistics(preferred_zone, zone);
@ -231,3 +234,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
} }
#ifdef CONFIG_MEMORY_HOTREMOVE #ifdef CONFIG_MEMORY_HOTREMOVE
--
2.20.1

View File

@ -1,21 +1,23 @@
From 3e69b8c10ef337ad55294b386473175604fac7ae Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo@elte.hu> From: Ingo Molnar <mingo@elte.hu>
Date: Fri, 3 Jul 2009 08:29:51 -0500 Date: Fri, 3 Jul 2009 08:29:51 -0500
Subject: mm/swap: Convert to percpu locked Subject: [PATCH 079/266] mm/swap: Convert to percpu locked
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Replace global locks (get_cpu + local_irq_save) with "local_locks()". Replace global locks (get_cpu + local_irq_save) with "local_locks()".
Currently there is one of for "rotate" and one for "swap". Currently there is one of for "rotate" and one for "swap".
Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
--- ---
include/linux/swap.h | 2 ++ include/linux/swap.h | 2 ++
mm/compaction.c | 6 ++++-- mm/compaction.c | 6 ++++--
mm/page_alloc.c | 3 ++- mm/page_alloc.c | 3 ++-
mm/swap.c | 38 ++++++++++++++++++++++---------------- mm/swap.c | 38 ++++++++++++++++++++++----------------
4 files changed, 30 insertions(+), 19 deletions(-) 4 files changed, 30 insertions(+), 19 deletions(-)
diff --git a/include/linux/swap.h b/include/linux/swap.h
index 77221c16733a..6819766b93aa 100644
--- a/include/linux/swap.h --- a/include/linux/swap.h
+++ b/include/linux/swap.h +++ b/include/linux/swap.h
@@ -12,6 +12,7 @@ @@ -12,6 +12,7 @@
@ -26,7 +28,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#include <asm/page.h> #include <asm/page.h>
struct notifier_block; struct notifier_block;
@@ -331,6 +332,7 @@ extern unsigned long nr_free_pagecache_p @@ -331,6 +332,7 @@ extern unsigned long nr_free_pagecache_pages(void);
/* linux/mm/swap.c */ /* linux/mm/swap.c */
@ -34,9 +36,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
extern void lru_cache_add(struct page *); extern void lru_cache_add(struct page *);
extern void lru_cache_add_anon(struct page *page); extern void lru_cache_add_anon(struct page *page);
extern void lru_cache_add_file(struct page *page); extern void lru_cache_add_file(struct page *page);
diff --git a/mm/compaction.c b/mm/compaction.c
index faca45ebe62d..f8ccb9d9daa3 100644
--- a/mm/compaction.c --- a/mm/compaction.c
+++ b/mm/compaction.c +++ b/mm/compaction.c
@@ -1657,10 +1657,12 @@ static enum compact_result compact_zone( @@ -1657,10 +1657,12 @@ static enum compact_result compact_zone(struct zone *zone, struct compact_contro
block_start_pfn(cc->migrate_pfn, cc->order); block_start_pfn(cc->migrate_pfn, cc->order);
if (cc->last_migrated_pfn < current_block_start) { if (cc->last_migrated_pfn < current_block_start) {
@ -51,9 +55,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
/* No more flushing until we migrate again */ /* No more flushing until we migrate again */
cc->last_migrated_pfn = 0; cc->last_migrated_pfn = 0;
} }
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index bfbd1d6abb54..5af1cdd1b923 100644
--- a/mm/page_alloc.c --- a/mm/page_alloc.c
+++ b/mm/page_alloc.c +++ b/mm/page_alloc.c
@@ -7205,8 +7205,9 @@ void __init free_area_init(unsigned long @@ -7205,8 +7205,9 @@ void __init free_area_init(unsigned long *zones_size)
static int page_alloc_cpu_dead(unsigned int cpu) static int page_alloc_cpu_dead(unsigned int cpu)
{ {
@ -64,6 +70,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
drain_pages(cpu); drain_pages(cpu);
/* /*
diff --git a/mm/swap.c b/mm/swap.c
index a3fc028e338e..4bac22ec1328 100644
--- a/mm/swap.c --- a/mm/swap.c
+++ b/mm/swap.c +++ b/mm/swap.c
@@ -33,6 +33,7 @@ @@ -33,6 +33,7 @@
@ -74,7 +82,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#include <linux/hugetlb.h> #include <linux/hugetlb.h>
#include <linux/page_idle.h> #include <linux/page_idle.h>
@@ -51,6 +52,8 @@ static DEFINE_PER_CPU(struct pagevec, lr @@ -51,6 +52,8 @@ static DEFINE_PER_CPU(struct pagevec, lru_lazyfree_pvecs);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
static DEFINE_PER_CPU(struct pagevec, activate_page_pvecs); static DEFINE_PER_CPU(struct pagevec, activate_page_pvecs);
#endif #endif
@ -83,7 +91,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
/* /*
* This path almost never happens for VM activity - pages are normally * This path almost never happens for VM activity - pages are normally
@@ -253,11 +256,11 @@ void rotate_reclaimable_page(struct page @@ -253,11 +256,11 @@ void rotate_reclaimable_page(struct page *page)
unsigned long flags; unsigned long flags;
get_page(page); get_page(page);
@ -113,7 +121,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
} }
} }
@@ -339,7 +343,7 @@ void activate_page(struct page *page) @@ -334,7 +338,7 @@ void activate_page(struct page *page)
static void __lru_cache_activate_page(struct page *page) static void __lru_cache_activate_page(struct page *page)
{ {
@ -122,7 +130,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
int i; int i;
/* /*
@@ -361,7 +365,7 @@ static void __lru_cache_activate_page(st @@ -356,7 +360,7 @@ static void __lru_cache_activate_page(struct page *page)
} }
} }
@ -131,7 +139,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
} }
/* /*
@@ -403,12 +407,12 @@ EXPORT_SYMBOL(mark_page_accessed); @@ -398,12 +402,12 @@ EXPORT_SYMBOL(mark_page_accessed);
static void __lru_cache_add(struct page *page) static void __lru_cache_add(struct page *page)
{ {
@ -146,7 +154,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
} }
/** /**
@@ -586,9 +590,9 @@ void lru_add_drain_cpu(int cpu) @@ -581,9 +585,9 @@ void lru_add_drain_cpu(int cpu)
unsigned long flags; unsigned long flags;
/* No harm done if a racing interrupt already did this */ /* No harm done if a racing interrupt already did this */
@ -158,7 +166,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
} }
pvec = &per_cpu(lru_deactivate_file_pvecs, cpu); pvec = &per_cpu(lru_deactivate_file_pvecs, cpu);
@@ -620,11 +624,12 @@ void deactivate_file_page(struct page *p @@ -615,11 +619,12 @@ void deactivate_file_page(struct page *page)
return; return;
if (likely(get_page_unless_zero(page))) { if (likely(get_page_unless_zero(page))) {
@ -173,7 +181,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
} }
} }
@@ -639,19 +644,20 @@ void mark_page_lazyfree(struct page *pag @@ -634,19 +639,20 @@ void mark_page_lazyfree(struct page *page)
{ {
if (PageLRU(page) && PageAnon(page) && PageSwapBacked(page) && if (PageLRU(page) && PageAnon(page) && PageSwapBacked(page) &&
!PageSwapCache(page) && !PageUnevictable(page)) { !PageSwapCache(page) && !PageUnevictable(page)) {
@ -197,4 +205,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+ local_unlock_cpu(swapvec_lock); + local_unlock_cpu(swapvec_lock);
} }
static void lru_add_drain_per_cpu(struct work_struct *dummy) #ifdef CONFIG_SMP
--
2.20.1

View File

@ -1,7 +1,8 @@
From ac3ff5ace2c5405df8a46847cd66757ae63d5477 Mon Sep 17 00:00:00 2001
From: Luiz Capitulino <lcapitulino@redhat.com> From: Luiz Capitulino <lcapitulino@redhat.com>
Date: Fri, 27 May 2016 15:03:28 +0200 Date: Fri, 27 May 2016 15:03:28 +0200
Subject: [PATCH] mm: perform lru_add_drain_all() remotely Subject: [PATCH 080/266] mm: perform lru_add_drain_all() remotely
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
lru_add_drain_all() works by scheduling lru_add_drain_cpu() to run lru_add_drain_all() works by scheduling lru_add_drain_cpu() to run
on all CPUs that have non-empty LRU pagevecs and then waiting for on all CPUs that have non-empty LRU pagevecs and then waiting for
@ -20,12 +21,14 @@ Signed-off-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
mm/swap.c | 36 ++++++++++++++++++++++++++++++------ mm/swap.c | 36 ++++++++++++++++++++++++++++++------
1 file changed, 30 insertions(+), 6 deletions(-) 1 file changed, 30 insertions(+), 6 deletions(-)
diff --git a/mm/swap.c b/mm/swap.c
index 4bac22ec1328..0457927d3f0c 100644
--- a/mm/swap.c --- a/mm/swap.c
+++ b/mm/swap.c +++ b/mm/swap.c
@@ -590,9 +590,15 @@ void lru_add_drain_cpu(int cpu) @@ -585,9 +585,15 @@ void lru_add_drain_cpu(int cpu)
unsigned long flags; unsigned long flags;
/* No harm done if a racing interrupt already did this */ /* No harm done if a racing interrupt already did this */
@ -41,9 +44,9 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
pvec = &per_cpu(lru_deactivate_file_pvecs, cpu); pvec = &per_cpu(lru_deactivate_file_pvecs, cpu);
@@ -660,6 +666,16 @@ void lru_add_drain(void) @@ -657,6 +663,16 @@ void lru_add_drain(void)
local_unlock_cpu(swapvec_lock);
} #ifdef CONFIG_SMP
+#ifdef CONFIG_PREEMPT_RT_BASE +#ifdef CONFIG_PREEMPT_RT_BASE
+static inline void remote_lru_add_drain(int cpu, struct cpumask *has_work) +static inline void remote_lru_add_drain(int cpu, struct cpumask *has_work)
@ -55,13 +58,13 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+ +
+#else +#else
+ +
static void lru_add_drain_per_cpu(struct work_struct *dummy)
{
lru_add_drain();
@@ -667,6 +683,16 @@ static void lru_add_drain_per_cpu(struct
static DEFINE_PER_CPU(struct work_struct, lru_add_drain_work); static DEFINE_PER_CPU(struct work_struct, lru_add_drain_work);
static void lru_add_drain_per_cpu(struct work_struct *dummy)
@@ -664,6 +680,16 @@ static void lru_add_drain_per_cpu(struct work_struct *dummy)
lru_add_drain();
}
+static inline void remote_lru_add_drain(int cpu, struct cpumask *has_work) +static inline void remote_lru_add_drain(int cpu, struct cpumask *has_work)
+{ +{
+ struct work_struct *work = &per_cpu(lru_add_drain_work, cpu); + struct work_struct *work = &per_cpu(lru_add_drain_work, cpu);
@ -75,7 +78,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* /*
* Doesn't need any cpu hotplug locking because we do rely on per-cpu * Doesn't need any cpu hotplug locking because we do rely on per-cpu
* kworkers being shut down before our page_alloc_cpu_dead callback is * kworkers being shut down before our page_alloc_cpu_dead callback is
@@ -691,21 +717,19 @@ void lru_add_drain_all(void) @@ -688,21 +714,19 @@ void lru_add_drain_all(void)
cpumask_clear(&has_work); cpumask_clear(&has_work);
for_each_online_cpu(cpu) { for_each_online_cpu(cpu) {
@ -101,3 +104,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
mutex_unlock(&lock); mutex_unlock(&lock);
} }
--
2.20.1

View File

@ -1,7 +1,9 @@
From 97d2d31ce45e742af6dc423c28ab0658114264dc Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo@elte.hu> From: Ingo Molnar <mingo@elte.hu>
Date: Fri, 3 Jul 2009 08:30:13 -0500 Date: Fri, 3 Jul 2009 08:30:13 -0500
Subject: mm/vmstat: Protect per cpu variables with preempt disable on RT Subject: [PATCH 081/266] mm/vmstat: Protect per cpu variables with preempt
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz disable on RT
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Disable preemption on -RT for the vmstat code. On vanila the code runs in Disable preemption on -RT for the vmstat code. On vanila the code runs in
IRQ-off regions while on -RT it is not. "preempt_disable" ensures that the IRQ-off regions while on -RT it is not. "preempt_disable" ensures that the
@ -9,15 +11,16 @@ same ressources is not updated in parallel due to preemption.
Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
--- ---
include/linux/vmstat.h | 4 ++++ include/linux/vmstat.h | 4 ++++
mm/vmstat.c | 12 ++++++++++++ mm/vmstat.c | 12 ++++++++++++
2 files changed, 16 insertions(+) 2 files changed, 16 insertions(+)
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h
index f25cef84b41d..febee8649220 100644
--- a/include/linux/vmstat.h --- a/include/linux/vmstat.h
+++ b/include/linux/vmstat.h +++ b/include/linux/vmstat.h
@@ -54,7 +54,9 @@ DECLARE_PER_CPU(struct vm_event_state, v @@ -54,7 +54,9 @@ DECLARE_PER_CPU(struct vm_event_state, vm_event_states);
*/ */
static inline void __count_vm_event(enum vm_event_item item) static inline void __count_vm_event(enum vm_event_item item)
{ {
@ -27,7 +30,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
} }
static inline void count_vm_event(enum vm_event_item item) static inline void count_vm_event(enum vm_event_item item)
@@ -64,7 +66,9 @@ static inline void count_vm_event(enum v @@ -64,7 +66,9 @@ static inline void count_vm_event(enum vm_event_item item)
static inline void __count_vm_events(enum vm_event_item item, long delta) static inline void __count_vm_events(enum vm_event_item item, long delta)
{ {
@ -37,9 +40,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
} }
static inline void count_vm_events(enum vm_event_item item, long delta) static inline void count_vm_events(enum vm_event_item item, long delta)
diff --git a/mm/vmstat.c b/mm/vmstat.c
index 7878da76abf2..2cfaa5075c72 100644
--- a/mm/vmstat.c --- a/mm/vmstat.c
+++ b/mm/vmstat.c +++ b/mm/vmstat.c
@@ -320,6 +320,7 @@ void __mod_zone_page_state(struct zone * @@ -320,6 +320,7 @@ void __mod_zone_page_state(struct zone *zone, enum zone_stat_item item,
long x; long x;
long t; long t;
@ -47,7 +52,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
x = delta + __this_cpu_read(*p); x = delta + __this_cpu_read(*p);
t = __this_cpu_read(pcp->stat_threshold); t = __this_cpu_read(pcp->stat_threshold);
@@ -329,6 +330,7 @@ void __mod_zone_page_state(struct zone * @@ -329,6 +330,7 @@ void __mod_zone_page_state(struct zone *zone, enum zone_stat_item item,
x = 0; x = 0;
} }
__this_cpu_write(*p, x); __this_cpu_write(*p, x);
@ -55,7 +60,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
} }
EXPORT_SYMBOL(__mod_zone_page_state); EXPORT_SYMBOL(__mod_zone_page_state);
@@ -340,6 +342,7 @@ void __mod_node_page_state(struct pglist @@ -340,6 +342,7 @@ void __mod_node_page_state(struct pglist_data *pgdat, enum node_stat_item item,
long x; long x;
long t; long t;
@ -63,7 +68,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
x = delta + __this_cpu_read(*p); x = delta + __this_cpu_read(*p);
t = __this_cpu_read(pcp->stat_threshold); t = __this_cpu_read(pcp->stat_threshold);
@@ -349,6 +352,7 @@ void __mod_node_page_state(struct pglist @@ -349,6 +352,7 @@ void __mod_node_page_state(struct pglist_data *pgdat, enum node_stat_item item,
x = 0; x = 0;
} }
__this_cpu_write(*p, x); __this_cpu_write(*p, x);
@ -71,7 +76,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
} }
EXPORT_SYMBOL(__mod_node_page_state); EXPORT_SYMBOL(__mod_node_page_state);
@@ -381,6 +385,7 @@ void __inc_zone_state(struct zone *zone, @@ -381,6 +385,7 @@ void __inc_zone_state(struct zone *zone, enum zone_stat_item item)
s8 __percpu *p = pcp->vm_stat_diff + item; s8 __percpu *p = pcp->vm_stat_diff + item;
s8 v, t; s8 v, t;
@ -79,7 +84,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
v = __this_cpu_inc_return(*p); v = __this_cpu_inc_return(*p);
t = __this_cpu_read(pcp->stat_threshold); t = __this_cpu_read(pcp->stat_threshold);
if (unlikely(v > t)) { if (unlikely(v > t)) {
@@ -389,6 +394,7 @@ void __inc_zone_state(struct zone *zone, @@ -389,6 +394,7 @@ void __inc_zone_state(struct zone *zone, enum zone_stat_item item)
zone_page_state_add(v + overstep, zone, item); zone_page_state_add(v + overstep, zone, item);
__this_cpu_write(*p, -overstep); __this_cpu_write(*p, -overstep);
} }
@ -87,7 +92,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
} }
void __inc_node_state(struct pglist_data *pgdat, enum node_stat_item item) void __inc_node_state(struct pglist_data *pgdat, enum node_stat_item item)
@@ -397,6 +403,7 @@ void __inc_node_state(struct pglist_data @@ -397,6 +403,7 @@ void __inc_node_state(struct pglist_data *pgdat, enum node_stat_item item)
s8 __percpu *p = pcp->vm_node_stat_diff + item; s8 __percpu *p = pcp->vm_node_stat_diff + item;
s8 v, t; s8 v, t;
@ -95,7 +100,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
v = __this_cpu_inc_return(*p); v = __this_cpu_inc_return(*p);
t = __this_cpu_read(pcp->stat_threshold); t = __this_cpu_read(pcp->stat_threshold);
if (unlikely(v > t)) { if (unlikely(v > t)) {
@@ -405,6 +412,7 @@ void __inc_node_state(struct pglist_data @@ -405,6 +412,7 @@ void __inc_node_state(struct pglist_data *pgdat, enum node_stat_item item)
node_page_state_add(v + overstep, pgdat, item); node_page_state_add(v + overstep, pgdat, item);
__this_cpu_write(*p, -overstep); __this_cpu_write(*p, -overstep);
} }
@ -103,7 +108,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
} }
void __inc_zone_page_state(struct page *page, enum zone_stat_item item) void __inc_zone_page_state(struct page *page, enum zone_stat_item item)
@@ -425,6 +433,7 @@ void __dec_zone_state(struct zone *zone, @@ -425,6 +433,7 @@ void __dec_zone_state(struct zone *zone, enum zone_stat_item item)
s8 __percpu *p = pcp->vm_stat_diff + item; s8 __percpu *p = pcp->vm_stat_diff + item;
s8 v, t; s8 v, t;
@ -111,7 +116,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
v = __this_cpu_dec_return(*p); v = __this_cpu_dec_return(*p);
t = __this_cpu_read(pcp->stat_threshold); t = __this_cpu_read(pcp->stat_threshold);
if (unlikely(v < - t)) { if (unlikely(v < - t)) {
@@ -433,6 +442,7 @@ void __dec_zone_state(struct zone *zone, @@ -433,6 +442,7 @@ void __dec_zone_state(struct zone *zone, enum zone_stat_item item)
zone_page_state_add(v - overstep, zone, item); zone_page_state_add(v - overstep, zone, item);
__this_cpu_write(*p, overstep); __this_cpu_write(*p, overstep);
} }
@ -119,7 +124,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
} }
void __dec_node_state(struct pglist_data *pgdat, enum node_stat_item item) void __dec_node_state(struct pglist_data *pgdat, enum node_stat_item item)
@@ -441,6 +451,7 @@ void __dec_node_state(struct pglist_data @@ -441,6 +451,7 @@ void __dec_node_state(struct pglist_data *pgdat, enum node_stat_item item)
s8 __percpu *p = pcp->vm_node_stat_diff + item; s8 __percpu *p = pcp->vm_node_stat_diff + item;
s8 v, t; s8 v, t;
@ -127,7 +132,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
v = __this_cpu_dec_return(*p); v = __this_cpu_dec_return(*p);
t = __this_cpu_read(pcp->stat_threshold); t = __this_cpu_read(pcp->stat_threshold);
if (unlikely(v < - t)) { if (unlikely(v < - t)) {
@@ -449,6 +460,7 @@ void __dec_node_state(struct pglist_data @@ -449,6 +460,7 @@ void __dec_node_state(struct pglist_data *pgdat, enum node_stat_item item)
node_page_state_add(v - overstep, pgdat, item); node_page_state_add(v - overstep, pgdat, item);
__this_cpu_write(*p, overstep); __this_cpu_write(*p, overstep);
} }
@ -135,3 +140,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
} }
void __dec_zone_page_state(struct page *page, enum zone_stat_item item) void __dec_zone_page_state(struct page *page, enum zone_stat_item item)
--
2.20.1

View File

@ -1,7 +1,9 @@
Subject: ARM: Initialize split page table locks for vector page From c4a52a68ff41c185a61d501c061b08ce81a2506e Mon Sep 17 00:00:00 2001
From: Frank Rowand <frank.rowand@am.sony.com> From: Frank Rowand <frank.rowand@am.sony.com>
Date: Sat, 1 Oct 2011 18:58:13 -0700 Date: Sat, 1 Oct 2011 18:58:13 -0700
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Subject: [PATCH 082/266] ARM: Initialize split page table locks for vector
page
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Without this patch, ARM can not use SPLIT_PTLOCK_CPUS if Without this patch, ARM can not use SPLIT_PTLOCK_CPUS if
PREEMPT_RT_FULL=y because vectors_user_mapping() creates a PREEMPT_RT_FULL=y because vectors_user_mapping() creates a
@ -31,12 +33,14 @@ Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/4E87C535.2030907@am.sony.com Link: http://lkml.kernel.org/r/4E87C535.2030907@am.sony.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
--- ---
arch/arm/kernel/process.c | 24 ++++++++++++++++++++++++ arch/arm/kernel/process.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+) 1 file changed, 24 insertions(+)
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index 82ab015bf42b..8d3c7ce34c24 100644
--- a/arch/arm/kernel/process.c --- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c
@@ -324,6 +324,30 @@ unsigned long arch_randomize_brk(struct @@ -324,6 +324,30 @@ unsigned long arch_randomize_brk(struct mm_struct *mm)
} }
#ifdef CONFIG_MMU #ifdef CONFIG_MMU
@ -67,3 +71,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#ifdef CONFIG_KUSER_HELPERS #ifdef CONFIG_KUSER_HELPERS
/* /*
* The vectors page is always readable from user space for the * The vectors page is always readable from user space for the
--
2.20.1

View File

@ -1,7 +1,8 @@
Subject: mm: Enable SLUB for RT From e438a74270d17d8f9d68d4278b14497bc2671a07 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de> From: Thomas Gleixner <tglx@linutronix.de>
Date: Thu, 25 Oct 2012 10:32:35 +0100 Date: Thu, 25 Oct 2012 10:32:35 +0100
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Subject: [PATCH 083/266] mm: Enable SLUB for RT
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Avoid the memory allocation in IRQ section Avoid the memory allocation in IRQ section
@ -9,12 +10,14 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[bigeasy: factor out everything except the kcalloc() workaorund ] [bigeasy: factor out everything except the kcalloc() workaorund ]
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
mm/slub.c | 6 ++++++ mm/slub.c | 6 ++++++
1 file changed, 6 insertions(+) 1 file changed, 6 insertions(+)
diff --git a/mm/slub.c b/mm/slub.c
index 224f79ee6b39..154c0eb7c28b 100644
--- a/mm/slub.c --- a/mm/slub.c
+++ b/mm/slub.c +++ b/mm/slub.c
@@ -3677,6 +3677,11 @@ static void list_slab_objects(struct kme @@ -3677,6 +3677,11 @@ static void list_slab_objects(struct kmem_cache *s, struct page *page,
const char *text) const char *text)
{ {
#ifdef CONFIG_SLUB_DEBUG #ifdef CONFIG_SLUB_DEBUG
@ -26,7 +29,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
void *addr = page_address(page); void *addr = page_address(page);
void *p; void *p;
unsigned long *map = kcalloc(BITS_TO_LONGS(page->objects), unsigned long *map = kcalloc(BITS_TO_LONGS(page->objects),
@@ -3698,6 +3703,7 @@ static void list_slab_objects(struct kme @@ -3698,6 +3703,7 @@ static void list_slab_objects(struct kmem_cache *s, struct page *page,
slab_unlock(page); slab_unlock(page);
kfree(map); kfree(map);
#endif #endif
@ -34,3 +37,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
/* /*
--
2.20.1

View File

@ -1,19 +1,22 @@
Subject: slub: Enable irqs for __GFP_WAIT From 605ec36d61e9293b08da52f9fd7edabe92f45940 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de> From: Thomas Gleixner <tglx@linutronix.de>
Date: Wed, 09 Jan 2013 12:08:15 +0100 Date: Wed, 9 Jan 2013 12:08:15 +0100
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Subject: [PATCH 084/266] slub: Enable irqs for __GFP_WAIT
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
SYSTEM_RUNNING might be too late for enabling interrupts. Allocations SYSTEM_RUNNING might be too late for enabling interrupts. Allocations
with GFP_WAIT can happen before that. So use this as an indicator. with GFP_WAIT can happen before that. So use this as an indicator.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
--- ---
mm/slub.c | 9 ++++++++- mm/slub.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-) 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/mm/slub.c b/mm/slub.c
index 154c0eb7c28b..bcc176415952 100644
--- a/mm/slub.c --- a/mm/slub.c
+++ b/mm/slub.c +++ b/mm/slub.c
@@ -1570,10 +1570,17 @@ static struct page *allocate_slab(struct @@ -1570,10 +1570,17 @@ static struct page *allocate_slab(struct kmem_cache *s, gfp_t flags, int node)
void *start, *p; void *start, *p;
int idx, order; int idx, order;
bool shuffle; bool shuffle;
@ -31,7 +34,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
local_irq_enable(); local_irq_enable();
flags |= s->allocflags; flags |= s->allocflags;
@@ -1632,7 +1639,7 @@ static struct page *allocate_slab(struct @@ -1632,7 +1639,7 @@ static struct page *allocate_slab(struct kmem_cache *s, gfp_t flags, int node)
page->frozen = 1; page->frozen = 1;
out: out:
@ -40,3 +43,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
local_irq_disable(); local_irq_disable();
if (!page) if (!page)
return NULL; return NULL;
--
2.20.1

View File

@ -1,7 +1,8 @@
From 41a8d11daef3a3ccbdc5af850a2de8ef30bf59f2 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Wed, 15 Apr 2015 19:00:47 +0200 Date: Wed, 15 Apr 2015 19:00:47 +0200
Subject: slub: Disable SLUB_CPU_PARTIAL Subject: [PATCH 085/266] slub: Disable SLUB_CPU_PARTIAL
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
|BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:915 |BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:915
|in_atomic(): 1, irqs_disabled(): 0, pid: 87, name: rcuop/7 |in_atomic(): 1, irqs_disabled(): 0, pid: 87, name: rcuop/7
@ -32,9 +33,11 @@ Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
init/Kconfig | 2 +- init/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/init/Kconfig b/init/Kconfig
index 707ca4d49944..68b4e39e421b 100644
--- a/init/Kconfig --- a/init/Kconfig
+++ b/init/Kconfig +++ b/init/Kconfig
@@ -1698,7 +1698,7 @@ config SLAB_FREELIST_HARDENED @@ -1698,7 +1698,7 @@ config SLAB_FREELIST_HARDENED
@ -46,3 +49,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
bool "SLUB per cpu partial cache" bool "SLUB per cpu partial cache"
help help
Per cpu partial caches accellerate objects allocation and freeing Per cpu partial caches accellerate objects allocation and freeing
--
2.20.1

View File

@ -1,7 +1,9 @@
From 69dc67df10975fa926d4d2a2bb0184b60f539002 Mon Sep 17 00:00:00 2001
From: Yang Shi <yang.shi@windriver.com> From: Yang Shi <yang.shi@windriver.com>
Subject: mm/memcontrol: Don't call schedule_work_on in preemption disabled context
Date: Wed, 30 Oct 2013 11:48:33 -0700 Date: Wed, 30 Oct 2013 11:48:33 -0700
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Subject: [PATCH 086/266] mm/memcontrol: Don't call schedule_work_on in
preemption disabled context
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
The following trace is triggered when running ltp oom test cases: The following trace is triggered when running ltp oom test cases:
@ -43,13 +45,14 @@ replace the pair of get/put_cpu() to get/put_cpu_light().
Signed-off-by: Yang Shi <yang.shi@windriver.com> Signed-off-by: Yang Shi <yang.shi@windriver.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
mm/memcontrol.c | 4 ++--
mm/memcontrol.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-) 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 9518aefd8cbb..5ae52e587528 100644
--- a/mm/memcontrol.c --- a/mm/memcontrol.c
+++ b/mm/memcontrol.c +++ b/mm/memcontrol.c
@@ -2052,7 +2052,7 @@ static void drain_all_stock(struct mem_c @@ -2052,7 +2052,7 @@ static void drain_all_stock(struct mem_cgroup *root_memcg)
* as well as workers from this path always operate on the local * as well as workers from this path always operate on the local
* per-cpu data. CPU up doesn't touch memcg_stock at all. * per-cpu data. CPU up doesn't touch memcg_stock at all.
*/ */
@ -58,7 +61,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
for_each_online_cpu(cpu) { for_each_online_cpu(cpu) {
struct memcg_stock_pcp *stock = &per_cpu(memcg_stock, cpu); struct memcg_stock_pcp *stock = &per_cpu(memcg_stock, cpu);
struct mem_cgroup *memcg; struct mem_cgroup *memcg;
@@ -2072,7 +2072,7 @@ static void drain_all_stock(struct mem_c @@ -2072,7 +2072,7 @@ static void drain_all_stock(struct mem_cgroup *root_memcg)
} }
css_put(&memcg->css); css_put(&memcg->css);
} }
@ -67,3 +70,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
mutex_unlock(&percpu_charge_mutex); mutex_unlock(&percpu_charge_mutex);
} }
--
2.20.1

View File

@ -1,16 +1,20 @@
From a400b856179528a4ed99bc3e9ab62c9b9f4299e3 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: mm/memcontrol: Replace local_irq_disable with local locks
Date: Wed, 28 Jan 2015 17:14:16 +0100 Date: Wed, 28 Jan 2015 17:14:16 +0100
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Subject: [PATCH 087/266] mm/memcontrol: Replace local_irq_disable with local
locks
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
There are a few local_irq_disable() which then take sleeping locks. This There are a few local_irq_disable() which then take sleeping locks. This
patch converts them local locks. patch converts them local locks.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
mm/memcontrol.c | 24 ++++++++++++++++-------- mm/memcontrol.c | 24 ++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-) 1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 5ae52e587528..d0ea4e74d6fc 100644
--- a/mm/memcontrol.c --- a/mm/memcontrol.c
+++ b/mm/memcontrol.c +++ b/mm/memcontrol.c
@@ -69,6 +69,7 @@ @@ -69,6 +69,7 @@
@ -30,7 +34,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* Whether legacy memory+swap accounting is active */ /* Whether legacy memory+swap accounting is active */
static bool do_memsw_account(void) static bool do_memsw_account(void)
{ {
@@ -4859,12 +4862,12 @@ static int mem_cgroup_move_account(struc @@ -4859,12 +4862,12 @@ static int mem_cgroup_move_account(struct page *page,
ret = 0; ret = 0;
@ -45,7 +49,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
out_unlock: out_unlock:
unlock_page(page); unlock_page(page);
out: out:
@@ -5983,10 +5986,10 @@ void mem_cgroup_commit_charge(struct pag @@ -5983,10 +5986,10 @@ void mem_cgroup_commit_charge(struct page *page, struct mem_cgroup *memcg,
commit_charge(page, memcg, lrucare); commit_charge(page, memcg, lrucare);
@ -58,7 +62,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (do_memsw_account() && PageSwapCache(page)) { if (do_memsw_account() && PageSwapCache(page)) {
swp_entry_t entry = { .val = page_private(page) }; swp_entry_t entry = { .val = page_private(page) };
@@ -6055,7 +6058,7 @@ static void uncharge_batch(const struct @@ -6055,7 +6058,7 @@ static void uncharge_batch(const struct uncharge_gather *ug)
memcg_oom_recover(ug->memcg); memcg_oom_recover(ug->memcg);
} }
@ -67,7 +71,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
__mod_memcg_state(ug->memcg, MEMCG_RSS, -ug->nr_anon); __mod_memcg_state(ug->memcg, MEMCG_RSS, -ug->nr_anon);
__mod_memcg_state(ug->memcg, MEMCG_CACHE, -ug->nr_file); __mod_memcg_state(ug->memcg, MEMCG_CACHE, -ug->nr_file);
__mod_memcg_state(ug->memcg, MEMCG_RSS_HUGE, -ug->nr_huge); __mod_memcg_state(ug->memcg, MEMCG_RSS_HUGE, -ug->nr_huge);
@@ -6063,7 +6066,7 @@ static void uncharge_batch(const struct @@ -6063,7 +6066,7 @@ static void uncharge_batch(const struct uncharge_gather *ug)
__count_memcg_events(ug->memcg, PGPGOUT, ug->pgpgout); __count_memcg_events(ug->memcg, PGPGOUT, ug->pgpgout);
__this_cpu_add(ug->memcg->stat_cpu->nr_page_events, nr_pages); __this_cpu_add(ug->memcg->stat_cpu->nr_page_events, nr_pages);
memcg_check_events(ug->memcg, ug->dummy_page); memcg_check_events(ug->memcg, ug->dummy_page);
@ -76,7 +80,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (!mem_cgroup_is_root(ug->memcg)) if (!mem_cgroup_is_root(ug->memcg))
css_put_many(&ug->memcg->css, nr_pages); css_put_many(&ug->memcg->css, nr_pages);
@@ -6226,10 +6229,10 @@ void mem_cgroup_migrate(struct page *old @@ -6226,10 +6229,10 @@ void mem_cgroup_migrate(struct page *oldpage, struct page *newpage)
commit_charge(newpage, memcg, false); commit_charge(newpage, memcg, false);
@ -89,7 +93,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
DEFINE_STATIC_KEY_FALSE(memcg_sockets_enabled_key); DEFINE_STATIC_KEY_FALSE(memcg_sockets_enabled_key);
@@ -6421,6 +6424,7 @@ void mem_cgroup_swapout(struct page *pag @@ -6421,6 +6424,7 @@ void mem_cgroup_swapout(struct page *page, swp_entry_t entry)
struct mem_cgroup *memcg, *swap_memcg; struct mem_cgroup *memcg, *swap_memcg;
unsigned int nr_entries; unsigned int nr_entries;
unsigned short oldid; unsigned short oldid;
@ -97,7 +101,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
VM_BUG_ON_PAGE(PageLRU(page), page); VM_BUG_ON_PAGE(PageLRU(page), page);
VM_BUG_ON_PAGE(page_count(page), page); VM_BUG_ON_PAGE(page_count(page), page);
@@ -6466,13 +6470,17 @@ void mem_cgroup_swapout(struct page *pag @@ -6466,13 +6470,17 @@ void mem_cgroup_swapout(struct page *page, swp_entry_t entry)
* important here to have the interrupts disabled because it is the * important here to have the interrupts disabled because it is the
* only synchronisation we have for updating the per-CPU variables. * only synchronisation we have for updating the per-CPU variables.
*/ */
@ -115,3 +119,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
/** /**
--
2.20.1

View File

@ -1,7 +1,8 @@
From e96c261e79fc523e023aedf55130eea2b4026dfb Mon Sep 17 00:00:00 2001
From: Mike Galbraith <umgwanakikbuti@gmail.com> From: Mike Galbraith <umgwanakikbuti@gmail.com>
Date: Tue, 22 Mar 2016 11:16:09 +0100 Date: Tue, 22 Mar 2016 11:16:09 +0100
Subject: [PATCH] mm/zsmalloc: copy with get_cpu_var() and locking Subject: [PATCH 088/266] mm/zsmalloc: copy with get_cpu_var() and locking
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
get_cpu_var() disables preemption and triggers a might_sleep() splat later. get_cpu_var() disables preemption and triggers a might_sleep() splat later.
This is replaced with get_locked_var(). This is replaced with get_locked_var().
@ -13,9 +14,11 @@ Signed-off-by: Mike Galbraith <umgwanakikbuti@gmail.com>
fixed the size magic] fixed the size magic]
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
mm/zsmalloc.c | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++----- mm/zsmalloc.c | 80 +++++++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 74 insertions(+), 6 deletions(-) 1 file changed, 74 insertions(+), 6 deletions(-)
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 9da65552e7ca..63c193c1ff96 100644
--- a/mm/zsmalloc.c --- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c +++ b/mm/zsmalloc.c
@@ -55,6 +55,7 @@ @@ -55,6 +55,7 @@
@ -50,7 +53,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* /*
* Object location (<PFN>, <obj_idx>) is encoded as * Object location (<PFN>, <obj_idx>) is encoded as
* as single (unsigned long) handle value. * as single (unsigned long) handle value.
@@ -320,7 +334,7 @@ static void SetZsPageMovable(struct zs_p @@ -320,7 +334,7 @@ static void SetZsPageMovable(struct zs_pool *pool, struct zspage *zspage) {}
static int create_cache(struct zs_pool *pool) static int create_cache(struct zs_pool *pool)
{ {
@ -59,7 +62,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
0, 0, NULL); 0, 0, NULL);
if (!pool->handle_cachep) if (!pool->handle_cachep)
return 1; return 1;
@@ -344,10 +358,27 @@ static void destroy_cache(struct zs_pool @@ -344,10 +358,27 @@ static void destroy_cache(struct zs_pool *pool)
static unsigned long cache_alloc_handle(struct zs_pool *pool, gfp_t gfp) static unsigned long cache_alloc_handle(struct zs_pool *pool, gfp_t gfp)
{ {
@ -89,7 +92,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
static void cache_free_handle(struct zs_pool *pool, unsigned long handle) static void cache_free_handle(struct zs_pool *pool, unsigned long handle)
{ {
kmem_cache_free(pool->handle_cachep, (void *)handle); kmem_cache_free(pool->handle_cachep, (void *)handle);
@@ -366,12 +397,18 @@ static void cache_free_zspage(struct zs_ @@ -366,12 +397,18 @@ static void cache_free_zspage(struct zs_pool *pool, struct zspage *zspage)
static void record_obj(unsigned long handle, unsigned long obj) static void record_obj(unsigned long handle, unsigned long obj)
{ {
@ -116,7 +119,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
static bool is_zspage_isolated(struct zspage *zspage) static bool is_zspage_isolated(struct zspage *zspage)
{ {
@@ -882,7 +920,13 @@ static unsigned long location_to_obj(str @@ -882,7 +920,13 @@ static unsigned long location_to_obj(struct page *page, unsigned int obj_idx)
static unsigned long handle_to_obj(unsigned long handle) static unsigned long handle_to_obj(unsigned long handle)
{ {
@ -130,7 +133,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
static unsigned long obj_to_head(struct page *page, void *obj) static unsigned long obj_to_head(struct page *page, void *obj)
@@ -896,22 +940,46 @@ static unsigned long obj_to_head(struct @@ -896,22 +940,46 @@ static unsigned long obj_to_head(struct page *page, void *obj)
static inline int testpin_tag(unsigned long handle) static inline int testpin_tag(unsigned long handle)
{ {
@ -177,7 +180,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
static void reset_page(struct page *page) static void reset_page(struct page *page)
@@ -1337,7 +1405,7 @@ void *zs_map_object(struct zs_pool *pool @@ -1337,7 +1405,7 @@ void *zs_map_object(struct zs_pool *pool, unsigned long handle,
class = pool->size_class[class_idx]; class = pool->size_class[class_idx];
off = (class->size * obj_idx) & ~PAGE_MASK; off = (class->size * obj_idx) & ~PAGE_MASK;
@ -186,7 +189,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
area->vm_mm = mm; area->vm_mm = mm;
if (off + class->size <= PAGE_SIZE) { if (off + class->size <= PAGE_SIZE) {
/* this object is contained entirely within a page */ /* this object is contained entirely within a page */
@@ -1391,7 +1459,7 @@ void zs_unmap_object(struct zs_pool *poo @@ -1391,7 +1459,7 @@ void zs_unmap_object(struct zs_pool *pool, unsigned long handle)
__zs_unmap_object(area, pages, off, class->size); __zs_unmap_object(area, pages, off, class->size);
} }
@ -195,3 +198,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
migrate_read_unlock(zspage); migrate_read_unlock(zspage);
unpin_tag(handle); unpin_tag(handle);
--
2.20.1

View File

@ -1,8 +1,9 @@
From 245b526fa55247c1866beef0e28326ccc11214c8 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Tue, 11 Dec 2018 21:53:43 +0100 Date: Tue, 11 Dec 2018 21:53:43 +0100
Subject: [PATCH] x86/mm/pat: disable preemption __split_large_page() after Subject: [PATCH 089/266] x86/mm/pat: disable preemption __split_large_page()
spin_lock() after spin_lock()
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Commit "x86/mm/pat: Disable preemption around __flush_tlb_all()" added a Commit "x86/mm/pat: Disable preemption around __flush_tlb_all()" added a
warning if __flush_tlb_all() is invoked in preemptible context. On !RT warning if __flush_tlb_all() is invoked in preemptible context. On !RT
@ -14,20 +15,23 @@ Disable preemption to avoid the warning __flush_tlb_all().
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
arch/x86/mm/pageattr.c | 8 ++++++++ arch/x86/mm/pageattr.c | 8 ++++++++
1 file changed, 8 insertions(+) 1 file changed, 8 insertions(+)
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index e2d4b25c7aa4..9626ebb9e3c8 100644
--- a/arch/x86/mm/pageattr.c --- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c
@@ -688,11 +688,17 @@ static int @@ -687,12 +687,18 @@ __split_large_page(struct cpa_data *cpa, pte_t *kpte, unsigned long address,
pgprot_t ref_prot;
spin_lock(&pgd_lock); spin_lock(&pgd_lock);
/* + /*
+ * Keep preemption disabled after __flush_tlb_all() which expects not be + * Keep preemption disabled after __flush_tlb_all() which expects not be
+ * preempted during the flush of the local TLB. + * preempted during the flush of the local TLB.
+ */ + */
+ preempt_disable(); + preempt_disable();
+ /* /*
* Check for races, another CPU might have split this page * Check for races, another CPU might have split this page
* up for us already: * up for us already:
*/ */
@ -37,7 +41,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
spin_unlock(&pgd_lock); spin_unlock(&pgd_lock);
return 1; return 1;
} }
@@ -726,6 +732,7 @@ static int @@ -726,6 +732,7 @@ __split_large_page(struct cpa_data *cpa, pte_t *kpte, unsigned long address,
break; break;
default: default:
@ -45,7 +49,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
spin_unlock(&pgd_lock); spin_unlock(&pgd_lock);
return 1; return 1;
} }
@@ -764,6 +771,7 @@ static int @@ -764,6 +771,7 @@ __split_large_page(struct cpa_data *cpa, pte_t *kpte, unsigned long address,
* going on. * going on.
*/ */
__flush_tlb_all(); __flush_tlb_all();
@ -53,3 +57,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
spin_unlock(&pgd_lock); spin_unlock(&pgd_lock);
return 0; return 0;
--
2.20.1

View File

@ -1,7 +1,8 @@
From 6e49e380bae22fbdbbc8ad1beaeb2b68f18bbcab Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Wed, 25 Jan 2017 16:34:27 +0100 Date: Wed, 25 Jan 2017 16:34:27 +0100
Subject: [PATCH] radix-tree: use local locks Subject: [PATCH 090/266] radix-tree: use local locks
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
The preload functionality uses per-CPU variables and preempt-disable to The preload functionality uses per-CPU variables and preempt-disable to
ensure that it does not switch CPUs during its usage. This patch adds ensure that it does not switch CPUs during its usage. This patch adds
@ -12,14 +13,16 @@ Cc: stable-rt@vger.kernel.org
Reported-and-debugged-by: Mike Galbraith <efault@gmx.de> Reported-and-debugged-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
include/linux/idr.h | 5 +---- include/linux/idr.h | 5 +----
include/linux/radix-tree.h | 7 ++----- include/linux/radix-tree.h | 7 ++-----
lib/radix-tree.c | 32 +++++++++++++++++++++++--------- lib/radix-tree.c | 32 +++++++++++++++++++++++---------
3 files changed, 26 insertions(+), 18 deletions(-) 3 files changed, 26 insertions(+), 18 deletions(-)
diff --git a/include/linux/idr.h b/include/linux/idr.h
index 3ec8628ce17f..54af68158f7d 100644
--- a/include/linux/idr.h --- a/include/linux/idr.h
+++ b/include/linux/idr.h +++ b/include/linux/idr.h
@@ -169,10 +169,7 @@ static inline bool idr_is_empty(const st @@ -169,10 +169,7 @@ static inline bool idr_is_empty(const struct idr *idr)
* Each idr_preload() should be matched with an invocation of this * Each idr_preload() should be matched with an invocation of this
* function. See idr_preload() for details. * function. See idr_preload() for details.
*/ */
@ -31,9 +34,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/** /**
* idr_for_each_entry() - Iterate over an IDR's elements of a given type. * idr_for_each_entry() - Iterate over an IDR's elements of a given type.
diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h
index 34149e8b5f73..affb0fc4c5b6 100644
--- a/include/linux/radix-tree.h --- a/include/linux/radix-tree.h
+++ b/include/linux/radix-tree.h +++ b/include/linux/radix-tree.h
@@ -330,6 +330,8 @@ unsigned int radix_tree_gang_lookup_slot @@ -330,6 +330,8 @@ unsigned int radix_tree_gang_lookup_slot(const struct radix_tree_root *,
int radix_tree_preload(gfp_t gfp_mask); int radix_tree_preload(gfp_t gfp_mask);
int radix_tree_maybe_preload(gfp_t gfp_mask); int radix_tree_maybe_preload(gfp_t gfp_mask);
int radix_tree_maybe_preload_order(gfp_t gfp_mask, int order); int radix_tree_maybe_preload_order(gfp_t gfp_mask, int order);
@ -42,7 +47,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
void radix_tree_init(void); void radix_tree_init(void);
void *radix_tree_tag_set(struct radix_tree_root *, void *radix_tree_tag_set(struct radix_tree_root *,
unsigned long index, unsigned int tag); unsigned long index, unsigned int tag);
@@ -349,11 +351,6 @@ unsigned int radix_tree_gang_lookup_tag_ @@ -349,11 +351,6 @@ unsigned int radix_tree_gang_lookup_tag_slot(const struct radix_tree_root *,
unsigned int max_items, unsigned int tag); unsigned int max_items, unsigned int tag);
int radix_tree_tagged(const struct radix_tree_root *, unsigned int tag); int radix_tree_tagged(const struct radix_tree_root *, unsigned int tag);
@ -54,6 +59,8 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
int radix_tree_split_preload(unsigned old_order, unsigned new_order, gfp_t); int radix_tree_split_preload(unsigned old_order, unsigned new_order, gfp_t);
int radix_tree_split(struct radix_tree_root *, unsigned long index, int radix_tree_split(struct radix_tree_root *, unsigned long index,
unsigned new_order); unsigned new_order);
diff --git a/lib/radix-tree.c b/lib/radix-tree.c
index bc03ecc4dfd2..44257463f683 100644
--- a/lib/radix-tree.c --- a/lib/radix-tree.c
+++ b/lib/radix-tree.c +++ b/lib/radix-tree.c
@@ -38,7 +38,7 @@ @@ -38,7 +38,7 @@
@ -73,7 +80,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
static inline struct radix_tree_node *entry_to_node(void *ptr) static inline struct radix_tree_node *entry_to_node(void *ptr)
{ {
@@ -405,12 +406,13 @@ radix_tree_node_alloc(gfp_t gfp_mask, st @@ -405,12 +406,13 @@ radix_tree_node_alloc(gfp_t gfp_mask, struct radix_tree_node *parent,
* succeed in getting a node here (and never reach * succeed in getting a node here (and never reach
* kmem_cache_alloc) * kmem_cache_alloc)
*/ */
@ -88,7 +95,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/* /*
* Update the allocation stack trace as this is more useful * Update the allocation stack trace as this is more useful
* for debugging. * for debugging.
@@ -476,14 +478,14 @@ static __must_check int __radix_tree_pre @@ -476,14 +478,14 @@ static __must_check int __radix_tree_preload(gfp_t gfp_mask, unsigned nr)
*/ */
gfp_mask &= ~__GFP_ACCOUNT; gfp_mask &= ~__GFP_ACCOUNT;
@ -106,7 +113,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
rtp = this_cpu_ptr(&radix_tree_preloads); rtp = this_cpu_ptr(&radix_tree_preloads);
if (rtp->nr < nr) { if (rtp->nr < nr) {
node->parent = rtp->nodes; node->parent = rtp->nodes;
@@ -525,7 +527,7 @@ int radix_tree_maybe_preload(gfp_t gfp_m @@ -525,7 +527,7 @@ int radix_tree_maybe_preload(gfp_t gfp_mask)
if (gfpflags_allow_blocking(gfp_mask)) if (gfpflags_allow_blocking(gfp_mask))
return __radix_tree_preload(gfp_mask, RADIX_TREE_PRELOAD_SIZE); return __radix_tree_preload(gfp_mask, RADIX_TREE_PRELOAD_SIZE);
/* Preloading doesn't help anything with this gfp mask, skip it */ /* Preloading doesn't help anything with this gfp mask, skip it */
@ -115,7 +122,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return 0; return 0;
} }
EXPORT_SYMBOL(radix_tree_maybe_preload); EXPORT_SYMBOL(radix_tree_maybe_preload);
@@ -563,7 +565,7 @@ int radix_tree_maybe_preload_order(gfp_t @@ -563,7 +565,7 @@ int radix_tree_maybe_preload_order(gfp_t gfp_mask, int order)
/* Preloading doesn't help anything with this gfp mask, skip it */ /* Preloading doesn't help anything with this gfp mask, skip it */
if (!gfpflags_allow_blocking(gfp_mask)) { if (!gfpflags_allow_blocking(gfp_mask)) {
@ -124,7 +131,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
return 0; return 0;
} }
@@ -597,6 +599,12 @@ int radix_tree_maybe_preload_order(gfp_t @@ -597,6 +599,12 @@ int radix_tree_maybe_preload_order(gfp_t gfp_mask, int order)
return __radix_tree_preload(gfp_mask, nr_nodes); return __radix_tree_preload(gfp_mask, nr_nodes);
} }
@ -155,7 +162,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
int ida_pre_get(struct ida *ida, gfp_t gfp) int ida_pre_get(struct ida *ida, gfp_t gfp)
{ {
/* /*
@@ -2114,7 +2128,7 @@ int ida_pre_get(struct ida *ida, gfp_t g @@ -2114,7 +2128,7 @@ int ida_pre_get(struct ida *ida, gfp_t gfp)
* to return to the ida_pre_get() step. * to return to the ida_pre_get() step.
*/ */
if (!__radix_tree_preload(gfp, IDA_PRELOAD_SIZE)) if (!__radix_tree_preload(gfp, IDA_PRELOAD_SIZE))
@ -164,3 +171,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (!this_cpu_read(ida_bitmap)) { if (!this_cpu_read(ida_bitmap)) {
struct ida_bitmap *bitmap = kzalloc(sizeof(*bitmap), gfp); struct ida_bitmap *bitmap = kzalloc(sizeof(*bitmap), gfp);
--
2.20.1

View File

@ -1,7 +1,8 @@
From 08b09c27edd97bc659d7c41867e01fe9daa71125 Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo@elte.hu> From: Ingo Molnar <mingo@elte.hu>
Date: Fri, 3 Jul 2009 08:29:34 -0500 Date: Fri, 3 Jul 2009 08:29:34 -0500
Subject: timers: Prepare for full preemption Subject: [PATCH 091/266] timers: Prepare for full preemption
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
When softirqs can be preempted we need to make sure that cancelling When softirqs can be preempted we need to make sure that cancelling
the timer from the active thread can not deadlock vs. a running timer the timer from the active thread can not deadlock vs. a running timer
@ -9,16 +10,17 @@ callback. Add a waitqueue to resolve that.
Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
--- ---
include/linux/timer.h | 2 +- include/linux/timer.h | 2 +-
kernel/sched/core.c | 9 +++++++-- kernel/sched/core.c | 9 +++++++--
kernel/time/timer.c | 45 +++++++++++++++++++++++++++++++++++++++++---- kernel/time/timer.c | 45 +++++++++++++++++++++++++++++++++++++++----
3 files changed, 49 insertions(+), 7 deletions(-) 3 files changed, 49 insertions(+), 7 deletions(-)
diff --git a/include/linux/timer.h b/include/linux/timer.h
index 7b066fd38248..54627d046b3a 100644
--- a/include/linux/timer.h --- a/include/linux/timer.h
+++ b/include/linux/timer.h +++ b/include/linux/timer.h
@@ -172,7 +172,7 @@ extern void add_timer(struct timer_list @@ -172,7 +172,7 @@ extern void add_timer(struct timer_list *timer);
extern int try_to_del_timer_sync(struct timer_list *timer); extern int try_to_del_timer_sync(struct timer_list *timer);
@ -27,9 +29,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
extern int del_timer_sync(struct timer_list *timer); extern int del_timer_sync(struct timer_list *timer);
#else #else
# define del_timer_sync(t) del_timer(t) # define del_timer_sync(t) del_timer(t)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index f027ac73f1df..8250701ecfd7 100644
--- a/kernel/sched/core.c --- a/kernel/sched/core.c
+++ b/kernel/sched/core.c +++ b/kernel/sched/core.c
@@ -496,11 +496,14 @@ void resched_cpu(int cpu) @@ -497,11 +497,14 @@ void resched_cpu(int cpu)
*/ */
int get_nohz_timer_target(void) int get_nohz_timer_target(void)
{ {
@ -46,7 +50,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
rcu_read_lock(); rcu_read_lock();
for_each_domain(cpu, sd) { for_each_domain(cpu, sd) {
@@ -519,6 +522,8 @@ int get_nohz_timer_target(void) @@ -520,6 +523,8 @@ int get_nohz_timer_target(void)
cpu = housekeeping_any_cpu(HK_FLAG_TIMER); cpu = housekeeping_any_cpu(HK_FLAG_TIMER);
unlock: unlock:
rcu_read_unlock(); rcu_read_unlock();
@ -55,6 +59,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
return cpu; return cpu;
} }
diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index fa49cd753dea..bbe24e241643 100644
--- a/kernel/time/timer.c --- a/kernel/time/timer.c
+++ b/kernel/time/timer.c +++ b/kernel/time/timer.c
@@ -44,6 +44,7 @@ @@ -44,6 +44,7 @@
@ -75,7 +81,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
unsigned long clk; unsigned long clk;
unsigned long next_expiry; unsigned long next_expiry;
unsigned int cpu; unsigned int cpu;
@@ -1178,6 +1182,33 @@ void add_timer_on(struct timer_list *tim @@ -1178,6 +1182,33 @@ void add_timer_on(struct timer_list *timer, int cpu)
} }
EXPORT_SYMBOL_GPL(add_timer_on); EXPORT_SYMBOL_GPL(add_timer_on);
@ -109,7 +115,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
/** /**
* del_timer - deactivate a timer. * del_timer - deactivate a timer.
* @timer: the timer to be deactivated * @timer: the timer to be deactivated
@@ -1233,7 +1264,7 @@ int try_to_del_timer_sync(struct timer_l @@ -1233,7 +1264,7 @@ int try_to_del_timer_sync(struct timer_list *timer)
} }
EXPORT_SYMBOL(try_to_del_timer_sync); EXPORT_SYMBOL(try_to_del_timer_sync);
@ -118,7 +124,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
/** /**
* del_timer_sync - deactivate a timer and wait for the handler to finish. * del_timer_sync - deactivate a timer and wait for the handler to finish.
* @timer: the timer to be deactivated * @timer: the timer to be deactivated
@@ -1293,7 +1324,7 @@ int del_timer_sync(struct timer_list *ti @@ -1293,7 +1324,7 @@ int del_timer_sync(struct timer_list *timer)
int ret = try_to_del_timer_sync(timer); int ret = try_to_del_timer_sync(timer);
if (ret >= 0) if (ret >= 0)
return ret; return ret;
@ -127,7 +133,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
} }
} }
EXPORT_SYMBOL(del_timer_sync); EXPORT_SYMBOL(del_timer_sync);
@@ -1354,13 +1385,16 @@ static void expire_timers(struct timer_b @@ -1354,13 +1385,16 @@ static void expire_timers(struct timer_base *base, struct hlist_head *head)
fn = timer->function; fn = timer->function;
@ -145,7 +151,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
raw_spin_lock_irq(&base->lock); raw_spin_lock_irq(&base->lock);
} }
} }
@@ -1681,8 +1715,8 @@ static inline void __run_timers(struct t @@ -1681,8 +1715,8 @@ static inline void __run_timers(struct timer_base *base)
while (levels--) while (levels--)
expire_timers(base, heads + levels); expire_timers(base, heads + levels);
} }
@ -155,7 +161,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
} }
/* /*
@@ -1927,6 +1961,9 @@ static void __init init_timer_cpu(int cp @@ -1927,6 +1961,9 @@ static void __init init_timer_cpu(int cpu)
base->cpu = cpu; base->cpu = cpu;
raw_spin_lock_init(&base->lock); raw_spin_lock_init(&base->lock);
base->clk = jiffies; base->clk = jiffies;
@ -165,3 +171,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
} }
} }
--
2.20.1

View File

@ -1,7 +1,8 @@
Subject: x86: kvm Require const tsc for RT From 72511f2c697b25d19b0a4dd298c2f7987d7cc386 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de> From: Thomas Gleixner <tglx@linutronix.de>
Date: Sun, 06 Nov 2011 12:26:18 +0100 Date: Sun, 6 Nov 2011 12:26:18 +0100
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Subject: [PATCH 092/266] x86: kvm Require const tsc for RT
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Non constant TSC is a nightmare on bare metal already, but with Non constant TSC is a nightmare on bare metal already, but with
virtualization it becomes a complete disaster because the workarounds virtualization it becomes a complete disaster because the workarounds
@ -10,9 +11,11 @@ a guest on top of a RT host.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
--- ---
arch/x86/kvm/x86.c | 7 +++++++ arch/x86/kvm/x86.c | 7 +++++++
1 file changed, 7 insertions(+) 1 file changed, 7 insertions(+)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 6181ec19bed2..10681ac91866 100644
--- a/arch/x86/kvm/x86.c --- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c
@@ -6698,6 +6698,13 @@ int kvm_arch_init(void *opaque) @@ -6698,6 +6698,13 @@ int kvm_arch_init(void *opaque)
@ -29,3 +32,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
r = kvm_mmu_module_init(); r = kvm_mmu_module_init();
if (r) if (r)
goto out_free_percpu; goto out_free_percpu;
--
2.20.1

View File

@ -1,7 +1,8 @@
From 7fbdd307f3cf05c50b493ea0a31f68dbd0a3ed50 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Wed, 4 Oct 2017 10:24:23 +0200 Date: Wed, 4 Oct 2017 10:24:23 +0200
Subject: [PATCH] pci/switchtec: Don't use completion's wait queue Subject: [PATCH 093/266] pci/switchtec: Don't use completion's wait queue
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
The poll callback is using completion's wait_queue_head_t member and The poll callback is using completion's wait_queue_head_t member and
puts it in poll_wait() so the poll() caller gets a wakeup after command puts it in poll_wait() so the poll() caller gets a wakeup after command
@ -19,9 +20,11 @@ Cc: Kurt Schwemmer <kurt.schwemmer@microsemi.com>
Cc: Logan Gunthorpe <logang@deltatee.com> Cc: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
drivers/pci/switch/switchtec.c | 22 +++++++++++++--------- drivers/pci/switch/switchtec.c | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-) 1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/drivers/pci/switch/switchtec.c b/drivers/pci/switch/switchtec.c
index 37d0c15c9eeb..c396f3ef1852 100644
--- a/drivers/pci/switch/switchtec.c --- a/drivers/pci/switch/switchtec.c
+++ b/drivers/pci/switch/switchtec.c +++ b/drivers/pci/switch/switchtec.c
@@ -43,10 +43,11 @@ struct switchtec_user { @@ -43,10 +43,11 @@ struct switchtec_user {
@ -37,7 +40,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
u32 cmd; u32 cmd;
u32 status; u32 status;
u32 return_code; u32 return_code;
@@ -68,7 +69,7 @@ static struct switchtec_user *stuser_cre @@ -68,7 +69,7 @@ static struct switchtec_user *stuser_create(struct switchtec_dev *stdev)
stuser->stdev = stdev; stuser->stdev = stdev;
kref_init(&stuser->kref); kref_init(&stuser->kref);
INIT_LIST_HEAD(&stuser->list); INIT_LIST_HEAD(&stuser->list);
@ -46,7 +49,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
stuser->event_cnt = atomic_read(&stdev->event_cnt); stuser->event_cnt = atomic_read(&stdev->event_cnt);
dev_dbg(&stdev->dev, "%s: %p\n", __func__, stuser); dev_dbg(&stdev->dev, "%s: %p\n", __func__, stuser);
@@ -151,7 +152,7 @@ static int mrpc_queue_cmd(struct switcht @@ -151,7 +152,7 @@ static int mrpc_queue_cmd(struct switchtec_user *stuser)
kref_get(&stuser->kref); kref_get(&stuser->kref);
stuser->read_len = sizeof(stuser->data); stuser->read_len = sizeof(stuser->data);
stuser_set_state(stuser, MRPC_QUEUED); stuser_set_state(stuser, MRPC_QUEUED);
@ -55,7 +58,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
list_add_tail(&stuser->list, &stdev->mrpc_queue); list_add_tail(&stuser->list, &stdev->mrpc_queue);
mrpc_cmd_submit(stdev); mrpc_cmd_submit(stdev);
@@ -188,7 +189,8 @@ static void mrpc_complete_cmd(struct swi @@ -188,7 +189,8 @@ static void mrpc_complete_cmd(struct switchtec_dev *stdev)
stuser->read_len); stuser->read_len);
out: out:
@ -65,7 +68,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
list_del_init(&stuser->list); list_del_init(&stuser->list);
stuser_put(stuser); stuser_put(stuser);
stdev->mrpc_busy = 0; stdev->mrpc_busy = 0;
@@ -458,10 +460,11 @@ static ssize_t switchtec_dev_read(struct @@ -458,10 +460,11 @@ static ssize_t switchtec_dev_read(struct file *filp, char __user *data,
mutex_unlock(&stdev->mrpc_mutex); mutex_unlock(&stdev->mrpc_mutex);
if (filp->f_flags & O_NONBLOCK) { if (filp->f_flags & O_NONBLOCK) {
@ -79,7 +82,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
if (rc < 0) if (rc < 0)
return rc; return rc;
} }
@@ -509,7 +512,7 @@ static __poll_t switchtec_dev_poll(struc @@ -509,7 +512,7 @@ static __poll_t switchtec_dev_poll(struct file *filp, poll_table *wait)
struct switchtec_dev *stdev = stuser->stdev; struct switchtec_dev *stdev = stuser->stdev;
__poll_t ret = 0; __poll_t ret = 0;
@ -88,7 +91,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
poll_wait(filp, &stdev->event_wq, wait); poll_wait(filp, &stdev->event_wq, wait);
if (lock_mutex_and_test_alive(stdev)) if (lock_mutex_and_test_alive(stdev))
@@ -517,7 +520,7 @@ static __poll_t switchtec_dev_poll(struc @@ -517,7 +520,7 @@ static __poll_t switchtec_dev_poll(struct file *filp, poll_table *wait)
mutex_unlock(&stdev->mrpc_mutex); mutex_unlock(&stdev->mrpc_mutex);
@ -97,7 +100,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
ret |= EPOLLIN | EPOLLRDNORM; ret |= EPOLLIN | EPOLLRDNORM;
if (stuser->event_cnt != atomic_read(&stdev->event_cnt)) if (stuser->event_cnt != atomic_read(&stdev->event_cnt))
@@ -1041,7 +1044,8 @@ static void stdev_kill(struct switchtec_ @@ -1041,7 +1044,8 @@ static void stdev_kill(struct switchtec_dev *stdev)
/* Wake up and kill any users waiting on an MRPC request */ /* Wake up and kill any users waiting on an MRPC request */
list_for_each_entry_safe(stuser, tmpuser, &stdev->mrpc_queue, list) { list_for_each_entry_safe(stuser, tmpuser, &stdev->mrpc_queue, list) {
@ -107,3 +110,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
list_del_init(&stuser->list); list_del_init(&stuser->list);
stuser_put(stuser); stuser_put(stuser);
} }
--
2.20.1

View File

@ -1,7 +1,11 @@
From b22255c793ef483f700e31323610af55e947782b Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Mon, 28 Oct 2013 12:19:57 +0100 Date: Mon, 28 Oct 2013 12:19:57 +0100
Subject: wait.h: include atomic.h Subject: [PATCH 094/266] wait.h: include atomic.h
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz 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.31-rt18.tar.xz
| CC init/main.o | CC init/main.o
|In file included from include/linux/mmzone.h:9:0, |In file included from include/linux/mmzone.h:9:0,
@ -18,9 +22,11 @@ This pops up on ARM. Non-RT gets its atomic.h include from spinlock.h
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
include/linux/wait.h | 1 + include/linux/wait.h | 1 +
1 file changed, 1 insertion(+) 1 file changed, 1 insertion(+)
diff --git a/include/linux/wait.h b/include/linux/wait.h
index ed7c122cb31f..2b5ef8e94d19 100644
--- a/include/linux/wait.h --- a/include/linux/wait.h
+++ b/include/linux/wait.h +++ b/include/linux/wait.h
@@ -10,6 +10,7 @@ @@ -10,6 +10,7 @@
@ -31,3 +37,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
typedef struct wait_queue_entry wait_queue_entry_t; typedef struct wait_queue_entry wait_queue_entry_t;
--
2.20.1

View File

@ -1,7 +1,8 @@
From c8edd94ddadba2df66391d879cc3f73ddac3fb1d Mon Sep 17 00:00:00 2001
From: Daniel Wagner <daniel.wagner@bmw-carit.de> From: Daniel Wagner <daniel.wagner@bmw-carit.de>
Date: Fri, 11 Jul 2014 15:26:11 +0200 Date: Fri, 11 Jul 2014 15:26:11 +0200
Subject: work-simple: Simple work queue implemenation Subject: [PATCH 095/266] work-simple: Simple work queue implemenation
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Provides a framework for enqueuing callbacks from irq context Provides a framework for enqueuing callbacks from irq context
PREEMPT_RT_FULL safe. The callbacks are executed in kthread context. PREEMPT_RT_FULL safe. The callbacks are executed in kthread context.
@ -11,11 +12,16 @@ Bases on wait-simple.
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de> Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
--- ---
include/linux/swork.h | 24 ++++++ include/linux/swork.h | 24 ++++++
kernel/sched/Makefile | 2 kernel/sched/Makefile | 2 +-
kernel/sched/swork.c | 173 ++++++++++++++++++++++++++++++++++++++++++++++++++ kernel/sched/swork.c | 173 ++++++++++++++++++++++++++++++++++++++++++
3 files changed, 198 insertions(+), 1 deletion(-) 3 files changed, 198 insertions(+), 1 deletion(-)
create mode 100644 include/linux/swork.h
create mode 100644 kernel/sched/swork.c
diff --git a/include/linux/swork.h b/include/linux/swork.h
new file mode 100644
index 000000000000..f175fa9a6016
--- /dev/null --- /dev/null
+++ b/include/linux/swork.h +++ b/include/linux/swork.h
@@ -0,0 +1,24 @@ @@ -0,0 +1,24 @@
@ -43,6 +49,8 @@ Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
+void swork_put(void); +void swork_put(void);
+ +
+#endif /* _LINUX_SWORK_H */ +#endif /* _LINUX_SWORK_H */
diff --git a/kernel/sched/Makefile b/kernel/sched/Makefile
index 7fe183404c38..2b765aa4e2c4 100644
--- a/kernel/sched/Makefile --- a/kernel/sched/Makefile
+++ b/kernel/sched/Makefile +++ b/kernel/sched/Makefile
@@ -18,7 +18,7 @@ endif @@ -18,7 +18,7 @@ endif
@ -54,6 +62,9 @@ Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
obj-$(CONFIG_SMP) += cpupri.o cpudeadline.o topology.o stop_task.o pelt.o obj-$(CONFIG_SMP) += cpupri.o cpudeadline.o topology.o stop_task.o pelt.o
obj-$(CONFIG_SCHED_AUTOGROUP) += autogroup.o obj-$(CONFIG_SCHED_AUTOGROUP) += autogroup.o
diff --git a/kernel/sched/swork.c b/kernel/sched/swork.c
new file mode 100644
index 000000000000..a5b89fdacf19
--- /dev/null --- /dev/null
+++ b/kernel/sched/swork.c +++ b/kernel/sched/swork.c
@@ -0,0 +1,173 @@ @@ -0,0 +1,173 @@
@ -230,3 +241,6 @@ Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
+ mutex_unlock(&worker_mutex); + mutex_unlock(&worker_mutex);
+} +}
+EXPORT_SYMBOL_GPL(swork_put); +EXPORT_SYMBOL_GPL(swork_put);
--
2.20.1

View File

@ -1,7 +1,9 @@
From 9b018413a45c8182c7ddfe274e127f723ceb35d8 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Mon, 10 Sep 2018 18:00:31 +0200 Date: Mon, 10 Sep 2018 18:00:31 +0200
Subject: [PATCH] work-simple: drop a shit statement in SWORK_EVENT_PENDING Subject: [PATCH 096/266] work-simple: drop a shit statement in
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz SWORK_EVENT_PENDING
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Dan Carpenter reported Dan Carpenter reported
| smatch warnings: | smatch warnings:
@ -14,9 +16,11 @@ Nevertheless I'm dropping that shift by zero to keep smatch quiet.
Cc: Daniel Wagner <daniel.wagner@siemens.com> Cc: Daniel Wagner <daniel.wagner@siemens.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
kernel/sched/swork.c | 2 +- kernel/sched/swork.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/swork.c b/kernel/sched/swork.c
index a5b89fdacf19..c90d14b9b126 100644
--- a/kernel/sched/swork.c --- a/kernel/sched/swork.c
+++ b/kernel/sched/swork.c +++ b/kernel/sched/swork.c
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
@ -28,3 +32,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
static DEFINE_MUTEX(worker_mutex); static DEFINE_MUTEX(worker_mutex);
static struct sworker *glob_worker; static struct sworker *glob_worker;
--
2.20.1

View File

@ -1,7 +1,8 @@
Subject: completion: Use simple wait queues From c2beaeff146ca9f454afd0da8cadea8fbfdf6c84 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de> From: Thomas Gleixner <tglx@linutronix.de>
Date: Fri, 11 Jan 2013 11:23:51 +0100 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.25-rt16.tar.xz Subject: [PATCH 097/266] completion: Use simple wait queues
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Completions have no long lasting callbacks and therefor do not need Completions have no long lasting callbacks and therefor do not need
the complex waitqueue variant. Use simple waitqueues which reduces the the complex waitqueue variant. Use simple waitqueues which reduces the
@ -9,23 +10,25 @@ contention on the waitqueue lock.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
--- ---
arch/powerpc/platforms/ps3/device-init.c | 4 +- arch/powerpc/platforms/ps3/device-init.c | 4 +--
drivers/net/wireless/intersil/orinoco/orinoco_usb.c | 4 +- .../wireless/intersil/orinoco/orinoco_usb.c | 4 +--
drivers/usb/gadget/function/f_fs.c | 2 - drivers/usb/gadget/function/f_fs.c | 2 +-
drivers/usb/gadget/legacy/inode.c | 4 +- drivers/usb/gadget/legacy/inode.c | 4 +--
include/linux/completion.h | 8 ++-- include/linux/completion.h | 8 ++---
include/linux/suspend.h | 6 +++ include/linux/suspend.h | 6 ++++
include/linux/swait.h | 2 + include/linux/swait.h | 2 ++
kernel/power/hibernate.c | 7 ++++ kernel/power/hibernate.c | 7 ++++
kernel/power/suspend.c | 4 ++ kernel/power/suspend.c | 4 +++
kernel/sched/completion.c | 34 ++++++++++---------- kernel/sched/completion.c | 34 +++++++++----------
kernel/sched/core.c | 10 ++++- kernel/sched/core.c | 10 ++++--
kernel/sched/swait.c | 21 +++++++++++- kernel/sched/swait.c | 21 +++++++++++-
12 files changed, 75 insertions(+), 31 deletions(-) 12 files changed, 75 insertions(+), 31 deletions(-)
diff --git a/arch/powerpc/platforms/ps3/device-init.c b/arch/powerpc/platforms/ps3/device-init.c
index e7075aaff1bb..1580464a9d5b 100644
--- a/arch/powerpc/platforms/ps3/device-init.c --- a/arch/powerpc/platforms/ps3/device-init.c
+++ b/arch/powerpc/platforms/ps3/device-init.c +++ b/arch/powerpc/platforms/ps3/device-init.c
@@ -752,8 +752,8 @@ static int ps3_notification_read_write(s @@ -752,8 +752,8 @@ static int ps3_notification_read_write(struct ps3_notification_device *dev,
} }
pr_debug("%s:%u: notification %s issued\n", __func__, __LINE__, op); pr_debug("%s:%u: notification %s issued\n", __func__, __LINE__, op);
@ -36,9 +39,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
if (kthread_should_stop()) if (kthread_should_stop())
res = -EINTR; res = -EINTR;
if (res) { if (res) {
diff --git a/drivers/net/wireless/intersil/orinoco/orinoco_usb.c b/drivers/net/wireless/intersil/orinoco/orinoco_usb.c
index 94ad6fe29e69..52a49f0bbc19 100644
--- a/drivers/net/wireless/intersil/orinoco/orinoco_usb.c --- a/drivers/net/wireless/intersil/orinoco/orinoco_usb.c
+++ b/drivers/net/wireless/intersil/orinoco/orinoco_usb.c +++ b/drivers/net/wireless/intersil/orinoco/orinoco_usb.c
@@ -697,8 +697,8 @@ static void ezusb_req_ctx_wait(struct ez @@ -697,8 +697,8 @@ static void ezusb_req_ctx_wait(struct ezusb_priv *upriv,
while (!ctx->done.done && msecs--) while (!ctx->done.done && msecs--)
udelay(1000); udelay(1000);
} else { } else {
@ -49,9 +54,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
} }
break; break;
default: default:
diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c
index 31e8bf3578c8..4d6741a54dd0 100644
--- a/drivers/usb/gadget/function/f_fs.c --- a/drivers/usb/gadget/function/f_fs.c
+++ b/drivers/usb/gadget/function/f_fs.c +++ b/drivers/usb/gadget/function/f_fs.c
@@ -1623,7 +1623,7 @@ static void ffs_data_put(struct ffs_data @@ -1623,7 +1623,7 @@ static void ffs_data_put(struct ffs_data *ffs)
pr_info("%s(): freeing\n", __func__); pr_info("%s(): freeing\n", __func__);
ffs_data_clear(ffs); ffs_data_clear(ffs);
BUG_ON(waitqueue_active(&ffs->ev.waitq) || BUG_ON(waitqueue_active(&ffs->ev.waitq) ||
@ -60,9 +67,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
waitqueue_active(&ffs->wait)); waitqueue_active(&ffs->wait));
destroy_workqueue(ffs->io_completion_wq); destroy_workqueue(ffs->io_completion_wq);
kfree(ffs->dev_name); kfree(ffs->dev_name);
diff --git a/drivers/usb/gadget/legacy/inode.c b/drivers/usb/gadget/legacy/inode.c
index 37ca0e669bd8..56a16587b221 100644
--- a/drivers/usb/gadget/legacy/inode.c --- a/drivers/usb/gadget/legacy/inode.c
+++ b/drivers/usb/gadget/legacy/inode.c +++ b/drivers/usb/gadget/legacy/inode.c
@@ -343,7 +343,7 @@ ep_io (struct ep_data *epdata, void *buf @@ -343,7 +343,7 @@ ep_io (struct ep_data *epdata, void *buf, unsigned len)
spin_unlock_irq (&epdata->dev->lock); spin_unlock_irq (&epdata->dev->lock);
if (likely (value == 0)) { if (likely (value == 0)) {
@ -71,7 +80,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
if (value != 0) { if (value != 0) {
spin_lock_irq (&epdata->dev->lock); spin_lock_irq (&epdata->dev->lock);
if (likely (epdata->ep != NULL)) { if (likely (epdata->ep != NULL)) {
@@ -352,7 +352,7 @@ ep_io (struct ep_data *epdata, void *buf @@ -352,7 +352,7 @@ ep_io (struct ep_data *epdata, void *buf, unsigned len)
usb_ep_dequeue (epdata->ep, epdata->req); usb_ep_dequeue (epdata->ep, epdata->req);
spin_unlock_irq (&epdata->dev->lock); spin_unlock_irq (&epdata->dev->lock);
@ -80,6 +89,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
if (epdata->status == -ECONNRESET) if (epdata->status == -ECONNRESET)
epdata->status = -EINTR; epdata->status = -EINTR;
} else { } else {
diff --git a/include/linux/completion.h b/include/linux/completion.h
index 519e94915d18..bf8e77001f18 100644
--- a/include/linux/completion.h --- a/include/linux/completion.h
+++ b/include/linux/completion.h +++ b/include/linux/completion.h
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
@ -100,7 +111,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
}; };
#define init_completion_map(x, m) __init_completion(x) #define init_completion_map(x, m) __init_completion(x)
@@ -34,7 +34,7 @@ static inline void complete_acquire(stru @@ -34,7 +34,7 @@ static inline void complete_acquire(struct completion *x) {}
static inline void complete_release(struct completion *x) {} static inline void complete_release(struct completion *x) {}
#define COMPLETION_INITIALIZER(work) \ #define COMPLETION_INITIALIZER(work) \
@ -109,7 +120,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#define COMPLETION_INITIALIZER_ONSTACK_MAP(work, map) \ #define COMPLETION_INITIALIZER_ONSTACK_MAP(work, map) \
(*({ init_completion_map(&(work), &(map)); &(work); })) (*({ init_completion_map(&(work), &(map)); &(work); }))
@@ -85,7 +85,7 @@ static inline void complete_release(stru @@ -85,7 +85,7 @@ static inline void complete_release(struct completion *x) {}
static inline void __init_completion(struct completion *x) static inline void __init_completion(struct completion *x)
{ {
x->done = 0; x->done = 0;
@ -118,6 +129,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
} }
/** /**
diff --git a/include/linux/suspend.h b/include/linux/suspend.h
index 3f529ad9a9d2..328439ce71f5 100644
--- a/include/linux/suspend.h --- a/include/linux/suspend.h
+++ b/include/linux/suspend.h +++ b/include/linux/suspend.h
@@ -196,6 +196,12 @@ struct platform_s2idle_ops { @@ -196,6 +196,12 @@ struct platform_s2idle_ops {
@ -133,9 +146,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#ifdef CONFIG_SUSPEND #ifdef CONFIG_SUSPEND
extern suspend_state_t mem_sleep_current; extern suspend_state_t mem_sleep_current;
extern suspend_state_t mem_sleep_default; extern suspend_state_t mem_sleep_default;
diff --git a/include/linux/swait.h b/include/linux/swait.h
index 73e06e9986d4..f426a0661aa0 100644
--- a/include/linux/swait.h --- a/include/linux/swait.h
+++ b/include/linux/swait.h +++ b/include/linux/swait.h
@@ -160,7 +160,9 @@ static inline bool swq_has_sleeper(struc @@ -160,7 +160,9 @@ static inline bool swq_has_sleeper(struct swait_queue_head *wq)
extern void swake_up_one(struct swait_queue_head *q); extern void swake_up_one(struct swait_queue_head *q);
extern void swake_up_all(struct swait_queue_head *q); extern void swake_up_all(struct swait_queue_head *q);
extern void swake_up_locked(struct swait_queue_head *q); extern void swake_up_locked(struct swait_queue_head *q);
@ -145,6 +160,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
extern void prepare_to_swait_exclusive(struct swait_queue_head *q, struct swait_queue *wait, int state); extern void prepare_to_swait_exclusive(struct swait_queue_head *q, struct swait_queue *wait, int state);
extern long prepare_to_swait_event(struct swait_queue_head *q, struct swait_queue *wait, int state); extern long prepare_to_swait_event(struct swait_queue_head *q, struct swait_queue *wait, int state);
diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
index abef759de7c8..69e418787f21 100644
--- a/kernel/power/hibernate.c --- a/kernel/power/hibernate.c
+++ b/kernel/power/hibernate.c +++ b/kernel/power/hibernate.c
@@ -681,6 +681,10 @@ static int load_image_and_restore(void) @@ -681,6 +681,10 @@ static int load_image_and_restore(void)
@ -175,9 +192,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
pr_info("hibernation exit\n"); pr_info("hibernation exit\n");
return error; return error;
diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
index 0bd595a0b610..a4456772d98e 100644
--- a/kernel/power/suspend.c --- a/kernel/power/suspend.c
+++ b/kernel/power/suspend.c +++ b/kernel/power/suspend.c
@@ -600,6 +600,8 @@ static int enter_state(suspend_state_t s @@ -600,6 +600,8 @@ static int enter_state(suspend_state_t state)
return error; return error;
} }
@ -202,6 +221,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
return error; return error;
} }
EXPORT_SYMBOL(pm_suspend); EXPORT_SYMBOL(pm_suspend);
diff --git a/kernel/sched/completion.c b/kernel/sched/completion.c
index a1ad5b7d5521..755a58084978 100644
--- a/kernel/sched/completion.c --- a/kernel/sched/completion.c
+++ b/kernel/sched/completion.c +++ b/kernel/sched/completion.c
@@ -29,12 +29,12 @@ void complete(struct completion *x) @@ -29,12 +29,12 @@ void complete(struct completion *x)
@ -260,7 +281,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
if (!x->done) if (!x->done)
return timeout; return timeout;
} }
@@ -100,9 +100,9 @@ static inline long __sched @@ -100,9 +100,9 @@ __wait_for_common(struct completion *x,
complete_acquire(x); complete_acquire(x);
@ -272,7 +293,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
complete_release(x); complete_release(x);
@@ -291,12 +291,12 @@ bool try_wait_for_completion(struct comp @@ -291,12 +291,12 @@ bool try_wait_for_completion(struct completion *x)
if (!READ_ONCE(x->done)) if (!READ_ONCE(x->done))
return false; return false;
@ -287,7 +308,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
return ret; return ret;
} }
EXPORT_SYMBOL(try_wait_for_completion); EXPORT_SYMBOL(try_wait_for_completion);
@@ -322,8 +322,8 @@ bool completion_done(struct completion * @@ -322,8 +322,8 @@ bool completion_done(struct completion *x)
* otherwise we can end up freeing the completion before complete() * otherwise we can end up freeing the completion before complete()
* is done referencing it. * is done referencing it.
*/ */
@ -298,9 +319,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
return true; return true;
} }
EXPORT_SYMBOL(completion_done); EXPORT_SYMBOL(completion_done);
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 8250701ecfd7..714f5617fe1f 100644
--- a/kernel/sched/core.c --- a/kernel/sched/core.c
+++ b/kernel/sched/core.c +++ b/kernel/sched/core.c
@@ -7107,7 +7107,10 @@ void migrate_disable(void) @@ -7108,7 +7108,10 @@ void migrate_disable(void)
return; return;
} }
#ifdef CONFIG_SCHED_DEBUG #ifdef CONFIG_SCHED_DEBUG
@ -312,7 +335,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#endif #endif
if (p->migrate_disable) { if (p->migrate_disable) {
@@ -7137,7 +7140,10 @@ void migrate_enable(void) @@ -7138,7 +7141,10 @@ void migrate_enable(void)
} }
#ifdef CONFIG_SCHED_DEBUG #ifdef CONFIG_SCHED_DEBUG
@ -324,9 +347,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#endif #endif
WARN_ON_ONCE(p->migrate_disable <= 0); WARN_ON_ONCE(p->migrate_disable <= 0);
diff --git a/kernel/sched/swait.c b/kernel/sched/swait.c
index 66b59ac77c22..c7cb30cdd1b7 100644
--- a/kernel/sched/swait.c --- a/kernel/sched/swait.c
+++ b/kernel/sched/swait.c +++ b/kernel/sched/swait.c
@@ -32,6 +32,25 @@ void swake_up_locked(struct swait_queue_ @@ -32,6 +32,25 @@ void swake_up_locked(struct swait_queue_head *q)
} }
EXPORT_SYMBOL(swake_up_locked); EXPORT_SYMBOL(swake_up_locked);
@ -352,7 +377,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
void swake_up_one(struct swait_queue_head *q) void swake_up_one(struct swait_queue_head *q)
{ {
unsigned long flags; unsigned long flags;
@@ -69,7 +88,7 @@ void swake_up_all(struct swait_queue_hea @@ -69,7 +88,7 @@ void swake_up_all(struct swait_queue_head *q)
} }
EXPORT_SYMBOL(swake_up_all); EXPORT_SYMBOL(swake_up_all);
@ -361,3 +386,6 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
{ {
wait->task = current; wait->task = current;
if (list_empty(&wait->task_list)) if (list_empty(&wait->task_list))
--
2.20.1

View File

@ -1,7 +1,8 @@
From afe56dc247199dfab44e763d2b7d384b8a27a028 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Mon, 16 Feb 2015 18:49:10 +0100 Date: Mon, 16 Feb 2015 18:49:10 +0100
Subject: fs/aio: simple simple work Subject: [PATCH 098/266] fs/aio: simple simple work
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
|BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:768 |BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:768
|in_atomic(): 1, irqs_disabled(): 0, pid: 26, name: rcuos/2 |in_atomic(): 1, irqs_disabled(): 0, pid: 26, name: rcuos/2
@ -25,9 +26,11 @@ Reported-By: Mike Galbraith <umgwanakikbuti@gmail.com>
Suggested-by: Benjamin LaHaise <bcrl@kvack.org> Suggested-by: Benjamin LaHaise <bcrl@kvack.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
fs/aio.c | 15 +++++++++++++-- fs/aio.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-) 1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/fs/aio.c b/fs/aio.c
index 45d5ef8dd0a8..7db10b87c9bc 100644
--- a/fs/aio.c --- a/fs/aio.c
+++ b/fs/aio.c +++ b/fs/aio.c
@@ -42,6 +42,7 @@ @@ -42,6 +42,7 @@
@ -54,7 +57,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
aio_mnt = kern_mount(&aio_fs); aio_mnt = kern_mount(&aio_fs);
if (IS_ERR(aio_mnt)) if (IS_ERR(aio_mnt))
panic("Failed to create aio fs mount."); panic("Failed to create aio fs mount.");
@@ -596,9 +599,9 @@ static void free_ioctx_reqs(struct percp @@ -596,9 +599,9 @@ static void free_ioctx_reqs(struct percpu_ref *ref)
* and ctx->users has dropped to 0, so we know no more kiocbs can be submitted - * and ctx->users has dropped to 0, so we know no more kiocbs can be submitted -
* now it's safe to cancel any that need to be. * now it's safe to cancel any that need to be.
*/ */
@ -66,7 +69,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
struct aio_kiocb *req; struct aio_kiocb *req;
spin_lock_irq(&ctx->ctx_lock); spin_lock_irq(&ctx->ctx_lock);
@@ -616,6 +619,14 @@ static void free_ioctx_users(struct perc @@ -616,6 +619,14 @@ static void free_ioctx_users(struct percpu_ref *ref)
percpu_ref_put(&ctx->reqs); percpu_ref_put(&ctx->reqs);
} }
@ -81,3 +84,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
static int ioctx_add_table(struct kioctx *ctx, struct mm_struct *mm) static int ioctx_add_table(struct kioctx *ctx, struct mm_struct *mm)
{ {
unsigned i, new_nr; unsigned i, new_nr;
--
2.20.1

View File

@ -1,7 +1,9 @@
From 2241ac7c8cc88110d42529596fd90f272387fd00 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Wed, 21 Aug 2013 17:48:46 +0200 Date: Wed, 21 Aug 2013 17:48:46 +0200
Subject: genirq: Do not invoke the affinity callback via a workqueue on RT Subject: [PATCH 099/266] genirq: Do not invoke the affinity callback via a
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz workqueue on RT
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
Joe Korty reported, that __irq_set_affinity_locked() schedules a Joe Korty reported, that __irq_set_affinity_locked() schedules a
workqueue while holding a rawlock which results in a might_sleep() workqueue while holding a rawlock which results in a might_sleep()
@ -10,10 +12,12 @@ This patch uses swork_queue() instead.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
include/linux/interrupt.h | 6 ++++++ include/linux/interrupt.h | 6 ++++++
kernel/irq/manage.c | 43 ++++++++++++++++++++++++++++++++++++++++--- kernel/irq/manage.c | 43 ++++++++++++++++++++++++++++++++++++---
2 files changed, 46 insertions(+), 3 deletions(-) 2 files changed, 46 insertions(+), 3 deletions(-)
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 315f852b4981..a943c07b54ba 100644
--- a/include/linux/interrupt.h --- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h +++ b/include/linux/interrupt.h
@@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
@ -44,9 +48,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
void (*notify)(struct irq_affinity_notify *, const cpumask_t *mask); void (*notify)(struct irq_affinity_notify *, const cpumask_t *mask);
void (*release)(struct kref *ref); void (*release)(struct kref *ref);
}; };
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 94a18cf54293..d2270f61d335 100644
--- a/kernel/irq/manage.c --- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c +++ b/kernel/irq/manage.c
@@ -259,7 +259,12 @@ int irq_set_affinity_locked(struct irq_d @@ -259,7 +259,12 @@ int irq_set_affinity_locked(struct irq_data *data, const struct cpumask *mask,
if (desc->affinity_notify) { if (desc->affinity_notify) {
kref_get(&desc->affinity_notify->kref); kref_get(&desc->affinity_notify->kref);
@ -59,7 +65,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
irqd_set(data, IRQD_AFFINITY_SET); irqd_set(data, IRQD_AFFINITY_SET);
@@ -297,10 +302,8 @@ int irq_set_affinity_hint(unsigned int i @@ -297,10 +302,8 @@ int irq_set_affinity_hint(unsigned int irq, const struct cpumask *m)
} }
EXPORT_SYMBOL_GPL(irq_set_affinity_hint); EXPORT_SYMBOL_GPL(irq_set_affinity_hint);
@ -71,7 +77,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
struct irq_desc *desc = irq_to_desc(notify->irq); struct irq_desc *desc = irq_to_desc(notify->irq);
cpumask_var_t cpumask; cpumask_var_t cpumask;
unsigned long flags; unsigned long flags;
@@ -322,6 +325,35 @@ static void irq_affinity_notify(struct w @@ -322,6 +325,35 @@ static void irq_affinity_notify(struct work_struct *work)
kref_put(&notify->kref, notify->release); kref_put(&notify->kref, notify->release);
} }
@ -107,7 +113,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
/** /**
* irq_set_affinity_notifier - control notification of IRQ affinity changes * irq_set_affinity_notifier - control notification of IRQ affinity changes
* @irq: Interrupt for which to enable/disable notification * @irq: Interrupt for which to enable/disable notification
@@ -350,7 +382,12 @@ irq_set_affinity_notifier(unsigned int i @@ -350,7 +382,12 @@ irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify)
if (notify) { if (notify) {
notify->irq = irq; notify->irq = irq;
kref_init(&notify->kref); kref_init(&notify->kref);
@ -120,3 +126,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
} }
raw_spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
--
2.20.1

View File

@ -1,19 +1,23 @@
From d14b54f5a857ad006ce9a339e8ddea5b0580db2b Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Wed, 15 Nov 2017 17:29:51 +0100 Date: Wed, 15 Nov 2017 17:29:51 +0100
Subject: [PATCH] time/hrtimer: avoid schedule_work() with interrupts disabled Subject: [PATCH 100/266] time/hrtimer: avoid schedule_work() with interrupts
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.25-rt16.tar.xz disabled
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.31-rt18.tar.xz
The NOHZ code tries to schedule a workqueue with interrupts disabled. The NOHZ code tries to schedule a workqueue with interrupts disabled.
Since this does not work -RT I am switching it to swork instead. Since this does not work -RT I am switching it to swork instead.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
--- ---
kernel/time/timer.c | 15 +++++++++++---- kernel/time/timer.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-) 1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index bbe24e241643..696e7583137c 100644
--- a/kernel/time/timer.c --- a/kernel/time/timer.c
+++ b/kernel/time/timer.c +++ b/kernel/time/timer.c
@@ -217,8 +217,7 @@ static DEFINE_PER_CPU(struct timer_base, @@ -217,8 +217,7 @@ static DEFINE_PER_CPU(struct timer_base, timer_bases[NR_BASES]);
static DEFINE_STATIC_KEY_FALSE(timers_nohz_active); static DEFINE_STATIC_KEY_FALSE(timers_nohz_active);
static DEFINE_MUTEX(timer_keys_mutex); static DEFINE_MUTEX(timer_keys_mutex);
@ -23,7 +27,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
unsigned int sysctl_timer_migration = 1; unsigned int sysctl_timer_migration = 1;
@@ -236,7 +235,7 @@ static void timers_update_migration(void @@ -236,7 +235,7 @@ static void timers_update_migration(void)
static inline void timers_update_migration(void) { } static inline void timers_update_migration(void) { }
#endif /* !CONFIG_SMP */ #endif /* !CONFIG_SMP */
@ -32,7 +36,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
{ {
mutex_lock(&timer_keys_mutex); mutex_lock(&timer_keys_mutex);
timers_update_migration(); timers_update_migration();
@@ -246,9 +245,17 @@ static void timer_update_keys(struct wor @@ -246,9 +245,17 @@ static void timer_update_keys(struct work_struct *work)
void timers_update_nohz(void) void timers_update_nohz(void)
{ {
@ -51,3 +55,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
int timer_migration_handler(struct ctl_table *table, int write, int timer_migration_handler(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, void __user *buffer, size_t *lenp,
loff_t *ppos) loff_t *ppos)
--
2.20.1

Some files were not shown because too many files have changed in this diff Show More