]> git.baikalelectronics.ru Git - kernel.git/commit
sched,x86: Fix L2 cache mask
authorPeter Zijlstra <peterz@infradead.org>
Fri, 22 Oct 2021 15:49:53 +0000 (17:49 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 22 Oct 2021 16:21:28 +0000 (18:21 +0200)
commit93c912d0c7bd4630bc96f4f40349360448b5b73a
treef6a18ee9347c902213e3a33d11a73c8ab3d68e2d
parent38047c1f490c3e121b53f156d65bc6b32dc1b66a
sched,x86: Fix L2 cache mask

Currently AMD/Hygon do not populate l2c_id, this means that for SMT
enabled systems they report an L2 per thread. This is ofcourse not
true but was harmless so far.

However, since commit: a92c9d6e7ced ("sched: Add cluster scheduler
level for x86") the scheduler topology setup requires:

  SMT <= L2 <= LLC

Which leads to noisy warnings and possibly weird behaviour on affected
chips.

Therefore change the topology generation such that if l2c_id is not
populated it follows the SMT topology, thereby satisfying the
constraint.

Fixes: a92c9d6e7ced ("sched: Add cluster scheduler level for x86")
Reported-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Tom Lendacky <thomas.lendacky@amd.com>
arch/x86/kernel/smpboot.c