Hi,
Enclosed patch is an updated version, with proper credits to Matt
Mackall and the Linux Tiny project.
Sincerly,
Thomas
---
Turn CONFIG_DMI into a selectable option if EMBEDDED is defined, in
order to be able to remove the DMI table scanning code if it's not
needed, and then reduce the kernel code size.
With CONFIG_DMI (i.e before) :
text data bss dec hex filename
1076076 128656 98304 1303036 13e1fc vmlinux
Without CONFIG_DMI (i.e after) :
text data bss dec hex filename
1068092 126308 98304 1292704 13b9a0 vmlinux
Result:
text data bss dec hex filename
-7984 -2348 0 -10332 -285c vmlinux
The new option appears in "Processor type and features", only when
CONFIG_EMBEDDED is defined.
This patch is part of the Linux Tiny project, and is based on previous
work done by Matt Mackall <mpm@selenic.com>.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
arch/x86/Kconfig | 12 +++++++++---
include/linux/dmi.h | 1 +
2 files changed, 10 insertions(+), 3 deletions(-)
Index: linux/arch/x86/Kconfig
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- linux.orig/arch/x86/Kconfig 2008-02-11 16:51:50.000000000 +0100
+++ linux/arch/x86/Kconfig 2008-02-11 17:48:15.000000000 +0100
@@ -88,9 +88,6 @@
config ARCH_MAY_HAVE_PC_FDC
def_bool y
=20
-config DMI
- def_bool y
-
config RWSEM_GENERIC_SPINLOCK
def_bool !X86_XADD
=20
@@ -433,6 +430,15 @@
=20
# Mark as embedded because too many people got it wrong.
# The code disables itself when not needed.
+config DMI
+ default y
+ bool "Enable DMI scanning" if EMBEDDED
+ 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 PNP
+ BIOS code.
+
config GART_IOMMU
bool "GART IOMMU support" if EMBEDDED
default y
Index: linux/include/linux/dmi.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- linux.orig/include/linux/dmi.h 2008-02-11 16:51:30.000000000 +0100
+++ linux/include/linux/dmi.h 2008-02-11 17:40:31.000000000 +0100
@@ -90,6 +90,7 @@
static inline const char * dmi_get_system_info(int field) { return NULL; }
static inline const struct dmi_device * dmi_find_device(int type, const ch=
ar *name,
const struct dmi_device *from) { return NULL; }
+static inline void dmi_scan_machine(void) { return; }
static inline int dmi_get_year(int year) { return 0; }
static inline int dmi_name_in_vendors(const char *s) { return 0; }
#define dmi_available 0
--=20
Thomas Petazzoni, Free Electrons
Free Embedded Linux Training Materials
on http://free-electrons.com/training
(More than 1500 pages!)
| David Miller | Slow DOWN, please!!! |
| Tomasz Kłoczko | Is it time for remove (crap) ALSA from kernel tree ? |
| holzheu | [RFC/PATCH] Documentation of kernel messages |
| Jiri Kosina | HID merge plans for 2.6.28 |
git: | |
| ir0s | Local branch ahead of tracked remote branch but git push claims everything up-to-d... |
| Elijah Newren | Trying to use git-filter-branch to compress history by removing large, obsolete bi... |
| Shawn O. Pearce | Re: pack operation is thrashing my server |
| Aubrey Li | git proxy issue |
| KOSAKI Motohiro | [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
| Jussi Kivilinna | [PATCH 01/14] Fix sparse warning: returning void-valued expression |
| Roland Dreier | Re: setsockopt() |
| Shyam_Iyer | RE: [RFC][PATCH 1/1] cxgb3i: cxgb3 iSCSI initiator |
| L. V. Lammert | 'Nother broken package - git-1.5.4.2 |
| Jason Dixon | Wasting our Freedom |
| Pau | acer aspire one dmesg? |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| high memory | 1 hour ago | Linux kernel |
| semaphore access speed | 4 hours ago | Applications and Utilities |
| the kernel how to power off the machine | 5 hours ago | Linux kernel |
| Easter Eggs in windows XP | 7 hours ago | Windows |
| Shared swap partition | 8 hours ago | Linux general |
| Root password | 9 hours ago | Linux general |
| Where/when DNOTIFY is used? | 10 hours ago | Linux kernel |
| How to convert Linux Kernel built-in module into a loadable module | 13 hours ago | Linux kernel |
| Linux 2.6.24 and I/O schedulers | 13 hours ago | Linux kernel |
| USB Driver -- Interrupt Polling -- A Little Help Please | 19 hours ago | Linux general |
