|
36 | 36 | #include <linux/io-64-nonatomic-lo-hi.h>
|
37 | 37 |
|
38 | 38 | #include "acpica/accommon.h"
|
39 |
| -#include "acpica/acnamesp.h" |
40 | 39 | #include "internal.h"
|
41 | 40 |
|
42 | 41 | /* Definitions for ACPI_DEBUG_PRINT() */
|
@@ -1496,91 +1495,6 @@ int acpi_check_region(resource_size_t start, resource_size_t n,
|
1496 | 1495 | }
|
1497 | 1496 | EXPORT_SYMBOL(acpi_check_region);
|
1498 | 1497 |
|
1499 |
| -static acpi_status acpi_deactivate_mem_region(acpi_handle handle, u32 level, |
1500 |
| - void *_res, void **return_value) |
1501 |
| -{ |
1502 |
| - struct acpi_mem_space_context **mem_ctx; |
1503 |
| - union acpi_operand_object *handler_obj; |
1504 |
| - union acpi_operand_object *region_obj2; |
1505 |
| - union acpi_operand_object *region_obj; |
1506 |
| - struct resource *res = _res; |
1507 |
| - acpi_status status; |
1508 |
| - |
1509 |
| - region_obj = acpi_ns_get_attached_object(handle); |
1510 |
| - if (!region_obj) |
1511 |
| - return AE_OK; |
1512 |
| - |
1513 |
| - handler_obj = region_obj->region.handler; |
1514 |
| - if (!handler_obj) |
1515 |
| - return AE_OK; |
1516 |
| - |
1517 |
| - if (region_obj->region.space_id != ACPI_ADR_SPACE_SYSTEM_MEMORY) |
1518 |
| - return AE_OK; |
1519 |
| - |
1520 |
| - if (!(region_obj->region.flags & AOPOBJ_SETUP_COMPLETE)) |
1521 |
| - return AE_OK; |
1522 |
| - |
1523 |
| - region_obj2 = acpi_ns_get_secondary_object(region_obj); |
1524 |
| - if (!region_obj2) |
1525 |
| - return AE_OK; |
1526 |
| - |
1527 |
| - mem_ctx = (void *)®ion_obj2->extra.region_context; |
1528 |
| - |
1529 |
| - if (!(mem_ctx[0]->address >= res->start && |
1530 |
| - mem_ctx[0]->address < res->end)) |
1531 |
| - return AE_OK; |
1532 |
| - |
1533 |
| - status = handler_obj->address_space.setup(region_obj, |
1534 |
| - ACPI_REGION_DEACTIVATE, |
1535 |
| - NULL, (void **)mem_ctx); |
1536 |
| - if (ACPI_SUCCESS(status)) |
1537 |
| - region_obj->region.flags &= ~(AOPOBJ_SETUP_COMPLETE); |
1538 |
| - |
1539 |
| - return status; |
1540 |
| -} |
1541 |
| - |
1542 |
| -/** |
1543 |
| - * acpi_release_memory - Release any mappings done to a memory region |
1544 |
| - * @handle: Handle to namespace node |
1545 |
| - * @res: Memory resource |
1546 |
| - * @level: A level that terminates the search |
1547 |
| - * |
1548 |
| - * Walks through @handle and unmaps all SystemMemory Operation Regions that |
1549 |
| - * overlap with @res and that have already been activated (mapped). |
1550 |
| - * |
1551 |
| - * This is a helper that allows drivers to place special requirements on memory |
1552 |
| - * region that may overlap with operation regions, primarily allowing them to |
1553 |
| - * safely map the region as non-cached memory. |
1554 |
| - * |
1555 |
| - * The unmapped Operation Regions will be automatically remapped next time they |
1556 |
| - * are called, so the drivers do not need to do anything else. |
1557 |
| - */ |
1558 |
| -acpi_status acpi_release_memory(acpi_handle handle, struct resource *res, |
1559 |
| - u32 level) |
1560 |
| -{ |
1561 |
| - acpi_status status; |
1562 |
| - |
1563 |
| - if (!(res->flags & IORESOURCE_MEM)) |
1564 |
| - return AE_TYPE; |
1565 |
| - |
1566 |
| - status = acpi_walk_namespace(ACPI_TYPE_REGION, handle, level, |
1567 |
| - acpi_deactivate_mem_region, NULL, |
1568 |
| - res, NULL); |
1569 |
| - if (ACPI_FAILURE(status)) |
1570 |
| - return status; |
1571 |
| - |
1572 |
| - /* |
1573 |
| - * Wait for all of the mappings queued up for removal by |
1574 |
| - * acpi_deactivate_mem_region() to actually go away. |
1575 |
| - */ |
1576 |
| - synchronize_rcu(); |
1577 |
| - rcu_barrier(); |
1578 |
| - flush_scheduled_work(); |
1579 |
| - |
1580 |
| - return AE_OK; |
1581 |
| -} |
1582 |
| -EXPORT_SYMBOL_GPL(acpi_release_memory); |
1583 |
| - |
1584 | 1498 | /*
|
1585 | 1499 | * Let drivers know whether the resource checks are effective
|
1586 | 1500 | */
|
|
0 commit comments