aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/cacheinfo.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-07-04 13:29:23 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-04 13:29:23 -0400
commit65b97fb7303050fc826e518cf67fc283da23314f (patch)
tree595e7f04d65d95a39d65bd2dcf2385b3b6ea7969 /arch/powerpc/kernel/cacheinfo.c
parentddcf6600b133697adbafd96e080818bdc0dfd028 (diff)
parent1d8b368ab4aacfc3f864655baad4d31a3028ec1a (diff)
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Pull powerpc updates from Ben Herrenschmidt: "This is the powerpc changes for the 3.11 merge window. In addition to the usual bug fixes and small updates, the main highlights are: - Support for transparent huge pages by Aneesh Kumar for 64-bit server processors. This allows the use of 16M pages as transparent huge pages on kernels compiled with a 64K base page size. - Base VFIO support for KVM on power by Alexey Kardashevskiy - Wiring up of our nvram to the pstore infrastructure, including putting compressed oopses in there by Aruna Balakrishnaiah - Move, rework and improve our "EEH" (basically PCI error handling and recovery) infrastructure. It is no longer specific to pseries but is now usable by the new "powernv" platform as well (no hypervisor) by Gavin Shan. - I fixed some bugs in our math-emu instruction decoding and made it usable to emulate some optional FP instructions on processors with hard FP that lack them (such as fsqrt on Freescale embedded processors). - Support for Power8 "Event Based Branch" facility by Michael Ellerman. This facility allows what is basically "userspace interrupts" for performance monitor events. - A bunch of Transactional Memory vs. Signals bug fixes and HW breakpoint/watchpoint fixes by Michael Neuling. And more ... I appologize in advance if I've failed to highlight something that somebody deemed worth it." * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (156 commits) pstore: Add hsize argument in write_buf call of pstore_ftrace_call powerpc/fsl: add MPIC timer wakeup support powerpc/mpic: create mpic subsystem object powerpc/mpic: add global timer support powerpc/mpic: add irq_set_wake support powerpc/85xx: enable coreint for all the 64bit boards powerpc/8xx: Erroneous double irq_eoi() on CPM IRQ in MPC8xx powerpc/fsl: Enable CONFIG_E1000E in mpc85xx_smp_defconfig powerpc/mpic: Add get_version API both for internal and external use powerpc: Handle both new style and old style reserve maps powerpc/hw_brk: Fix off by one error when validating DAWR region end powerpc/pseries: Support compression of oops text via pstore powerpc/pseries: Re-organise the oops compression code pstore: Pass header size in the pstore write callback powerpc/powernv: Fix iommu initialization again powerpc/pseries: Inform the hypervisor we are using EBB regs powerpc/perf: Add power8 EBB support powerpc/perf: Core EBB support for 64-bit book3s powerpc/perf: Drop MMCRA from thread_struct powerpc/perf: Don't enable if we have zero events ...
Diffstat (limited to 'arch/powerpc/kernel/cacheinfo.c')
-rw-r--r--arch/powerpc/kernel/cacheinfo.c36
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
134static void __cpuinit cache_init(struct cache *cache, int type, int level, struct device_node *ofnode) 134static 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
143static struct cache *__cpuinit new_cache(int type, int level, struct device_node *ofnode) 144static 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
327static struct cache *__cpuinit cache_do_one_devnode_unified(struct device_node *node, int level) 328static 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
338static struct cache *__cpuinit cache_do_one_devnode_split(struct device_node *node, int level) 340static 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
360static struct cache *__cpuinit cache_do_one_devnode(struct device_node *node, int level) 363static 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
372static struct cache *__cpuinit cache_lookup_or_instantiate(struct device_node *node, int level) 375static 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
388static void __cpuinit link_cache_lists(struct cache *smaller, struct cache *bigger) 392static 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
399static void __cpuinit do_subsidiary_caches_debugcheck(struct cache *cache) 403static 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
405static void __cpuinit do_subsidiary_caches(struct cache *cache) 409static 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
426static struct cache *__cpuinit cache_chain_instantiate(unsigned int cpu_id) 430static 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
451static struct cache_dir *__cpuinit cacheinfo_create_cache_dir(unsigned int cpu_id) 455static 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
656static void __cpuinit cacheinfo_create_index_opt_attrs(struct cache_index_dir *dir) 660static 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
699static void __cpuinit cacheinfo_create_index_dir(struct cache *cache, int index, struct cache_dir *cache_dir) 703static 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
725static void __cpuinit cacheinfo_sysfs_populate(unsigned int cpu_id, struct cache *cache_list) 730static 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
743void __cpuinit cacheinfo_cpu_online(unsigned int cpu_id) 749void cacheinfo_cpu_online(unsigned int cpu_id)
744{ 750{
745 struct cache *cache; 751 struct cache *cache;
746 752