]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
drivers: base: cacheinfo: setup DT cache properties early
authorJeremy Linton <jeremy.linton@arm.com>
Fri, 11 May 2018 23:57:57 +0000 (18:57 -0500)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 6 Jun 2018 19:37:49 +0000 (15:37 -0400)
commitb5d1de4c1aa1377e368540197661ee7c305e0b09
tree277f487405ee76af8eb7b3af5417a9d94f9d60f2
parentfa7b88478c058d2f33e5fbe030453bd63589a0ae
drivers: base: cacheinfo: setup DT cache properties early

BugLink: https://bugs.launchpad.net/bugs/1770231
The original intent in cacheinfo was that an architecture
specific populate_cache_leaves() would probe the hardware
and then cache_shared_cpu_map_setup() and
cache_override_properties() would provide firmware help to
extend/expand upon what was probed. Arm64 was really
the only architecture that was working this way, and
with the removal of most of the hardware probing logic it
became clear that it was possible to simplify the logic a bit.

This patch combines the walk of the DT nodes with the
code updating the cache size/line_size and nr_sets.
cache_override_properties() (which was DT specific) is
then removed. The result is that cacheinfo.of_node is
no longer used as a temporary place to hold DT references
for future calls that update cache properties. That change
helps to clarify its one remaining use (matching
cacheinfo nodes that represent shared caches) which
will be used by the ACPI/PPTT code in the following patches.

Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Vijaya Kumar K <vkilari@codeaurora.org>
Tested-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
Tested-by: Tomasz Nowicki <Tomasz.Nowicki@cavium.com>
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit 2ff075c7dfd4705de12d687daede2dd664386b1c linux-next)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
arch/riscv/kernel/cacheinfo.c
drivers/base/cacheinfo.c