Skip to content

Commit f4cd87a

Browse files
author
Linus Torvalds
committed
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6: [IA64] refresh config files [IA64] put kdump_find_rsvd_region in __init [IA64] Remove sparse warning from unwind code [IA64] add missing syscall trace clear [IA64] Cleanup in crash.c [IA64] kexec: declare ia64_mca_pal_base in mca.h rather than kexec.h [IA64] pci_get_legacy_ide_irq should return irq (not GSI) [IA64] whitespace fixes for include/asm-ia64/sal.h [IA64] Cache error recovery [IA64] Proper handling of TLB errors from duplicate itr.d dropins
2 parents 271368b + e3a696e commit f4cd87a

14 files changed

Lines changed: 783 additions & 245 deletions

File tree

‎arch/ia64/configs/tiger_defconfig‎

Lines changed: 207 additions & 56 deletions
Large diffs are not rendered by default.

‎arch/ia64/configs/zx1_defconfig‎

Lines changed: 271 additions & 73 deletions
Large diffs are not rendered by default.

‎arch/ia64/defconfig‎

Lines changed: 243 additions & 78 deletions
Large diffs are not rendered by default.

‎arch/ia64/kernel/crash.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
#include <asm/mca.h>
2222

2323
int kdump_status[NR_CPUS];
24-
atomic_t kdump_cpu_freezed;
24+
static atomic_t kdump_cpu_frozen;
2525
atomic_t kdump_in_progress;
26-
int kdump_on_init = 1;
26+
static int kdump_on_init = 1;
2727

