From: zhenwei pi <pizhenwei@bytedance.com>
To: arnd@arndb.de, gregkh@linuxfoundation.org, peng.hao2@zte.com.cn
Cc: hutao@cn.fujitsu.com, linux-kernel@vger.kernel.org,
pizhenwei@bytedance.com
Subject: [PATCH v2 1/2] misc: pvpanic: move bit definition to uapi header file
Date: Sun, 15 Dec 2019 11:48:39 +0800 [thread overview]
Message-ID: <20191215034840.2273096-2-pizhenwei@bytedance.com> (raw)
In-Reply-To: <20191215034840.2273096-1-pizhenwei@bytedance.com>
Some processes outside of the kernel(Ex, QEMU) should know what the
value really is for, so move the bit definition to a uapi file.
Suggested-by: Greg KH <gregkh@linuxfoundation.org>
Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
---
drivers/misc/pvpanic.c | 3 +--
include/uapi/misc/pvpanic.h | 8 ++++++++
2 files changed, 9 insertions(+), 2 deletions(-)
create mode 100644 include/uapi/misc/pvpanic.h
diff --git a/drivers/misc/pvpanic.c b/drivers/misc/pvpanic.c
index 95ff7c5a1dfb..3f0de3be0a19 100644
--- a/drivers/misc/pvpanic.c
+++ b/drivers/misc/pvpanic.c
@@ -15,11 +15,10 @@
#include <linux/of_address.h>
#include <linux/platform_device.h>
#include <linux/types.h>
+#include <uapi/misc/pvpanic.h>
static void __iomem *base;
-#define PVPANIC_PANICKED (1 << 0)
-
MODULE_AUTHOR("Hu Tao <hutao@cn.fujitsu.com>");
MODULE_DESCRIPTION("pvpanic device driver");
MODULE_LICENSE("GPL");
diff --git a/include/uapi/misc/pvpanic.h b/include/uapi/misc/pvpanic.h
new file mode 100644
index 000000000000..cae69a822b25
--- /dev/null
+++ b/include/uapi/misc/pvpanic.h
@@ -0,0 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+
+#ifndef __PVPANIC_H__
+#define __PVPANIC_H__
+
+#define PVPANIC_PANICKED (1 << 0)
+
+#endif /* __PVPANIC_H__ */
--
2.11.0
next prev parent reply other threads:[~2019-12-15 3:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-15 3:48 [PATCH v2 0/2] misc: pvpanic: add crash loaded event zhenwei pi
2019-12-15 3:48 ` zhenwei pi [this message]
2019-12-15 3:48 ` [PATCH v2 2/2] " zhenwei pi
2020-01-18 20:56 ` [PATCH v2 0/2] " Paolo Bonzini
2019-12-25 6:26 zhenwei pi
2019-12-25 6:26 ` [PATCH v2 1/2] misc: pvpanic: move bit definition to uapi header file zhenwei pi
2020-01-02 2:35 [PATCH v2 0/2] misc: pvpanic: add crash loaded event zhenwei pi
2020-01-02 2:35 ` [PATCH v2 1/2] misc: pvpanic: move bit definition to uapi header file zhenwei pi
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=20191215034840.2273096-2-pizhenwei@bytedance.com \
--to=pizhenwei@bytedance.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=hutao@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peng.hao2@zte.com.cn \
/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;
as well as URLs for NNTP newsgroup(s).