diff options
Diffstat (limited to 'arch/powerpc/kernel/cacheinfo.c')
-rw-r--r-- | arch/powerpc/kernel/cacheinfo.c | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/arch/powerpc/kernel/cacheinfo.c b/arch/powerpc/kernel/cacheinfo.c index 92c6b008dd2b..9262cf2bec4b 100644 --- a/arch/powerpc/kernel/cacheinfo.c +++ b/arch/powerpc/kernel/cacheinfo.c | |||
@@ -131,7 +131,8 @@ static const char *cache_type_string(const struct cache *cache) | |||
131 | return cache_type_info[cache->type].name; | 131 | return cache_type_info[cache->type].name; |
132 | } | 132 | } |
133 | 133 | ||
134 | static void __cpuinit cache_init(struct cache *cache, int type, int level, struct device_node *ofnode) | 134 | static void cache_init(struct cache *cache, int type, int level, |
135 | struct device_node *ofnode) | ||
135 | { | 136 | { |
136 | cache->type = type; | 137 | cache->type = type; |
137 | cache->level = level; | 138 | cache->level = level; |
@@ -140,7 +141,7 @@ static void __cpuinit cache_init(struct cache *cache, int type, int level, struc | |||
140 | list_add(&cache->list, &cache_list); | 141 | list_add(&cache->list, &cache_list); |
141 | } | 142 | } |
142 | 143 | ||
143 | static struct cache *__cpuinit new_cache(int type, int level, struct device_node *ofnode) | 144 | static struct cache *new_cache(int type, int level, struct device_node *ofnode) |
144 | { | 145 | { |
145 | struct cache *cache; | 146 | struct cache *cache; |
146 | 147 | ||
@@ -324,7 +325,8 @@ static bool cache_node_is_unified(const struct device_node *np) | |||
324 | return of_get_property(np, "cache-unified", NULL); | 325 | return of_get_property(np, "cache-unified", NULL); |
325 | } | 326 | } |
326 | 327 | ||
327 | static struct cache *__cpuinit cache_do_one_devnode_unified(struct device_node *node, int level) | 328 | static struct cache *cache_do_one_devnode_unified(struct device_node *node, |
329 | int level) | ||
328 | { | 330 | { |
329 | struct cache *cache; | 331 | struct cache *cache; |
330 | 332 | ||
@@ -335,7 +337,8 @@ static struct cache *__cpuinit cache_do_one_devnode_unified(struct device_node * | |||
335 | return cache; | 337 | return cache; |
336 | } | 338 | } |
337 | 339 | ||
338 | static struct cache *__cpuinit cache_do_one_devnode_split(struct device_node *node, int level) | 340 | static struct cache *cache_do_one_devnode_split(struct device_node *node, |
341 | int level) | ||
339 | { | 342 | { |
340 | struct cache *dcache, *icache; | 343 | struct cache *dcache, *icache; |
341 | 344 | ||
@@ -357,7 +360,7 @@ err: | |||
357 | return NULL; | 360 | return NULL; |
358 | } | 361 | } |
359 | 362 | ||
360 | static struct cache *__cpuinit cache_do_one_devnode(struct device_node *node, int level) | 363 | static struct cache *cache_do_one_devnode(struct device_node *node, int level) |
361 | { | 364 | { |
362 | struct cache *cache; | 365 | struct cache *cache; |
363 | 366 | ||
@@ -369,7 +372,8 @@ static struct cache *__cpuinit cache_do_one_devnode(struct device_node *node, in | |||
369 | return cache; | 372 | return cache; |
370 | } | 373 | } |
371 | 374 | ||
372 | static struct cache *__cpuinit cache_lookup_or_instantiate(struct device_node *node, int level) | 375 | static struct cache *cache_lookup_or_instantiate(struct device_node *node, |
376 | int level) | ||
373 | { | 377 | { |
374 | struct cache *cache; | 378 | struct cache *cache; |
375 | 379 | ||
@@ -385,7 +389,7 @@ static struct cache *__cpuinit cache_lookup_or_instantiate(struct device_node *n | |||
385 | return cache; | 389 | return cache; |
386 | } | 390 | } |
387 | 391 | ||
388 | static void __cpuinit link_cache_lists(struct cache *smaller, struct cache *bigger) | 392 | static void link_cache_lists(struct cache *smaller, struct cache *bigger) |
389 | { | 393 | { |
390 | while (smaller->next_local) { | 394 | while (smaller->next_local) { |
391 | if (smaller->next_local == bigger) | 395 | if (smaller->next_local == bigger) |
@@ -396,13 +400,13 @@ static void __cpuinit link_cache_lists(struct cache *smaller, struct cache *bigg | |||
396 | smaller->next_local = bigger; | 400 | smaller->next_local = bigger; |
397 | } | 401 | } |
398 | 402 | ||
399 | static void __cpuinit do_subsidiary_caches_debugcheck(struct cache *cache) | 403 | static void do_subsidiary_caches_debugcheck(struct cache *cache) |
400 | { | 404 | { |
401 | WARN_ON_ONCE(cache->level != 1); | 405 | WARN_ON_ONCE(cache->level != 1); |
402 | WARN_ON_ONCE(strcmp(cache->ofnode->type, "cpu")); | 406 | WARN_ON_ONCE(strcmp(cache->ofnode->type, "cpu")); |
403 | } | 407 | } |
404 | 408 | ||
405 | static void __cpuinit do_subsidiary_caches(struct cache *cache) | 409 | static void do_subsidiary_caches(struct cache *cache) |
406 | { | 410 | { |
407 | struct device_node *subcache_node; | 411 | struct device_node *subcache_node; |
408 | int level = cache->level; | 412 | int level = cache->level; |
@@ -423,7 +427,7 @@ static void __cpuinit do_subsidiary_caches(struct cache *cache) | |||
423 | } | 427 | } |
424 | } | 428 | } |
425 | 429 | ||
426 | static struct cache *__cpuinit cache_chain_instantiate(unsigned int cpu_id) | 430 | static struct cache *cache_chain_instantiate(unsigned int cpu_id) |
427 | { | 431 | { |
428 | struct device_node *cpu_node; | 432 | struct device_node *cpu_node; |
429 | struct cache *cpu_cache = NULL; | 433 | struct cache *cpu_cache = NULL; |
@@ -448,7 +452,7 @@ out: | |||
448 | return cpu_cache; | 452 | return cpu_cache; |
449 | } | 453 | } |
450 | 454 | ||
451 | static struct cache_dir *__cpuinit cacheinfo_create_cache_dir(unsigned int cpu_id) | 455 | static struct cache_dir *cacheinfo_create_cache_dir(unsigned int cpu_id) |
452 | { | 456 | { |
453 | struct cache_dir *cache_dir; | 457 | struct cache_dir *cache_dir; |
454 | struct device *dev; | 458 | struct device *dev; |
@@ -653,7 +657,7 @@ static struct kobj_type cache_index_type = { | |||
653 | .default_attrs = cache_index_default_attrs, | 657 | .default_attrs = cache_index_default_attrs, |
654 | }; | 658 | }; |
655 | 659 | ||
656 | static void __cpuinit cacheinfo_create_index_opt_attrs(struct cache_index_dir *dir) | 660 | static void cacheinfo_create_index_opt_attrs(struct cache_index_dir *dir) |
657 | { | 661 | { |
658 | const char *cache_name; | 662 | const char *cache_name; |
659 | const char *cache_type; | 663 | const char *cache_type; |
@@ -696,7 +700,8 @@ static void __cpuinit cacheinfo_create_index_opt_attrs(struct cache_index_dir *d | |||
696 | kfree(buf); | 700 | kfree(buf); |
697 | } | 701 | } |
698 | 702 | ||
699 | static void __cpuinit cacheinfo_create_index_dir(struct cache *cache, int index, struct cache_dir *cache_dir) | 703 | static void cacheinfo_create_index_dir(struct cache *cache, int index, |
704 | struct cache_dir *cache_dir) | ||
700 | { | 705 | { |
701 | struct cache_index_dir *index_dir; | 706 | struct cache_index_dir *index_dir; |
702 | int rc; | 707 | int rc; |
@@ -722,7 +727,8 @@ err: | |||
722 | kfree(index_dir); | 727 | kfree(index_dir); |
723 | } | 728 | } |
724 | 729 | ||
725 | static void __cpuinit cacheinfo_sysfs_populate(unsigned int cpu_id, struct cache *cache_list) | 730 | static void cacheinfo_sysfs_populate(unsigned int cpu_id, |
731 | struct cache *cache_list) | ||
726 | { | 732 | { |
727 | struct cache_dir *cache_dir; | 733 | struct cache_dir *cache_dir; |
728 | struct cache *cache; | 734 | struct cache *cache; |
@@ -740,7 +746,7 @@ static void __cpuinit cacheinfo_sysfs_populate(unsigned int cpu_id, struct cache | |||
740 | } | 746 | } |
741 | } | 747 | } |
742 | 748 | ||
743 | void __cpuinit cacheinfo_cpu_online(unsigned int cpu_id) | 749 | void cacheinfo_cpu_online(unsigned int cpu_id) |
744 | { | 750 | { |
745 | struct cache *cache; | 751 | struct cache *cache; |
746 | 752 | ||