From: mlangsdo@redhat.com (Mark Langsdorf)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/4] arm64: kdebugfs: create arm64 debugfs directory
Date: Thu, 24 May 2018 14:09:30 -0500 [thread overview]
Message-ID: <20180524190932.32118-3-mlangsdo@redhat.com> (raw)
In-Reply-To: <20180524190932.32118-1-mlangsdo@redhat.com>
Create debugfs directory for arm64, like the existing one for x86.
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
---
arch/arm64/kernel/Makefile | 3 ++-
arch/arm64/kernel/kdebugfs.c | 27 +++++++++++++++++++++++++++
2 files changed, 29 insertions(+), 1 deletion(-)
create mode 100644 arch/arm64/kernel/kdebugfs.c
diff --git a/arch/arm64/kernel/Makefile b/arch/arm64/kernel/Makefile
index bf825f3..a48b298 100644
--- a/arch/arm64/kernel/Makefile
+++ b/arch/arm64/kernel/Makefile
@@ -18,7 +18,8 @@ arm64-obj-y := debug-monitors.o entry.o irq.o fpsimd.o \
hyp-stub.o psci.o cpu_ops.o insn.o \
return_address.o cpuinfo.o cpu_errata.o \
cpufeature.o alternative.o cacheinfo.o \
- smp.o smp_spin_table.o topology.o smccc-call.o
+ smp.o smp_spin_table.o topology.o smccc-call.o \
+ kdebugfs.o
extra-$(CONFIG_EFI) := efi-entry.o
diff --git a/arch/arm64/kernel/kdebugfs.c b/arch/arm64/kernel/kdebugfs.c
new file mode 100644
index 0000000..e1e3332
--- /dev/null
+++ b/arch/arm64/kernel/kdebugfs.c
@@ -0,0 +1,27 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Architecture specific debugfs files
+ *
+ * Copyright (C) 2018 Red Hat, Inc.
+ */
+
+#include <linux/debugfs.h>
+#include <linux/export.h>
+#include <linux/init.h>
+
+struct dentry *arch_debugfs_dir;
+EXPORT_SYMBOL(arch_debugfs_dir);
+
+static int __init arch_kdebugfs_init(void)
+{
+ int error = 0;
+
+ arch_debugfs_dir = debugfs_create_dir("arm64", NULL);
+ if (IS_ERR(arch_debugfs_dir)) {
+ arch_debugfs_dir = NULL;
+ return -ENOMEM;
+ }
+
+ return error;
+}
+postcore_initcall(arch_kdebugfs_init);
--
2.9.5
next prev parent reply other threads:[~2018-05-24 19:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-24 19:09 [PATCH 0/4] arm64: align KPTI interface with x86 Mark Langsdorf
2018-05-24 19:09 ` [PATCH 1/4] arm64: capabilities: add nopti command line argument Mark Langsdorf
2018-05-30 8:59 ` Suzuki K Poulose
2018-05-31 13:45 ` Mark Langsdorf
2018-05-24 19:09 ` Mark Langsdorf [this message]
2018-05-24 19:09 ` [PATCH 3/4] arm64: cpufeature: add debugfs interface for KPTI Mark Langsdorf
2018-05-24 19:09 ` [PATCH 4/4] arm64: cpufeature: always log KPTI setting on boot Mark Langsdorf
2018-05-29 21:12 ` Laura Abbott
2018-05-29 21:26 ` [PATCH 0/4] arm64: align KPTI interface with x86 Laura Abbott
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=20180524190932.32118-3-mlangsdo@redhat.com \
--to=mlangsdo@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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).