Commit efb0c9c
perf/x86/intel/uncore: Factor out common MMIO init and ops functions
Some uncore PMON registers are located in the MMIO space. For the client
machine, the MMIO space is usually located at D0:F0 but in a different
BAR. For example, some uncore PMON registers are located in the SAF BAR,
not the MCHBAR in the Lunar Lake.
The current __uncore_imc_init_box() hard code the BAR information.
Factor out the uncore_get_box_mmio_addr() which uses the BAR information
as a parameter.
The only change is the error output message. The hardcode name 'MCHBAR'
is replaced by the offset of a BAR.
Add a new macro, MMIO_UNCORE_COMMON_OPS(), since the MMIO ops functions
are usually the same among different generations.
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20240731141353.759643-2-kan.liang@linux.intel.com1 parent e0f49f1 commit efb0c9c
1 file changed
Lines changed: 30 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1481 | 1481 | | |
1482 | 1482 | | |
1483 | 1483 | | |
1484 | | - | |
1485 | | - | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
1486 | 1488 | | |
1487 | 1489 | | |
1488 | 1490 | | |
1489 | 1491 | | |
1490 | 1492 | | |
1491 | | - | |
| 1493 | + | |
1492 | 1494 | | |
1493 | 1495 | | |
1494 | 1496 | | |
1495 | 1497 | | |
1496 | 1498 | | |
1497 | 1499 | | |
1498 | | - | |
1499 | | - | |
1500 | | - | |
1501 | | - | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
1502 | 1504 | | |
1503 | 1505 | | |
1504 | 1506 | | |
1505 | | - | |
1506 | | - | |
| 1507 | + | |
| 1508 | + | |
1507 | 1509 | | |
1508 | 1510 | | |
1509 | | - | |
1510 | | - | |
| 1511 | + | |
| 1512 | + | |
1511 | 1513 | | |
1512 | 1514 | | |
1513 | 1515 | | |
| |||
1518 | 1520 | | |
1519 | 1521 | | |
1520 | 1522 | | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
1521 | 1531 | | |
1522 | 1532 | | |
1523 | 1533 | | |
| |||
1612 | 1622 | | |
1613 | 1623 | | |
1614 | 1624 | | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
1615 | 1633 | | |
1616 | 1634 | | |
1617 | | - | |
1618 | | - | |
1619 | | - | |
1620 | | - | |
1621 | | - | |
1622 | | - | |
| 1635 | + | |
1623 | 1636 | | |
1624 | 1637 | | |
1625 | 1638 | | |
| |||
0 commit comments