valeriyvdovin / rpms / systemd

Forked from rpms/systemd 4 years ago
Clone

Blame SOURCES/0497-rules-move-cpu-hotplug-rule-to-separate-file.patch

803fb7
From 360d7eb0f8233d16557ef34a9e58055a67ea9b70 Mon Sep 17 00:00:00 2001
803fb7
From: Michal Sekletar <msekleta@redhat.com>
803fb7
Date: Mon, 12 Jun 2017 13:43:48 +0200
803fb7
Subject: [PATCH] rules: move cpu hotplug rule to separate file
803fb7
803fb7
In kdump initrd we don't want to automatically bring online all
803fb7
available CPUs. Hence, kdump maintainers can easily mask the rule by
803fb7
placing symlink to /dev/null with the same name in /etc/udev/rules.d
803fb7
803fb7
RHEL-only
803fb7
803fb7
Related: #1266322
803fb7
803fb7
[msekleta: note that this is just part of the fix for #1266322, in
803fb7
order to fix the bug it is necessary to actually mask the newly added
803fb7
rule when generating kdump initrd]
803fb7
---
803fb7
 Makefile.am                       | 1 +
803fb7
 rules/40-redhat-cpu-hotplug.rules | 4 ++++
803fb7
 rules/40-redhat.rules             | 3 ---
803fb7
 3 files changed, 5 insertions(+), 3 deletions(-)
803fb7
 create mode 100644 rules/40-redhat-cpu-hotplug.rules
803fb7
803fb7
diff --git a/Makefile.am b/Makefile.am
803fb7
index e9ceac98a..94fee02c5 100644
803fb7
--- a/Makefile.am
803fb7
+++ b/Makefile.am
803fb7
@@ -3511,6 +3511,7 @@ dist_udevrules_DATA += \
803fb7
 	rules/80-net-setup-link.rules \
803fb7
 	rules/95-udev-late.rules \
803fb7
 	rules/40-redhat.rules \
803fb7
+	rules/40-redhat-cpu-hotplug.rules \
803fb7
 	rules/73-idrac.rules \
803fb7
         rules/80-net-name-slot.rules
803fb7
 
803fb7
diff --git a/rules/40-redhat-cpu-hotplug.rules b/rules/40-redhat-cpu-hotplug.rules
803fb7
new file mode 100644
803fb7
index 000000000..bc5ddc841
803fb7
--- /dev/null
803fb7
+++ b/rules/40-redhat-cpu-hotplug.rules
803fb7
@@ -0,0 +1,4 @@
803fb7
+# do not edit this file, it will be overwritten on update
803fb7
+
803fb7
+# CPU hotadd request
803fb7
+SUBSYSTEM=="cpu", ACTION=="add", TEST=="online", ATTR{online}=="0", ATTR{online}="1"
803fb7
diff --git a/rules/40-redhat.rules b/rules/40-redhat.rules
803fb7
index 34a1df9c4..d04c7fc9a 100644
803fb7
--- a/rules/40-redhat.rules
803fb7
+++ b/rules/40-redhat.rules
803fb7
@@ -1,8 +1,5 @@
803fb7
 # do not edit this file, it will be overwritten on update
803fb7
 
803fb7
-# CPU hotadd request
803fb7
-SUBSYSTEM=="cpu", ACTION=="add", TEST=="online", ATTR{online}=="0", ATTR{online}="1"
803fb7
-
803fb7
 # Memory hotadd request
803fb7
 SUBSYSTEM=="memory", ACTION=="add", PROGRAM="/bin/uname -p", RESULT!="s390*", ATTR{state}=="offline", ATTR{state}="online"
803fb7