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 710781 Details for
Bug 903360
ACPI device nodes lookup for the PCI bus type bug
[?]
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]
correct patch
PCI-ACPI-Rework-ACPI-device-nodes-lookup-for-the-PCI-bus-type.patch (text/plain), 2.47 KB, created by
Gary Gatling
on 2013-03-15 18:05:04 UTC
(
hide
)
Description:
correct patch
Filename:
MIME Type:
Creator:
Gary Gatling
Created:
2013-03-15 18:05:04 UTC
Size:
2.47 KB
patch
obsolete
>From 33f767d767e9a684e9cd60704d4c049a2014c8d5 Mon Sep 17 00:00:00 2001 >From: Rafael J. Wysocki <rafael.j.wysocki@intel.com> >Date: Thu, 10 Jan 2013 12:13:49 +0000 >Subject: ACPI: Rework acpi_get_child() to be more efficient > >Observe that acpi_get_child() doesn't need to use the helper >struct acpi_find_child structure and change it to work without it. >Also, using acpi_get_object_info() to get the output of _ADR for the >given device is overkill, because that function does much more than >just evaluating _ADR (let alone the additional memory allocation >done by it). > >Moreover, acpi_get_child() doesn't need to loop any more once it has >found a matching handle, so make it stop in that case. To prevent >the results from changing, make it use do_acpi_find_child() as >a post-order callback. > >Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> >--- >diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c >index 35da181..e9e486f 100644 >--- a/drivers/acpi/glue.c >+++ b/drivers/acpi/glue.c >@@ -95,40 +95,31 @@ static int acpi_find_bridge_device(struct device *dev, acpi_handle * handle) > return ret; > } > >-/* Get device's handler per its address under its parent */ >-struct acpi_find_child { >- acpi_handle handle; >- u64 address; >-}; >- >-static acpi_status >-do_acpi_find_child(acpi_handle handle, u32 lvl, void *context, void **rv) >+static acpi_status do_acpi_find_child(acpi_handle handle, u32 lvl_not_used, >+ void *addr_p, void **ret_p) > { >+ unsigned long long addr; > acpi_status status; >- struct acpi_device_info *info; >- struct acpi_find_child *find = context; >- >- status = acpi_get_object_info(handle, &info); >- if (ACPI_SUCCESS(status)) { >- if ((info->address == find->address) >- && (info->valid & ACPI_VALID_ADR)) >- find->handle = handle; >- kfree(info); >+ >+ status = acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL, &addr); >+ if (ACPI_SUCCESS(status) && addr == *((u64 *)addr_p)) { >+ *ret_p = handle; >+ return AE_CTRL_TERMINATE; > } > return AE_OK; > } > > acpi_handle acpi_get_child(acpi_handle parent, u64 address) > { >- struct acpi_find_child find = { NULL, address }; >+ void *ret = NULL; > > if (!parent) > return NULL; >- acpi_walk_namespace(ACPI_TYPE_DEVICE, parent, >- 1, do_acpi_find_child, NULL, &find, NULL); >- return find.handle; >-} > >+ acpi_walk_namespace(ACPI_TYPE_DEVICE, parent, 1, NULL, >+ do_acpi_find_child, &address, &ret); >+ return (acpi_handle)ret; >+} > EXPORT_SYMBOL(acpi_get_child); > > static int acpi_bind_one(struct device *dev, acpi_handle handle) >-- >cgit v0.9.1
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 903360
:
686239
|
707591
| 710781