Commit 650680d
x86/resctrl: Change mon_event_config_{read,write}() to be arch helpers
mon_event_config_{read,write}() are called via IPI and access model specific
registers to do their work.
To support another architecture, this needs abstracting.
Rename mon_event_config_{read,write}() to have a "resctrl_arch_" prefix, and
move their struct mon_config_info parameter into <linux/resctrl.h>. This
allows another architecture to supply an implementation of these.
As struct mon_config_info is now exposed globally, give it a 'resctrl_'
prefix. MPAM systems need access to the domain to do this work, add the
resource and domain to struct resctrl_mon_config_info.
Co-developed-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Reviewed-by: Fenghua Yu <fenghuay@nvidia.com>
Reviewed-by: Babu Moger <babu.moger@amd.com>
Tested-by: Carl Worth <carl@os.amperecomputing.com> # arm64
Tested-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Tested-by: Peter Newman <peternewman@google.com>
Tested-by: Amit Singh Tomar <amitsinght@marvell.com> # arm64
Tested-by: Shanker Donthineni <sdonthineni@nvidia.com> # arm64
Tested-by: Babu Moger <babu.moger@amd.com>
Link: https://lore.kernel.org/r/20250311183715.16445-21-james.morse@arm.com1 parent d81826f commit 650680d
2 files changed
Lines changed: 54 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1580 | 1580 | | |
1581 | 1581 | | |
1582 | 1582 | | |
1583 | | - | |
1584 | | - | |
1585 | | - | |
1586 | | - | |
1587 | | - | |
1588 | 1583 | | |
1589 | 1584 | | |
1590 | 1585 | | |
| |||
1609 | 1604 | | |
1610 | 1605 | | |
1611 | 1606 | | |
1612 | | - | |
| 1607 | + | |
1613 | 1608 | | |
1614 | | - | |
| 1609 | + | |
1615 | 1610 | | |
1616 | 1611 | | |
1617 | 1612 | | |
1618 | | - | |
| 1613 | + | |
1619 | 1614 | | |
1620 | | - | |
| 1615 | + | |
1621 | 1616 | | |
1622 | 1617 | | |
1623 | 1618 | | |
1624 | 1619 | | |
1625 | 1620 | | |
1626 | | - | |
| 1621 | + | |
1627 | 1622 | | |
1628 | 1623 | | |
1629 | | - | |
| 1624 | + | |
1630 | 1625 | | |
1631 | | - | |
| 1626 | + | |
| 1627 | + | |
1632 | 1628 | | |
1633 | 1629 | | |
1634 | 1630 | | |
1635 | 1631 | | |
1636 | | - | |
| 1632 | + | |
1637 | 1633 | | |
1638 | 1634 | | |
1639 | 1635 | | |
| |||
1644 | 1640 | | |
1645 | 1641 | | |
1646 | 1642 | | |
1647 | | - | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
1648 | 1646 | | |
1649 | | - | |
| 1647 | + | |
1650 | 1648 | | |
1651 | 1649 | | |
1652 | 1650 | | |
| |||
1679 | 1677 | | |
1680 | 1678 | | |
1681 | 1679 | | |
1682 | | - | |
| 1680 | + | |
1683 | 1681 | | |
1684 | | - | |
| 1682 | + | |
1685 | 1683 | | |
1686 | 1684 | | |
1687 | | - | |
| 1685 | + | |
1688 | 1686 | | |
1689 | | - | |
| 1687 | + | |
1690 | 1688 | | |
1691 | 1689 | | |
1692 | | - | |
| 1690 | + | |
1693 | 1691 | | |
1694 | 1692 | | |
1695 | 1693 | | |
1696 | 1694 | | |
1697 | 1695 | | |
1698 | | - | |
| 1696 | + | |
1699 | 1697 | | |
1700 | 1698 | | |
1701 | 1699 | | |
1702 | 1700 | | |
1703 | 1701 | | |
| 1702 | + | |
| 1703 | + | |
1704 | 1704 | | |
1705 | | - | |
| 1705 | + | |
1706 | 1706 | | |
1707 | 1707 | | |
1708 | 1708 | | |
| |||
1714 | 1714 | | |
1715 | 1715 | | |
1716 | 1716 | | |
1717 | | - | |
| 1717 | + | |
1718 | 1718 | | |
1719 | 1719 | | |
1720 | 1720 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
273 | 280 | | |
274 | 281 | | |
275 | 282 | | |
| |||
311 | 318 | | |
312 | 319 | | |
313 | 320 | | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
314 | 345 | | |
315 | 346 | | |
316 | 347 | | |
| |||
0 commit comments