Commit 9b9c353f authored by Yi-wei Zhao's avatar Yi-wei Zhao Committed by Yinjun Chen

drivers: apanic_mmc: write panic information to raw MMC partition

This patch is created based on the following changes:

* (CR) apanic_mmc: support writing panic data to
  raw MMC partition
  Reviewed-on: http://gerrit.pcs.mot.com/342283

* (CR): fix no apanic_threads issue
  Reviewed-on: http://gerrit.pcs.mot.com/377655

* (CR) Porting omap split apanic_threads to qcom
  Reviewed-on: http://gerrit.pcs.mot.com/377659

* (CR): Support apanic dump ftrace buffer no
  more than 512k
  Reviewed-on: http://gerrit.pcs.mot.com/377664

* (CR): port apanic annotations from AP20
  Reviewed-on: http://gerrit.pcs.mot.com/392744

* (CR): apanic: add read support to user space
  annotations
  Reviewed-on: http://gerrit.pcs.mot.com/400182

* (CR) Fix potential watchdog reset on emmc kernel
  panic failure for qcom platform.
  Reviewed-on: http://gerrit.pcs.mot.com/404849

Change-Id: Ice455ee53448f05d6d252ab4378963d1cbd01443
Signed-off-by: 's avatarYi-wei Zhao <gbjc64@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/503768Tested-by: 's avatarJira Key <JIRAKEY@motorola.com>
Reviewed-by: 's avatarJason Hrycay <jason.hrycay@motorola.com>
(cherry picked from commit eeef74de)
Signed-off-by: 's avatarJeffrey Carlyle <jeff.carlyle@motorola.com>
parent 34b867a1
......@@ -542,6 +542,29 @@ config WL127X_RFKILL
Creates an rfkill entry in sysfs for power control of Bluetooth
TI wl127x chips.
config APANIC_MMC
bool "Android kernel panic diagnostics driver on mmc"
default n
---help---
Driver which handles kernel panics and attempts to write
critical debugging data through mmc.
config APANIC_MMC_MEMDUMP
bool "Android memory dump driver on mmc"
depends on APANIC_MMC
default n
---help---
Driver which handles kernel panics and attempts to write
full memory dump through mmc.
config APANIC_PLABEL
string "Android panic dump flash partition label"
depends on APANIC_MMC
default "kpanic"
---help---
If your platform uses a different flash partition label for storing
crashdumps, enter it here.
config TSIF
depends on ARCH_MSM8X60 || ARCH_MSM8960 || ARCH_APQ8064
tristate "TSIF (Transport Stream InterFace) support"
......
......@@ -54,6 +54,7 @@ obj-$(CONFIG_MAX8997_MUIC) += max8997-muic.o
obj-$(CONFIG_WL127X_RFKILL) += wl127x-rfkill.o
obj-$(CONFIG_SENSORS_AK8975) += akm8975.o
obj-$(CONFIG_SENSORS_MSP430) += msp430.o
obj-$(CONFIG_APANIC_MMC) += apanic_mmc.o
obj-$(CONFIG_TSIF) += msm_tsif.o
obj-$(CONFIG_VIB_TIMED) += vib-timed.o
msm_tsif-objs := tsif.o
......
This diff is collapsed.
/*
* include/linux/apanic_mmc.h
*
* Copyright 2012 Motorola Mobility LLC .
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#ifndef __LINUX_APANIC_MMC_H__
#define __LINUX_APANIC_MMC_H__
#include <linux/genhd.h>
#ifdef __KERNEL__
struct raw_mmc_panic_ops {
int type; /* MMC, SD, SDIO on the fly */
int (*panic_probe)(struct hd_struct *hd, int type);
int (*panic_write)(struct hd_struct *hd, char *buf,
unsigned int offset, unsigned int len);
int (*panic_erase)(struct hd_struct *hd, unsigned int offset,
unsigned int len);
};
#ifdef CONFIG_APANIC_MMC
int is_apanic_threads_dump(void);
int is_emergency_dump(void);
void emergency_dump(void);
void apanic_mmc_partition_add(struct hd_struct *part);
void apanic_mmc_partition_remove(struct hd_struct *part);
int apanic_mmc_annotate(const char *annotation);
int __init apanic_mmc_init(struct raw_mmc_panic_ops *panic_ops);
#else
static inline int is_apanic_threads_dump(void) { return 0; }
static inline int is_emergency_dump(void) { return 0; }
static inline void emergency_dump(void) {}
static inline void apanic_mmc_partition_add(struct hd_struct *part) {}
static inline void apanic_mmc_partition_remove(struct hd_struct *part) {}
static inline int apanic_mmc_annotate(const char *annotation) { return 0; }
static inline int apanic_mmc_init(struct raw_mmc_panic_ops *panic_ops)
{
return 0;
}
#endif /* CONFIG_APANIC_MMC */
#endif /* __KERNEL__ */
#endif /* __LINUX_APANIC_MMC_H__ */
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