1. 17 11月, 2010 4 次提交
    • J
      SCSI host lock push-down · f281233d
      Jeff Garzik 提交于
      Move the mid-layer's ->queuecommand() invocation from being locked
      with the host lock to being unlocked to facilitate speeding up the
      critical path for drivers who don't need this lock taken anyway.
      
      The patch below presents a simple SCSI host lock push-down as an
      equivalent transformation.  No locking or other behavior should change
      with this patch.  All existing bugs and locking orders are preserved.
      
      Additionally, add one parameter to queuecommand,
      	struct Scsi_Host *
      and remove one parameter from queuecommand,
      	void (*done)(struct scsi_cmnd *)
      
      Scsi_Host* is a convenient pointer that most host drivers need anyway,
      and 'done' is redundant to struct scsi_cmnd->scsi_done.
      
      Minimal code disturbance was attempted with this change.  Most drivers
      needed only two one-line modifications for their host lock push-down.
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      Acked-by: NJames Bottomley <James.Bottomley@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f281233d
    • L
      bdbd01ac
    • L
      Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6 · 2ebc8ec8
      Linus Torvalds 提交于
      * 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
        [S390] kprobes: Fix the return address of multiple kretprobes
        [S390] kprobes: disable interrupts throughout
        [S390] ftrace: build without frame pointers on s390
        [S390] mm: add devmem_is_allowed() for STRICT_DEVMEM checking
        [S390] vmlogrdr: purge after recording is switched off
        [S390] cio: fix incorrect ccw_device_init_count
        [S390] tape: add medium state notifications
        [S390] fix get_user_pages_fast
      2ebc8ec8
    • D
      PCI: fix offset check for sysfs mmapped files · 8c05cd08
      Darrick J. Wong 提交于
      I just loaded 2.6.37-rc2 on my machines, and I noticed that X no longer starts.
      Running an strace of the X server shows that it's doing this:
      
      open("/sys/bus/pci/devices/0000:07:00.0/resource0", O_RDWR) = 10
      mmap(NULL, 16777216, PROT_READ|PROT_WRITE, MAP_SHARED, 10, 0) = -1 EINVAL (Invalid argument)
      
      This code seems to be asking for a shared read/write mapping of 16MB worth of
      BAR0 starting at file offset 0, and letting the kernel assign a starting
      address.  Unfortunately, this -EINVAL causes X not to start.  Looking into
      dmesg, there's a complaint like so:
      
      process "Xorg" tried to map 0x01000000 bytes at page 0x00000000 on 0000:07:00.0 BAR 0 (start 0x        96000000, size 0x         1000000)
      
      ...with the following code in pci_mmap_fits:
      
      	pci_start = (mmap_api == PCI_MMAP_SYSFS) ?
      		pci_resource_start(pdev, resno) >> PAGE_SHIFT : 0;
              if (start >= pci_start && start < pci_start + size &&
                              start + nr <= pci_start + size)
      
      It looks like the logic here is set up such that when the mmap call comes via
      sysfs, the check in pci_mmap_fits wants vma->vm_pgoff to be between the
      resource's start and end address, and the end of the vma to be no farther than
      the end.  However, the sysfs PCI resource files always start at offset zero,
      which means that this test always fails for programs that mmap the sysfs files.
      Given the comment in the original commit
      3b519e4e, I _think_ the old procfs files
      require that the file offset be equal to the resource's base address when
      mmapping.
      
      I think what we want here is for pci_start to be 0 when mmap_api ==
      PCI_MMAP_PROCFS.  The following patch makes that change, after which the Matrox
      and Mach64 X drivers work again.
      Acked-by: NMartin Wilck <martin.wilck@ts.fujitsu.com>
      Signed-off-by: NDarrick J. Wong <djwong@us.ibm.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      8c05cd08
  2. 16 11月, 2010 28 次提交
  3. 15 11月, 2010 8 次提交