Page MenuHomeFreeBSD

x86: add cpu_get_pkg_id() and cpu_get_core_id() topology helpers
Needs ReviewPublic

Authored by afscoelho_gmail.com on Tue, Jun 23, 2:36 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jul 8, 9:44 AM
Unknown Object (File)
Wed, Jul 8, 9:26 AM
Unknown Object (File)
Sun, Jul 5, 3:36 AM
Unknown Object (File)
Sat, Jul 4, 9:46 AM
Unknown Object (File)
Fri, Jul 3, 12:55 AM
Unknown Object (File)
Wed, Jul 1, 2:33 AM
Unknown Object (File)
Mon, Jun 29, 11:29 AM
Unknown Object (File)
Sun, Jun 28, 9:39 PM
Subscribers
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

Map logical CPU to physical package (socket) id and physical core id by
shifting per-package and SMT-thread bits out of the APIC id. SMT siblings
share a core id.

Lets drivers for per-socket or per-core hardware bind to real topology,
not NUMA domains or logical CPUs. First consumer: AMD RAPL (package
energy MSRs socket-scoped, per-core energy MSR shared by SMT siblings).

Sponsored by: Advanced Micro Devices (AMD)
MFC after: 2 weeks
Signed-off-by: Andre Silva <andasilv@amd.com>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 74128
Build 71011: arc lint + arc unit