1. 30 1月, 2008 2 次提交
    • I
      x86: fix DMI ioremap leak · 0d64484f
      Ingo Molnar 提交于
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      0d64484f
    • P
      x86: fix DMI out of memory problems · 79da4721
      Parag Warudkar 提交于
      People with HP Desktops (including me) encounter couple of DMI errors
      during boot - dmi_save_oem_strings_devices: out of memory and
      dmi_string: out of memory.
      
      On some HP desktops the DMI data include OEM strings (type 11) out of
      which only few are meaningful and most other are empty. DMI code
      religiously creates copies of these 27 strings (65 bytes each in my
      case) and goes OOM in dmi_string().
      
      If DMI_MAX_DATA is bumped up a little then it goes and fails in
      dmi_save_oem_strings while allocating dmi_devices of sizeof(struct
      dmi_device) corresponding to these strings.
      
      On x86_64 since we cannot use alloc_bootmem this early, the code uses a
      static array of 2048 bytes (DMI_MAX_DATA) for allocating the memory DMI
      needs. It does not survive the creation of empty strings and devices.
      
      Fix this by detecting and not newly allocating empty strings and instead
      using a one statically defined dmi_empty_string.
      
      Also do not create a new struct dmi_device for each empty string - use
      one statically define dmi_device with .name=dmi_empty_string and add
      that to the dmi_devices list.
      
      On x64 this should stop the OOM with same current size of DMI_MAX_DATA
      and on x86 this should save a good amount of (27*65 bytes +
      27*sizeof(struct dmi_device) bootmem.
      
      Compile and boot tested on both 32-bit and 64-bit x86.
      Signed-off-by: NParag Warudkar <parag.warudkar@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      79da4721
  2. 24 1月, 2008 1 次提交
  3. 10 10月, 2007 1 次提交
    • J
      drivers/firmware: const-ify DMI API and internals · 1855256c
      Jeff Garzik 提交于
      Three main sets of changes:
      
      1) dmi_get_system_info() return value should have been marked const,
         since callers should not be changing that data.
      
      2) const-ify DMI internals, since DMI firmware tables should,
         whenever possible, be marked const to ensure we never ever write to
         that data area.
      
      3) const-ify DMI API, to enable marking tables const where possible
         in low-level drivers.
      
      And if we're really lucky, this might enable some additional
      optimizations on the part of the compiler.
      
      The bulk of the changes are #2 and #3, which are interrelated.  #1 could
      have been a separate patch, but it was so small compared to the others,
      it was easier to roll it into this changeset.
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      1855256c
  4. 12 7月, 2007 1 次提交
    • L
      DMI-based module autoloading · 4f5c791a
      Lennart Poettering 提交于
      The patch below adds DMI/SMBIOS based module autoloading to the Linux
      kernel. The idea is to load laptop drivers automatically (and other
      drivers which cannot be autoloaded otherwise), based on the DMI system
      identification information of the BIOS.
      
      Right now most distros manually try to load all available laptop
      drivers on bootup in the hope that at least one of them loads
      successfully. This patch does away with all that, and uses udev to
      automatically load matching drivers on the right machines.
      
      Basically the patch just exports the DMI information that has been
      parsed by the kernel anyway to userspace via a sysfs device
      /sys/class/dmi/id and makes sure that proper modalias attributes are
      available. Besides adding the "modalias" attribute it also adds
      attributes for a few other DMI fields which might be useful for
      writing udev rules.
      
      This patch is not an attempt to export the entire DMI/SMBIOS data to
      userspace. We already have "dmidecode" which parses the complete DMI
      info from userspace. The purpose of this patch is machine model
      identification and good udev integration.
      
      To take advantage of DMI based module autoloading, a driver should
      export one or more MODULE_ALIAS fields similar to these:
      
      MODULE_ALIAS("dmi:*:svnMICRO-STARINT'LCO.,LTD:pnMS-1013:pvr0131*:cvnMICRO-STARINT'LCO.,LTD:ct10:*");
      MODULE_ALIAS("dmi:*:svnMicro-StarInternational:pnMS-1058:pvr0581:rvnMSI:rnMS-1058:*:ct10:*");
      MODULE_ALIAS("dmi:*:svnMicro-StarInternational:pnMS-1412:*:rvnMSI:rnMS-1412:*:cvnMICRO-STARINT'LCO.,LTD:ct10:*");
      MODULE_ALIAS("dmi:*:svnNOTEBOOK:pnSAM2000:pvr0131*:cvnMICRO-STARINT'LCO.,LTD:ct10:*");
      
      These lines are specific to my msi-laptop.c driver. They are basically
      just a concatenation of a few carefully selected DMI fields with all
      potentially bad characters stripped.
      
      Besides laptop drivers, modules like "hdaps", the i2c modules
      and the hwmon modules are good candidates for "dmi:" MODULE_ALIAS
      lines.
      
      Besides merely exporting the DMI data via sysfs the patch adds
      support for a few more DMI fields. Especially the CHASSIS fields are
      very useful to identify different laptop modules. The patch also adds
      working MODULE_ALIAS lines to my msi-laptop.c driver.
      
      I'd like to thank Kay Sievers for helping me to clean up this patch
      for posting it on lkml.
      
      Patch is against Linus' current GIT HEAD. Should probably apply to
      older kernels as well without modification.
      Signed-off-by: NLennart Poettering <mzxreary@0pointer.de>
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      
      4f5c791a
  5. 22 10月, 2006 1 次提交
  6. 30 9月, 2006 1 次提交
  7. 26 6月, 2006 1 次提交
  8. 15 4月, 2006 1 次提交
  9. 27 3月, 2006 4 次提交
    • T
      [PATCH] EFI fixes · 23dd842c
      Tolentino, Matthew E 提交于
      Here's a patch that fixes EFI boot for x86 on 2.6.16-rc5-mm3.  The
      off-by-one is admittedly my fault, but the other two fix up the rest.
      
      Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
      Cc: Matt Domsch <Matt_Domsch@dell.com>
      Cc: "Tolentino, Matthew E" <matthew.e.tolentino@intel.com>
      Cc: "Brown, Len" <len.brown@intel.com>
      Cc: Andi Kleen <ak@muc.de>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      23dd842c
    • B
      [PATCH] EFI: keep physical table addresses in efi structure · b2c99e3c
      Bjorn Helgaas 提交于
      Almost all users of the table addresses from the EFI system table want
      physical addresses.  So rather than doing the pa->va->pa conversion, just keep
      physical addresses in struct efi.
      
      This fixes a DMI bug: the efi structure contained the physical SMBIOS address
      on x86 but the virtual address on ia64, so dmi_scan_machine() used ioremap()
      on a virtual address on ia64.
      
      This is essentially the same as an earlier patch by Matt Tolentino:
      	http://marc.theaimsgroup.com/?l=linux-kernel&m=112130292316281&w=2
      except that this changes all table addresses, not just ACPI addresses.
      
      Matt's original patch was backed out because it caused MCAs on HP sx1000
      systems.  That problem is resolved by the ioremap() attribute checking added
      for ia64.
      Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Cc: Matt Domsch <Matt_Domsch@dell.com>
      Cc: "Tolentino, Matthew E" <matthew.e.tolentino@intel.com>
      Cc: "Brown, Len" <len.brown@intel.com>
      Cc: Andi Kleen <ak@muc.de>
      Acked-by: N"Luck, Tony" <tony.luck@intel.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      b2c99e3c
    • B
      [PATCH] DMI: only ioremap stuff we actually need · 27d8e3d1
      Bjorn Helgaas 提交于
      dmi_scan_machine() tries to ioremap 0x10000 (64K) bytes, even though it only
      looks at the first 32 bytes or so.  If the SMBIOS table is near the end of a
      memory region, the ioremap() may fail when it shouldn't.
      
      This is in the efi_enabled path, so it really only affects ia64 at the moment.
      Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Cc: Matt Domsch <Matt_Domsch@dell.com>
      Cc: "Tolentino, Matthew E" <matthew.e.tolentino@intel.com>
      Cc: "Brown, Len" <len.brown@intel.com>
      Cc: Andi Kleen <ak@muc.de>
      Acked-by: N"Luck, Tony" <tony.luck@intel.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      27d8e3d1
    • M
      [PATCH] ia64: use i386 dmi_scan.c · 3ed3bce8
      Matt Domsch 提交于
      Enable DMI table parsing on ia64.
      
      Andi Kleen has a patch in his x86_64 tree which enables the use of i386
      dmi_scan.c on x86_64.  dmi_scan.c functions are being used by the
      drivers/char/ipmi/ipmi_si_intf.c driver for autodetecting the ports or
      memory spaces where the IPMI controllers may be found.
      
      This patch adds equivalent changes for ia64 as to what is in the x86_64
      tree.  In addition, I reworked the DMI detection, such that on EFI-capable
      systems, it uses the efi.smbios pointer to find the table, rather than
      brute-force searching from 0xF0000.  On non-EFI systems, it continues the
      brute-force search.
      
      My test system, an Intel S870BN4 'Tiger4', aka Dell PowerEdge 7250, with
      latest BIOS, does not list the IPMI controller in the ACPI namespace, nor
      does it have an ACPI SPMI table.  Also note, currently shipping Dell x8xx
      EM64T servers don't have these either, so DMI is the only method for
      obtaining the address of the IPMI controller.
      Signed-off-by: NMatt Domsch <Matt_Domsch@dell.com>
      Acked-by: N"Luck, Tony" <tony.luck@intel.com>
      Cc: Andi Kleen <ak@muc.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3ed3bce8
  10. 26 3月, 2006 3 次提交
  11. 12 1月, 2006 1 次提交
    • A
      [PATCH] x86_64: Generalize DMI and enable for x86-64 · e9928674
      Andi Kleen 提交于
      Some people need it now on 64bit so reuse the i386 code for
      x86-64. This will be also useful for future bug workarounds.
      
      It is a bit simplified there because there is no need
      to do it very early on x86-64. This means it doesn't need
      early ioremap et.al. We run it as a core initcall right now.
      
      I hope it's not needed for early setup.
      
      I added a general CONFIG_DMI symbol in case IA64 or someone
      else wants to reuse the code later too.
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      e9928674
  12. 08 9月, 2005 5 次提交
  13. 26 6月, 2005 5 次提交
  14. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4