1. 24 10月, 2013 1 次提交
  2. 12 9月, 2013 4 次提交
  3. 01 8月, 2013 1 次提交
  4. 04 7月, 2013 1 次提交
  5. 01 5月, 2013 3 次提交
    • B
      dmi_scan: refactor dmi_scan_machine(), {smbios,dmi}_present() · 79bae42d
      Ben Hutchings 提交于
      Move the calls to memcpy_fromio() up into the loop in
      dmi_scan_machine(), and move the signature checks back down into
      dmi_decode().  We need to check at 16-byte intervals but keep a 32-byte
      buffer for an SMBIOS entry, so shift the buffer after each iteration.
      
      Merge smbios_present() into dmi_present(), so we look for an SMBIOS
      signature at the beginning of the given buffer and then for a DMI
      signature at an offset of 16 bytes.
      
      [artem.savkov@gmail.com: use proper buf type in dmi_present()]
      Signed-off-by: NBen Hutchings <ben@decadent.org.uk>
      Reported-by: NTim McGrath <tmhikaru@gmail.com>
      Tested-by: NTim Mcgrath <tmhikaru@gmail.com>
      Cc: Zhenzhong Duan <zhenzhong.duan@oracle.com>
      Signed-off-by: NArtem Savkov <artem.savkov@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      79bae42d
    • T
      dump_stack: implement arch-specific hardware description in task dumps · 98e5e1bf
      Tejun Heo 提交于
      x86 and ia64 can acquire extra hardware identification information
      from DMI and print it along with task dumps; however, the usage isn't
      consistent.
      
      * x86 show_regs() collects vendor, product and board strings and print
        them out with PID, comm and utsname.  Some of the information is
        printed again later in the same dump.
      
      * warn_slowpath_common() explicitly accesses the DMI board and prints
        it out with "Hardware name:" label.  This applies to both x86 and
        ia64 but is irrelevant on all other archs.
      
      * ia64 doesn't show DMI information on other non-WARN dumps.
      
      This patch introduces arch-specific hardware description used by
      dump_stack().  It can be set by calling dump_stack_set_arch_desc()
      during boot and, if exists, printed out in a separate line with
      "Hardware name:" label.
      
      dmi_set_dump_stack_arch_desc() is added which sets arch-specific
      description from DMI data.  It uses dmi_ids_string[] which is set from
      dmi_present() used for DMI debug message.  It is superset of the
      information x86 show_regs() is using.  The function is called from x86
      and ia64 boot code right after dmi_scan_machine().
      
      This makes the explicit DMI handling in warn_slowpath_common()
      unnecessary.  Removed.
      
      show_regs() isn't yet converted to use generic debug information
      printing and this patch doesn't remove the duplicate DMI handling in
      x86 show_regs().  The next patch will unify show_regs() handling and
      remove the duplication.
      
      An example WARN dump follows.
      
       WARNING: at kernel/workqueue.c:4841 init_workqueues+0x35/0x505()
       Modules linked in:
       CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.9.0-rc1-work+ #3
       Hardware name: empty empty/S3992, BIOS 080011  10/26/2007
        0000000000000009 ffff88007c861e08 ffffffff81c614dc ffff88007c861e48
        ffffffff8108f500 ffffffff82228240 0000000000000040 ffffffff8234a08e
        0000000000000000 0000000000000000 0000000000000000 ffff88007c861e58
       Call Trace:
        [<ffffffff81c614dc>] dump_stack+0x19/0x1b
        [<ffffffff8108f500>] warn_slowpath_common+0x70/0xa0
        [<ffffffff8108f54a>] warn_slowpath_null+0x1a/0x20
        [<ffffffff8234a0c3>] init_workqueues+0x35/0x505
        ...
      
      v2: Use the same string as the debug message from dmi_present() which
          also contains BIOS information.  Move hardware name into its own
          line as warn_slowpath_common() did.  This change was suggested by
          Bjorn Helgaas.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Fengguang Wu <fengguang.wu@intel.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Jesper Nilsson <jesper.nilsson@axis.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Mike Frysinger <vapier@gentoo.org>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      98e5e1bf
    • T
      dmi: morph dmi_dump_ids() into dmi_format_ids() which formats into a buffer · c90fe6bc
      Tejun Heo 提交于
      We're goning to use DMI identification for other purposes too.  Morph
      dmi_dump_ids() which is used to print DMI identification as a debug
      message during boot into dmi_format_ids() which formats the same
      information sans the leading "DMI:" tag into a string buffer.
      
      dmi_present() is updated to format the information into dmi_ids_string[]
      using the new function and print it with "DMI:" prefix.
      
      dmi_ids_string[] will be used for another purpose by a future patch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Fengguang Wu <fengguang.wu@intel.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Jesper Nilsson <jesper.nilsson@axis.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Mike Frysinger <vapier@gentoo.org>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c90fe6bc
  6. 09 3月, 2013 1 次提交
  7. 31 1月, 2013 1 次提交
    • M
      efi: Make 'efi_enabled' a function to query EFI facilities · 83e68189
      Matt Fleming 提交于
      Originally 'efi_enabled' indicated whether a kernel was booted from
      EFI firmware. Over time its semantics have changed, and it now
      indicates whether or not we are booted on an EFI machine with
      bit-native firmware, e.g. 64-bit kernel with 64-bit firmware.
      
      The immediate motivation for this patch is the bug report at,
      
          https://bugs.launchpad.net/ubuntu-cdimage/+bug/1040557
      
      which details how running a platform driver on an EFI machine that is
      designed to run under BIOS can cause the machine to become
      bricked. Also, the following report,
      
          https://bugzilla.kernel.org/show_bug.cgi?id=47121
      
      details how running said driver can also cause Machine Check
      Exceptions. Drivers need a new means of detecting whether they're
      running on an EFI machine, as sadly the expression,
      
          if (!efi_enabled)
      
      hasn't been a sufficient condition for quite some time.
      
      Users actually want to query 'efi_enabled' for different reasons -
      what they really want access to is the list of available EFI
      facilities.
      
      For instance, the x86 reboot code needs to know whether it can invoke
      the ResetSystem() function provided by the EFI runtime services, while
      the ACPI OSL code wants to know whether the EFI config tables were
      mapped successfully. There are also checks in some of the platform
      driver code to simply see if they're running on an EFI machine (which
      would make it a bad idea to do BIOS-y things).
      
      This patch is a prereq for the samsung-laptop fix patch.
      
      Cc: David Airlie <airlied@linux.ie>
      Cc: Corentin Chary <corentincj@iksaif.net>
      Cc: Matthew Garrett <mjg59@srcf.ucam.org>
      Cc: Dave Jiang <dave.jiang@intel.com>
      Cc: Olof Johansson <olof@lixom.net>
      Cc: Peter Jones <pjones@redhat.com>
      Cc: Colin Ian King <colin.king@canonical.com>
      Cc: Steve Langasek <steve.langasek@canonical.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Konrad Rzeszutek Wilk <konrad@kernel.org>
      Cc: Rafael J. Wysocki <rjw@sisk.pl>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      83e68189
  8. 21 12月, 2012 2 次提交
  9. 25 7月, 2012 1 次提交
  10. 16 11月, 2011 1 次提交
    • J
      drivers/firmware/dmi_scan.c: make dmi_name_in_vendors more focused · 66e13e66
      Jean Delvare 提交于
      The current implementation of dmi_name_in_vendors() is an invitation to
      lazy coding and false positives [1].  Searching for a string in 8 know
      what you're looking for, so you should know where to look.  strstr isn't
      fast, especially when it fails, so we should avoid calling it when it
      just can't succeed.
      
      Looking at the current users of the function, it seems clear to me that
      they are looking for a system or board vendor name, so let's limit
      dmi_name_in_vendors to these two DMI fields.  This much better matches
      the function name, BTW.
      
      [1] We currently have code looking for short names in DMI data, such as
      "IBM", "ASUS" or "Acer".  I let you guess what will happen the day other
      vendors ship products named, for example, "SCHREIBMEISTER", "PEGASUS" or
      "Acerola".
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      66e13e66
  11. 15 2月, 2011 1 次提交
    • N
      x86, dmi, debug: Log board name (when present) in dmesg/oops output · 84e383b3
      Naga Chumbalkar 提交于
      The "Type 2" SMBIOS record that contains Board Name is not
      strictly required and may be absent in the SMBIOS on some
      platforms.
      
      ( Please note that Type 2 is not listed in Table 3 in Sec 6.2
        ("Required Structures and Data") of the SMBIOS v2.7
        Specification. )
      
      Use the Manufacturer Name (aka System Vendor) name.
      Print Board Name only when it is present.
      
      Before the fix:
        (i) dmesg output: DMI: /ProLiant DL380 G6, BIOS P62 01/29/2011
       (ii) oops output:  Pid: 2170, comm: bash Not tainted 2.6.38-rc4+ #3 /ProLiant DL380 G6
      
      After the fix:
        (i) dmesg output: DMI: HP ProLiant DL380 G6, BIOS P62 01/29/2011
       (ii) oops output:  Pid: 2278, comm: bash Not tainted 2.6.38-rc4+ #4 HP ProLiant DL380 G6
      Signed-off-by: NNaga Chumbalkar <nagananda.chumbalkar@hp.com>
      Reviewed-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Cc: <stable@kernel.org> # .3x - good for debugging, please apply as far back as it applies cleanly
      LKML-Reference: <20110214224423.2182.13929.sendpatchset@nchumbalkar.americas.hpqcorp.net>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      84e383b3
  12. 28 10月, 2010 1 次提交
  13. 31 7月, 2010 1 次提交
  14. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  15. 16 12月, 2009 1 次提交
  16. 05 12月, 2009 1 次提交
  17. 09 9月, 2009 2 次提交
    • T
      dmi: extend dmi_get_year() to dmi_get_date() · 3e5cd1f2
      Tejun Heo 提交于
      There are cases where full date information is required instead of
      just the year.  Add month and day parsing to dmi_get_year() and rename
      it to dmi_get_date().
      
      As the original function only required '/' followed by any number of
      parseable characters at the end of the string, keep that behavior to
      avoid upsetting existing users.
      
      The new function takes dates of format [mm[/dd]]/yy[yy].  Year, month
      and date are checked to be in the ranges of [1-9999], [1-12] and
      [1-31] respectively and any invalid or out-of-range component is
      returned as zero.
      
      The dummy implementation is updated accordingly but the return value
      is updated to indicate field not found which is consistent with how
      other dummy functions behave.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      3e5cd1f2
    • T
      dmi: fix date handling in dmi_get_year() · 02c24fa8
      Tejun Heo 提交于
      Year parsing in dmi_get_year() had the following two bugs.
      
      * "00" is treated as invalid instead of 2000 because zero return from
        simple_strtoul() is treated as error.
      
      * "0N" where N >= 8 is treated as invalid of 200N because the leading
        0 is considered to specify octal.
      
      Fix the above two bugs by using endptr to detect invalid number and
      forcing decimal.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      02c24fa8
  18. 10 6月, 2009 1 次提交
    • S
      [libata] ahci: Restore SB600 SATA controller 64 bit DMA · 58a09b38
      Shane Huang 提交于
      Community reported one SB600 SATA issue(BZ #9412), which led to 64 bit
      DMA disablement for all SB600 revisions by driver maintainers with
      commits c7a42156 and
      4cde32fc.
      
      But the root cause is ASUS M2A-VM system BIOS bug in old revisions
      like 0901, while forcing into 32bit DMA happens to work as workaround.
      Now it's time to withdraw 4cde32fc
      so as to restore the SB600 SATA 64bit DMA capability.
      This patch is also adding the workaround for M2A-VM old BIOS revisions,
      but users are suggested to upgrade their system BIOS to the latest one
      if they meet this issue.
      Signed-off-by: NShane Huang <shane.huang@amd.com>
      Cc: Tejun Heo <tj@kernel.org>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      58a09b38
  19. 31 3月, 2009 1 次提交
    • J
      dmi: Let dmi_walk() users pass private data · e7a19c56
      Jean Delvare 提交于
      At the moment, dmi_walk() lacks flexibility, users can't pass data to
      the callback function. Add a pointer for private data to make this
      function more flexible.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Cc: Matthew Garrett <mjg@redhat.com>
      Cc: Roland Dreier <rolandd@cisco.com>
      e7a19c56
  20. 27 1月, 2009 1 次提交
    • R
      DMI: Introduce dmi_first_match to make the interface more flexible · d7b1956f
      Rafael J. Wysocki 提交于
      Some notebooks from HP have the problem that their BIOSes attempt to
      spin down hard drives before entering ACPI system states S4 and S5.
      This leads to a yo-yo effect during system power-off shutdown and the
      last phase of hibernation when the disk is first spun down by the
      kernel and then almost immediately turned on and off by the BIOS.
      This, in turn, may result in shortening the disk's life times.
      
      To prevent this from happening we can blacklist the affected systems
      using DMI information.  However, only the on-board controlles should
      be blacklisted and their PCI slot numbers can be used for this
      purpose.  Unfortunately the existing interface for checking DMI
      information of the system is not very convenient for this purpose,
      because to use it, we would have to define special callback functions
      or create a separate struct dmi_system_id table for each blacklisted
      system.
      
      To overcome this difficulty introduce a new function
      dmi_first_match() returning a pointer to the first entry in an array
      of struct dmi_system_id elements that matches the system DMI
      information.  Then, we can use this pointer to access the entry's
      .driver_data field containing the additional information, such as
      the PCI slot number, allowing us to do the desired blacklisting.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      d7b1956f
  21. 07 1月, 2009 1 次提交
  22. 29 12月, 2008 1 次提交
  23. 08 11月, 2008 1 次提交
  24. 05 11月, 2008 1 次提交
    • A
      x86: vmware: look for DMI string in the product serial key · fd8cd7e1
      Alok Kataria 提交于
      Impact: Should permit VMware detection on older platforms where the
      vendor is changed.  Could theoretically cause a regression if some
      weird serial number scheme contains the string "VMware" by pure
      chance.  Seems unlikely, especially with the mixed case.
      
      In some user configured cases, VMware may choose not to put a VMware specific
      DMI string, but the product serial key is always there and is VMware specific.
      Add a interface to check the serial key, when checking for VMware in the DMI
      information.
      Signed-off-by: NAlok N Kataria <akataria@vmware.com>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      fd8cd7e1
  25. 18 9月, 2008 1 次提交
  26. 25 5月, 2008 1 次提交
  27. 05 4月, 2008 1 次提交
    • C
      ipmi: change device node ordering to reflect probe order · abd24df8
      Carol Hebert 提交于
      In 2.6.14 a patch was merged which switching the order of the ipmi device
      naming from in-order-of-discovery over to reverse-order-of-discovery.
      
      So on systems with multiple BMC interfaces, the ipmi device names are being
      created in reverse order relative to how they are discovered on the system
      (e.g.  on an IBM x3950 multinode server with N nodes, the device name for the
      BMC in the first node is /dev/ipmiN-1 and the device name for the BMC in the
      last node is /dev/ipmi0, etc.).
      
      The problem is caused by the list handling routines chosen in dmi_scan.c.
      Using list_add() causes the multiple ipmi devices to be added to the device
      list using a stack-paradigm and so the ipmi driver subsequently pulls them off
      during initialization in LIFO order.  This patch changes the
      dmi_save_ipmi_device() list handling paradigm to a queue, thereby allowing the
      ipmi driver to build the ipmi device names in the order in which they are
      found on the system.
      Signed-off-by: NCarol Hebert <cah@us.ibm.com>
      Signed-off-by: NCorey Minyard <cminyard@mvista.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      abd24df8
  28. 24 2月, 2008 2 次提交
  29. 09 2月, 2008 1 次提交
  30. 08 2月, 2008 1 次提交
  31. 04 2月, 2008 1 次提交
  32. 30 1月, 2008 1 次提交