UPSTREAM: pstore: Add console log messages support
authorAnton Vorontsov <anton.vorontsov@linaro.org>
Sat, 26 May 2012 13:20:19 +0000 (06:20 -0700)
committerGerrit <chrome-bot@google.com>
Mon, 13 Aug 2012 21:22:19 +0000 (14:22 -0700)
commitac1605018451fc661f57f1a8c6076a970642ff53
tree472faaf410f6c1e89f969a4be7fc775ad174831e
parent9675773fbc8372285c76688075b60c7ce1289b31
UPSTREAM: pstore: Add console log messages support

Pstore doesn't support logging kernel messages in run-time, it only
dumps dmesg when kernel oopses/panics. This makes pstore useless for
debugging hangs caused by HW issues or improper use of HW (e.g.
weird device inserted -> driver tried to write a reserved bits ->
SoC hanged. In that case we don't get any messages in the pstore.

Therefore, let's add a runtime logging support: PSTORE_TYPE_CONSOLE.

Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Acked-by: Kees Cook <keescook@chromium.org>
Acked-by: Colin Cross <ccross@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit f29e5956aebafe63f81e80f972c44c4a666e5c7f)

BUG=chromium-os:33273
TEST=none

Change-Id: Ie171bdc67bc24b0f47adfd014e21743f0975d941
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29959
Reviewed-by: Kees Cook <keescook@chromium.org>
fs/pstore/Kconfig
fs/pstore/inode.c
fs/pstore/platform.c
include/linux/pstore.h