ACPI/PPTT: Handle architecturally unknown cache types
authorJeffrey Hugo <jhugo@codeaurora.org>
Thu, 4 Oct 2018 15:20:06 +0000 (09:20 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2018 19:08:24 +0000 (11:08 -0800)
commit0deec59610205886cd9f624117b8198a1f709e0b
tree35c613a016732c4bbbc12e373f9913453d37476b
parenta0a9e3062a0f286355da91ac7e6ed1220b41f0a2
ACPI/PPTT: Handle architecturally unknown cache types

[ Upstream commit 59bbff3775c0951300f7b41345a54b999438f8d0 ]

The type of a cache might not be specified by architectural mechanisms (ie
system registers), but its type might be specified in the PPTT.  In this
case, we should populate the type of the cache, rather than leave it
undefined.

This fixes the issue where the cacheinfo driver will not populate sysfs
for such caches, resulting in the information missing from utilities like
lstopo and lscpu, thus degrading the user experience.

Fixes: 2bd00bcd73e5 (ACPI/PPTT: Add Processor Properties Topology Table parsing)
Reported-by: Vijaya Kumar K <vkilari@codeaurora.org>
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/acpi/pptt.c