cacheinfo.c (860dbce3d8dd90cb9e909c58fa79808766243651) cacheinfo.c (d4aa219a074a5abaf95a756b9f0d190b5c03a945)
1/*
2 * Processor cache information made available to userspace via sysfs;
3 * intended to be compatible with x86 intel_cacheinfo implementation.
4 *
5 * Copyright 2008 IBM Corporation
6 * Author: Nathan Lynch
7 *
8 * This program is free software; you can redistribute it and/or

--- 882 unchanged lines hidden (view full) ---

891 per_cpu(cache_dir_pcpu, cpu_id) = NULL;
892
893 /* clear the CPU's bit in its cache chain, possibly freeing
894 * cache objects */
895 cache = cache_lookup_by_cpu(cpu_id);
896 if (cache)
897 cache_cpu_clear(cache, cpu_id);
898}
1/*
2 * Processor cache information made available to userspace via sysfs;
3 * intended to be compatible with x86 intel_cacheinfo implementation.
4 *
5 * Copyright 2008 IBM Corporation
6 * Author: Nathan Lynch
7 *
8 * This program is free software; you can redistribute it and/or

--- 882 unchanged lines hidden (view full) ---

891 per_cpu(cache_dir_pcpu, cpu_id) = NULL;
892
893 /* clear the CPU's bit in its cache chain, possibly freeing
894 * cache objects */
895 cache = cache_lookup_by_cpu(cpu_id);
896 if (cache)
897 cache_cpu_clear(cache, cpu_id);
898}
899
900void cacheinfo_teardown(void)
901{
902 unsigned int cpu;
903
904 lockdep_assert_cpus_held();
905
906 for_each_online_cpu(cpu)
907 cacheinfo_cpu_offline(cpu);
908}
909
910void cacheinfo_rebuild(void)
911{
912 unsigned int cpu;
913
914 lockdep_assert_cpus_held();
915
916 for_each_online_cpu(cpu)
917 cacheinfo_cpu_online(cpu);
918}
919
899#endif /* (CONFIG_PPC_PSERIES && CONFIG_SUSPEND) || CONFIG_HOTPLUG_CPU */
920#endif /* (CONFIG_PPC_PSERIES && CONFIG_SUSPEND) || CONFIG_HOTPLUG_CPU */