From: yi.li@linaro.org (Yi Li)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM:DMI: Add dmi driver support on arm
Date: Sat, 7 Sep 2013 00:02:51 +0800 [thread overview]
Message-ID: <1378483371-19858-2-git-send-email-yi.li@linaro.org> (raw)
In-Reply-To: <1378483371-19858-1-git-send-email-yi.li@linaro.org>
From: liyi <yi.li@linaro.org>
Add dmi driver support on arm, it depends on efi runtime service
enabled.
Signed-off-by: liyi <yi.li@linaro.org>
---
arch/arm/Kconfig | 9 +++++++++
arch/arm/include/asm/dmi.h | 12 ++++++++++++
arch/arm/kernel/setup.c | 7 ++++++-
3 files changed, 27 insertions(+), 1 deletion(-)
create mode 100644 arch/arm/include/asm/dmi.h
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index e8daccd..02abb1d 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1946,6 +1946,15 @@ config EFI_STUB
executed directly by EFI firmware.
See Documentation/efi-stub.txt for more information.
+config DMI
+ default y
+ bool "Enable DMI scanning" if EXPERT
+ ---help---
+ Enabled scanning of DMI to identify machine quirks. Say Y
+ here unless you have verified that your setup is not
+ affected by entries in the DMI blacklist. Required by EFI
+ support.
+
config SECCOMP
bool
prompt "Enable seccomp to safely compute untrusted bytecode"
diff --git a/arch/arm/include/asm/dmi.h b/arch/arm/include/asm/dmi.h
new file mode 100644
index 0000000..84baf0e
--- /dev/null
+++ b/arch/arm/include/asm/dmi.h
@@ -0,0 +1,12 @@
+#ifndef _ASM_DMI_H
+#define _ASM_DMI_H 1
+
+#include <linux/slab.h>
+#include <asm/io.h>
+#include <asm/mach/map.h>
+/* Use normal IO mappings for DMI */
+#define dmi_ioremap(x, l) __arm_ioremap((x), (l), MT_MEMORY)
+#define dmi_iounmap(x, l) __arm_iounmap((x))
+#define dmi_alloc(l) kmalloc(l, GFP_ATOMIC)
+
+#endif
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index a440211..2194554 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -34,13 +34,15 @@
#ifdef CONFIG_ACPI
#include <linux/acpi.h>
#endif
+#ifdef CONFIG_DMI
+#include <linux/dmi.h>
+#endif
#include <asm/unified.h>
#include <asm/cp15.h>
#include <asm/cpu.h>
#include <asm/cputype.h>
#include <asm/elf.h>
-#include <asm/io.h>
#include <asm/procinfo.h>
#include <asm/psci.h>
#include <asm/sections.h>
@@ -1073,3 +1075,6 @@ const struct seq_operations cpuinfo_op = {
.stop = c_stop,
.show = c_show
};
+#ifdef CONFIG_DMI
+ core_initcall(dmi_scan_machine);
+#endif
--
1.7.9.5
prev parent reply other threads:[~2013-09-06 16:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-06 16:02 [PATCH] Add dmi driver support on arm Yi Li
2013-09-06 16:02 ` Yi Li [this message]
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=1378483371-19858-2-git-send-email-yi.li@linaro.org \
--to=yi.li@linaro.org \
--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).