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>