drivers: base: cacheinfo: fix cache type for non-architected system cache
authorSudeep Holla <sudeep.holla@arm.com>
Fri, 17 Nov 2017 11:56:41 +0000 (11:56 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Jan 2018 19:31:16 +0000 (20:31 +0100)
commit2695c0f1f71e6022a6916584a4d19de8968e97c3
tree601763347af4a63e448b628d6deb494f7493713b
parentf3f5fa872d09109edfd7c10c57865301fee396d4
drivers: base: cacheinfo: fix cache type for non-architected system cache

commit f57ab9a01a36ef3454333251cc57e3a9948b17bf upstream.

Commit dfea747d2aba ("drivers: base: cacheinfo: support DT overrides for
cache properties") doesn't initialise the cache type if it's present
only in DT and the architecture is not aware of it. They are unified
system level cache which are generally transparent.

This patch check if the cache type is set to NOCACHE but the DT node
indicates that it's unified cache and sets the cache type accordingly.

Fixes: dfea747d2aba ("drivers: base: cacheinfo: support DT overrides for cache properties")
Reported-and-tested-by: Tan Xiaojun <tanxiaojun@huawei.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/cacheinfo.c