Skip to content
  • Sudeep Holla's avatar
    drivers: base: cacheinfo: fix x86 with CONFIG_OF enabled · f5aaa5a2
    Sudeep Holla authored
    commit fac51482
    
     upstream.
    
    With CONFIG_OF enabled on x86, we get the following error on boot:
    "
    	Failed to find cpu0 device node
     	Unable to detect cache hierarchy from DT for CPU 0
    "
    and the cacheinfo fails to get populated in the corresponding sysfs
    entries. This is because cache_setup_of_node looks for of_node for
    setting up the shared cpu_map without checking that it's already
    populated in the architecture specific callback.
    
    In order to indicate that the shared cpu_map is already populated, this
    patch introduces a boolean `cpu_map_populated` in struct cpu_cacheinfo
    that can be used by the generic code to skip cache_shared_cpu_map_setup.
    
    This patch also sets that boolean for x86.
    
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: default avatarSudeep Holla <sudeep.holla@arm.com>
    Signed-off-by: default avatarMian Yousaf Kaukab <yousaf.kaukab@suse.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    f5aaa5a2