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.
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