Lines Matching full:cpu_id

455  * If sub-groups of threads in a core containing @cpu_id share the
463 static int get_group_id(unsigned int cpu_id, int level) in get_group_id() argument
467 cpu_id)); in get_group_id()
470 cpu_id)); in get_group_id()
473 cpu_id)); in get_group_id()
477 static void do_subsidiary_caches(struct cache *cache, unsigned int cpu_id) in do_subsidiary_caches() argument
489 group_id = get_group_id(cpu_id, level); in do_subsidiary_caches()
500 static struct cache *cache_chain_instantiate(unsigned int cpu_id) in cache_chain_instantiate() argument
506 pr_debug("creating cache object(s) for CPU %i\n", cpu_id); in cache_chain_instantiate()
508 cpu_node = of_get_cpu_node(cpu_id, NULL); in cache_chain_instantiate()
509 WARN_ONCE(!cpu_node, "no OF node found for CPU %i\n", cpu_id); in cache_chain_instantiate()
513 group_id = get_group_id(cpu_id, 1); in cache_chain_instantiate()
519 do_subsidiary_caches(cpu_cache, cpu_id); in cache_chain_instantiate()
521 cache_cpu_set(cpu_cache, cpu_id); in cache_chain_instantiate()
528 static struct cache_dir *cacheinfo_create_cache_dir(unsigned int cpu_id) in cacheinfo_create_cache_dir() argument
534 dev = get_cpu_device(cpu_id); in cacheinfo_create_cache_dir()
535 WARN_ONCE(!dev, "no dev for CPU %i\n", cpu_id); in cacheinfo_create_cache_dir()
549 WARN_ON_ONCE(per_cpu(cache_dir_pcpu, cpu_id) != NULL); in cacheinfo_create_cache_dir()
551 per_cpu(cache_dir_pcpu, cpu_id) = cache_dir; in cacheinfo_create_cache_dir()
810 static void cacheinfo_sysfs_populate(unsigned int cpu_id, in cacheinfo_sysfs_populate() argument
817 cache_dir = cacheinfo_create_cache_dir(cpu_id); in cacheinfo_sysfs_populate()
829 void cacheinfo_cpu_online(unsigned int cpu_id) in cacheinfo_cpu_online() argument
833 cache = cache_chain_instantiate(cpu_id); in cacheinfo_cpu_online()
837 cacheinfo_sysfs_populate(cpu_id, cache); in cacheinfo_cpu_online()
845 static struct cache *cache_lookup_by_cpu(unsigned int cpu_id) in cache_lookup_by_cpu() argument
851 cpu_node = of_get_cpu_node(cpu_id, NULL); in cache_lookup_by_cpu()
852 WARN_ONCE(!cpu_node, "no OF node found for CPU %i\n", cpu_id); in cache_lookup_by_cpu()
856 group_id = get_group_id(cpu_id, 1); in cache_lookup_by_cpu()
911 void cacheinfo_cpu_offline(unsigned int cpu_id) in cacheinfo_cpu_offline() argument
918 cache_dir = per_cpu(cache_dir_pcpu, cpu_id); in cacheinfo_cpu_offline()
924 per_cpu(cache_dir_pcpu, cpu_id) = NULL; in cacheinfo_cpu_offline()
928 cache = cache_lookup_by_cpu(cpu_id); in cacheinfo_cpu_offline()
930 cache_cpu_clear(cache, cpu_id); in cacheinfo_cpu_offline()