On 22 November 2013 17:43, Yi Li yi.li@linaro.org wrote:
Add dmi support on arm32, it depends on efi boot.
Signed-off-by: Yi Li yi.li@linaro.org
arch/arm/Kconfig | 11 +++++++++++ arch/arm/include/asm/dmi.h | 30 ++++++++++++++++++++++++++++++ arch/arm/kernel/setup.c | 7 +++++++ 3 files changed, 48 insertions(+) create mode 100644 arch/arm/include/asm/dmi.h
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 11367a4..6c54d16 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1910,6 +1910,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
Same point as for arm64. Also, why the 'if EXPERT' here and not for arm64? Anyway, I think you could remove the help text completely and replace this line with something like
bool "Enable support for SMBIOS (DMI) tables" depends on EFI
---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" @@ -2348,6 +2357,8 @@ source "net/Kconfig"
source "drivers/Kconfig"
+source "drivers/firmware/Kconfig"
source "fs/Kconfig"
source "arch/arm/Kconfig.debug" diff --git a/arch/arm/include/asm/dmi.h b/arch/arm/include/asm/dmi.h new file mode 100644 index 0000000..2abd4bf --- /dev/null +++ b/arch/arm/include/asm/dmi.h @@ -0,0 +1,30 @@ +/*
- arch/arm/include/asm/dmi.h
- Copyright (C) 2013 Linaro Limited.
- Written by: Yi Li (yi.li@linaro.org)
- based on arch/arm64/include/asm/dmi.h
- This file is subject to the terms and conditions of the GNU General Public
- License. See the file "COPYING" in the main directory of this archive
- for more details.
- */
+#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_early_remap(x, l) __arm_ioremap((x), (l), MT_MEMORY) +#define dmi_early_unmap(x, l) __arm_iounmap(x) +#define dmi_remap ioremap +#define dmi_unmap(x, l) iounmap(x) +#define dmi_alloc(l) kzalloc(l, GFP_ATOMIC)
Please refer to the other email regarding the mapping functions
+#endif
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 0bde4e3..ba6e612 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -34,6 +34,7 @@ #ifdef CONFIG_ACPI #include <linux/acpi.h> #endif +#include <linux/dmi.h>
#include <asm/unified.h> #include <asm/cp15.h> @@ -1063,3 +1064,9 @@ const struct seq_operations cpuinfo_op = { .stop = c_stop, .show = c_show };
+#ifdef CONFIG_DMI
core_initcall(dmi_scan_machine);
+#endif
You could add the call to dmi_scan_machine() to customize_machine(), and frop the #ifdef as well.
Regards,