Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 943020 Details for
Bug 1145751
kvm_clock lacks protection against tsc going backwards
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
RHEL PATCH 1/2
0001-ACPI-hotplug-Add-demand_offline-hotplug-profile-flag.patch (text/plain), 4.29 KB, created by
Prarit Bhargava
on 2014-10-01 11:48:42 UTC
(
hide
)
Description:
RHEL PATCH 1/2
Filename:
MIME Type:
Creator:
Prarit Bhargava
Created:
2014-10-01 11:48:42 UTC
Size:
4.29 KB
patch
obsolete
>From e6125abad996586950db62de30b2521b53c300c4 Mon Sep 17 00:00:00 2001 >From: Prarit Bhargava <prarit@redhat.com> >Date: Mon, 15 Sep 2014 10:45:09 -0400 >Subject: [1/6] ACPI / hotplug: Add demand_offline hotplug profile flag > >Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1128634 > >commit d22ddcbc4fb7a483d0721eddfda3f0558821d372 >Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> >Date: Sun Dec 29 15:25:35 2013 +0100 > > ACPI / hotplug: Add demand_offline hotplug profile flag > > Add a new ACPI hotplug profile flag, demand_offline, such that if > set for the given ACPI device object's scan handler, it will cause > acpi_scan_hot_remove() to check if that device object's physical > companions are offline upfront and fail the hot removal if that > is not the case. > > That flag will be useful to overcome a problem with containers on > some system where they can only be hot-removed after some cleanup > operations carried out by user space, which needs to be notified > of the container hot-removal before the kernel attempts to offline > devices in the container. In those cases the current implementation > of acpi_scan_hot_remove() is not sufficient, because it first tries > to offline the devices in the container and only if that is > suffcessful it tries to offline the container itself. As a result, > the container hot-removal notification is not delivered to user space > at the right time. > > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> >--- > drivers/acpi/scan.c | 41 +++++++++++++++++++++++++++++++++++++---- > include/acpi/acpi_bus.h | 3 ++- > 2 files changed, 39 insertions(+), 5 deletions(-) > >diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c >index bc06fa8..4c8b2ee 100644 >--- a/drivers/acpi/scan.c >+++ b/drivers/acpi/scan.c >@@ -128,6 +128,24 @@ acpi_device_modalias_show(struct device *dev, struct device_attribute *attr, cha > } > static DEVICE_ATTR(modalias, 0444, acpi_device_modalias_show, NULL); > >+static bool acpi_scan_is_offline(struct acpi_device *adev) >+{ >+ struct acpi_device_physical_node *pn; >+ bool offline = true; >+ >+ mutex_lock(&adev->physical_node_lock); >+ >+ list_for_each_entry(pn, &adev->physical_node_list, node) >+ if (device_supports_offline(pn->dev) && !pn->dev->offline) { >+ kobject_uevent(&pn->dev->kobj, KOBJ_CHANGE); >+ offline = false; >+ break; >+ } >+ >+ mutex_unlock(&adev->physical_node_lock); >+ return offline; >+} >+ > static acpi_status acpi_bus_offline(acpi_handle handle, u32 lvl, void *data, > void **ret_p) > { >@@ -198,12 +216,11 @@ static acpi_status acpi_bus_online(acpi_handle handle, u32 lvl, void *data, > return AE_OK; > } > >-static int acpi_scan_hot_remove(struct acpi_device *device) >+static int acpi_scan_try_to_offline(struct acpi_device *device) > { > acpi_handle handle = device->handle; >- struct device *errdev; >+ struct device *errdev = NULL; > acpi_status status; >- unsigned long long sta; > > /* > * Carry out two passes here and ignore errors in the first pass, >@@ -214,7 +231,6 @@ static int acpi_scan_hot_remove(struct acpi_device *device) > * > * If the first pass is successful, the second one isn't needed, though. > */ >- errdev = NULL; > status = acpi_walk_namespace(ACPI_TYPE_ANY, handle, ACPI_UINT32_MAX, > NULL, acpi_bus_offline, (void *)false, > (void **)&errdev); >@@ -243,6 +259,23 @@ static int acpi_scan_hot_remove(struct acpi_device *device) > return -EBUSY; > } > } >+ return 0; >+} >+ >+static int acpi_scan_hot_remove(struct acpi_device *device) >+{ >+ acpi_handle handle = device->handle; >+ unsigned long long sta; >+ acpi_status status; >+ >+ if (device->handler->hotplug.demand_offline && !acpi_force_hot_remove) { >+ if (!acpi_scan_is_offline(device)) >+ return -EBUSY; >+ } else { >+ int error = acpi_scan_try_to_offline(device); >+ if (error) >+ return error; >+ } > > ACPI_DEBUG_PRINT((ACPI_DB_INFO, > "Hot-removing device %s...\n", dev_name(&device->dev))); >diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h >index 18e26a4..d983651 100644 >--- a/include/acpi/acpi_bus.h >+++ b/include/acpi/acpi_bus.h >@@ -93,8 +93,9 @@ struct acpi_device; > > struct acpi_hotplug_profile { > struct kobject kobj; >- bool enabled:1; > int (*scan_dependent)(struct acpi_device *adev); >+ bool enabled:1; >+ bool demand_offline:1; > }; > > static inline struct acpi_hotplug_profile *to_acpi_hotplug_profile( >-- >1.7.9.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1145751
:
941540
|
941541
|
941542
|
941543
|
941544
|
941545
| 943020 |
943021
|
943022
|
943023
|
943024
|
943025
|
975178
|
975179