mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
Merge branch 'akpm' (patches from Andrew)
Merge more updates from Andrew Morton: - the rest of MM - various misc things - procfs updates - lib/ updates - checkpatch updates - kdump/kexec updates - add kvmalloc helpers, use them - time helper updates for Y2038 issues. We're almost ready to remove current_fs_time() but that awaits a btrfs merge. - add tracepoints to DAX * emailed patches from Andrew Morton <[email protected]>: (114 commits) drivers/staging/ccree/ssi_hash.c: fix build with gcc-4.4.4 selftests/vm: add a test for virtual address range mapping dax: add tracepoint to dax_insert_mapping() dax: add tracepoint to dax_writeback_one() dax: add tracepoints to dax_writeback_mapping_range() dax: add tracepoints to dax_load_hole() dax: add tracepoints to dax_pfn_mkwrite() dax: add tracepoints to dax_iomap_pte_fault() mtd: nand: nandsim: convert to memalloc_noreclaim_*() treewide: convert PF_MEMALLOC manipulations to new helpers mm: introduce memalloc_noreclaim_{save,restore} mm: prevent potential recursive reclaim due to clearing PF_MEMALLOC mm/huge_memory.c: deposit a pgtable for DAX PMD faults when required mm/huge_memory.c: use zap_deposited_table() more time: delete CURRENT_TIME_SEC and CURRENT_TIME gfs2: replace CURRENT_TIME with current_time apparmorfs: replace CURRENT_TIME with current_time() lustre: replace CURRENT_TIME macro fs: ubifs: replace CURRENT_TIME_SEC with current_time fs: ufs: use ktime_get_real_ts64() for birthtime ...
This commit is contained in:
commit
bf5f89463f
323 changed files with 2448 additions and 2106 deletions
|
|
@ -571,21 +571,23 @@ config RELOCATABLE_TEST
|
|||
relocation code.
|
||||
|
||||
config CRASH_DUMP
|
||||
bool "Build a kdump crash kernel"
|
||||
bool "Build a dump capture kernel"
|
||||
depends on PPC64 || 6xx || FSL_BOOKE || (44x && !SMP)
|
||||
select RELOCATABLE if PPC64 || 44x || FSL_BOOKE
|
||||
help
|
||||
Build a kernel suitable for use as a kdump capture kernel.
|
||||
Build a kernel suitable for use as a dump capture kernel.
|
||||
The same kernel binary can be used as production kernel and dump
|
||||
capture kernel.
|
||||
|
||||
config FA_DUMP
|
||||
bool "Firmware-assisted dump"
|
||||
depends on PPC64 && PPC_RTAS && CRASH_DUMP && KEXEC_CORE
|
||||
depends on PPC64 && PPC_RTAS
|
||||
select CRASH_CORE
|
||||
select CRASH_DUMP
|
||||
help
|
||||
A robust mechanism to get reliable kernel crash dump with
|
||||
assistance from firmware. This approach does not use kexec,
|
||||
instead firmware assists in booting the kdump kernel
|
||||
instead firmware assists in booting the capture kernel
|
||||
while preserving memory contents. Firmware-assisted dump
|
||||
is meant to be a kdump replacement offering robustness and
|
||||
speed not possible without system firmware assistance.
|
||||
|
|
|
|||
|
|
@ -73,6 +73,8 @@
|
|||
reg_entry++; \
|
||||
})
|
||||
|
||||
extern int crashing_cpu;
|
||||
|
||||
/* Kernel Dump section info */
|
||||
struct fadump_section {
|
||||
__be32 request_flag;
|
||||
|
|
|
|||
|
|
@ -43,8 +43,6 @@
|
|||
#define IPI_TIMEOUT 10000
|
||||
#define REAL_MODE_TIMEOUT 10000
|
||||
|
||||
/* This keeps a track of which one is the crashing cpu. */
|
||||
int crashing_cpu = -1;
|
||||
static int time_to_dump;
|
||||
|
||||
#define CRASH_HANDLER_MAX 3
|
||||
|
|
|
|||
|
|
@ -209,14 +209,20 @@ static unsigned long init_fadump_mem_struct(struct fadump_mem_struct *fdm,
|
|||
*/
|
||||
static inline unsigned long fadump_calculate_reserve_size(void)
|
||||
{
|
||||
unsigned long size;
|
||||
int ret;
|
||||
unsigned long long base, size;
|
||||
|
||||
/*
|
||||
* Check if the size is specified through fadump_reserve_mem= cmdline
|
||||
* option. If yes, then use that.
|
||||
* Check if the size is specified through crashkernel= cmdline
|
||||
* option. If yes, then use that but ignore base as fadump
|
||||
* reserves memory at end of RAM.
|
||||
*/
|
||||
if (fw_dump.reserve_bootvar)
|
||||
ret = parse_crashkernel(boot_command_line, memblock_phys_mem_size(),
|
||||
&size, &base);
|
||||
if (ret == 0 && size > 0) {
|
||||
fw_dump.reserve_bootvar = (unsigned long)size;
|
||||
return fw_dump.reserve_bootvar;
|
||||
}
|
||||
|
||||
/* divide by 20 to get 5% of value */
|
||||
size = memblock_end_of_DRAM() / 20;
|
||||
|
|
@ -371,15 +377,6 @@ static int __init early_fadump_param(char *p)
|
|||
}
|
||||
early_param("fadump", early_fadump_param);
|
||||
|
||||
/* Look for fadump_reserve_mem= cmdline option */
|
||||
static int __init early_fadump_reserve_mem(char *p)
|
||||
{
|
||||
if (p)
|
||||
fw_dump.reserve_bootvar = memparse(p, &p);
|
||||
return 0;
|
||||
}
|
||||
early_param("fadump_reserve_mem", early_fadump_reserve_mem);
|
||||
|
||||
static void register_fw_dump(struct fadump_mem_struct *fdm)
|
||||
{
|
||||
int rc;
|
||||
|
|
@ -527,34 +524,6 @@ fadump_read_registers(struct fadump_reg_entry *reg_entry, struct pt_regs *regs)
|
|||
return reg_entry;
|
||||
}
|
||||
|
||||
static u32 *fadump_append_elf_note(u32 *buf, char *name, unsigned type,
|
||||
void *data, size_t data_len)
|
||||
{
|
||||
struct elf_note note;
|
||||
|
||||
note.n_namesz = strlen(name) + 1;
|
||||
note.n_descsz = data_len;
|
||||
note.n_type = type;
|
||||
memcpy(buf, ¬e, sizeof(note));
|
||||
buf += (sizeof(note) + 3)/4;
|
||||
memcpy(buf, name, note.n_namesz);
|
||||
buf += (note.n_namesz + 3)/4;
|
||||
memcpy(buf, data, note.n_descsz);
|
||||
buf += (note.n_descsz + 3)/4;
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
static void fadump_final_note(u32 *buf)
|
||||
{
|
||||
struct elf_note note;
|
||||
|
||||
note.n_namesz = 0;
|
||||
note.n_descsz = 0;
|
||||
note.n_type = 0;
|
||||
memcpy(buf, ¬e, sizeof(note));
|
||||
}
|
||||
|
||||
static u32 *fadump_regs_to_elf_notes(u32 *buf, struct pt_regs *regs)
|
||||
{
|
||||
struct elf_prstatus prstatus;
|
||||
|
|
@ -565,8 +534,8 @@ static u32 *fadump_regs_to_elf_notes(u32 *buf, struct pt_regs *regs)
|
|||
* prstatus.pr_pid = ????
|
||||
*/
|
||||
elf_core_copy_kernel_regs(&prstatus.pr_reg, regs);
|
||||
buf = fadump_append_elf_note(buf, KEXEC_CORE_NOTE_NAME, NT_PRSTATUS,
|
||||
&prstatus, sizeof(prstatus));
|
||||
buf = append_elf_note(buf, CRASH_CORE_NOTE_NAME, NT_PRSTATUS,
|
||||
&prstatus, sizeof(prstatus));
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
|
@ -707,7 +676,7 @@ static int __init fadump_build_cpu_notes(const struct fadump_mem_struct *fdm)
|
|||
note_buf = fadump_regs_to_elf_notes(note_buf, ®s);
|
||||
}
|
||||
}
|
||||
fadump_final_note(note_buf);
|
||||
final_note(note_buf);
|
||||
|
||||
if (fdh) {
|
||||
pr_debug("Updating elfcore header (%llx) with cpu notes\n",
|
||||
|
|
|
|||
|
|
@ -125,6 +125,11 @@ int ppc_do_canonicalize_irqs;
|
|||
EXPORT_SYMBOL(ppc_do_canonicalize_irqs);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CRASH_CORE
|
||||
/* This keeps a track of which one is the crashing cpu. */
|
||||
int crashing_cpu = -1;
|
||||
#endif
|
||||
|
||||
/* also used by kexec */
|
||||
void machine_shutdown(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ static u32 acop_get_inst(struct pt_regs *regs)
|
|||
}
|
||||
|
||||
/**
|
||||
* @regs: regsiters at time of interrupt
|
||||
* @regs: registers at time of interrupt
|
||||
* @address: storage address
|
||||
* @error_code: Fault code, usually the DSISR or ESR depending on
|
||||
* processor type
|
||||
|
|
|
|||
Loading…
Reference in a new issue