1. 15 9月, 2009 1 次提交
  2. 14 9月, 2009 2 次提交
  3. 10 9月, 2009 4 次提交
  4. 08 8月, 2009 2 次提交
    • K
      PCI hotplug: SGI hotplug: do not use hotplug_slot_attr · 94f81a47
      Kenji Kaneshige 提交于
      By the pci slot changes, callbacks of attributes under slot directory
      (/sys/bus/pci/slots) had been changed to get the pointer to struct
      pci_slot instead of struct hotplug_slot. So the path_show() that
      assumes the parameter is a pointer to struct hotplug_slot seems
      broken.
      Tested-by: NMike Habeck <habeck@sgi.com>
      Signed-off-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      94f81a47
    • K
      PCI hotplug: SGI hotplug: fix build failure · d25f1438
      Kenji Kaneshige 提交于
      The commit bd3d99c1 ("PCI: Remove
      untested Electromechanical Interlock (EMI) support in pciehp."), which
      removes the definition of "struct hotplug_slot_attr", broke SGI
      hotplug driver. By this commit, we get the following compile error.
      
      drivers/pci/hotplug/sgi_hotplug.c:106: error: variable 'sn_slot_path_attr' has initializer but incomplete type
      drivers/pci/hotplug/sgi_hotplug.c:106: error: unknown field 'attr' specified in initializer
      drivers/pci/hotplug/sgi_hotplug.c:106: error: extra brace group at end of initializer
      drivers/pci/hotplug/sgi_hotplug.c:106: error: (near initialization for 'sn_slot_path_attr')
      drivers/pci/hotplug/sgi_hotplug.c:106: warning: excess elements in struct initializer
      drivers/pci/hotplug/sgi_hotplug.c:106: warning: (near initialization for 'sn_slot_path_attr')
      drivers/pci/hotplug/sgi_hotplug.c:106: error: unknown field 'show' specified in initializer
      drivers/pci/hotplug/sgi_hotplug.c:106: warning: excess elements in struct initializer
      drivers/pci/hotplug/sgi_hotplug.c:106: warning: (near initialization for 'sn_slot_path_attr')
      drivers/pci/hotplug/sgi_hotplug.c: In function 'sn_hp_destroy':
      drivers/pci/hotplug/sgi_hotplug.c:203: error: invalid use of undefined type 'struct hotplug_slot_attribute'
      drivers/pci/hotplug/sgi_hotplug.c: In function 'sn_hotplug_slot_register':
      drivers/pci/hotplug/sgi_hotplug.c:655: error: invalid use of undefined type 'struct hotplug_slot_attribute'
      
      This patch fixes this regression by adding the definition of struct
      hotplug_slot_attr into sgi_hotplug.c.
      Tested-by: NMike Habeck <habeck@sgi.com>
      Signed-off-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      d25f1438
  5. 13 7月, 2009 1 次提交
  6. 30 6月, 2009 1 次提交
  7. 19 6月, 2009 1 次提交
  8. 18 6月, 2009 2 次提交
  9. 17 6月, 2009 4 次提交
  10. 13 6月, 2009 1 次提交
  11. 12 6月, 2009 15 次提交
  12. 27 5月, 2009 1 次提交
    • A
      PCI Hotplug: acpiphp: don't store a pci_dev in acpiphp_func · 9d911d79
      Alex Chiang 提交于
      An oops can occur if a user attempts to use both PCI logical
      hotplug and the ACPI physical hotplug driver (acpiphp) in this
      sequence, where $slot/address == $device.
      
      In other words, if acpiphp has claimed a PCI device, and that
      device is logically removed, then acpiphp may oops when it
      attempts to access it again.
      
      	# echo 1 > /sys/bus/pci/devices/$device/remove
      	# echo 0 > /sys/bus/pci/slots/$slot/power
      
      Unable to handle kernel NULL pointer dereference (address 0000000000000000)
      Call Trace:
       [<a000000100016390>] show_stack+0x50/0xa0
       [<a000000100016c60>] show_regs+0x820/0x860
       [<a00000010003b390>] die+0x190/0x2a0
       [<a000000100066a40>] ia64_do_page_fault+0x8e0/0xa40
       [<a00000010000c7a0>] ia64_native_leave_kernel+0x0/0x270
       [<a0000001003b2660>] pci_remove_bus_device+0x120/0x260
       [<a0000002060549f0>] acpiphp_disable_slot+0x410/0x540 [acpiphp]
       [<a0000002060505c0>] disable_slot+0xc0/0x120 [acpiphp]
       [<a0000002040d21c0>] power_write_file+0x1e0/0x2a0 [pci_hotplug]
       [<a0000001003bb820>] pci_slot_attr_store+0x60/0xa0
       [<a000000100240f70>] sysfs_write_file+0x230/0x2c0
       [<a000000100195750>] vfs_write+0x190/0x2e0
       [<a0000001001961a0>] sys_write+0x80/0x100
       [<a00000010000c600>] ia64_ret_from_syscall+0x0/0x20
       [<a000000000010720>] __kernel_syscall_via_break+0x0/0x20
      
      The root cause of this oops is that the logical remove ("echo 1 >
      /sys/bus/pci/devices/$device/remove") destroyed the pci_dev. The
      pci_dev struct itself wasn't deallocated because acpiphp kept a
      reference, but some of its fields became invalid.
      
      acpiphp doesn't have any real reason to keep a pointer to a
      pci_dev around. It can always derive it using pci_get_slot().
      
      If a logical remove destroys the pci_dev, acpiphp won't find it
      and is thus prevented from causing mischief.
      Reviewed-by: NMatthew Wilcox <willy@linux.intel.com>
      Reviewed-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Tested-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Reported-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Acked-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Signed-off-by: NAlex Chiang <achiang@hp.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      9d911d79
  13. 18 5月, 2009 1 次提交
    • Y
      x86, apic: introduce io_apic_irq_attr · e5198075
      Yinghai Lu 提交于
      according to Ingo, io_apic irq-setup related functions have too many
      parameters with a repetitive signature.
      
      So reduce related funcs to get less params by passing a pointer
      to a newly defined io_apic_irq_attr structure.
      
      v2: io_apic_irq ==> irq_attr
          triggering ==> trigger
      
      v3: add set_io_apic_irq_attr
      
      [ Impact: cleanup ]
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Cc: Len Brown <lenb@kernel.org>
      LKML-Reference: <4A08ACD3.2070401@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      e5198075
  14. 12 5月, 2009 1 次提交
  15. 11 5月, 2009 1 次提交
  16. 07 4月, 2009 1 次提交
  17. 27 3月, 2009 1 次提交