diff options
| -rw-r--r-- | arch/powerpc/platforms/pseries/setup.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 000724149089..6c42cfde8415 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
| @@ -287,14 +287,22 @@ static int alloc_dispatch_logs(void) | |||
| 287 | int cpu, ret; | 287 | int cpu, ret; |
| 288 | struct paca_struct *pp; | 288 | struct paca_struct *pp; |
| 289 | struct dtl_entry *dtl; | 289 | struct dtl_entry *dtl; |
| 290 | struct kmem_cache *dtl_cache; | ||
| 290 | 291 | ||
| 291 | if (!firmware_has_feature(FW_FEATURE_SPLPAR)) | 292 | if (!firmware_has_feature(FW_FEATURE_SPLPAR)) |
| 292 | return 0; | 293 | return 0; |
| 293 | 294 | ||
| 295 | dtl_cache = kmem_cache_create("dtl", DISPATCH_LOG_BYTES, | ||
| 296 | DISPATCH_LOG_BYTES, 0, NULL); | ||
| 297 | if (!dtl_cache) { | ||
| 298 | pr_warn("Failed to create dispatch trace log buffer cache\n"); | ||
| 299 | pr_warn("Stolen time statistics will be unreliable\n"); | ||
| 300 | return 0; | ||
| 301 | } | ||
| 302 | |||
| 294 | for_each_possible_cpu(cpu) { | 303 | for_each_possible_cpu(cpu) { |
| 295 | pp = &paca[cpu]; | 304 | pp = &paca[cpu]; |
| 296 | dtl = kmalloc_node(DISPATCH_LOG_BYTES, GFP_KERNEL, | 305 | dtl = kmem_cache_alloc(dtl_cache, GFP_KERNEL); |
| 297 | cpu_to_node(cpu)); | ||
| 298 | if (!dtl) { | 306 | if (!dtl) { |
| 299 | pr_warn("Failed to allocate dispatch trace log for cpu %d\n", | 307 | pr_warn("Failed to allocate dispatch trace log for cpu %d\n", |
| 300 | cpu); | 308 | cpu); |
