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