2828
static inline Elf64_Word
2929
*append_elf_note(Elf64_Word *buf, char *name, unsigned type, void *data,
@@ -86,7 +86,7 @@ kdump_wait_cpu_freeze(void)
8686
int cpu_num = num_online_cpus() - 1;
8787
int timeout = 1000;
8888
while(timeout-- > 0) {
89-
if (atomic_read(&kdump_cpu_freezed) == cpu_num)
89+
if (atomic_read(&kdump_cpu_frozen) == cpu_num)
9090
return 0;
9191
udelay(1000);
9292
}
@@ -108,8 +108,8 @@ machine_crash_shutdown(struct pt_regs *pt)
108108
kexec_disable_iosapic();
109109
#ifdef CONFIG_SMP
110110
kdump_smp_send_stop();
111+
/* not all cpu response to IPI, send INIT to freeze them */
111112
if (kdump_wait_cpu_freeze() && kdump_on_init) {
112-
//not all cpu response to IPI, send INIT to freeze them
113113
kdump_smp_send_init();
114114
}
115115
#endif
@@ -136,7 +136,7 @@ kdump_cpu_freeze(struct unw_frame_info *info, void *arg)
136136
cpuid = smp_processor_id();
137137
crash_save_this_cpu();
138138
current->thread.ksp = (__u64)info->sw - 16;
139-
atomic_inc(&kdump_cpu_freezed);
139+
atomic_inc(&kdump_cpu_frozen);
140140
kdump_status[cpuid] = 1;
141141
mb();
142142
#ifdef CONFIG_HOTPLUG_CPU

‎arch/ia64/kernel/efi.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,7 @@ efi_initialize_iomem_resources(struct resource *code_resource,
11421142
/* find a block of memory aligned to 64M exclude reserved regions
11431143
rsvd_regions are sorted
11441144
*/
1145-
unsigned long
1145+
unsigned long __init
11461146
kdump_find_rsvd_region (unsigned long size,
11471147
struct rsvd_region *r, int n)
11481148
{

‎arch/ia64/kernel/mca.c‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,8 +1192,6 @@ void
11921192
ia64_mca_handler(struct pt_regs *regs, struct switch_stack *sw,
11931193
struct ia64_sal_os_state *sos)
11941194
{
1195-
pal_processor_state_info_t *psp = (pal_processor_state_info_t *)
1196-
&sos->proc_state_param;
11971195
int recover, cpu = smp_processor_id();
11981196
struct task_struct *previous_current;
11991197
struct ia64_mca_notify_die nd =
@@ -1223,10 +1221,8 @@ ia64_mca_handler(struct pt_regs *regs, struct switch_stack *sw,
12231221
/* Get the MCA error record and log it */
12241222
ia64_mca_log_sal_error_record(SAL_INFO_TYPE_MCA);
12251223

1226-
/* TLB error is only exist in this SAL error record */
1227-
recover = (psp->tc && !(psp->cc || psp->bc || psp->rc || psp->uc))
1228-
/* other error recovery */
1229-
|| (ia64_mca_ucmc_extension
1224+
/* MCA error recovery */
1225+
recover = (ia64_mca_ucmc_extension
12301226
&& ia64_mca_ucmc_extension(
12311227
IA64_LOG_CURR_BUFFER(SAL_INFO_TYPE_MCA),
12321228
sos));

‎arch/ia64/kernel/mca_drv.c‎

Lines changed: 44 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -602,11 +602,40 @@ recover_from_platform_error(slidx_table_t *slidx, peidx_table_t *peidx,
602602
default:
603603
break;
604604
}
605+
} else if (psp->cc && !psp->bc) { /* Cache error */
606+
status = recover_from_read_error(slidx, peidx, pbci, sos);
605607
}
606608

607609
return status;
608610
}
609611

612+
/*
613+
* recover_from_tlb_check
614+
* @peidx: pointer of index of processor error section
615+
*
616+
* Return value:
617+
* 1 on Success / 0 on Failure
618+
*/
619+
static int
620+
recover_from_tlb_check(peidx_table_t *peidx)
621+
{
622+
sal_log_mod_error_info_t *smei;
623+
pal_tlb_check_info_t *ptci;
624+
625+
smei = (sal_log_mod_error_info_t *)peidx_tlb_check(peidx, 0);
626+
ptci = (pal_tlb_check_info_t *)&(smei->check_info);
627+
628+
/*
629+
* Look for signature of a duplicate TLB DTC entry, which is
630+
* a SW bug and always fatal.
631+
*/
632+
if (ptci->op == PAL_TLB_CHECK_OP_PURGE
633+
&& !(ptci->itr || ptci->dtc || ptci->itc))
634+
return fatal_mca("Duplicate TLB entry");
635+
636+
return mca_recovered("TLB check recovered");
637+
}
638+
610639
/**
611640
* recover_from_processor_error
612641
* @platform: whether there are some platform error section or not
@@ -618,13 +647,6 @@ recover_from_platform_error(slidx_table_t *slidx, peidx_table_t *peidx,
618647
* Return value:
619648
* 1 on Success / 0 on Failure
620649
*/
621-
/*
622-
* Later we try to recover when below all conditions are satisfied.
623-
* 1. Only one processor error section is exist.
624-
* 2. BUS_CHECK is exist and the others are not exist.(Except TLB_CHECK)
625-
* 3. The entry of BUS_CHECK_INFO is 1.
626-
* 4. "External bus error" flag is set and the others are not set.
627-
*/
628650

629651
static int
630652
recover_from_processor_error(int platform, slidx_table_t *slidx,
@@ -651,39 +673,40 @@ recover_from_processor_error(int platform, slidx_table_t *slidx,
651673
if (psp->us || psp->ci == 0)
652674
return fatal_mca("error not contained");
653675

676+
/*
677+
* Look for recoverable TLB check
678+
*/
679+
if (psp->tc && !(psp->cc || psp->bc || psp->rc || psp->uc))
680+
return recover_from_tlb_check(peidx);
681+
654682
/*
655683
* The cache check and bus check bits have four possible states
656684
* cc bc
657-
* 0 0 Weird record, not recovered
658-
* 1 0 Cache error, not recovered
659-
* 0 1 I/O error, attempt recovery
660685
* 1 1 Memory error, attempt recovery
686+
* 1 0 Cache error, attempt recovery
687+
* 0 1 I/O error, attempt recovery
688+
* 0 0 Other error type, not recovered
661689
*/
662-
if (psp->bc == 0 || pbci == NULL)
663-
return fatal_mca("No bus check");
690+
if (psp->cc == 0 && (psp->bc == 0 || pbci == NULL))
691+
return fatal_mca("No cache or bus check");
664692

665693
/*
666-
* Sorry, we cannot handle so many.
694+
* Cannot handle more than one bus check.
667695
*/
668696
if (peidx_bus_check_num(peidx) > 1)
669697
return fatal_mca("Too many bus checks");
670-
/*
671-
* Well, here is only one bus error.
672-
*/
698+
673699
if (pbci->ib)
674700
return fatal_mca("Internal Bus error");
675-
if (pbci->cc)
676-
return fatal_mca("Cache-cache error");
677701
if (pbci->eb && pbci->bsi > 0)
678702
return fatal_mca("External bus check fatal status");
679703

680704
/*
681-
* This is a local MCA and estimated as recoverble external bus error.
682-
* (e.g. a load from poisoned memory)
683-
* This means "there are some platform errors".
705+
* This is a local MCA and estimated as a recoverble error.
684706
*/
685707
if (platform)
686708
return recover_from_platform_error(slidx, peidx, pbci, sos);
709+
687710
/*
688711
* On account of strange SAL error record, we cannot recover.
689712
*/

‎arch/ia64/kernel/ptrace.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1573,6 +1573,7 @@ sys_ptrace (long request, pid_t pid, unsigned long addr, unsigned long data)
15731573

15741574
case PTRACE_DETACH:
15751575
/* detach a process that was attached. */
1576+
clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
15761577
ret = ptrace_detach(child, data);
15771578
goto out_tsk;
15781579

‎include/asm-ia64/kexec.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
} while(0)
2323

2424
extern struct kimage *ia64_kimage;
25-
DECLARE_PER_CPU(u64, ia64_mca_pal_base);
2625
extern const unsigned int relocate_new_kernel_size;
2726
extern void relocate_new_kernel(unsigned long, unsigned long,
2827
struct ia64_boot_param *, unsigned long);

‎include/asm-ia64/mca.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ struct ia64_mca_notify_die {
156156
int *monarch_cpu;
157157
};
158158

159+
DECLARE_PER_CPU(u64, ia64_mca_pal_base);
160+
159161
#else /* __ASSEMBLY__ */
160162

161163
#define IA64_MCA_CORRECTED 0x0 /* Error has been corrected by OS_MCA */

0 commit comments

Comments
 (0)