Commit f4cd87aa authored by Linus Torvalds's avatar Linus Torvalds

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
parents 271368b6 e3a696e0
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -21,9 +21,9 @@
#include <asm/mca.h>
int kdump_status[NR_CPUS];
atomic_t kdump_cpu_freezed;
static atomic_t kdump_cpu_frozen;
atomic_t kdump_in_progress;
int kdump_on_init = 1;
static int kdump_on_init = 1;
static inline Elf64_Word
*append_elf_note(Elf64_Word *buf, char *name, unsigned type, void *data,
......@@ -86,7 +86,7 @@ kdump_wait_cpu_freeze(void)
int cpu_num = num_online_cpus() - 1;
int timeout = 1000;
while(timeout-- > 0) {
if (atomic_read(&kdump_cpu_freezed) == cpu_num)
if (atomic_read(&kdump_cpu_frozen) == cpu_num)
return 0;
udelay(1000);
}
......@@ -108,8 +108,8 @@ machine_crash_shutdown(struct pt_regs *pt)
kexec_disable_iosapic();
#ifdef CONFIG_SMP
kdump_smp_send_stop();
/* not all cpu response to IPI, send INIT to freeze them */
if (kdump_wait_cpu_freeze() && kdump_on_init) {
//not all cpu response to IPI, send INIT to freeze them
kdump_smp_send_init();
}
#endif
......@@ -136,7 +136,7 @@ kdump_cpu_freeze(struct unw_frame_info *info, void *arg)
cpuid = smp_processor_id();
crash_save_this_cpu();
current->thread.ksp = (__u64)info->sw - 16;
atomic_inc(&kdump_cpu_freezed);
atomic_inc(&kdump_cpu_frozen);
kdump_status[cpuid] = 1;
mb();
#ifdef CONFIG_HOTPLUG_CPU
......
......@@ -1142,7 +1142,7 @@ efi_initialize_iomem_resources(struct resource *code_resource,
/* find a block of memory aligned to 64M exclude reserved regions
rsvd_regions are sorted
*/
unsigned long
unsigned long __init
kdump_find_rsvd_region (unsigned long size,
struct rsvd_region *r, int n)
{
......
......@@ -1192,8 +1192,6 @@ void
ia64_mca_handler(struct pt_regs *regs, struct switch_stack *sw,
struct ia64_sal_os_state *sos)
{
pal_processor_state_info_t *psp = (pal_processor_state_info_t *)
&sos->proc_state_param;
int recover, cpu = smp_processor_id();
struct task_struct *previous_current;
struct ia64_mca_notify_die nd =
......@@ -1223,10 +1221,8 @@ ia64_mca_handler(struct pt_regs *regs, struct switch_stack *sw,
/* Get the MCA error record and log it */
ia64_mca_log_sal_error_record(SAL_INFO_TYPE_MCA);
/* TLB error is only exist in this SAL error record */
recover = (psp->tc && !(psp->cc || psp->bc || psp->rc || psp->uc))
/* other error recovery */
|| (ia64_mca_ucmc_extension
/* MCA error recovery */
recover = (ia64_mca_ucmc_extension
&& ia64_mca_ucmc_extension(
IA64_LOG_CURR_BUFFER(SAL_INFO_TYPE_MCA),
sos));
......
......@@ -602,11 +602,40 @@ recover_from_platform_error(slidx_table_t *slidx, peidx_table_t *peidx,
default:
break;
}
} else if (psp->cc && !psp->bc) { /* Cache error */
status = recover_from_read_error(slidx, peidx, pbci, sos);
}
return status;
}
/*
* recover_from_tlb_check
* @peidx: pointer of index of processor error section
*
* Return value:
* 1 on Success / 0 on Failure
*/
static int
recover_from_tlb_check(peidx_table_t *peidx)
{
sal_log_mod_error_info_t *smei;
pal_tlb_check_info_t *ptci;
smei = (sal_log_mod_error_info_t *)peidx_tlb_check(peidx, 0);
ptci = (pal_tlb_check_info_t *)&(smei->check_info);
/*
* Look for signature of a duplicate TLB DTC entry, which is
* a SW bug and always fatal.
*/
if (ptci->op == PAL_TLB_CHECK_OP_PURGE
&& !(ptci->itr || ptci->dtc || ptci->itc))
return fatal_mca("Duplicate TLB entry");
return mca_recovered("TLB check recovered");
}
/**
* recover_from_processor_error
* @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,
* Return value:
* 1 on Success / 0 on Failure
*/
/*
* Later we try to recover when below all conditions are satisfied.
* 1. Only one processor error section is exist.
* 2. BUS_CHECK is exist and the others are not exist.(Except TLB_CHECK)
* 3. The entry of BUS_CHECK_INFO is 1.
* 4. "External bus error" flag is set and the others are not set.
*/
static int
recover_from_processor_error(int platform, slidx_table_t *slidx,
......@@ -651,39 +673,40 @@ recover_from_processor_error(int platform, slidx_table_t *slidx,
if (psp->us || psp->ci == 0)
return fatal_mca("error not contained");
/*
* Look for recoverable TLB check
*/
if (psp->tc && !(psp->cc || psp->bc || psp->rc || psp->uc))
return recover_from_tlb_check(peidx);
/*
* The cache check and bus check bits have four possible states
* cc bc
* 0 0 Weird record, not recovered
* 1 0 Cache error, not recovered
* 0 1 I/O error, attempt recovery
* 1 1 Memory error, attempt recovery
* 1 0 Cache error, attempt recovery
* 0 1 I/O error, attempt recovery
* 0 0 Other error type, not recovered
*/
if (psp->bc == 0 || pbci == NULL)
return fatal_mca("No bus check");
if (psp->cc == 0 && (psp->bc == 0 || pbci == NULL))
return fatal_mca("No cache or bus check");
/*
* Sorry, we cannot handle so many.
* Cannot handle more than one bus check.
*/
if (peidx_bus_check_num(peidx) > 1)
return fatal_mca("Too many bus checks");
/*
* Well, here is only one bus error.
*/
if (pbci->ib)
return fatal_mca("Internal Bus error");
if (pbci->cc)
return fatal_mca("Cache-cache error");
if (pbci->eb && pbci->bsi > 0)
return fatal_mca("External bus check fatal status");
/*
* This is a local MCA and estimated as recoverble external bus error.
* (e.g. a load from poisoned memory)
* This means "there are some platform errors".
* This is a local MCA and estimated as a recoverble error.
*/
if (platform)
return recover_from_platform_error(slidx, peidx, pbci, sos);
/*
* On account of strange SAL error record, we cannot recover.
*/
......
......@@ -1573,6 +1573,7 @@ sys_ptrace (long request, pid_t pid, unsigned long addr, unsigned long data)
case PTRACE_DETACH:
/* detach a process that was attached. */
clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
ret = ptrace_detach(child, data);
goto out_tsk;
......
......@@ -22,7 +22,6 @@
} while(0)
extern struct kimage *ia64_kimage;
DECLARE_PER_CPU(u64, ia64_mca_pal_base);
extern const unsigned int relocate_new_kernel_size;
extern void relocate_new_kernel(unsigned long, unsigned long,
struct ia64_boot_param *, unsigned long);
......
......@@ -156,6 +156,8 @@ struct ia64_mca_notify_die {
int *monarch_cpu;
};
DECLARE_PER_CPU(u64, ia64_mca_pal_base);
#else /* __ASSEMBLY__ */
#define IA64_MCA_CORRECTED 0x0 /* Error has been corrected by OS_MCA */
......
......@@ -371,6 +371,7 @@ typedef u64 pal_mc_info_index_t;
* dependent
*/
#define PAL_TLB_CHECK_OP_PURGE 8
typedef struct pal_process_state_info_s {
u64 reserved1 : 2,
......
......@@ -9,6 +9,7 @@
#include <asm/io.h>
#include <asm/scatterlist.h>
#include <asm/hw_irq.h>
/*
* Can be used to override the logic in pci_scan_bus for skipping already-configured bus
......@@ -170,7 +171,7 @@ pcibios_select_root(struct pci_dev *pdev, struct resource *res)
#define HAVE_ARCH_PCI_GET_LEGACY_IDE_IRQ
static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
{
return channel ? 15 : 14;
return channel ? isa_irq_to_vector(15) : isa_irq_to_vector(14);
}
#endif /* _ASM_IA64_PCI_H */
......@@ -847,12 +847,13 @@ extern int ia64_sal_oemcall_reentrant(struct ia64_sal_retval *, u64, u64, u64,
*/
struct sal_to_os_boot {
u64 rr[8]; /* Region Registers */
u64 br[6]; /* br0: return addr into SAL boot rendez routine */
u64 br[6]; /* br0:
* return addr into SAL boot rendez routine */
u64 gr1; /* SAL:GP */
u64 gr12; /* SAL:SP */
u64 gr13; /* SAL: Task Pointer */
u64 fpsr;
u64 pfs;
u64 pfs;
u64 rnat;
u64 unat;
u64 bspstore;
......
......@@ -81,7 +81,7 @@ struct unw_frame_info {
struct unw_ireg {
unsigned long *loc;
struct unw_ireg_nat {
long type : 3; /* enum unw_nat_type */
unsigned long type : 3; /* enum unw_nat_type */
signed long off : 61; /* NaT word is at loc+nat.off */
} nat;
} r4, r5, r6, r7;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment