Commit feb2d38
ACPI: APEI: GHES: Extract helper functions for error status handling
Refactors the GHES driver by extracting common functionality into
reusable helper functions:
1. ghes_has_active_errors() - Checks if any error sources in a given list
have active errors
2. ghes_map_error_status() - Maps error status address to virtual address
3. ghes_unmap_error_status() - Unmaps error status virtual address
4. Use `guard(rcu)()` instead of explicit `rcu_read_lock()`/`rcu_read_unlock()`.
These helpers eliminate code duplication in the NMI path and prepare for
similar usage in the SEA path in a subsequent patch.
No functional change intended.
Tested-by: Tony Luck <tony.luck@intel.com>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Shuai Xue <xueshuai@linux.alibaba.com>
Reviewed-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Hanjun Guo <guohanjun@huawei.com>
Link: https://patch.msgid.link/20260112032239.30023-3-xueshuai@linux.alibaba.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>1 parent f2edc1f commit feb2d38
1 file changed
Lines changed: 68 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1434 | 1434 | | |
1435 | 1435 | | |
1436 | 1436 | | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
1437 | 1502 | | |
1438 | 1503 | | |
1439 | 1504 | | |
| |||
1484 | 1549 | | |
1485 | 1550 | | |
1486 | 1551 | | |
1487 | | - | |
1488 | 1552 | | |
1489 | | - | |
1490 | 1553 | | |
1491 | | - | |
1492 | | - | |
1493 | | - | |
1494 | | - | |
1495 | | - | |
1496 | | - | |
1497 | | - | |
1498 | | - | |
1499 | | - | |
1500 | | - | |
| 1554 | + | |
1501 | 1555 | | |
1502 | 1556 | | |
1503 | 1557 | | |
| |||
1514 | 1568 | | |
1515 | 1569 | | |
1516 | 1570 | | |
1517 | | - | |
1518 | | - | |
1519 | 1571 | | |
1520 | 1572 | | |
1521 | | - | |
| 1573 | + | |
1522 | 1574 | | |
1523 | 1575 | | |
1524 | 1576 | | |
1525 | | - | |
1526 | | - | |
1527 | | - | |
1528 | | - | |
1529 | 1577 | | |
1530 | 1578 | | |
1531 | 1579 | | |
| |||
1543 | 1591 | | |
1544 | 1592 | | |
1545 | 1593 | | |
1546 | | - | |
1547 | | - | |
| 1594 | + | |
1548 | 1595 | | |
1549 | 1596 | | |
1550 | 1597 | | |
| |||
0 commit comments