From: Shai Fultheim Date: Thu, 19 Apr 2012 22:09:11 +0000 (+0300) Subject: x86/cache_info: Fix setup of l2/l3 ids X-Git-Tag: v3.5-rc1~130^4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ddc5681ed33a279fdc188e98e71f0c539f08c6e6;p=pandora-kernel.git x86/cache_info: Fix setup of l2/l3 ids On some architectures (such as vSMP), it is possible to have CPUs with a different number of cores sharing the same cache. The current implementation implicitly assumes that all CPUs will have the same number of cores sharing caches, and as a result, different CPUs can end up with the same l2/l3 ids. Fix this by masking out the shared cache bits, instead of shifting the APICID. By doing so, it is guaranteed that the generated cache ids are always unique. Signed-off-by: Shai Fultheim [ rebased, simplified, and reworded the commit message] Signed-off-by: Ido Yariv Cc: Borislav Petkov Cc: Andreas Herrmann Cc: Mike Travis Cc: Dave Jones Link: http://lkml.kernel.org/r/1334873351-31142-1-git-send-email-ido@wizery.com Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed