lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <DE8DF0795D48FD4CA783C40EC8292335970B@SHSMSX101.ccr.corp.intel.com>
Date:	Fri, 23 Dec 2011 10:29:35 +0000
From:	"Liu, Jinsong" <jinsong.liu@...el.com>
To:	"konrad.wilk@...cle.com" <konrad.wilk@...cle.com>
CC:	"Jiang, Yunhong" <yunhong.jiang@...el.com>,
	"jeremy.fitzhardinge@...rix.com" <jeremy.fitzhardinge@...rix.com>,
	"Shan, Haitao" <haitao.shan@...el.com>,
	"Zhao, Yakui" <yakui.zhao@...el.com>,
	"Brown, Len" <len.brown@...el.com>,
	"Luck, Tony" <tony.luck@...el.com>,
	"Kleen, Andi" <andi.kleen@...el.com>,
	"xen-devel@...ts.xensource.com" <xen-devel@...ts.xensource.com>,
	Kernel development list <linux-kernel@...r.kernel.org>
Subject: [PATCH 07/10] xen/acpi: Prepare for cpu hotplug

>From 0dad15c02d033d6be7e9447fbe5f645d97badc24 Mon Sep 17 00:00:00 2001
From: Liu Jinsong <jinsong.liu@...el.com>
Date: Tue, 13 Dec 2011 21:14:45 +0800
Subject: [PATCH 07/10] xen/acpi: Prepare for cpu hotplug

This patch rebased from Jeremy's pvops commit
68320323a51c2378aca433c76157d9e66104ff1e

It does some prepare work for cpu hotplug

Signed-off-by: Liu, Jinsong <jinsong.liu@...el.com>
Signed-off-by: Jiang, Yunhong <yunhong.jiang@...el.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>
---
 drivers/acpi/processor_xen.c |   37 +++++++++++++++++++++++++++++++++++++
 1 files changed, 37 insertions(+), 0 deletions(-)

diff --git a/drivers/acpi/processor_xen.c b/drivers/acpi/processor_xen.c
index 029e10c..38a1c05 100644
--- a/drivers/acpi/processor_xen.c
+++ b/drivers/acpi/processor_xen.c
@@ -19,6 +19,7 @@
 #include <acpi/acpi_drivers.h>
 #include <acpi/processor.h>
 #include <xen/acpi.h>
+#include <xen/pcpu.h>
 
 #define PREFIX "ACPI: "
 
@@ -54,6 +55,42 @@ struct acpi_driver xen_acpi_processor_driver = {
 		},
 };
 
+static int is_processor_present(acpi_handle handle)
+{
+	acpi_status status;
+	unsigned long long sta = 0;
+
+
+	status = acpi_evaluate_integer(handle, "_STA", NULL, &sta);
+
+	if (ACPI_SUCCESS(status) && (sta & ACPI_STA_DEVICE_PRESENT))
+		return 1;
+
+	/*
+	 * _STA is mandatory for a processor that supports hot plug
+	 */
+	if (status == AE_NOT_FOUND)
+		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
+				"Processor does not support hot plug\n"));
+	else
+		ACPI_EXCEPTION((AE_INFO, status,
+				"Processor Device is not present"));
+	return 0;
+}
+
+static acpi_status
+xen_acpi_processor_hotadd_init(struct acpi_processor *pr, int *p_cpu)
+{
+	if (!is_processor_present(pr->handle))
+		return AE_ERROR;
+
+	if (processor_cntl_xen_notify(pr,
+				PROCESSOR_HOTPLUG, HOTPLUG_TYPE_ADD))
+		return AE_ERROR;
+
+	return AE_OK;
+}
+
 #ifdef CONFIG_CPU_FREQ
 /*
  * Existing ACPI module does parse performance states at some point,
-- 
1.6.5.6

Download attachment "0007-xen-acpi-Prepare-for-cpu-hotplug.patch" of type "application/octet-stream" (1986 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