1. 21 3月, 2009 7 次提交
    • M
      PCI MSI: Refactor interrupt masking code · f2440d9a
      Matthew Wilcox 提交于
      Since most of the callers already know whether they have an MSI or
      an MSI-X capability, split msi_set_mask_bits() into msi_mask_irq()
      and msix_mask_irq().  The only callers which don't (mask_msi_irq()
      and unmask_msi_irq()) can share code in msi_set_mask_bit().  This then
      becomes the only caller of msix_flush_writes(), so we can inline it.
      The flushing read can be to any address that belongs to the device,
      so we can eliminate the calculation too.
      
      We can also get rid of maskbits_mask from struct msi_desc and simply
      recalculate it on the rare occasion that we need it.  The single-bit
      'masked' element is replaced by a copy of the 32-bit 'masked' register,
      so this patch does not affect the size of msi_desc.
      Signed-off-by: NMatthew Wilcox <willy@linux.intel.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      f2440d9a
    • M
      PCI MSI: Use mask_pos instead of mask_base when appropriate · 264d9caa
      Matthew Wilcox 提交于
      MSI interrupts have a mask_pos where MSI-X have a mask_base.  Use a
      transparent union to get rid of some ugly casts.
      Signed-off-by: NMatthew Wilcox <willy@linux.intel.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      264d9caa
    • M
      PCI MSI: Replace 'type' with 'is_msix' · 24d27553
      Matthew Wilcox 提交于
      By changing from a 5-bit field to a 1-bit field, we free up some bits
      that can be used by a later patch.  Also rearrange the fields for better
      packing on 64-bit platforms (reducing the size of msi_desc from 72 bytes
      to 64 bytes).
      Signed-off-by: NMatthew Wilcox <willy@linux.intel.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      24d27553
    • Y
      PCI: fix incorrect mask of PM No_Soft_Reset bit · 998dd7c7
      Yu Zhao 提交于
      Reviewed-by: NMatthew Wilcox <matthew@wil.cx>
      Signed-off-by: NYu Zhao <yu.zhao@intel.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      998dd7c7
    • K
      PCI/ACPI: fix wrong assumption in acpi_find_root_bridge_handle · d18690af
      Kenji Kaneshige 提交于
      Current acpi_find_root_bridge_handle() has a assumption that
      pci_bus->self is NULL on the root pci bus. But it might not be true on
      some platforms. Because of this wrong assumption, current
      acpi_find_root_bridge_handle() might cause endless loop. We must check
      pci_bus->parent instead.
      Signed-off-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      d18690af
    • K
      PCI/ACPI: fix wrong assumption in acpi_pci_get_bridge_handle · 0747aaf4
      Kenji Kaneshige 提交于
      Current acpi_pci_get_bridge_handle() has an assumption that
      pci_bus->self is NULL on the root pci bus. But it might not true on
      some platforms. Because of this wrong assumption, current
      acpi_pci_get_bridge_handle() might return improper ACPI handle. We
      must check pci_bus->parent instead.
      
      This bug is the root cause of the following kernel panic reported by
      James Bottomley. This problem was introduced by the commit
      e8c331e9. The immediate cause was
      acpi_pci_get_bridge_handle() returned NULL unexpectedly and it was
      passed as the second argument of acpi_walk_namespace().
      
      pci_hotplug: PCI Hot Plug PCI Core version: 0.5
      acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
      BUG: unable to handle kernel NULL pointer dereference at 0000000000000010
      IP: [<ffffffff8039646f>] acpi_ns_get_next_node+0xb/0x3c
      PGD 0
      Oops: 0000 [#1] SMP
      last sysfs file:
      CPU 0
      Modules linked in:
      Pid: 1, comm: swapper Not tainted 2.6.28 #1
      RIP: 0010:[<ffffffff8039646f>]  [<ffffffff8039646f>] acpi_ns_get_next_node+0xb/0x3c
      RSP: 0018:ffff88007f87fd30  EFLAGS: 00010246
      RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
      RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
      RBP: 0000000000000000 R08: ffffffff8037d260 R09: ffff88007f87fdfc
      R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000001
      R13: 0000000000000000 R14: 0000000000000001 R15: 0000000000000000
      FS:  0000000000000000(0000) GS:ffffffff80742040(0000) knlGS:0000000000000000
      CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
      CR2: 0000000000000010 CR3: 0000000000201000 CR4: 00000000000006a0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      Process swapper (pid: 1, threadinfo ffff88007f87e000, task ffff88007f875040)
      Stack:
       0000000000000000 ffffffff803964f5 ffff88007f81b728 0000000000001001
       ffff88007f87fdfc ffffffff8037d260 0000000600000001 0000000000000000
       ffffffff8037d260 0000000000000000 0000000000000001 ffff88007f87fdfc
      Call Trace:
       [<ffffffff803964f5>] acpi_ns_walk_namespace+0x55/0x138
       [<ffffffff8037d260>] is_pci_dock_device+0x0/0x20
       [<ffffffff8037d260>] is_pci_dock_device+0x0/0x20
       [<ffffffff80394a9e>] acpi_walk_namespace+0x5f/0x83
       [<ffffffff8037dd33>] detect_ejectable_slots+0x53/0x70
       [<ffffffff8037de38>] add_bridge+0xe8/0x200
       [<ffffffff80394aaa>] acpi_walk_namespace+0x6b/0x83
       [<ffffffff803a4ad1>] acpi_pci_register_driver+0x48/0x61
       [<ffffffff806fc5df>] acpiphp_init+0x0/0x58
       [<ffffffff806fc732>] acpiphp_glue_init+0x4c/0x5a
       [<ffffffff806fc616>] acpiphp_init+0x37/0x58
       [<ffffffff8020903b>] _stext+0x3b/0x180
       [<ffffffff80312598>] create_proc_entry+0x58/0xa0
       [<ffffffff802815d1>] register_irq_proc+0xc1/0xe0
       [<ffffffff806db64b>] kernel_init+0x152/0x1ac
       [<ffffffff8023d970>] finish_task_switch+0x0/0x110
       [<ffffffff8020ca7a>] child_rip+0xa/0x20
       [<ffffffff8020c47c>] restore_args+0x0/0x30
       [<ffffffff806db4f9>] kernel_init+0x0/0x1ac
       [<ffffffff8020ca70>] child_rip+0x0/0x20
      Code: 89 c2 48 8b 00 48 85 c0 75 f5 48 8b 45 00 48 89 02 44 88 65 09 48 89 5d 00 31 c0 5b 5d 41 5c c3 53 48 85 d2 89 fb 48 89 d7 75 06 <48> 8b 56 10 eb 08 e8 73 f1 ff ff 48 89 c2 85 db 74 1a eb 13 0f
      RIP  [<ffffffff8039646f>] acpi_ns_get_next_node+0xb/0x3c
       RSP <ffff88007f87fd30>
      CR2: 0000000000000010
      ---[ end trace a7919e7f17c0a725 ]---
      Signed-off-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      0747aaf4
    • R
      PCI: PCIe portdrv: Implement pm object · 3a3c244c
      Rafael J. Wysocki 提交于
      Implement pm object for the PCI Express port driver in order to use
      the new power management framework and reduce the code size.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      3a3c244c
  2. 20 3月, 2009 10 次提交
  3. 18 3月, 2009 1 次提交
  4. 15 3月, 2009 1 次提交
  5. 14 3月, 2009 1 次提交
  6. 13 3月, 2009 1 次提交
  7. 12 3月, 2009 2 次提交
  8. 11 3月, 2009 2 次提交
  9. 10 3月, 2009 1 次提交
    • D
      Revert "[CPUFREQ] Disable sysfs ui for p4-clockmod." · 129f8ae9
      Dave Jones 提交于
      This reverts commit e088e4c9.
      
      Removing the sysfs interface for p4-clockmod was flagged as a
      regression in bug 12826.
      
      Course of action:
       - Find out the remaining causes of overheating, and fix them
         if possible. ACPI should be doing the right thing automatically.
         If it isn't, we need to fix that.
       - mark p4-clockmod ui as deprecated
       - try again with the removal in six months.
      
      It's not really feasible to printk about the deprecation, because
      it needs to happen at all the sysfs entry points, which means adding
      a lot of strcmp("p4-clockmod".. calls to the core, which.. bleuch.
      Signed-off-by: NDave Jones <davej@redhat.com>
      129f8ae9
  10. 08 3月, 2009 1 次提交
  11. 06 3月, 2009 1 次提交
  12. 05 3月, 2009 6 次提交
  13. 02 3月, 2009 1 次提交
  14. 01 3月, 2009 2 次提交
  15. 28 2月, 2009 1 次提交
  16. 27 2月, 2009 1 次提交
  17. 26 2月, 2009 1 次提交
    • J
      block: reduce stack footprint of blk_recount_segments() · 1e428079
      Jens Axboe 提交于
      blk_recalc_rq_segments() requires a request structure passed in, which
      we don't have from blk_recount_segments(). So the latter allocates one on
      the stack, using > 400 bytes of stack for that. This can cause us to spill
      over one page of stack from ext4 at least:
      
       0)     4560     400   blk_recount_segments+0x43/0x62
       1)     4160      32   bio_phys_segments+0x1c/0x24
       2)     4128      32   blk_rq_bio_prep+0x2a/0xf9
       3)     4096      32   init_request_from_bio+0xf9/0xfe
       4)     4064     112   __make_request+0x33c/0x3f6
       5)     3952     144   generic_make_request+0x2d1/0x321
       6)     3808      64   submit_bio+0xb9/0xc3
       7)     3744      48   submit_bh+0xea/0x10e
       8)     3696     368   ext4_mb_init_cache+0x257/0xa6a [ext4]
       9)     3328     288   ext4_mb_regular_allocator+0x421/0xcd9 [ext4]
      10)     3040     160   ext4_mb_new_blocks+0x211/0x4b4 [ext4]
      11)     2880     336   ext4_ext_get_blocks+0xb61/0xd45 [ext4]
      12)     2544      96   ext4_get_blocks_wrap+0xf2/0x200 [ext4]
      13)     2448      80   ext4_da_get_block_write+0x6e/0x16b [ext4]
      14)     2368     352   mpage_da_map_blocks+0x7e/0x4b3 [ext4]
      15)     2016     352   ext4_da_writepages+0x2ce/0x43c [ext4]
      16)     1664      32   do_writepages+0x2d/0x3c
      17)     1632     144   __writeback_single_inode+0x162/0x2cd
      18)     1488      96   generic_sync_sb_inodes+0x1e3/0x32b
      19)     1392      16   sync_sb_inodes+0xe/0x10
      20)     1376      48   writeback_inodes+0x69/0xb3
      21)     1328     208   balance_dirty_pages_ratelimited_nr+0x187/0x2f9
      22)     1120     224   generic_file_buffered_write+0x1d4/0x2c4
      23)      896     176   __generic_file_aio_write_nolock+0x35f/0x393
      24)      720      80   generic_file_aio_write+0x6c/0xc8
      25)      640      80   ext4_file_write+0xa9/0x137 [ext4]
      26)      560     320   do_sync_write+0xf0/0x137
      27)      240      48   vfs_write+0xb3/0x13c
      28)      192      64   sys_write+0x4c/0x74
      29)      128     128   system_call_fastpath+0x16/0x1b
      
      Split the segment counting out into a __blk_recalc_rq_segments() helper
      to avoid allocating an onstack request just for checking the physical
      segment count.
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      1e428079