+ i386-introduce-the-mechanism-of-disabling-cpu-hotplug-control-cleanup.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     change the 'no_control' field to 'hotpluggable' in the struct cpu
has been added to the -mm tree.  Its filename is
     i386-introduce-the-mechanism-of-disabling-cpu-hotplug-control-cleanup.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: change the 'no_control' field to 'hotpluggable' in the struct cpu
From: "Siddha, Suresh B" <suresh.b.siddha@xxxxxxxxx>

Change the 'no_control' field in the cpu struct to a more positive
and better term 'hotpluggable'. And change(/cleanup) the logic accordingly.

Signed-off-by: Suresh Siddha <suresh.b.siddha@xxxxxxxxx>
Cc: Andi Kleen <ak@xxxxxxx>
Cc: "Li, Shaohua" <shaohua.li@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 arch/i386/kernel/topology.c |    4 ++--
 arch/ia64/kernel/topology.c |    8 ++++----
 arch/powerpc/kernel/sysfs.c |    8 ++++----
 drivers/base/cpu.c          |    6 +++---
 include/linux/cpu.h         |    2 +-
 5 files changed, 14 insertions(+), 14 deletions(-)

diff -puN arch/i386/kernel/topology.c~i386-introduce-the-mechanism-of-disabling-cpu-hotplug-control-cleanup arch/i386/kernel/topology.c
--- a/arch/i386/kernel/topology.c~i386-introduce-the-mechanism-of-disabling-cpu-hotplug-control-cleanup
+++ a/arch/i386/kernel/topology.c
@@ -44,8 +44,8 @@ int arch_register_cpu(int num)
 	 * Also certain PCI quirks require not to enable hotplug control
 	 * for all CPU's.
 	 */
-	if (!num || !enable_cpu_hotplug)
-		cpu_devices[num].cpu.no_control = 1;
+	if (num && enable_cpu_hotplug)
+		cpu_devices[num].cpu.hotpluggable = 1;
 
 	return register_cpu(&cpu_devices[num].cpu, num);
 }
diff -puN arch/ia64/kernel/topology.c~i386-introduce-the-mechanism-of-disabling-cpu-hotplug-control-cleanup arch/ia64/kernel/topology.c
--- a/arch/ia64/kernel/topology.c~i386-introduce-the-mechanism-of-disabling-cpu-hotplug-control-cleanup
+++ a/arch/ia64/kernel/topology.c
@@ -31,11 +31,11 @@ int arch_register_cpu(int num)
 {
 #if defined (CONFIG_ACPI) && defined (CONFIG_HOTPLUG_CPU)
 	/*
-	 * If CPEI cannot be re-targetted, and this is
-	 * CPEI target, then dont create the control file
+	 * If CPEI can be re-targetted or if this is not
+	 * CPEI target, then it is hotpluggable
 	 */
-	if (!can_cpei_retarget() && is_cpu_cpei_target(num))
-		sysfs_cpus[num].cpu.no_control = 1;
+	if (can_cpei_retarget() || !is_cpu_cpei_target(num))
+		sysfs_cpus[num].cpu.hotpluggable = 1;
 	map_cpu_to_node(num, node_cpuid[num].nid);
 #endif
 
diff -puN arch/powerpc/kernel/sysfs.c~i386-introduce-the-mechanism-of-disabling-cpu-hotplug-control-cleanup arch/powerpc/kernel/sysfs.c
--- a/arch/powerpc/kernel/sysfs.c~i386-introduce-the-mechanism-of-disabling-cpu-hotplug-control-cleanup
+++ a/arch/powerpc/kernel/sysfs.c
@@ -240,7 +240,7 @@ static void unregister_cpu_online(unsign
 	struct cpu *c = &per_cpu(cpu_devices, cpu);
 	struct sys_device *s = &c->sysdev;
 
-	BUG_ON(c->no_control);
+	BUG_ON(!c->hotpluggable);
 
 #ifndef CONFIG_PPC_ISERIES
 	if (cpu_has_feature(CPU_FTR_SMT))
@@ -426,10 +426,10 @@ static int __init topology_init(void)
 		 * CPU.  For instance, the boot cpu might never be valid
 		 * for hotplugging.
 		 */
-		if (!ppc_md.cpu_die)
-			c->no_control = 1;
+		if (ppc_md.cpu_die)
+			c->hotpluggable = 1;
 
-		if (cpu_online(cpu) || (c->no_control == 0)) {
+		if (cpu_online(cpu) || c->hotpluggable) {
 			register_cpu(c, cpu);
 
 			sysdev_create_file(&c->sysdev, &attr_physical_id);
diff -puN drivers/base/cpu.c~i386-introduce-the-mechanism-of-disabling-cpu-hotplug-control-cleanup drivers/base/cpu.c
--- a/drivers/base/cpu.c~i386-introduce-the-mechanism-of-disabling-cpu-hotplug-control-cleanup
+++ a/drivers/base/cpu.c
@@ -103,8 +103,8 @@ static SYSDEV_ATTR(crash_notes, 0400, sh
 
 /*
  * register_cpu - Setup a driverfs device for a CPU.
- * @cpu - Callers can set the cpu->no_control field to 1, to indicate not to
- *		  generate a control file in sysfs for this CPU.
+ * @cpu - cpu->hotpluggable field set to 1 will generate a control file in
+ *	  sysfs for this CPU.
  * @num - CPU number to use when creating the device.
  *
  * Initialize and register the CPU device.
@@ -118,7 +118,7 @@ int __devinit register_cpu(struct cpu *c
 
 	error = sysdev_register(&cpu->sysdev);
 
-	if (!error && !cpu->no_control)
+	if (!error && cpu->hotpluggable)
 		register_cpu_control(cpu);
 	if (!error)
 		cpu_sys_devices[num] = &cpu->sysdev;
diff -puN include/linux/cpu.h~i386-introduce-the-mechanism-of-disabling-cpu-hotplug-control-cleanup include/linux/cpu.h
--- a/include/linux/cpu.h~i386-introduce-the-mechanism-of-disabling-cpu-hotplug-control-cleanup
+++ a/include/linux/cpu.h
@@ -27,7 +27,7 @@
 
 struct cpu {
 	int node_id;		/* The node which contains the CPU */
-	int no_control;		/* Should the sysfs control file be created? */
+	int hotpluggable;	/* creates sysfs control file if hotpluggable */
 	struct sys_device sysdev;
 };
 
_

Patches currently in -mm which might be from suresh.b.siddha@xxxxxxxxx are

i386-add-write_pci_config_byte-to-direct-pci-access-routines.patch
i386-introduce-the-mechanism-of-disabling-cpu-hotplug-control.patch
i386-introduce-the-mechanism-of-disabling-cpu-hotplug-control-cleanup.patch
x86_64-add-genapic_force.patch
fix-the-irqbalance-quirk-for-e7320-e7520-e7525.patch
suspend-dont-change-cpus_allowed-for-task-initiating-the-suspend.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux