1. 19 5月, 2011 1 次提交
    • G
      drivercore: revert addition of of_match to struct device · b1608d69
      Grant Likely 提交于
      Commit b826291c, "drivercore/dt: add a match table pointer to struct
      device" added an of_match pointer to struct device to cache the
      of_match_table entry discovered at driver match time.  This was unsafe
      because matching is not an atomic operation with probing a driver.  If
      two or more drivers are attempted to be matched to a driver at the
      same time, then the cached matching entry pointer could get
      overwritten.
      
      This patch reverts the of_match cache pointer and reworks all users to
      call of_match_device() directly instead.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      b1608d69
  2. 31 3月, 2011 1 次提交
  3. 24 3月, 2011 1 次提交
  4. 11 3月, 2011 1 次提交
  5. 01 3月, 2011 1 次提交
  6. 11 2月, 2011 1 次提交
  7. 12 1月, 2011 1 次提交
  8. 04 1月, 2011 2 次提交
  9. 14 12月, 2010 1 次提交
    • Z
      IPMI: Add one interface to get more info of low-level IPMI device · 16f4232c
      Zhao Yakui 提交于
      The IPMI smi_watcher will be used to catch the IPMI interface as they
      come or go.  In order to communicate with the correct IPMI device, it
      should be confirmed whether it is what we wanted especially on the
      system with multiple IPMI devices. But the new_smi callback function
      of smi_watcher provides very limited info(only the interface number
      and dev pointer) and there is no detailed info about the low level
      interface. For example: which mechansim registers the IPMI
      interface(ACPI, PCI, DMI and so on).
      
      This is to add one interface that can get more info of low-level IPMI
      device. For example: the ACPI device handle will be returned for the
      pnp_acpi IPMI device.
      Signed-off-by: NZhao Yakui <yakui.zhao@intel.com>
      Signed-off-by: NCorey Minyard <cminyard@mvista.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      16f4232c
  10. 28 10月, 2010 1 次提交
  11. 27 10月, 2010 1 次提交
    • E
      ipmi: proper spinlock initialization · de5e2ddf
      Eric Dumazet 提交于
      Unloading ipmi module can trigger following error.  (if
      CONFIG_DEBUG_SPINLOCK=y)
      
      [ 9633.779590] BUG: spinlock bad magic on CPU#1, rmmod/7170
      [ 9633.779606]  lock: f41f5414, .magic: 00000000, .owner:
      <none>/-1, .owner_cpu: 0
      [ 9633.779626] Pid: 7170, comm: rmmod Not tainted
      2.6.36-rc7-11474-gb71eb1e-dirty #328
      [ 9633.779644] Call Trace:
      [ 9633.779657]  [<c13921cc>] ? printk+0x18/0x1c
      [ 9633.779672]  [<c11a1f33>] spin_bug+0xa3/0xf0
      [ 9633.779685]  [<c11a1ffd>] do_raw_spin_lock+0x7d/0x160
      [ 9633.779702]  [<c1131537>] ? release_sysfs_dirent+0x47/0xb0
      [ 9633.779718]  [<c1131b78>] ? sysfs_addrm_finish+0xa8/0xd0
      [ 9633.779734]  [<c1394bac>] _raw_spin_lock_irqsave+0xc/0x20
      [ 9633.779752]  [<f99d93da>] cleanup_one_si+0x6a/0x200 [ipmi_si]
      [ 9633.779768]  [<c11305b2>] ? sysfs_hash_and_remove+0x72/0x80
      [ 9633.779786]  [<f99dcf26>] ipmi_pnp_remove+0xd/0xf [ipmi_si]
      [ 9633.779802]  [<c11f622b>] pnp_device_remove+0x1b/0x40
      
      Fix this by initializing spinlocks in a smi_info_alloc() helper function,
      right after memory allocation and clearing.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Acked-by: NDavid Miller <davem@davemloft.net>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Acked-by: NCorey Minyard <cminyard@mvista.com>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      de5e2ddf
  12. 18 10月, 2010 1 次提交
  13. 23 9月, 2010 2 次提交
    • Y
      ipmi: fix hardcoded ipmi device exit path warning · 561f8182
      Yinghai Lu 提交于
      When modprobe.conf has
      options ipmi_si type="kcs" ports=0xCA2 regspacings="4"
      
      ipmi_si can be loaded properly, but when try to unload it get:
      
      Sep 20 15:00:27 xx abrt: Kerneloops: Reported 1 kernel oopses to Abrt
      Sep 20 15:00:27 xx abrtd: Directory 'kerneloops-1285020027-1' creation detected
      Sep 20 15:00:27 xx abrtd: New crash /var/spool/abrt/kerneloops-1285020027-1, processing
      Sep 20 15:01:09 xx kernel: ------------[ cut here ]------------
      Sep 20 15:01:09 xx kernel: WARNING: at drivers/base/driver.c:262 driver_unregister+0x8a/0xa0()
      Sep 20 15:01:09 xx kernel: Hardware name: Sun Fire x4800
      Sep 20 15:01:09 xx kernel: Unexpected driver unregister!
      Sep 20 15:01:09 xx kernel: Modules linked in: ipmi_si(-) ipmi_msghandler ip6table_filter ip6_tables ebtable_nat ebtables ipt_MASQUERADE iptable_nat nf_nat bridge stp llc autofs4 sunrpc cpufreq_ondemand acpi_cpufreq freq_table mperf xt_physdev be2iscsi iscsi_boot_sysfs bnx2i cnic uio cxgb3i iw_cxgb3 cxgb3 mdio ib_iser rdma_cm ib_cm iw_cm ib_sa ib_mad ib_core ib_addr ipv6 iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi dm_mirror dm_region_hash dm_log dm_mod vhost_net macvtap macvlan tun kvm_intel kvm uinput sg ses enclosure ahci libahci pcspkr i2c_i801 i2c_core iTCO_wdt iTCO_vendor_support igb dca i7core_edac edac_core ext3 jbd mbcache sd_mod crc_t10dif megaraid_sas [last unloaded: ipmi_devintf]
      Sep 20 15:01:09 xx kernel: Pid: 10625, comm: modprobe Tainted: G        W   2.6.36-rc5-tip+ #6
      Sep 20 15:01:09 xx kernel: Call Trace:
      Sep 20 15:01:09 xx kernel: [<ffffffff810600df>] warn_slowpath_common+0x7f/0xc0
      Sep 20 15:01:09 xx kernel: [<ffffffff810601d6>] warn_slowpath_fmt+0x46/0x50
      Sep 20 15:01:09 xx kernel: [<ffffffff812ff60a>] driver_unregister+0x8a/0xa0
      Sep 20 15:01:09 xx kernel: [<ffffffff812ae112>] pnp_unregister_driver+0x12/0x20
      Sep 20 15:01:09 xx kernel: [<ffffffffa01d0327>] cleanup_ipmi_si+0x3c/0xa7 [ipmi_si]
      Sep 20 15:01:09 xx kernel: [<ffffffff81099a60>] sys_delete_module+0x1a0/0x270
      Sep 20 15:01:09 xx kernel: [<ffffffff814b7070>] ? do_page_fault+0x150/0x320
      Sep 20 15:01:09 xx kernel: [<ffffffff8100b072>] system_call_fastpath+0x16/0x1b
      Sep 20 15:01:09 xx kernel: ---[ end trace 0d1967161adcee0d ]---
      
      We need to check if ipmi_pnp_driver is loaded before we try to unload it.
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Cc: Corey Minyard <minyard@acm.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      561f8182
    • Y
      ipmi: fix acpi probe print · a9e31765
      Yinghai Lu 提交于
      After d9e1b6c4 ("ipmi: fix ACPI detection with regspacing") we get
      
      [   11.026326] ipmi_si: probing via ACPI
      [   11.030019] ipmi_si 00:09: (null) regsize 1 spacing 1 irq 0
      [   11.035594] ipmi_si: Adding ACPI-specified kcs state machine
      
      on an old system with only one range for ipmi kcs range.
      
      Try to fix it by adding another res pointer.
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      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>
      a9e31765
  14. 11 8月, 2010 3 次提交
  15. 10 8月, 2010 1 次提交
    • Y
      ipmi: fix ACPI detection with regspacing · d9e1b6c4
      Yinghai Lu 提交于
      After the commit that changed ipmi_si detecting sequence from SMBIOS/ACPI
      to ACPI/SMBIOS,
      
      | commit 754d4531
      | Author: Matthew Garrett <mjg@redhat.com>
      | Date:   Wed May 26 14:43:47 2010 -0700
      |
      |    ipmi: change device discovery order
      |
      |    The ipmi spec provides an ordering for si discovery.  Change the driver to
      |    match, with the exception of preferring smbios to SPMI as HPs (at least)
      |    contain accurate information in the former but not the latter.
      
      ipmi_si can not be initialized.
      
      [  138.799739] calling  init_ipmi_devintf+0x0/0x109 @ 1
      [  138.805050] ipmi device interface
      [  138.818131] initcall init_ipmi_devintf+0x0/0x109 returned 0 after 12797 usecs
      [  138.822998] calling  init_ipmi_si+0x0/0xa90 @ 1
      [  138.840276] IPMI System Interface driver.
      [  138.846137] ipmi_si: probing via ACPI
      [  138.849225] ipmi_si 00:09: [io  0x0ca2] regsize 1 spacing 1 irq 0
      [  138.864438] ipmi_si: Adding ACPI-specified kcs state machine
      [  138.870893] ipmi_si: probing via SMBIOS
      [  138.880945] ipmi_si: Adding SMBIOS-specified kcs state machineipmi_si: duplicate interface
      [  138.896511] ipmi_si: probing via SPMI
      [  138.899861] ipmi_si: Adding SPMI-specified kcs state machineipmi_si: duplicate interface
      [  138.917095] ipmi_si: Trying ACPI-specified kcs state machine at i/o address 0xca2, slave address 0x0, irq 0
      [  138.928658] ipmi_si: Interface detection failed
      [  138.953411] initcall init_ipmi_si+0x0/0xa90 returned 0 after 110847 usecs
      
      in smbios has
      DMI/SMBIOS
      Handle 0x00C5, DMI type 38, 18 bytes
      IPMI Device Information
              Interface Type: KCS (Keyboard Control Style)
              Specification Version: 2.0
              I2C Slave Address: 0x00
              NV Storage Device: Not Present
              Base Address: 0x0000000000000CA2 (I/O)
              Register Spacing: 32-bit Boundaries
      in DSDT has
                          Device (BMC)
                          {
      
                              Name (_HID, EisaId ("IPI0001"))
                              Method (_STA, 0, NotSerialized)
                              {
                                  If (LEqual (OSN, Zero))
                                  {
                                      Return (Zero)
                                  }
      
                                  Return (0x0F)
                              }
      
                              Name (_STR, Unicode ("IPMI_KCS"))
                              Name (_UID, Zero)
                              Name (_CRS, ResourceTemplate ()
                              {
                                  IO (Decode16,
                                      0x0CA2,             // Range Minimum
                                      0x0CA2,             // Range Maximum
                                      0x00,               // Alignment
                                      0x01,               // Length
                                      )
                                  IO (Decode16,
                                      0x0CA6,             // Range Minimum
                                      0x0CA6,             // Range Maximum
                                      0x00,               // Alignment
                                      0x01,               // Length
                                      )
                              })
                              Method (_IFT, 0, NotSerialized)
                              {
                                  Return (One)
                              }
      
                              Method (_SRV, 0, NotSerialized)
                              {
                                  Return (0x0200)
                              }
                          }
      
      so the reg spacing should be 4 instead of 1.
      
      Try to calculate regspacing for this kind of system.
      
      Observed on a Sun Fire X4800.  Other OSes work and pass certification.
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
      Acked-by: NMatthew Garrett <mjg@redhat.com>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Myron Stowe <myron.stowe@hp.com>
      Cc: Corey Minyard <minyard@acm.org>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d9e1b6c4
  16. 06 8月, 2010 1 次提交
  17. 30 6月, 2010 2 次提交
  18. 28 5月, 2010 10 次提交
  19. 22 5月, 2010 1 次提交
    • G
      of: Remove duplicate fields from of_platform_driver · 4018294b
      Grant Likely 提交于
      .name, .match_table and .owner are duplicated in both of_platform_driver
      and device_driver.  This patch is a removes the extra copies from struct
      of_platform_driver and converts all users to the device_driver members.
      
      This patch is a pretty mechanical change.  The usage model doesn't change
      and if any drivers have been missed, or if anything has been fixed up
      incorrectly, then it will fail with a compile time error, and the fixup
      will be trivial.  This patch looks big and scary because it touches so
      many files, but it should be pretty safe.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Acked-by: NSean MacLennan <smaclennan@pikatech.com>
      4018294b
  20. 19 5月, 2010 1 次提交
  21. 13 3月, 2010 2 次提交
  22. 30 12月, 2009 1 次提交
    • I
      ACPI: fix ACPI=n allmodconfig build · 27d0567a
      Ingo Molnar 提交于
      Today's -tip failed to build because commit
      9e368fa0 ("ipmi: add PNP discovery (ACPI
      namespace via PNPACPI)") from today's upstream kernel causes the following
      build failure on x86, for CONFIG_ACPI=n && CONFIG_IPMI_SI=y:
      
       drivers/char/ipmi/ipmi_si_intf.c:3208: error: 'ipmi_pnp_driver' undeclared (first use in this function)
       drivers/char/ipmi/ipmi_si_intf.c:3208: error: (Each undeclared identifier is reported only once
       drivers/char/ipmi/ipmi_si_intf.c:3208: error: for each function it appears in.)
       drivers/char/ipmi/ipmi_si_intf.c:3334: error: 'ipmi_pnp_driver' undeclared (first use in this function)
      
      The reason is that the ipmi_pnp_driver depends on ACPI facilities and is only
      made available under ACPI - while the registration and unregistration is made
      dependent on CONFIG_PNP:
      
       #ifdef CONFIG_PNP
       	pnp_register_driver(&ipmi_pnp_driver);
       #endif
      
      The solution is to only register this driver under ACPI. (Also, the CONFIG_PNP
      dependency is not needed because pnp_register_driver() is stubbed out in the
      !CONFIG_PNP case.)
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Acked-by: NMyron Stowe <myron.stowe@hp.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      27d0567a
  23. 16 12月, 2009 3 次提交