From: Zhenguo Zhao <zhenguo6858@gmail.com>
To: nianfu.bai@unisoc.com, keescook@chromium.org, anton@enomsg.org,
ccross@android.com, tony.luck@intel.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 2/3] pstore: Add pstore back-end choice method in kconfig
Date: Fri, 29 Oct 2021 14:51:19 +0800 [thread overview]
Message-ID: <1635490280-8798-2-git-send-email-zhenguo6858@gmail.com> (raw)
In-Reply-To: <1635490280-8798-1-git-send-email-zhenguo6858@gmail.com>
From: Zhenguo Zhao <Zhenguo.Zhao1@unisoc.com>
The pstore has one storage device for back-end,so it should be
use choice method to config.
When ramoops config,insmod pstore_blk.ko,it will print unexpected,the
module will insmod failed.
if (backend && strcmp(backend, psi->name)) {
pr_warn("ignoring unexpected backend '%s'\n", psi->name);
return -EPERM;
}
Signed-off-by: Zhenguo Zhao <Zhenguo.Zhao1@unisoc.com>
---
fs/pstore/Kconfig | 57 ++++++++++++++++++++++++++++++-------------------------
1 file changed, 31 insertions(+), 26 deletions(-)
diff --git a/fs/pstore/Kconfig b/fs/pstore/Kconfig
index 8adabde..288ed3c 100644
--- a/fs/pstore/Kconfig
+++ b/fs/pstore/Kconfig
@@ -146,21 +146,40 @@ config PSTORE_FTRACE
If unsure, say N.
-config PSTORE_RAM
- tristate "Log panic/oops to a RAM buffer"
+choice
+ prompt "Choice pstore device"
depends on PSTORE
- depends on HAS_IOMEM
- select REED_SOLOMON
- select REED_SOLOMON_ENC8
- select REED_SOLOMON_DEC8
+ default PSTORE_RAM
help
- This enables panic and oops messages to be logged to a circular
- buffer in RAM where it can be read back at some later point.
-
- Note that for historical reasons, the module will be named
- "ramoops.ko".
+ This option chooses ram or blk to use pstore device.
+ config PSTORE_RAM
+ tristate "Log panic/oops to a RAM buffer"
+ depends on HAS_IOMEM
+ select REED_SOLOMON
+ select REED_SOLOMON_ENC8
+ select REED_SOLOMON_DEC8
+ help
+ This enables panic and oops messages to be logged to a circular
+ buffer in RAM where it can be read back at some later point.
+
+ Note that for historical reasons, the module will be named
+ "ramoops.ko".
+
+ For more information, see Documentation/admin-guide/ramoops.rst.
+
+ config PSTORE_BLK
+ tristate "Log panic/oops to a block device"
+ depends on BLOCK
+ select PSTORE_ZONE
+ help
+ This enables panic and oops message to be logged to a block dev
+ where it can be read back at some later point.
+
+ For more information, see Documentation/admin-guide/pstore-blk.rst
+
+ If unsure, say N.
- For more information, see Documentation/admin-guide/ramoops.rst.
+endchoice
config PSTORE_ZONE
tristate
@@ -169,20 +188,6 @@ config PSTORE_ZONE
The common layer for pstore/blk (and pstore/ram in the future)
to manage storage in zones.
-config PSTORE_BLK
- tristate "Log panic/oops to a block device"
- depends on PSTORE
- depends on BLOCK
- select PSTORE_ZONE
- default n
- help
- This enables panic and oops message to be logged to a block dev
- where it can be read back at some later point.
-
- For more information, see Documentation/admin-guide/pstore-blk.rst
-
- If unsure, say N.
-
config PSTORE_BLK_BLKDEV
string "block device identifier"
depends on PSTORE_BLK
--
1.9.1
next prev parent reply other threads:[~2021-10-29 6:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-29 6:51 [PATCH 1/3] pstore/zone: Remove redundant check for total size Zhenguo Zhao
2021-10-29 6:51 ` Zhenguo Zhao [this message]
2021-10-29 14:30 ` [PATCH 2/3] pstore: Add pstore back-end choice method in kconfig Kees Cook
2021-11-01 9:19 ` 赵振国
2021-10-29 6:51 ` [PATCH 3/3] pstore: Modify kconfig to align text Zhenguo Zhao
-- strict thread matches above, loose matches on Subject: below --
2021-09-24 8:59 [PATCH 1/3] pstore/zone: Remove redundant check for total size Zhenguo Zhao
2021-09-24 8:59 ` [PATCH 2/3] pstore: Add pstore back-end choice method in kconfig Zhenguo Zhao
2021-09-03 11:27 [PATCH 1/3] pstore/zone: Remove redundant check for total size Zhenguo Zhao
2021-09-03 11:27 ` [PATCH 2/3] pstore: Add pstore back-end choice method in kconfig Zhenguo Zhao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1635490280-8798-2-git-send-email-zhenguo6858@gmail.com \
--to=zhenguo6858@gmail.com \
--cc=anton@enomsg.org \
--cc=ccross@android.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nianfu.bai@unisoc.com \
--cc=tony.luck@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®