diff options
Diffstat (limited to 'arch/ia64/kernel')
-rw-r--r-- | arch/ia64/kernel/entry.S | 1 | ||||
-rw-r--r-- | arch/ia64/kernel/mca_drv.c | 54 | ||||
-rw-r--r-- | arch/ia64/kernel/palinfo.c | 2 | ||||
-rw-r--r-- | arch/ia64/kernel/salinfo.c | 2 | ||||
-rw-r--r-- | arch/ia64/kernel/topology.c | 9 |
5 files changed, 42 insertions, 26 deletions
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S index e30798811216..bcb80ca5cf40 100644 --- a/arch/ia64/kernel/entry.S +++ b/arch/ia64/kernel/entry.S | |||
@@ -1610,5 +1610,6 @@ sys_call_table: | |||
1610 | data8 sys_get_robust_list | 1610 | data8 sys_get_robust_list |
1611 | data8 sys_sync_file_range // 1300 | 1611 | data8 sys_sync_file_range // 1300 |
1612 | data8 sys_tee | 1612 | data8 sys_tee |
1613 | data8 sys_vmsplice | ||
1613 | 1614 | ||
1614 | .org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls | 1615 | .org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls |
diff --git a/arch/ia64/kernel/mca_drv.c b/arch/ia64/kernel/mca_drv.c index 37c88eb55873..ca6666b51ccb 100644 --- a/arch/ia64/kernel/mca_drv.c +++ b/arch/ia64/kernel/mca_drv.c | |||
@@ -62,6 +62,11 @@ typedef enum { | |||
62 | ISOLATE_NONE | 62 | ISOLATE_NONE |
63 | } isolate_status_t; | 63 | } isolate_status_t; |
64 | 64 | ||
65 | typedef enum { | ||
66 | MCA_NOT_RECOVERED = 0, | ||
67 | MCA_RECOVERED = 1 | ||
68 | } recovery_status_t; | ||
69 | |||
65 | /* | 70 | /* |
66 | * This pool keeps pointers to the section part of SAL error record | 71 | * This pool keeps pointers to the section part of SAL error record |
67 | */ | 72 | */ |
@@ -71,6 +76,18 @@ static struct { | |||
71 | int max_idx; /* Maximum index of section pointer list pool */ | 76 | int max_idx; /* Maximum index of section pointer list pool */ |
72 | } slidx_pool; | 77 | } slidx_pool; |
73 | 78 | ||
79 | static int | ||
80 | fatal_mca(const char *fmt, ...) | ||
81 | { | ||
82 | va_list args; | ||
83 | |||
84 | va_start(args, fmt); | ||
85 | vprintk(fmt, args); | ||
86 | va_end(args); | ||
87 | |||
88 | return MCA_NOT_RECOVERED; | ||
89 | } | ||
90 | |||
74 | /** | 91 | /** |
75 | * mca_page_isolate - isolate a poisoned page in order not to use it later | 92 | * mca_page_isolate - isolate a poisoned page in order not to use it later |
76 | * @paddr: poisoned memory location | 93 | * @paddr: poisoned memory location |
@@ -424,7 +441,7 @@ recover_from_read_error(slidx_table_t *slidx, | |||
424 | 441 | ||
425 | /* Is target address valid? */ | 442 | /* Is target address valid? */ |
426 | if (!pbci->tv) | 443 | if (!pbci->tv) |
427 | return 0; | 444 | return fatal_mca(KERN_ALERT "MCA: target address not valid\n"); |
428 | 445 | ||
429 | /* | 446 | /* |
430 | * cpu read or memory-mapped io read | 447 | * cpu read or memory-mapped io read |
@@ -442,7 +459,7 @@ recover_from_read_error(slidx_table_t *slidx, | |||
442 | 459 | ||
443 | /* Is minstate valid? */ | 460 | /* Is minstate valid? */ |
444 | if (!peidx_bottom(peidx) || !(peidx_bottom(peidx)->valid.minstate)) | 461 | if (!peidx_bottom(peidx) || !(peidx_bottom(peidx)->valid.minstate)) |
445 | return 0; | 462 | return fatal_mca(KERN_ALERT "MCA: minstate not valid\n"); |
446 | psr1 =(struct ia64_psr *)&(peidx_minstate_area(peidx)->pmsa_ipsr); | 463 | psr1 =(struct ia64_psr *)&(peidx_minstate_area(peidx)->pmsa_ipsr); |
447 | psr2 =(struct ia64_psr *)&(peidx_minstate_area(peidx)->pmsa_xpsr); | 464 | psr2 =(struct ia64_psr *)&(peidx_minstate_area(peidx)->pmsa_xpsr); |
448 | 465 | ||
@@ -476,12 +493,13 @@ recover_from_read_error(slidx_table_t *slidx, | |||
476 | psr2->bn = 1; | 493 | psr2->bn = 1; |
477 | psr2->i = 0; | 494 | psr2->i = 0; |
478 | 495 | ||
479 | return 1; | 496 | return MCA_RECOVERED; |
480 | } | 497 | } |
481 | 498 | ||
482 | } | 499 | } |
483 | 500 | ||
484 | return 0; | 501 | return fatal_mca(KERN_ALERT "MCA: kernel context not recovered," |
502 | " iip 0x%lx\n", pmsa->pmsa_iip); | ||
485 | } | 503 | } |
486 | 504 | ||
487 | /** | 505 | /** |
@@ -567,13 +585,13 @@ recover_from_processor_error(int platform, slidx_table_t *slidx, | |||
567 | * The machine check is corrected. | 585 | * The machine check is corrected. |
568 | */ | 586 | */ |
569 | if (psp->cm == 1) | 587 | if (psp->cm == 1) |
570 | return 1; | 588 | return MCA_RECOVERED; |
571 | 589 | ||
572 | /* | 590 | /* |
573 | * The error was not contained. Software must be reset. | 591 | * The error was not contained. Software must be reset. |
574 | */ | 592 | */ |
575 | if (psp->us || psp->ci == 0) | 593 | if (psp->us || psp->ci == 0) |
576 | return 0; | 594 | return fatal_mca(KERN_ALERT "MCA: error not contained\n"); |
577 | 595 | ||
578 | /* | 596 | /* |
579 | * The cache check and bus check bits have four possible states | 597 | * The cache check and bus check bits have four possible states |
@@ -584,20 +602,22 @@ recover_from_processor_error(int platform, slidx_table_t *slidx, | |||
584 | * 1 1 Memory error, attempt recovery | 602 | * 1 1 Memory error, attempt recovery |
585 | */ | 603 | */ |
586 | if (psp->bc == 0 || pbci == NULL) | 604 | if (psp->bc == 0 || pbci == NULL) |
587 | return 0; | 605 | return fatal_mca(KERN_ALERT "MCA: No bus check\n"); |
588 | 606 | ||
589 | /* | 607 | /* |
590 | * Sorry, we cannot handle so many. | 608 | * Sorry, we cannot handle so many. |
591 | */ | 609 | */ |
592 | if (peidx_bus_check_num(peidx) > 1) | 610 | if (peidx_bus_check_num(peidx) > 1) |
593 | return 0; | 611 | return fatal_mca(KERN_ALERT "MCA: Too many bus checks\n"); |
594 | /* | 612 | /* |
595 | * Well, here is only one bus error. | 613 | * Well, here is only one bus error. |
596 | */ | 614 | */ |
597 | if (pbci->ib || pbci->cc) | 615 | if (pbci->ib) |
598 | return 0; | 616 | return fatal_mca(KERN_ALERT "MCA: Internal Bus error\n"); |
617 | if (pbci->cc) | ||
618 | return fatal_mca(KERN_ALERT "MCA: Cache-cache error\n"); | ||
599 | if (pbci->eb && pbci->bsi > 0) | 619 | if (pbci->eb && pbci->bsi > 0) |
600 | return 0; | 620 | return fatal_mca(KERN_ALERT "MCA: External bus check fatal status\n"); |
601 | 621 | ||
602 | /* | 622 | /* |
603 | * This is a local MCA and estimated as recoverble external bus error. | 623 | * This is a local MCA and estimated as recoverble external bus error. |
@@ -609,7 +629,7 @@ recover_from_processor_error(int platform, slidx_table_t *slidx, | |||
609 | /* | 629 | /* |
610 | * On account of strange SAL error record, we cannot recover. | 630 | * On account of strange SAL error record, we cannot recover. |
611 | */ | 631 | */ |
612 | return 0; | 632 | return fatal_mca(KERN_ALERT "MCA: Strange SAL record\n"); |
613 | } | 633 | } |
614 | 634 | ||
615 | /** | 635 | /** |
@@ -638,12 +658,10 @@ mca_try_to_recover(void *rec, struct ia64_sal_os_state *sos) | |||
638 | 658 | ||
639 | /* Now, OS can recover when there is one processor error section */ | 659 | /* Now, OS can recover when there is one processor error section */ |
640 | if (n_proc_err > 1) | 660 | if (n_proc_err > 1) |
641 | return 0; | 661 | return fatal_mca(KERN_ALERT "MCA: Too Many Errors\n"); |
642 | else if (n_proc_err == 0) { | 662 | else if (n_proc_err == 0) |
643 | /* Weird SAL record ... We need not to recover */ | 663 | /* Weird SAL record ... We need not to recover */ |
644 | 664 | return fatal_mca(KERN_ALERT "MCA: Weird SAL record\n"); | |
645 | return 1; | ||
646 | } | ||
647 | 665 | ||
648 | /* Make index of processor error section */ | 666 | /* Make index of processor error section */ |
649 | mca_make_peidx((sal_log_processor_info_t*) | 667 | mca_make_peidx((sal_log_processor_info_t*) |
@@ -654,7 +672,7 @@ mca_try_to_recover(void *rec, struct ia64_sal_os_state *sos) | |||
654 | 672 | ||
655 | /* Check whether MCA is global or not */ | 673 | /* Check whether MCA is global or not */ |
656 | if (is_mca_global(&peidx, &pbci, sos)) | 674 | if (is_mca_global(&peidx, &pbci, sos)) |
657 | return 0; | 675 | return fatal_mca(KERN_ALERT "MCA: global MCA\n"); |
658 | 676 | ||
659 | /* Try to recover a processor error */ | 677 | /* Try to recover a processor error */ |
660 | return recover_from_processor_error(platform_err, &slidx, &peidx, | 678 | return recover_from_processor_error(platform_err, &slidx, &peidx, |
diff --git a/arch/ia64/kernel/palinfo.c b/arch/ia64/kernel/palinfo.c index 6386f63c413e..859fb37ff49b 100644 --- a/arch/ia64/kernel/palinfo.c +++ b/arch/ia64/kernel/palinfo.c | |||
@@ -959,7 +959,7 @@ remove_palinfo_proc_entries(unsigned int hcpu) | |||
959 | } | 959 | } |
960 | } | 960 | } |
961 | 961 | ||
962 | static int __devinit palinfo_cpu_callback(struct notifier_block *nfb, | 962 | static int palinfo_cpu_callback(struct notifier_block *nfb, |
963 | unsigned long action, | 963 | unsigned long action, |
964 | void *hcpu) | 964 | void *hcpu) |
965 | { | 965 | { |
diff --git a/arch/ia64/kernel/salinfo.c b/arch/ia64/kernel/salinfo.c index 9d5a823479a3..663a186ad194 100644 --- a/arch/ia64/kernel/salinfo.c +++ b/arch/ia64/kernel/salinfo.c | |||
@@ -572,7 +572,7 @@ static struct file_operations salinfo_data_fops = { | |||
572 | }; | 572 | }; |
573 | 573 | ||
574 | #ifdef CONFIG_HOTPLUG_CPU | 574 | #ifdef CONFIG_HOTPLUG_CPU |
575 | static int __devinit | 575 | static int |
576 | salinfo_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu) | 576 | salinfo_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu) |
577 | { | 577 | { |
578 | unsigned int i, cpu = (unsigned long)hcpu; | 578 | unsigned int i, cpu = (unsigned long)hcpu; |
diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c index b47476d655f1..4f3a16b37f8f 100644 --- a/arch/ia64/kernel/topology.c +++ b/arch/ia64/kernel/topology.c | |||
@@ -305,13 +305,10 @@ static struct kobj_type cache_ktype_percpu_entry = { | |||
305 | 305 | ||
306 | static void __cpuinit cpu_cache_sysfs_exit(unsigned int cpu) | 306 | static void __cpuinit cpu_cache_sysfs_exit(unsigned int cpu) |
307 | { | 307 | { |
308 | if (all_cpu_cache_info[cpu].cache_leaves) { | 308 | kfree(all_cpu_cache_info[cpu].cache_leaves); |
309 | kfree(all_cpu_cache_info[cpu].cache_leaves); | 309 | all_cpu_cache_info[cpu].cache_leaves = NULL; |
310 | all_cpu_cache_info[cpu].cache_leaves = NULL; | ||
311 | } | ||
312 | all_cpu_cache_info[cpu].num_cache_leaves = 0; | 310 | all_cpu_cache_info[cpu].num_cache_leaves = 0; |
313 | memset(&all_cpu_cache_info[cpu].kobj, 0, sizeof(struct kobject)); | 311 | memset(&all_cpu_cache_info[cpu].kobj, 0, sizeof(struct kobject)); |
314 | |||
315 | return; | 312 | return; |
316 | } | 313 | } |
317 | 314 | ||
@@ -429,7 +426,7 @@ static int __cpuinit cache_remove_dev(struct sys_device * sys_dev) | |||
429 | * When a cpu is hot-plugged, do a check and initiate | 426 | * When a cpu is hot-plugged, do a check and initiate |
430 | * cache kobject if necessary | 427 | * cache kobject if necessary |
431 | */ | 428 | */ |
432 | static int __cpuinit cache_cpu_callback(struct notifier_block *nfb, | 429 | static int cache_cpu_callback(struct notifier_block *nfb, |
433 | unsigned long action, void *hcpu) | 430 | unsigned long action, void *hcpu) |
434 | { | 431 | { |
435 | unsigned int cpu = (unsigned long)hcpu; | 432 | unsigned int cpu = (unsigned long)hcpu; |